@cuemath/leap 3.5.29-as6 → 3.5.30-link.0

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 (228) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -21
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/images/images.js +0 -8
  4. package/dist/assets/images/images.js.map +1 -1
  5. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
  6. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
  7. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
  8. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
  9. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +91 -18
  10. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  11. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +58 -42
  12. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  13. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +32 -16
  14. package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +1 -1
  15. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +87 -88
  16. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
  17. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component-styled.js.map +1 -0
  18. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js +26 -0
  19. package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js.map +1 -0
  20. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +35 -35
  21. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  22. package/dist/features/homework/card-title.js +8 -8
  23. package/dist/features/homework/card-title.js.map +1 -1
  24. package/dist/features/milestone/constants.js +28 -15
  25. package/dist/features/milestone/constants.js.map +1 -1
  26. package/dist/features/milestone/create/milestone-create-helpers.js +43 -42
  27. package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
  28. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +5 -5
  29. package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -1
  30. package/dist/features/trial-session/comps/school-goals/school-goals.js +74 -65
  31. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  32. package/dist/features/trial-session/comps/worksheet/worksheet.js +20 -19
  33. package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
  34. package/dist/features/trial-session/helper.js +69 -66
  35. package/dist/features/trial-session/helper.js.map +1 -1
  36. package/dist/features/trial-session/hooks/use-slide-config-update.js +22 -17
  37. package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -1
  38. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +139 -128
  39. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  40. package/dist/features/trial-session/left-panel/index.js.map +1 -1
  41. package/dist/features/trial-session/trial-session-constants.js +8 -1
  42. package/dist/features/trial-session/trial-session-constants.js.map +1 -1
  43. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  44. package/dist/features/trial-session/trial-session.js +33 -32
  45. package/dist/features/trial-session/trial-session.js.map +1 -1
  46. package/dist/features/ui/animated-arc/animated-arc-styled.js +7 -7
  47. package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -1
  48. package/dist/features/ui/animated-arc/animated-arc.js +26 -37
  49. package/dist/features/ui/animated-arc/animated-arc.js.map +1 -1
  50. package/dist/features/ui/theme/text.js +0 -14
  51. package/dist/features/ui/theme/text.js.map +1 -1
  52. package/dist/index.d.ts +27 -230
  53. package/dist/index.js +568 -588
  54. package/dist/index.js.map +1 -1
  55. package/package.json +2 -3
  56. package/dist/assets/line-icons/icons/carat-right.js +0 -26
  57. package/dist/assets/line-icons/icons/carat-right.js.map +0 -1
  58. package/dist/assets/line-icons/icons/dots-icon.js +0 -21
  59. package/dist/assets/line-icons/icons/dots-icon.js.map +0 -1
  60. package/dist/assets/line-icons/icons/pause-icon.js +0 -24
  61. package/dist/assets/line-icons/icons/pause-icon.js.map +0 -1
  62. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js +0 -82
  63. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js.map +0 -1
  64. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.styled.js +0 -77
  65. package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.styled.js.map +0 -1
  66. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js +0 -13
  67. package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js.map +0 -1
  68. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js +0 -60
  69. package/dist/features/timeline/monthly-report/comps/achievements/achievements.js.map +0 -1
  70. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js +0 -15
  71. package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js.map +0 -1
  72. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js +0 -128
  73. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +0 -1
  74. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js +0 -53
  75. package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +0 -1
  76. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +0 -105
  77. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +0 -1
  78. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +0 -40
  79. package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +0 -1
  80. package/dist/features/timeline/monthly-report/comps/activities/activities.js +0 -27
  81. package/dist/features/timeline/monthly-report/comps/activities/activities.js.map +0 -1
  82. package/dist/features/timeline/monthly-report/comps/activities/constants.js +0 -94
  83. package/dist/features/timeline/monthly-report/comps/activities/constants.js.map +0 -1
  84. package/dist/features/timeline/monthly-report/comps/activities/utils.js +0 -15
  85. package/dist/features/timeline/monthly-report/comps/activities/utils.js.map +0 -1
  86. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js +0 -29
  87. package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js.map +0 -1
  88. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js +0 -95
  89. package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js.map +0 -1
  90. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js +0 -77
  91. package/dist/features/timeline/monthly-report/comps/attendance/attendance.js.map +0 -1
  92. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js +0 -39
  93. package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js.map +0 -1
  94. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js +0 -9
  95. package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js.map +0 -1
  96. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js +0 -94
  97. package/dist/features/timeline/monthly-report/comps/feedback/feedback.js.map +0 -1
  98. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js +0 -48
  99. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +0 -1
  100. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js +0 -28
  101. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +0 -1
  102. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js +0 -103
  103. package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +0 -1
  104. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js +0 -30
  105. package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js.map +0 -1
  106. package/dist/features/timeline/monthly-report/comps/goals/goals.js +0 -22
  107. package/dist/features/timeline/monthly-report/comps/goals/goals.js.map +0 -1
  108. package/dist/features/timeline/monthly-report/monthly-report-styled.js +0 -14
  109. package/dist/features/timeline/monthly-report/monthly-report-styled.js.map +0 -1
  110. package/dist/features/timeline/monthly-report/monthly-report-types.js +0 -5
  111. package/dist/features/timeline/monthly-report/monthly-report-types.js.map +0 -1
  112. package/dist/features/timeline/monthly-report/monthly-report.js +0 -70
  113. package/dist/features/timeline/monthly-report/monthly-report.js.map +0 -1
  114. package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +0 -10
  115. package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +0 -1
  116. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +0 -74
  117. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +0 -1
  118. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js +0 -9
  119. package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js.map +0 -1
  120. package/dist/features/timeline/monthly-timeline/constants.js +0 -41
  121. package/dist/features/timeline/monthly-timeline/constants.js.map +0 -1
  122. package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js +0 -9
  123. package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js.map +0 -1
  124. package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js +0 -6
  125. package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js.map +0 -1
  126. package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js +0 -28
  127. package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js.map +0 -1
  128. package/dist/features/timeline/monthly-timeline/monthly-timeline.js +0 -54
  129. package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +0 -1
  130. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js +0 -9
  131. package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js.map +0 -1
  132. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js +0 -9
  133. package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js.map +0 -1
  134. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js +0 -35
  135. package/dist/features/timeline/ptm-report/comps/key-need/key-need.js.map +0 -1
  136. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js +0 -53
  137. package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js.map +0 -1
  138. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js +0 -19
  139. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +0 -1
  140. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js +0 -50
  141. package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +0 -1
  142. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js +0 -9
  143. package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js.map +0 -1
  144. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js +0 -22
  145. package/dist/features/timeline/ptm-report/comps/report-card/report-card.js.map +0 -1
  146. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js +0 -9
  147. package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js.map +0 -1
  148. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js +0 -84
  149. package/dist/features/timeline/ptm-report/comps/school-support/school-support.js.map +0 -1
  150. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js +0 -11
  151. package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js.map +0 -1
  152. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js +0 -36
  153. package/dist/features/timeline/ptm-report/comps/strategies/strategies.js.map +0 -1
  154. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js +0 -55
  155. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +0 -1
  156. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js +0 -35
  157. package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js.map +0 -1
  158. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js +0 -21
  159. package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js.map +0 -1
  160. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js +0 -21
  161. package/dist/features/timeline/ptm-report/comps/student-info/student-info.js.map +0 -1
  162. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js +0 -9
  163. package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js.map +0 -1
  164. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js +0 -30
  165. package/dist/features/timeline/ptm-report/comps/support-card/support-card.js.map +0 -1
  166. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js +0 -9
  167. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +0 -1
  168. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js +0 -56
  169. package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +0 -1
  170. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js +0 -15
  171. package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +0 -1
  172. package/dist/features/timeline/ptm-report/ptm-report-constants.js +0 -16
  173. package/dist/features/timeline/ptm-report/ptm-report-constants.js.map +0 -1
  174. package/dist/features/timeline/ptm-report/ptm-report-helpers.js +0 -8
  175. package/dist/features/timeline/ptm-report/ptm-report-helpers.js.map +0 -1
  176. package/dist/features/timeline/ptm-report/ptm-report-styled.js +0 -11
  177. package/dist/features/timeline/ptm-report/ptm-report-styled.js.map +0 -1
  178. package/dist/features/timeline/ptm-report/ptm-report-types.js +0 -5
  179. package/dist/features/timeline/ptm-report/ptm-report-types.js.map +0 -1
  180. package/dist/features/timeline/ptm-report/ptm-report.js +0 -113
  181. package/dist/features/timeline/ptm-report/ptm-report.js.map +0 -1
  182. package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js +0 -5
  183. package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js.map +0 -1
  184. package/dist/features/timeline/timeline-tabs/timeline-tabs.js +0 -41
  185. package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +0 -1
  186. package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js +0 -37
  187. package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js.map +0 -1
  188. package/dist/features/ui/linear-progress-bar/linear-progress-bar.js +0 -39
  189. package/dist/features/ui/linear-progress-bar/linear-progress-bar.js.map +0 -1
  190. package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js +0 -23
  191. package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js.map +0 -1
  192. package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js +0 -57
  193. package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js.map +0 -1
  194. package/dist/features/ui/swipable-carousel/swipable-carousel.js +0 -132
  195. package/dist/features/ui/swipable-carousel/swipable-carousel.js.map +0 -1
  196. package/dist/features/ui/swipeable-component/swipeable-component-styled.js.map +0 -1
  197. package/dist/features/ui/swipeable-component/swipeable-component.js +0 -27
  198. package/dist/features/ui/swipeable-component/swipeable-component.js.map +0 -1
  199. package/dist/static/2021.0683b580.png +0 -0
  200. package/dist/static/2022.d34ad7a5.png +0 -0
  201. package/dist/static/2023.fce87149.png +0 -0
  202. package/dist/static/2024.a275ee85.png +0 -0
  203. package/dist/static/2025.677cc187.png +0 -0
  204. package/dist/static/2026.63763214.png +0 -0
  205. package/dist/static/2027.b82dc039.png +0 -0
  206. package/dist/static/2028.580b8cc0.png +0 -0
  207. package/dist/static/coding-report-icon.91a1e900.svg +0 -1
  208. package/dist/static/elp-icon.d45b457d.svg +0 -1
  209. package/dist/static/english-icon.50c2e005.svg +0 -1
  210. package/dist/static/focus-blue.664be268.svg +0 -1
  211. package/dist/static/full-report.00112c74.svg +0 -1
  212. package/dist/static/key.fa0b4c98.svg +0 -1
  213. package/dist/static/live-session-blue.ec7fa85f.svg +0 -1
  214. package/dist/static/math-fit-grey.c32f37b3.svg +0 -1
  215. package/dist/static/opened-book-green.faacda34.svg +0 -1
  216. package/dist/static/percentage-pattern-yellow.6a25e820.svg +0 -1
  217. package/dist/static/pi-orange.132b108d.svg +0 -1
  218. package/dist/static/ptm-report-icon.5089218f.svg +0 -1
  219. package/dist/static/puzzle-purple.60ff4884.svg +0 -1
  220. package/dist/static/question-mark-yellow.1925aa04.svg +0 -1
  221. package/dist/static/renewal-blue.1ab3b2d4.svg +0 -1
  222. package/dist/static/sat-report-icon.4331be86.svg +0 -1
  223. package/dist/static/science-report-icon.a0014c40.svg +0 -1
  224. package/dist/static/thumbs-up-green.6a03b9d2.svg +0 -1
  225. package/dist/static/thumps-down.a1192a62.svg +0 -1
  226. package/dist/static/thumps-up.caa35a98.svg +0 -1
  227. package/dist/static/time-purple.ab1a458d.svg +0 -1
  228. /package/dist/features/{ui/swipeable-component → circle-games/game-launcher/comps/swipable-component}/swipeable-component-styled.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import { useCallback, useLayoutEffect, useRef, useState, memo, type FC } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport ChapterCircularProgress from './chapter-circular-progress/chapter-circular-progress';\nimport * as Styled from './chapter-item-styled';\nimport type { IChapterItemProps } from './chapter-item-types';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(function ChapterItem({\n milestoneId,\n chapter,\n onChapterClick,\n itemIndex,\n shouldShowItemIndex,\n}) {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { mandatory, optional } = chapterProgressStat || {};\n const { completed = 0, total: totalMandatory = 0 } = mandatory || {};\n const { total: optionalTotal = 0 } = optional || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const completionPercentage =\n completed > 0 ? Math.floor((completed / totalMandatory || 1) * 100) : 0;\n const totalSheets = totalMandatory + optionalTotal;\n const handleOnChapterClick = useCallback(() => {\n if (totalSheets === 0) {\n return null;\n }\n\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick, totalSheets]);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem=\"Coming soon! We’re building this chapter\"\n hidden={totalSheets > 0}\n parentWidth=\"100%\"\n zIndex={5}\n >\n <Styled.ChapterItemWrapper\n id={`milestone-chapter-${milestoneId || ''}-${itemIndex}`}\n $alignItems=\"center\"\n $gapX={1}\n $gutterX={1}\n $flexGap={8}\n $background=\"WHITE_1\"\n onClick={handleOnChapterClick}\n className=\"goal-widget-chapter-item\"\n $bgColor={`${imageHue}_1`}\n shouldHideClick={totalSheets === 0}\n >\n <ChapterCircularProgress\n completionPercentage={completionPercentage}\n imageUrl={imageUrl}\n imageHue={imageHue}\n imageWidth={96}\n iconWidth={20}\n />\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={name}\n hidden={!showTitleTooltip}\n widthX={21.75}\n zIndex={5}\n >\n <Styled.ChapterName\n ref={titleTextRef}\n $renderAs=\"ab2\"\n $color=\"BLACK_T_87\"\n $align=\"center\"\n >\n {name}\n </Styled.ChapterName>\n </ArrowTooltip>\n </FlexView>\n {!!shouldShowItemIndex && (\n <Styled.ChapterItemNumberWrapper\n $background=\"WHITE_4\"\n $widthX={1.75}\n $heightX={1.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\" $align=\"center\">\n {itemIndex + 1}\n </Text>\n </Styled.ChapterItemNumberWrapper>\n )}\n </Styled.ChapterItemWrapper>\n </ArrowTooltip>\n );\n});\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","shouldShowItemIndex","name","imageUrl","chapterProgressStat","imageHue","mandatory","optional","completed","totalMandatory","optionalTotal","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","totalSheets","handleOnChapterClick","useCallback","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.ChapterItemWrapper","ChapterCircularProgress","FlexView","Styled.ChapterName","Styled.ChapterItemNumberWrapper","Text"],"mappings":";;;;;;;AASM,MAAAA,IAAqCC,EAAK,SAAqB;AAAA,EACnE,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,qBAAAC;AACF,GAAG;AACK,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,WAAWC;AAAA,IACX,eAAeC;AAAA,IACf,WAAWC;AAAA,EACT,IAAAP,GACE,EAAE,WAAAQ,GAAW,UAAAC,MAAaH,KAAuB,CAAA,GACjD,EAAE,WAAAI,IAAY,GAAG,OAAOC,IAAiB,EAAE,IAAIH,KAAa,IAC5D,EAAE,OAAOI,IAAgB,EAAE,IAAIH,KAAY,CAAA,GAC3C,CAACI,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxDC,IAAeC,EAAuB,IAAI,GAC1CC,IACJR,IAAY,IAAI,KAAK,OAAOA,IAAYC,KAAkB,KAAK,GAAG,IAAI,GAClEQ,IAAcR,IAAiBC,GAC/BQ,IAAuBC,EAAY,MAAM;AAC7C,QAAIF,MAAgB;AACX,aAAA;AAGT,IAA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AA,gBACH;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,YACC,CAAC,CAACD,KACD,gBAAAoB;AAAA,cAACO;AAAAA,cAAA;AAAA,gBACC,aAAY;AAAA,gBACZ,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,aAAY;AAAA,gBACZ,iBAAgB;AAAA,gBAEhB,UAAA,gBAAAP,EAACQ,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAC3C,UAAA7B,IAAY,EACf,CAAA;AAAA,cAAA;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import { useCallback, useLayoutEffect, useRef, useState, memo, type FC } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport * as Styled from './chapter-item-styled';\nimport type { IChapterItemProps } from './chapter-item-types';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(function ChapterItem({\n milestoneId,\n chapter,\n onChapterClick,\n itemIndex,\n shouldShowItemIndex,\n}) {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { mandatory, optional } = chapterProgressStat || {};\n const { completed = 0, total: totalMandatory = 0 } = mandatory || {};\n const { total: optionalTotal = 0 } = optional || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const completionPercentage =\n completed > 0 ? Math.floor((completed / totalMandatory || 1) * 100) : 0;\n const totalSheets = totalMandatory + optionalTotal;\n const handleOnChapterClick = useCallback(() => {\n if (totalSheets === 0) {\n return null;\n }\n\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick, totalSheets]);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem=\"Coming soon! We’re building this chapter\"\n hidden={totalSheets > 0}\n parentWidth=\"100%\"\n zIndex={5}\n >\n <Styled.ChapterItemWrapper\n id={`milestone-chapter-${milestoneId || ''}-${itemIndex}`}\n $alignItems=\"center\"\n $gapX={1}\n $gutterX={1}\n $flexGap={8}\n $background=\"WHITE_1\"\n onClick={handleOnChapterClick}\n className=\"goal-widget-chapter-item\"\n $bgColor={`${imageHue}_1`}\n shouldHideClick={totalSheets === 0}\n >\n <Styled.ChapterImageWrapper\n $width=\"fit-content\"\n $position=\"relative\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Styled.ChapterProgressWrapper>\n <Styled.ChapterProgressSVG width=\"96px\" height=\"96px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"47\" cx=\"48\" cy=\"48\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progress={completionPercentage * 2.98}\n r=\"47\"\n cx=\"48\"\n cy=\"48\"\n />\n </Styled.ChapterProgressSVG>\n </Styled.ChapterProgressWrapper>\n\n <Styled.ChapterImage src={imageUrl} alt=\"Chapter Image\" />\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIconWrapper>\n <Check2Icon width={20} height={20} />\n </Styled.StyledCheckIconWrapper>\n )}\n </Styled.ChapterImageWrapper>\n\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={name}\n hidden={!showTitleTooltip}\n widthX={21.75}\n zIndex={5}\n >\n <Styled.ChapterName\n ref={titleTextRef}\n $renderAs=\"ab2\"\n $color=\"BLACK_T_87\"\n $align=\"center\"\n >\n {name}\n </Styled.ChapterName>\n </ArrowTooltip>\n </FlexView>\n {!!shouldShowItemIndex && (\n <Styled.ChapterItemNumberWrapper\n $background=\"WHITE_4\"\n $widthX={1.75}\n $heightX={1.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\" $align=\"center\">\n {itemIndex + 1}\n </Text>\n </Styled.ChapterItemNumberWrapper>\n )}\n </Styled.ChapterItemWrapper>\n </ArrowTooltip>\n );\n});\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","shouldShowItemIndex","name","imageUrl","chapterProgressStat","imageHue","mandatory","optional","completed","totalMandatory","optionalTotal","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","totalSheets","handleOnChapterClick","useCallback","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","Styled.ChapterName","Styled.ChapterItemNumberWrapper","Text"],"mappings":";;;;;;;AASM,MAAAA,IAAqCC,EAAK,SAAqB;AAAA,EACnE,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,qBAAAC;AACF,GAAG;AACK,QAAA;AAAA,IACJ,MAAAC;AAAA,IACA,WAAWC;AAAA,IACX,eAAeC;AAAA,IACf,WAAWC;AAAA,EACT,IAAAP,GACE,EAAE,WAAAQ,GAAW,UAAAC,MAAaH,KAAuB,CAAA,GACjD,EAAE,WAAAI,IAAY,GAAG,OAAOC,IAAiB,EAAE,IAAIH,KAAa,IAC5D,EAAE,OAAOI,IAAgB,EAAE,IAAIH,KAAY,CAAA,GAC3C,CAACI,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxDC,IAAeC,EAAuB,IAAI,GAC1C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import e, { css as i } from "styled-components";
2
2
  import o from "../../../../ui/layout/flex-view.js";
3
3
  import { GREEN_TICK_LOTTIE_FOR_MOBILE as n, GREEN_TICK_LOTTIE_FOR_DESKTOP as r } from "./constants.js";
4
- const d = t.div`
4
+ const p = e.div`
5
+ width: 100%;
6
+ height: 100%;
7
+ position: relative;
8
+ display: flex;
9
+ justify-content: center;
10
+ touch-action: none;
11
+ `, d = e.div`
12
+ display: flex;
13
+ width: 100%;
14
+ flex-grow: 1;
15
+ transform: ${({ $translate: t = 0 }) => `translateX(${-t}%)`};
16
+ transition: ${({ $translateDuration: t }) => `all ${t}ms ease-in`};
17
+ touch-action: none;
18
+ `, c = e.div`
5
19
  width: 100%;
6
20
  display: flex;
7
21
  align-items: center;
@@ -9,12 +23,12 @@ const d = t.div`
9
23
  flex-grow: 1;
10
24
  flex-shrink: 0;
11
25
  touch-action: none;
12
- `, l = t(o)`
26
+ `, x = e(o)`
13
27
  bottom: -54px;
14
- ${({ theme: { mediaQueries: e } }) => e.minWidthDesktop} {
28
+ ${({ theme: { mediaQueries: t } }) => t.minWidthDesktop} {
15
29
  bottom: -64px;
16
30
  }
17
- `, c = t.div`
31
+ `, m = e.div`
18
32
  display: flex;
19
33
  flex-direction: row;
20
34
  align-items: center;
@@ -22,31 +36,33 @@ const d = t.div`
22
36
  padding: 2px;
23
37
  gap: 2px;
24
38
  position: relative;
25
- background: ${({ theme: e }) => e.colors.BLACK_5};
39
+ background: ${({ theme: t }) => t.colors.BLACK_5};
26
40
  border-radius: 24px;
27
41
  margin-top: 20px;
28
- ${({ theme: e }) => i`
29
- ${e.mediaQueries.minWidthSmallDesktop} {
42
+ ${({ theme: t }) => i`
43
+ ${t.mediaQueries.minWidthSmallDesktop} {
30
44
  padding: 8px;
31
45
  gap: 8px;
32
46
  margin-top: 16px;
33
- background: ${e.colors.BLACK_3};
47
+ background: ${t.colors.BLACK_3};
34
48
  }
35
49
  `}
36
- `, m = t.div`
50
+ `, f = e.div`
37
51
  position: absolute;
38
52
  align-self: center;
39
53
  width: ${n}px;
40
- ${({ theme: e }) => `
41
- ${e.mediaQueries.minWidthSmallDesktop} {
54
+ ${({ theme: t }) => `
55
+ ${t.mediaQueries.minWidthSmallDesktop} {
42
56
  width: ${r}px;
43
57
  }
44
58
  `}
45
59
  `;
46
60
  export {
47
- m as AllGreenTickLottieWrapper,
48
- c as CarouselIdicatorContainer,
49
- d as CarouselItemContainer,
50
- l as ExtendedFlexView
61
+ f as AllGreenTickLottieWrapper,
62
+ p as Carousel,
63
+ m as CarouselIdicatorContainer,
64
+ c as CarouselItemContainer,
65
+ d as CarouselWrapper,
66
+ x as ExtendedFlexView
51
67
  };
52
68
  //# sourceMappingURL=carousel-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/carousel/carousel-styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { GREEN_TICK_LOTTIE_FOR_DESKTOP, GREEN_TICK_LOTTIE_FOR_MOBILE } from './constants';\n\nexport const CarouselItemContainer = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n flex-shrink: 0;\n touch-action: none;\n`;\n\nexport const ExtendedFlexView = styled(FlexView)`\n bottom: -54px;\n ${({ theme: { mediaQueries } }) => mediaQueries.minWidthDesktop} {\n bottom: -64px;\n }\n`;\n\nexport const CarouselIdicatorContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 2px;\n gap: 2px;\n position: relative;\n background: ${({ theme }) => theme.colors.BLACK_5};\n border-radius: 24px;\n margin-top: 20px;\n ${({ theme }) => css`\n ${theme.mediaQueries.minWidthSmallDesktop} {\n padding: 8px;\n gap: 8px;\n margin-top: 16px;\n background: ${theme.colors.BLACK_3};\n }\n `}\n`;\n\nexport const AllGreenTickLottieWrapper = styled.div`\n position: absolute;\n align-self: center;\n width: ${GREEN_TICK_LOTTIE_FOR_MOBILE}px;\n ${({ theme }) => `\n ${theme.mediaQueries.minWidthSmallDesktop} {\n width: ${GREEN_TICK_LOTTIE_FOR_DESKTOP}px;\n }\n `}\n`;\n"],"names":["CarouselItemContainer","styled","ExtendedFlexView","FlexView","mediaQueries","CarouselIdicatorContainer","theme","css","AllGreenTickLottieWrapper","GREEN_TICK_LOTTIE_FOR_MOBILE","GREEN_TICK_LOTTIE_FOR_DESKTOP"],"mappings":";;;AAKO,MAAMA,IAAwBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAU/BC,IAAmBD,EAAOE,CAAQ;AAAA;AAAA,IAE3C,CAAC,EAAE,OAAO,EAAE,cAAAC,IAAe,MAAMA,EAAa,eAAe;AAAA;AAAA;AAAA,GAKpDC,IAA4BJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQhC,CAAC,EAAE,OAAAK,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,IAG/C,CAAC,EAAE,OAAAA,EAAY,MAAAC;AAAA,MACbD,EAAM,aAAa,oBAAoB;AAAA;AAAA;AAAA;AAAA,oBAIzBA,EAAM,OAAO,OAAO;AAAA;AAAA,GAErC;AAAA,GAGUE,IAA4BP,EAAO;AAAA;AAAA;AAAA,WAGrCQ,CAA4B;AAAA,IACnC,CAAC,EAAE,OAAAH,EAAA,MAAY;AAAA,MACbA,EAAM,aAAa,oBAAoB;AAAA,eAC9BI,CAA6B;AAAA;AAAA,GAEzC;AAAA;"}
1
+ {"version":3,"file":"carousel-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/carousel/carousel-styled.tsx"],"sourcesContent":["import styled, { css } from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { GREEN_TICK_LOTTIE_FOR_DESKTOP, GREEN_TICK_LOTTIE_FOR_MOBILE } from './constants';\n\nexport const Carousel = styled.div`\n width: 100%;\n height: 100%;\n position: relative;\n display: flex;\n justify-content: center;\n touch-action: none;\n`;\nexport const CarouselWrapper = styled.div<{ $translate?: number; $translateDuration?: number }>`\n display: flex;\n width: 100%;\n flex-grow: 1;\n transform: ${({ $translate = 0 }) => `translateX(${-$translate}%)`};\n transition: ${({ $translateDuration }) => `all ${$translateDuration}ms ease-in`};\n touch-action: none;\n`;\n\nexport const CarouselItemContainer = styled.div`\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-grow: 1;\n flex-shrink: 0;\n touch-action: none;\n`;\n\nexport const ExtendedFlexView = styled(FlexView)`\n bottom: -54px;\n ${({ theme: { mediaQueries } }) => mediaQueries.minWidthDesktop} {\n bottom: -64px;\n }\n`;\n\nexport const CarouselIdicatorContainer = styled.div`\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n padding: 2px;\n gap: 2px;\n position: relative;\n background: ${({ theme }) => theme.colors.BLACK_5};\n border-radius: 24px;\n margin-top: 20px;\n ${({ theme }) => css`\n ${theme.mediaQueries.minWidthSmallDesktop} {\n padding: 8px;\n gap: 8px;\n margin-top: 16px;\n background: ${theme.colors.BLACK_3};\n }\n `}\n`;\n\nexport const AllGreenTickLottieWrapper = styled.div`\n position: absolute;\n align-self: center;\n width: ${GREEN_TICK_LOTTIE_FOR_MOBILE}px;\n ${({ theme }) => `\n ${theme.mediaQueries.minWidthSmallDesktop} {\n width: ${GREEN_TICK_LOTTIE_FOR_DESKTOP}px;\n }\n `}\n`;\n"],"names":["Carousel","styled","CarouselWrapper","$translate","$translateDuration","CarouselItemContainer","ExtendedFlexView","FlexView","mediaQueries","CarouselIdicatorContainer","theme","css","AllGreenTickLottieWrapper","GREEN_TICK_LOTTIE_FOR_MOBILE","GREEN_TICK_LOTTIE_FOR_DESKTOP"],"mappings":";;;AAKO,MAAMA,IAAWC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQlBC,IAAkBD,EAAO;AAAA;AAAA;AAAA;AAAA,eAIvB,CAAC,EAAE,YAAAE,IAAa,QAAQ,cAAc,CAACA,CAAU,IAAI;AAAA,gBACpD,CAAC,EAAE,oBAAAC,EAAyB,MAAA,OAAOA,CAAkB,YAAY;AAAA;AAAA,GAIpEC,IAAwBJ,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAU/BK,IAAmBL,EAAOM,CAAQ;AAAA;AAAA,IAE3C,CAAC,EAAE,OAAO,EAAE,cAAAC,IAAe,MAAMA,EAAa,eAAe;AAAA;AAAA;AAAA,GAKpDC,IAA4BR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAQhC,CAAC,EAAE,OAAAS,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,IAG/C,CAAC,EAAE,OAAAA,EAAY,MAAAC;AAAA,MACbD,EAAM,aAAa,oBAAoB;AAAA;AAAA;AAAA;AAAA,oBAIzBA,EAAM,OAAO,OAAO;AAAA;AAAA,GAErC;AAAA,GAGUE,IAA4BX,EAAO;AAAA;AAAA;AAAA,WAGrCY,CAA4B;AAAA,IACnC,CAAC,EAAE,OAAAH,EAAA,MAAY;AAAA,MACbA,EAAM,aAAa,oBAAoB;AAAA,eAC9BI,CAA6B;AAAA;AAAA,GAEzC;AAAA;"}
@@ -1,108 +1,107 @@
1
- import { jsx as o, jsxs as j } from "react/jsx-runtime";
2
- import { memo as x, forwardRef as A, useRef as S, useState as E, useCallback as u, useMemo as v, createRef as D, useImperativeHandle as F, useEffect as p } from "react";
3
- import f from "../../../../ui/hooks/use-click-handler.js";
4
- import { useCircleSounds as H } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
5
- import { CarouselItemContainer as K, ExtendedFlexView as V, CarouselIdicatorContainer as W, AllGreenTickLottieWrapper as N } from "./carousel-styled.js";
1
+ import { jsx as n, jsxs as k } from "react/jsx-runtime";
2
+ import { memo as R, forwardRef as _, useRef as M, useState as b, useCallback as P, useMemo as S, createRef as j, useImperativeHandle as v, useEffect as c } from "react";
3
+ import u from "../../../../ui/hooks/use-click-handler.js";
4
+ import { useCircleSounds as A } from "../../../hooks/use-circle-sounds/use-circle-sounds.js";
5
+ import { Carousel as D, CarouselWrapper as W, CarouselItemContainer as F, ExtendedFlexView as H, CarouselIdicatorContainer as K, AllGreenTickLottieWrapper as V } from "./carousel-styled.js";
6
+ import N from "../swipable-component/swipeable-component.js";
6
7
  import { CarouselIndicator as U } from "./carousel-indicator/carousel-indicator.js";
7
8
  import Y from "../../../../ui/lottie-animation/lottie-animation.js";
8
9
  import { LOTTIE as q } from "../../../../../assets/lottie/lottie.js";
9
10
  import { allGreenTickLottienAimationSettings as z } from "./constants.js";
10
11
  import { CircleSoundKey as B } from "../../../hooks/use-circle-sounds/use-circle-sounds-enums.js";
11
- import G from "../../../../ui/swipable-carousel/swipable-carousel.js";
12
- const J = ({
12
+ const G = ({
13
13
  items: t,
14
- defaultIndex: n = 0,
15
- analyticsSwipeLeft: m,
16
- analyticsSwipeRight: C,
14
+ defaultIndex: i = 0,
15
+ analyticsSwipeLeft: p,
16
+ analyticsSwipeRight: m,
17
17
  analyticsIndicatorClick: d,
18
- playAllGreenTickAnimation: y,
18
+ playAllGreenTickAnimation: f,
19
19
  onAllGreenTickAnimationComplete: a
20
- }, w) => {
21
- var P;
22
- const { playSwipeSound: L, play: I } = H(), s = S(!0), c = S(null), [i, l] = E(((P = c.current) == null ? void 0 : P.currentIndex) ?? n), [R, h] = E(!1), { handleClick: O } = f({
23
- analyticsLabel: C.analyticsLabel,
24
- analyticsProps: C.analyticsProps
25
- }), { handleClick: _ } = f({
26
- analyticsLabel: m.analyticsLabel,
27
- analyticsProps: m.analyticsProps
28
- }), { handleClick: T } = f({
20
+ }, E) => {
21
+ const { playSwipeSound: C, play: y } = A(), l = M(!0), [s, o] = b(i), [g, L] = b(!1), { handleClick: $ } = u(
22
+ {
23
+ analyticsLabel: m.analyticsLabel,
24
+ analyticsProps: m.analyticsProps
25
+ },
26
+ () => o((e) => e <= 0 ? 0 : e - 1)
27
+ ), { handleClick: w } = u(
28
+ {
29
+ analyticsLabel: p.analyticsLabel,
30
+ analyticsProps: p.analyticsProps
31
+ },
32
+ () => o((e) => e >= t.length - 1 ? e : e + 1)
33
+ ), { handleClick: h } = u({
29
34
  analyticsLabel: d.analyticsLabel,
30
35
  analyticsProps: d.analyticsProps
31
- }), k = u(() => {
32
- h(!1), a == null || a();
33
- }, [a]), M = v(
36
+ }), I = P(() => {
37
+ L(!1), a == null || a();
38
+ }, [a]), x = S(
34
39
  () => ({
35
40
  name: "complete",
36
- callback: k
41
+ callback: I
37
42
  }),
38
- [k]
39
- ), b = v(() => t.map(() => D()), [t]), g = u(
40
- (e) => {
41
- var r;
42
- e < 0 || e >= t.length || e === i || ((r = c.current) == null || r.goToIndex(e), l(e));
43
- },
44
- [i, t.length]
45
- ), $ = u(
43
+ [I]
44
+ ), T = S(() => t.map(() => j()), [t]), O = P(
46
45
  (e) => {
47
- L(), T(), l(e), g(e);
46
+ C(), h(), o(e);
48
47
  },
49
- [T, L]
48
+ [h, C]
50
49
  );
51
- return F(w, () => ({
52
- indicatorRefs: b,
53
- currentIndex: i,
54
- goToIndex: g
55
- })), p(() => {
56
- s.current && (s.current = !1);
57
- }, []), p(() => {
58
- var e;
59
- l(((e = c.current) == null ? void 0 : e.currentIndex) ?? n);
60
- }, [n]), p(() => {
61
- const e = t.every((r) => r.indicatorType === "green-tick");
62
- y && e && (I(B.ALL_ACTIVITIES_COMPLETE), h(!0));
63
- }, [y, I, t]), /* @__PURE__ */ o(
64
- G,
65
- {
66
- ref: c,
67
- items: t.map((e, r) => /* @__PURE__ */ o(K, { children: e.element }, r)),
68
- defaultIndex: n,
69
- transitionDuration: s.current ? 0 : 300,
70
- onSwipeLeft: _,
71
- onSwipeRight: O,
72
- children: t.length > 1 && /* @__PURE__ */ o(
73
- V,
74
- {
75
- $flexDirection: "row",
76
- $alignItems: "center",
77
- $justifyContent: "center",
78
- $position: "absolute",
79
- children: /* @__PURE__ */ j(W, { children: [
80
- R && /* @__PURE__ */ o(N, { children: /* @__PURE__ */ o(
81
- Y,
82
- {
83
- src: q.DAILY_WORK_OUT_COMPLETE,
84
- settings: z,
85
- eventListener: M
86
- }
87
- ) }),
88
- t.map((e, r) => /* @__PURE__ */ o(
89
- U,
90
- {
91
- ref: b[r],
92
- indicatorType: e.indicatorType,
93
- isActive: r === i,
94
- textToShowInsideIndicator: (r + 1).toString(),
95
- onClick: () => $(r)
96
- },
97
- r
98
- ))
99
- ] })
100
- }
101
- )
50
+ return v(E, () => ({
51
+ indicatorRefs: T,
52
+ currentIndex: s,
53
+ goToIndex: (e) => {
54
+ o(e);
102
55
  }
103
- );
104
- }, se = x(A(J));
56
+ })), c(() => {
57
+ l.current && (l.current = !1);
58
+ }, []), c(() => {
59
+ o(i);
60
+ }, [i]), c(() => {
61
+ const e = t.every((r) => r.indicatorType === "green-tick");
62
+ f && e && (y(B.ALL_ACTIVITIES_COMPLETE), L(!0));
63
+ }, [f, y, t]), /* @__PURE__ */ n(N, { onSwipeLeft: w, onSwipeRight: $, children: /* @__PURE__ */ k(D, { children: [
64
+ /* @__PURE__ */ n(
65
+ W,
66
+ {
67
+ $translate: s * 100,
68
+ $translateDuration: l.current ? 0 : 300,
69
+ children: t.map((e, r) => /* @__PURE__ */ n(F, { children: e.element }, r))
70
+ }
71
+ ),
72
+ t.length > 1 && /* @__PURE__ */ n(
73
+ H,
74
+ {
75
+ $flexDirection: "row",
76
+ $alignItems: "center",
77
+ $justifyContent: "center",
78
+ $position: "absolute",
79
+ children: /* @__PURE__ */ k(K, { children: [
80
+ g && /* @__PURE__ */ n(V, { children: /* @__PURE__ */ n(
81
+ Y,
82
+ {
83
+ src: q.DAILY_WORK_OUT_COMPLETE,
84
+ settings: z,
85
+ eventListener: x
86
+ }
87
+ ) }),
88
+ t.map((e, r) => /* @__PURE__ */ n(
89
+ U,
90
+ {
91
+ ref: T[r],
92
+ indicatorType: e.indicatorType,
93
+ isActive: r === s,
94
+ textToShowInsideIndicator: (r + 1).toString(),
95
+ onClick: () => O(r)
96
+ },
97
+ r
98
+ ))
99
+ ] })
100
+ }
101
+ )
102
+ ] }) });
103
+ }, le = R(_(G));
105
104
  export {
106
- se as Carousel
105
+ le as Carousel
107
106
  };
108
107
  //# sourceMappingURL=carousel.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/carousel/carousel.tsx"],"sourcesContent":["import {\n type ForwardRefRenderFunction,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n forwardRef,\n useImperativeHandle,\n createRef,\n} from 'react';\nimport { type AnimationEventName } from 'lottie-web';\n\nimport useClickHandler from '../../../../ui/hooks/use-click-handler';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport * as Styled from './carousel-styled';\nimport type { ICarouselProps, ICarouselRefs } from './carousel-types';\nimport { CarouselIndicator } from './carousel-indicator/carousel-indicator';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { allGreenTickLottienAimationSettings } from './constants';\nimport { CircleSoundKey } from '../../../hooks/use-circle-sounds/use-circle-sounds-enums';\nimport type { ISwipableCarouselRefs } from '../../../../ui/swipable-carousel/swipable-carousel-types';\nimport SwipableCarousel from '../../../../ui/swipable-carousel/swipable-carousel';\n\nconst CarouselComponent: ForwardRefRenderFunction<ICarouselRefs, ICarouselProps> = (\n {\n items,\n defaultIndex = 0,\n analyticsSwipeLeft,\n analyticsSwipeRight,\n analyticsIndicatorClick,\n playAllGreenTickAnimation,\n onAllGreenTickAnimationComplete,\n },\n ref,\n) => {\n const { playSwipeSound, play } = useCircleSounds();\n const isFirstMount = useRef(true);\n const carousalRef = useRef<ISwipableCarouselRefs>(null);\n const [currIndex, setCurrIndex] = useState(carousalRef.current?.currentIndex ?? defaultIndex);\n const [playAllGreenTickAnimationLottie, setPlayAllGreenTickAnimationLottie] = useState(false);\n\n const { handleClick: handlePrevClick } = useClickHandler({\n analyticsLabel: analyticsSwipeRight.analyticsLabel,\n analyticsProps: analyticsSwipeRight.analyticsProps,\n });\n\n const { handleClick: handleNextClick } = useClickHandler({\n analyticsLabel: analyticsSwipeLeft.analyticsLabel,\n analyticsProps: analyticsSwipeLeft.analyticsProps,\n });\n\n const { handleClick: handleItemClick } = useClickHandler({\n analyticsLabel: analyticsIndicatorClick.analyticsLabel,\n analyticsProps: analyticsIndicatorClick.analyticsProps,\n });\n\n const onAllGreenTickLottieAnimationComplete = useCallback(() => {\n setPlayAllGreenTickAnimationLottie(false);\n onAllGreenTickAnimationComplete?.();\n }, [onAllGreenTickAnimationComplete]);\n\n const allGreenTickAnimationEvent = useMemo(\n () => ({\n name: 'complete' as AnimationEventName,\n callback: onAllGreenTickLottieAnimationComplete,\n }),\n [onAllGreenTickLottieAnimationComplete],\n );\n\n const indicatorRefs = useMemo(() => items.map(() => createRef<HTMLDivElement>()), [items]);\n\n const goToIndex = useCallback(\n (index: number) => {\n if (index < 0 || index >= items.length || index === currIndex) return;\n carousalRef.current?.goToIndex(index);\n setCurrIndex(index);\n },\n [currIndex, items.length],\n );\n\n const handleCarouselIndicatorClick = useCallback(\n (index: number) => {\n playSwipeSound();\n handleItemClick();\n setCurrIndex(index);\n goToIndex(index);\n },\n [handleItemClick, playSwipeSound],\n );\n\n useImperativeHandle(ref, () => ({\n indicatorRefs,\n currentIndex: currIndex,\n goToIndex,\n }));\n\n useEffect(() => {\n if (isFirstMount.current) {\n isFirstMount.current = false;\n }\n }, []);\n\n useEffect(() => {\n setCurrIndex(carousalRef.current?.currentIndex ?? defaultIndex);\n }, [defaultIndex]);\n\n useEffect(() => {\n const playAnimation = items.every(item => item.indicatorType === 'green-tick');\n\n if (playAllGreenTickAnimation && playAnimation) {\n play(CircleSoundKey.ALL_ACTIVITIES_COMPLETE);\n setPlayAllGreenTickAnimationLottie(true);\n }\n }, [playAllGreenTickAnimation, play, items]);\n\n return (\n <SwipableCarousel\n ref={carousalRef}\n items={items.map((item, index) => (\n <Styled.CarouselItemContainer key={index}>{item.element}</Styled.CarouselItemContainer>\n ))}\n defaultIndex={defaultIndex}\n transitionDuration={isFirstMount.current ? 0 : 300}\n onSwipeLeft={handleNextClick}\n onSwipeRight={handlePrevClick}\n >\n {items.length > 1 && (\n <Styled.ExtendedFlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $position=\"absolute\"\n >\n <Styled.CarouselIdicatorContainer>\n {playAllGreenTickAnimationLottie && (\n <Styled.AllGreenTickLottieWrapper>\n <LottieAnimation\n src={LOTTIE.DAILY_WORK_OUT_COMPLETE}\n settings={allGreenTickLottienAimationSettings}\n eventListener={allGreenTickAnimationEvent}\n />\n </Styled.AllGreenTickLottieWrapper>\n )}\n {items.map((item, index) => (\n <CarouselIndicator\n ref={indicatorRefs[index]}\n key={index}\n indicatorType={item.indicatorType}\n isActive={index === currIndex}\n textToShowInsideIndicator={(index + 1).toString()}\n onClick={() => handleCarouselIndicatorClick(index)}\n />\n ))}\n </Styled.CarouselIdicatorContainer>\n </Styled.ExtendedFlexView>\n )}\n </SwipableCarousel>\n );\n};\n\nexport const Carousel = memo(forwardRef(CarouselComponent));\n"],"names":["CarouselComponent","items","defaultIndex","analyticsSwipeLeft","analyticsSwipeRight","analyticsIndicatorClick","playAllGreenTickAnimation","onAllGreenTickAnimationComplete","ref","playSwipeSound","play","useCircleSounds","isFirstMount","useRef","carousalRef","currIndex","setCurrIndex","useState","_a","playAllGreenTickAnimationLottie","setPlayAllGreenTickAnimationLottie","handlePrevClick","useClickHandler","handleNextClick","handleItemClick","onAllGreenTickLottieAnimationComplete","useCallback","allGreenTickAnimationEvent","useMemo","indicatorRefs","createRef","goToIndex","index","handleCarouselIndicatorClick","useImperativeHandle","useEffect","playAnimation","item","CircleSoundKey","jsx","SwipableCarousel","Styled.CarouselItemContainer","Styled.ExtendedFlexView","jsxs","Styled.CarouselIdicatorContainer","Styled.AllGreenTickLottieWrapper","LottieAnimation","LOTTIE","allGreenTickLottienAimationSettings","CarouselIndicator","Carousel","memo","forwardRef"],"mappings":";;;;;;;;;;;AA0BA,MAAMA,IAA6E,CACjF;AAAA,EACE,OAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,iCAAAC;AACF,GACAC,MACG;;AACH,QAAM,EAAE,gBAAAC,GAAgB,MAAAC,EAAK,IAAIC,EAAgB,GAC3CC,IAAeC,EAAO,EAAI,GAC1BC,IAAcD,EAA8B,IAAI,GAChD,CAACE,GAAWC,CAAY,IAAIC,IAASC,IAAAJ,EAAY,YAAZ,gBAAAI,EAAqB,iBAAgBhB,CAAY,GACtF,CAACiB,GAAiCC,CAAkC,IAAIH,EAAS,EAAK,GAEtF,EAAE,aAAaI,EAAgB,IAAIC,EAAgB;AAAA,IACvD,gBAAgBlB,EAAoB;AAAA,IACpC,gBAAgBA,EAAoB;AAAA,EAAA,CACrC,GAEK,EAAE,aAAamB,EAAgB,IAAID,EAAgB;AAAA,IACvD,gBAAgBnB,EAAmB;AAAA,IACnC,gBAAgBA,EAAmB;AAAA,EAAA,CACpC,GAEK,EAAE,aAAaqB,EAAgB,IAAIF,EAAgB;AAAA,IACvD,gBAAgBjB,EAAwB;AAAA,IACxC,gBAAgBA,EAAwB;AAAA,EAAA,CACzC,GAEKoB,IAAwCC,EAAY,MAAM;AAC9D,IAAAN,EAAmC,EAAK,GACNb,KAAA,QAAAA;AAAA,EAAA,GACjC,CAACA,CAA+B,CAAC,GAE9BoB,IAA6BC;AAAA,IACjC,OAAO;AAAA,MACL,MAAM;AAAA,MACN,UAAUH;AAAA,IAAA;AAAA,IAEZ,CAACA,CAAqC;AAAA,EAAA,GAGlCI,IAAgBD,EAAQ,MAAM3B,EAAM,IAAI,MAAM6B,GAA2B,GAAG,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A,MACb,cAAcF;AAAA,MAEb,UAAApB,EAAM,SAAS,KACd,gBAAAsC;AAAA,QAACG;AAAAA,QAAA;AAAA,UACC,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,iBAAgB;AAAA,UAChB,WAAU;AAAA,UAEV,UAAA,gBAAAC,EAACC,GAAA,EACE,UAAA;AAAA,YACCzB,KAAA,gBAAAoB,EAACM,GAAA,EACC,UAAA,gBAAAN;AAAA,cAACO;AAAA,cAAA;AAAA,gBACC,KAAKC,EAAO;AAAA,gBACZ,UAAUC;AAAA,gBACV,eAAerB;AAAA,cAAA;AAAA,YAAA,GAEnB;AAAA,YAED1B,EAAM,IAAI,CAACoC,GAAML,MAChB,gBAAAO;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,KAAKpB,EAAcG,CAAK;AAAA,gBAExB,eAAeK,EAAK;AAAA,gBACpB,UAAUL,MAAUjB;AAAA,gBACpB,4BAA4BiB,IAAQ,GAAG,SAAS;AAAA,gBAChD,SAAS,MAAMC,EAA6BD,CAAK;AAAA,cAAA;AAAA,cAJ5CA;AAAA,YAAA,CAMR;AAAA,UAAA,GACH;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAIR,GAEakB,KAAWC,EAAKC,EAAWpD,CAAiB,CAAC;"}
1
+ {"version":3,"file":"carousel.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/carousel/carousel.tsx"],"sourcesContent":["import {\n type ForwardRefRenderFunction,\n memo,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n forwardRef,\n useImperativeHandle,\n createRef,\n} from 'react';\nimport { type AnimationEventName } from 'lottie-web';\n\nimport useClickHandler from '../../../../ui/hooks/use-click-handler';\nimport { useCircleSounds } from '../../../hooks/use-circle-sounds/use-circle-sounds';\nimport * as Styled from './carousel-styled';\nimport type { ICarouselProps, ICarouselRefs } from './carousel-types';\nimport SwipeableComponent from '../swipable-component/swipeable-component';\nimport { CarouselIndicator } from './carousel-indicator/carousel-indicator';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport { LOTTIE } from '../../../../../assets/lottie/lottie';\nimport { allGreenTickLottienAimationSettings } from './constants';\nimport { CircleSoundKey } from '../../../hooks/use-circle-sounds/use-circle-sounds-enums';\n\nconst CarouselComponent: ForwardRefRenderFunction<ICarouselRefs, ICarouselProps> = (\n {\n items,\n defaultIndex = 0,\n analyticsSwipeLeft,\n analyticsSwipeRight,\n analyticsIndicatorClick,\n playAllGreenTickAnimation,\n onAllGreenTickAnimationComplete,\n },\n ref,\n) => {\n const { playSwipeSound, play } = useCircleSounds();\n const isFirstMount = useRef(true);\n const [currIndex, setCurrIndex] = useState(defaultIndex);\n const [playAllGreenTickAnimationLottie, setPlayAllGreenTickAnimationLottie] = useState(false);\n\n const { handleClick: handlePrevClick } = useClickHandler(\n {\n analyticsLabel: analyticsSwipeRight.analyticsLabel,\n analyticsProps: analyticsSwipeRight.analyticsProps,\n },\n () =>\n setCurrIndex(prev => {\n if (prev <= 0) return 0;\n\n return prev - 1;\n }),\n );\n\n const { handleClick: handleNextClick } = useClickHandler(\n {\n analyticsLabel: analyticsSwipeLeft.analyticsLabel,\n analyticsProps: analyticsSwipeLeft.analyticsProps,\n },\n () =>\n setCurrIndex(prev => {\n if (prev >= items.length - 1) return prev;\n\n return prev + 1;\n }),\n );\n\n const { handleClick: handleItemClick } = useClickHandler({\n analyticsLabel: analyticsIndicatorClick.analyticsLabel,\n analyticsProps: analyticsIndicatorClick.analyticsProps,\n });\n\n const onAllGreenTickLottieAnimationComplete = useCallback(() => {\n setPlayAllGreenTickAnimationLottie(false);\n onAllGreenTickAnimationComplete?.();\n }, [onAllGreenTickAnimationComplete]);\n\n const allGreenTickAnimationEvent = useMemo(\n () => ({\n name: 'complete' as AnimationEventName,\n callback: onAllGreenTickLottieAnimationComplete,\n }),\n [onAllGreenTickLottieAnimationComplete],\n );\n\n const indicatorRefs = useMemo(() => items.map(() => createRef<HTMLDivElement>()), [items]);\n\n const handleCarouselIndicatorClick = useCallback(\n (index: number) => {\n playSwipeSound();\n handleItemClick();\n setCurrIndex(index);\n },\n [handleItemClick, playSwipeSound],\n );\n\n useImperativeHandle(ref, () => ({\n indicatorRefs,\n currentIndex: currIndex,\n goToIndex: (index: number) => {\n setCurrIndex(index);\n },\n }));\n\n useEffect(() => {\n if (isFirstMount.current) {\n isFirstMount.current = false;\n }\n }, []);\n\n useEffect(() => {\n setCurrIndex(defaultIndex);\n }, [defaultIndex]);\n\n useEffect(() => {\n const playAnimation = items.every(item => item.indicatorType === 'green-tick');\n\n if (playAllGreenTickAnimation && playAnimation) {\n play(CircleSoundKey.ALL_ACTIVITIES_COMPLETE);\n setPlayAllGreenTickAnimationLottie(true);\n }\n }, [playAllGreenTickAnimation, play, items]);\n\n return (\n <SwipeableComponent onSwipeLeft={handleNextClick} onSwipeRight={handlePrevClick}>\n <Styled.Carousel>\n <Styled.CarouselWrapper\n $translate={currIndex * 100}\n $translateDuration={isFirstMount.current ? 0 : 300}\n >\n {items.map((item, index) => (\n <Styled.CarouselItemContainer key={index}>{item.element}</Styled.CarouselItemContainer>\n ))}\n </Styled.CarouselWrapper>\n {items.length > 1 && (\n <Styled.ExtendedFlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $position=\"absolute\"\n >\n <Styled.CarouselIdicatorContainer>\n {playAllGreenTickAnimationLottie && (\n <Styled.AllGreenTickLottieWrapper>\n <LottieAnimation\n src={LOTTIE.DAILY_WORK_OUT_COMPLETE}\n settings={allGreenTickLottienAimationSettings}\n eventListener={allGreenTickAnimationEvent}\n />\n </Styled.AllGreenTickLottieWrapper>\n )}\n {items.map((item, index) => (\n <CarouselIndicator\n ref={indicatorRefs[index]}\n key={index}\n indicatorType={item.indicatorType}\n isActive={index === currIndex}\n textToShowInsideIndicator={(index + 1).toString()}\n onClick={() => handleCarouselIndicatorClick(index)}\n />\n ))}\n </Styled.CarouselIdicatorContainer>\n </Styled.ExtendedFlexView>\n )}\n </Styled.Carousel>\n </SwipeableComponent>\n );\n};\n\nexport const Carousel = memo(forwardRef(CarouselComponent));\n"],"names":["CarouselComponent","items","defaultIndex","analyticsSwipeLeft","analyticsSwipeRight","analyticsIndicatorClick","playAllGreenTickAnimation","onAllGreenTickAnimationComplete","ref","playSwipeSound","play","useCircleSounds","isFirstMount","useRef","currIndex","setCurrIndex","useState","playAllGreenTickAnimationLottie","setPlayAllGreenTickAnimationLottie","handlePrevClick","useClickHandler","prev","handleNextClick","handleItemClick","onAllGreenTickLottieAnimationComplete","useCallback","allGreenTickAnimationEvent","useMemo","indicatorRefs","createRef","handleCarouselIndicatorClick","index","useImperativeHandle","useEffect","playAnimation","item","CircleSoundKey","jsx","SwipeableComponent","jsxs","Styled.Carousel","Styled.CarouselWrapper","Styled.CarouselItemContainer","Styled.ExtendedFlexView","Styled.CarouselIdicatorContainer","Styled.AllGreenTickLottieWrapper","LottieAnimation","LOTTIE","allGreenTickLottienAimationSettings","CarouselIndicator","Carousel","memo","forwardRef"],"mappings":";;;;;;;;;;;AAyBA,MAAMA,IAA6E,CACjF;AAAA,EACE,OAAAC;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,oBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,iCAAAC;AACF,GACAC,MACG;AACH,QAAM,EAAE,gBAAAC,GAAgB,MAAAC,EAAK,IAAIC,EAAgB,GAC3CC,IAAeC,EAAO,EAAI,GAC1B,CAACC,GAAWC,CAAY,IAAIC,EAASd,CAAY,GACjD,CAACe,GAAiCC,CAAkC,IAAIF,EAAS,EAAK,GAEtF,EAAE,aAAaG,EAAA,IAAoBC;AAAA,IACvC;AAAA,MACE,gBAAgBhB,EAAoB;AAAA,MACpC,gBAAgBA,EAAoB;AAAA,IACtC;AAAA,IACA,MACEW,EAAa,CAAQM,MACfA,KAAQ,IAAU,IAEfA,IAAO,CACf;AAAA,EAAA,GAGC,EAAE,aAAaC,EA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AC;"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swipeable-component-styled.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/swipable-component/swipeable-component-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const SwipeableWrapper = styled.div`\n display: flex;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n`;\n"],"names":["SwipeableWrapper","styled"],"mappings":";AAEO,MAAMA,IAAmBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
@@ -0,0 +1,26 @@
1
+ import { jsx as h } from "react/jsx-runtime";
2
+ import { memo as T, useRef as l, useCallback as o } from "react";
3
+ import { SwipeableWrapper as X } from "./swipeable-component-styled.js";
4
+ const C = T(
5
+ ({ onSwipeLeft: t, onSwipeRight: a, minSwipeDistance: e = 50, children: m }) => {
6
+ const s = l(0), n = l(0), u = o(() => {
7
+ const r = s.current - n.current;
8
+ Math.abs(r) < e || (r > 0 ? t == null || t() : a == null || a());
9
+ }, [e, t, a]), d = o((r) => {
10
+ var c;
11
+ s.current = ((c = r.changedTouches[0]) == null ? void 0 : c.clientX) || 0;
12
+ }, []), b = o(
13
+ (r) => {
14
+ var c;
15
+ n.current = ((c = r.changedTouches[0]) == null ? void 0 : c.clientX) || 0, u();
16
+ },
17
+ [u]
18
+ );
19
+ return /* @__PURE__ */ h(X, { onTouchStart: d, onTouchEnd: b, children: m });
20
+ }
21
+ );
22
+ C.displayName = "SwipeableComponent";
23
+ export {
24
+ C as default
25
+ };
26
+ //# sourceMappingURL=swipeable-component.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"swipeable-component.js","sources":["../../../../../../src/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.tsx"],"sourcesContent":["import { useRef, useCallback, memo } from 'react';\n\nimport * as Styled from './swipeable-component-styled';\nimport { type ISwipeableComponentProps } from './swipeable-component-types';\n\nconst SwipeableComponent: React.FC<ISwipeableComponentProps> = memo(\n ({ onSwipeLeft, onSwipeRight, minSwipeDistance = 50, children }) => {\n const touchStartX = useRef(0);\n const touchEndX = useRef(0);\n\n const handleSwipe = useCallback(() => {\n const distance = touchStartX.current - touchEndX.current;\n\n if (Math.abs(distance) < minSwipeDistance) return;\n\n if (distance > 0) {\n onSwipeLeft?.();\n } else {\n onSwipeRight?.();\n }\n }, [minSwipeDistance, onSwipeLeft, onSwipeRight]);\n\n const onTouchStart = useCallback((e: React.TouchEvent) => {\n touchStartX.current = e.changedTouches[0]?.clientX || 0;\n }, []);\n\n const onTouchEnd = useCallback(\n (e: React.TouchEvent) => {\n touchEndX.current = e.changedTouches[0]?.clientX || 0;\n handleSwipe();\n },\n [handleSwipe],\n );\n\n return (\n <Styled.SwipeableWrapper onTouchStart={onTouchStart} onTouchEnd={onTouchEnd}>\n {children}\n </Styled.SwipeableWrapper>\n );\n },\n);\n\nSwipeableComponent.displayName = 'SwipeableComponent';\n\nexport default SwipeableComponent;\n"],"names":["SwipeableComponent","memo","onSwipeLeft","onSwipeRight","minSwipeDistance","children","touchStartX","useRef","touchEndX","handleSwipe","useCallback","distance","onTouchStart","e","_a","onTouchEnd","Styled.SwipeableWrapper"],"mappings":";;;AAKA,MAAMA,IAAyDC;AAAA,EAC7D,CAAC,EAAE,aAAAC,GAAa,cAAAC,GAAc,kBAAAC,IAAmB,IAAI,UAAAC,QAAe;AAC5D,UAAAC,IAAcC,EAAO,CAAC,GACtBC,IAAYD,EAAO,CAAC,GAEpBE,IAAcC,EAAY,MAAM;AAC9B,YAAAC,IAAWL,EAAY,UAAUE,EAAU;AAEjD,MAAI,KAAK,IAAIG,CAAQ,IAAIP,MAErBO,IAAW,IACCT,KAAA,QAAAA,MAECC,KAAA,QAAAA;AAAA,IAEhB,GAAA,CAACC,GAAkBF,GAAaC,CAAY,CAAC,GAE1CS,IAAeF,EAAY,CAACG,MAAwB;;AACxD,MAAAP,EAAY,YAAUQ,IAAAD,EAAE,eAAe,CAAC,MAAlB,gBAAAC,EAAqB,YAAW;AAAA,IACxD,GAAG,CAAE,CAAA,GAECC,IAAaL;AAAA,MACjB,CAACG,MAAwB;;AACvB,QAAAL,EAAU,YAAUM,IAAAD,EAAE,eAAe,CAAC,MAAlB,gBAAAC,EAAqB,YAAW,GACxCL;MACd;AAAA,MACA,CAACA,CAAW;AAAA,IAAA;AAGd,6BACGO,GAAA,EAAwB,cAAAJ,GAA4B,YAAAG,GAClD,UAAAV,EACH,CAAA;AAAA,EAEJ;AACF;AAEAL,EAAmB,cAAc;"}
@@ -1,4 +1,4 @@
1
- import { jsx as n } from "react/jsx-runtime";
1
+ import { jsx as i } from "react/jsx-runtime";
2
2
  import { useRef as N, useCallback as f, useMemo as J, useEffect as X } from "react";
3
3
  import { useTheme as $ } from "styled-components";
4
4
  import { PLATFORM_EVENTS_STUDENT as B } from "../../../../analytics-events/platform-events-student.js";
@@ -9,35 +9,35 @@ import A from "../../../../ui/text/text.js";
9
9
  import { EDeviceType as Q } from "../../../../ui/theme/constants.js";
10
10
  import { CIRCLE_ONBOARDING_ANALYTICS_STEPS as S } from "../../../enum/circle-onboarding-steps.js";
11
11
  import { CircularGameCard as D } from "../../comps/circular-game-card/circular-game-card.js";
12
- import j from "../../../../ui/swipeable-component/swipeable-component.js";
12
+ import j from "../../comps/swipable-component/swipeable-component.js";
13
13
  import { SHOW_NUDGE_AFTER_MS as V, SLIDE_TO_LESSON_MS as ee } from "./constants.js";
14
- import { SwipableArea as re } from "./use-game-launcher-journey-style.js";
15
- import { CarouselIndicator as te } from "../../comps/carousel/carousel-indicator/carousel-indicator.js";
16
- import { ProjectType as i } from "../../../games/web-view/enums/project-type-enum.js";
14
+ import { SwipableArea as te } from "./use-game-launcher-journey-style.js";
15
+ import { CarouselIndicator as re } from "../../comps/carousel/carousel-indicator/carousel-indicator.js";
16
+ import { ProjectType as n } from "../../../games/web-view/enums/project-type-enum.js";
17
17
  const Se = ({
18
18
  carouselRefs: o,
19
19
  onSegmentClick: d,
20
20
  onJourneyComplete: a
21
21
  }) => {
22
22
  const { device: W } = $(), l = W <= Q.TABLET, L = N([]), c = N(null), C = N(null), { nextCoachmark: u, setJourney: _, endJourney: h } = K(), { onEvent: p } = q(), E = f(
23
- (t) => {
23
+ (r) => {
24
24
  p(B.ONBOARDING_STEP_COMPLETED, {
25
- step: t
25
+ step: r
26
26
  });
27
27
  },
28
28
  [p]
29
29
  ), O = f(
30
- (t, e) => {
31
- d(t, i.PUZZLE), E(S.PUZZLE_ACTIVITY), h(e), a(e);
30
+ (r, e) => {
31
+ d(r, n.PUZZLE), E(S.PUZZLE_ACTIVITY), h(e), a(e);
32
32
  },
33
33
  [h, a, d, E]
34
34
  ), y = f(
35
- (t, e) => {
36
- d(t, i.LESSON), E(S.SKILL_ACTIVITY), h(e), a(e);
35
+ (r, e) => {
36
+ d(r, n.LESSON), E(S.SKILL_ACTIVITY), h(e), a(e);
37
37
  },
38
38
  [h, a, d, E]
39
39
  ), R = f(
40
- (t, e) => {
40
+ (r, e) => {
41
41
  var G, w, x, P, U, Y, Z, k, H, M, z;
42
42
  const T = (G = o.current) == null ? void 0 : G.indicatorRefs, s = ((x = (w = c.current) == null ? void 0 : w.circularCardWrapperRef.current) == null ? void 0 : x.getBoundingClientRect()) || {
43
43
  height: 0,
@@ -49,56 +49,56 @@ const Se = ({
49
49
  (P = e == null ? void 0 : e.games) != null && P.data.length && ((U = e == null ? void 0 : e.puzzles) != null && U.data.length) && g.push(
50
50
  {
51
51
  projectData: e.games.data[0],
52
- type: i.GAME
52
+ type: n.GAME
53
53
  },
54
54
  {
55
55
  projectData: e.puzzles.data[0],
56
- type: i.PUZZLE
56
+ type: n.PUZZLE
57
57
  }
58
58
  ), (Y = e == null ? void 0 : e.lessons) != null && Y.data.length && g.push(
59
- { projectData: e.lessons.data[0], type: i.LESSON },
60
- { projectData: e.lessons.data[1], type: i.LESSON }
59
+ { projectData: e.lessons.data[0], type: n.LESSON },
60
+ { projectData: e.lessons.data[1], type: n.LESSON }
61
61
  );
62
- const r = g[1];
62
+ const t = g[1];
63
63
  p(B.ONBOARDING_STEP_VIEWED, {
64
- step: ((Z = g[0]) == null ? void 0 : Z.type) === i.LESSON ? S.SKILL_ACTIVITY : S.GAMES_ACTIVITY
64
+ step: ((Z = g[0]) == null ? void 0 : Z.type) === n.LESSON ? S.SKILL_ACTIVITY : S.GAMES_ACTIVITY
65
65
  });
66
66
  const F = [
67
67
  l ? {
68
68
  originalElementToHighlightRef: c.current.circularCardWrapperRef,
69
69
  type: I.NUDGE,
70
- elementToHighlight: /* @__PURE__ */ n(
70
+ elementToHighlight: /* @__PURE__ */ i(
71
71
  j,
72
72
  {
73
73
  onSwipeLeft: () => {
74
74
  var m;
75
- (m = o.current) == null || m.goToIndex(1), u(t, !1, V);
75
+ (m = o.current) == null || m.goToIndex(1), u(r, !1, V);
76
76
  },
77
- children: /* @__PURE__ */ n(re, {})
77
+ children: /* @__PURE__ */ i(te, {})
78
78
  }
79
79
  ),
80
80
  indicator: {
81
81
  nudge: "swipe",
82
- content: /* @__PURE__ */ n(A, { $renderAs: "ab2-bold", children: "Swipe to explore" }),
82
+ content: /* @__PURE__ */ i(A, { $renderAs: "ab2-bold", children: "Swipe to explore" }),
83
83
  nudgePointerX: s.width / 2 - 30,
84
84
  nudgePointerY: s.height / 2
85
85
  }
86
86
  } : {
87
87
  originalElementToHighlightRef: T[1],
88
88
  type: I.NUDGE,
89
- elementToHighlight: /* @__PURE__ */ n(
90
- te,
89
+ elementToHighlight: /* @__PURE__ */ i(
90
+ re,
91
91
  {
92
92
  textToShowInsideIndicator: "2",
93
93
  onClick: () => {
94
94
  var m;
95
- (m = o.current) == null || m.goToIndex(1), u(t, !1, V);
95
+ (m = o.current) == null || m.goToIndex(1), u(r, !1, V);
96
96
  }
97
97
  }
98
98
  ),
99
99
  indicator: {
100
100
  nudge: "click",
101
- content: /* @__PURE__ */ n(A, { $renderAs: "ab1-bold", children: "Click to proceed" }),
101
+ content: /* @__PURE__ */ i(A, { $renderAs: "ab1-bold", children: "Click to proceed" }),
102
102
  nudgePointerX: 0,
103
103
  nudgePointerY: 0
104
104
  }
@@ -106,32 +106,32 @@ const Se = ({
106
106
  {
107
107
  originalElementToHighlightRef: C.current.circularCardWrapperRef,
108
108
  type: I.NUDGE,
109
- elementToHighlight: /* @__PURE__ */ n(
109
+ elementToHighlight: /* @__PURE__ */ i(
110
110
  D,
111
111
  {
112
112
  label: "",
113
113
  data: {
114
- card: ((k = r == null ? void 0 : r.projectData) == null ? void 0 : k.cardLottie) ?? "",
115
- name: ((H = r == null ? void 0 : r.projectData) == null ? void 0 : H.name) ?? "",
114
+ card: ((k = t == null ? void 0 : t.projectData) == null ? void 0 : k.cardLottie) ?? "",
115
+ name: ((H = t == null ? void 0 : t.projectData) == null ? void 0 : H.name) ?? "",
116
116
  isCompleted: !1,
117
- displayNameImage: (M = r == null ? void 0 : r.projectData) == null ? void 0 : M.displayNameImage,
117
+ displayNameImage: (M = t == null ? void 0 : t.projectData) == null ? void 0 : M.displayNameImage,
118
118
  onPress: () => {
119
- (r == null ? void 0 : r.type) === i.LESSON && y(r.projectData, t), (r == null ? void 0 : r.type) === i.PUZZLE && O(r.projectData, t);
119
+ (t == null ? void 0 : t.type) === n.LESSON && y(t.projectData, r), (t == null ? void 0 : t.type) === n.PUZZLE && O(t.projectData, r);
120
120
  }
121
121
  }
122
122
  }
123
123
  ),
124
124
  indicator: {
125
125
  nudge: "click",
126
- content: /* @__PURE__ */ n(A, { $renderAs: l ? "ab2-bold" : "ab1-bold", children: l ? "Tap to start" : " Click to start" }),
126
+ content: /* @__PURE__ */ i(A, { $renderAs: l ? "ab2-bold" : "ab1-bold", children: l ? "Tap to start" : " Click to start" }),
127
127
  nudgePointerX: l ? s.width / 2 : s.width / 1.3,
128
128
  nudgePointerY: l ? s.height / 2 : s.height / 1.3
129
129
  }
130
130
  }
131
131
  ];
132
- _(t, F), (z = o.current) == null || z.goToIndex(0);
132
+ _(r, F), (z = o.current) == null || z.goToIndex(0);
133
133
  const b = setTimeout(() => {
134
- clearTimeout(b), u(t);
134
+ clearTimeout(b), u(r);
135
135
  }, ee);
136
136
  L.current.push(b);
137
137
  },
@@ -153,7 +153,7 @@ const Se = ({
153
153
  [R]
154
154
  );
155
155
  return X(() => () => {
156
- L.current.forEach((t) => clearTimeout(t)), L.current = [];
156
+ L.current.forEach((r) => clearTimeout(r)), L.current = [];
157
157
  }, [o]), v;
158
158
  };
159
159
  export {