@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
@@ -1,107 +1,108 @@
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";
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";
7
6
  import { CarouselIndicator as U } from "./carousel-indicator/carousel-indicator.js";
8
7
  import Y from "../../../../ui/lottie-animation/lottie-animation.js";
9
8
  import { LOTTIE as q } from "../../../../../assets/lottie/lottie.js";
10
9
  import { allGreenTickLottienAimationSettings as z } from "./constants.js";
11
10
  import { CircleSoundKey as B } from "../../../hooks/use-circle-sounds/use-circle-sounds-enums.js";
12
- const G = ({
11
+ import G from "../../../../ui/swipable-carousel/swipable-carousel.js";
12
+ const J = ({
13
13
  items: t,
14
- defaultIndex: i = 0,
15
- analyticsSwipeLeft: p,
16
- analyticsSwipeRight: m,
14
+ defaultIndex: n = 0,
15
+ analyticsSwipeLeft: m,
16
+ analyticsSwipeRight: C,
17
17
  analyticsIndicatorClick: d,
18
- playAllGreenTickAnimation: f,
18
+ playAllGreenTickAnimation: y,
19
19
  onAllGreenTickAnimationComplete: a
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({
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({
34
29
  analyticsLabel: d.analyticsLabel,
35
30
  analyticsProps: d.analyticsProps
36
- }), I = P(() => {
37
- L(!1), a == null || a();
38
- }, [a]), x = S(
31
+ }), k = u(() => {
32
+ h(!1), a == null || a();
33
+ }, [a]), M = v(
39
34
  () => ({
40
35
  name: "complete",
41
- callback: I
36
+ callback: k
42
37
  }),
43
- [I]
44
- ), T = S(() => t.map(() => j()), [t]), O = P(
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(
45
46
  (e) => {
46
- C(), h(), o(e);
47
+ L(), T(), l(e), g(e);
47
48
  },
48
- [h, C]
49
+ [T, L]
49
50
  );
50
- return v(E, () => ({
51
- indicatorRefs: T,
52
- currentIndex: s,
53
- goToIndex: (e) => {
54
- o(e);
55
- }
56
- })), c(() => {
57
- l.current && (l.current = !1);
58
- }, []), c(() => {
59
- o(i);
60
- }, [i]), c(() => {
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
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));
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
+ )
102
+ }
103
+ );
104
+ }, se = x(A(J));
104
105
  export {
105
- le as Carousel
106
+ se as Carousel
106
107
  };
107
108
  //# 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 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,EAAA,IAAoBF;AAAA,IACvC;AAAA,MACE,gBAAgBjB,EAAmB;AAAA,MACnC,gBAAgBA,EAAmB;AAAA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,CAAC,GAGzC,gBAAAoC,EAACC,KAAmB,aAAahB,GAAiB,cAAcH,GAC9D,UAAA,gBAAAoB,EAACC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAH;AAAA,MAACI;AAAAA,MAAA;AAAA,QACC,YAAY3B,IAAY;AAAA,QACxB,oBAAoBF,EAAa,UAAU,IAAI;AAAA,QAE9C,UAAMX,EAAA,IAAI,CAACkC,GAAMJ,MAChB,gBAAAM,EAACK,GAAA,EAA0C,UAAAP,EAAK,QAAb,GAAAJ,CAAqB,CACzD;AAAA,MAAA;AAAA,IACH;AAAA,IACC9B,EAAM,SAAS,KACd,gBAAAoC;AAAA,MAACM;AAAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,WAAU;AAAA,QAEV,UAAA,gBAAAJ,EAACK,GAAA,EACE,UAAA;AAAA,UACC3B,KAAA,gBAAAoB,EAACQ,GAAA,EACC,UAAA,gBAAAR;AAAA,YAACS;AAAA,YAAA;AAAA,cACC,KAAKC,EAAO;AAAA,cACZ,UAAUC;AAAA,cACV,eAAetB;AAAA,YAAA;AAAA,UAAA,GAEnB;AAAA,UAEDzB,EAAM,IAAI,CAACkC,GAAMJ,MAChB,gBAAAM;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,KAAKrB,EAAcG,CAAK;AAAA,cAExB,eAAeI,EAAK;AAAA,cACpB,UAAUJ,MAAUjB;AAAA,cACpB,4BAA4BiB,IAAQ,GAAG,SAAS;AAAA,cAChD,SAAS,MAAMD,EAA6BC,CAAK;AAAA,YAAA;AAAA,YAJ5CA;AAAA,UAAA,CAMR;AAAA,QAAA,GACH;AAAA,MAAA;AAAA,IACF;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA;AAEJ,GAEamB,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 { 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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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,4 +1,4 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as n } 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 "../../comps/swipable-component/swipeable-component.js";
12
+ import j from "../../../../ui/swipeable-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 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";
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";
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
- (r) => {
23
+ (t) => {
24
24
  p(B.ONBOARDING_STEP_COMPLETED, {
25
- step: r
25
+ step: t
26
26
  });
27
27
  },
28
28
  [p]
29
29
  ), O = f(
30
- (r, e) => {
31
- d(r, n.PUZZLE), E(S.PUZZLE_ACTIVITY), h(e), a(e);
30
+ (t, e) => {
31
+ d(t, i.PUZZLE), E(S.PUZZLE_ACTIVITY), h(e), a(e);
32
32
  },
33
33
  [h, a, d, E]
34
34
  ), y = f(
35
- (r, e) => {
36
- d(r, n.LESSON), E(S.SKILL_ACTIVITY), h(e), a(e);
35
+ (t, e) => {
36
+ d(t, i.LESSON), E(S.SKILL_ACTIVITY), h(e), a(e);
37
37
  },
38
38
  [h, a, d, E]
39
39
  ), R = f(
40
- (r, e) => {
40
+ (t, 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: n.GAME
52
+ type: i.GAME
53
53
  },
54
54
  {
55
55
  projectData: e.puzzles.data[0],
56
- type: n.PUZZLE
56
+ type: i.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: n.LESSON },
60
- { projectData: e.lessons.data[1], type: n.LESSON }
59
+ { projectData: e.lessons.data[0], type: i.LESSON },
60
+ { projectData: e.lessons.data[1], type: i.LESSON }
61
61
  );
62
- const t = g[1];
62
+ const r = g[1];
63
63
  p(B.ONBOARDING_STEP_VIEWED, {
64
- step: ((Z = g[0]) == null ? void 0 : Z.type) === n.LESSON ? S.SKILL_ACTIVITY : S.GAMES_ACTIVITY
64
+ step: ((Z = g[0]) == null ? void 0 : Z.type) === i.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__ */ i(
70
+ elementToHighlight: /* @__PURE__ */ n(
71
71
  j,
72
72
  {
73
73
  onSwipeLeft: () => {
74
74
  var m;
75
- (m = o.current) == null || m.goToIndex(1), u(r, !1, V);
75
+ (m = o.current) == null || m.goToIndex(1), u(t, !1, V);
76
76
  },
77
- children: /* @__PURE__ */ i(te, {})
77
+ children: /* @__PURE__ */ n(re, {})
78
78
  }
79
79
  ),
80
80
  indicator: {
81
81
  nudge: "swipe",
82
- content: /* @__PURE__ */ i(A, { $renderAs: "ab2-bold", children: "Swipe to explore" }),
82
+ content: /* @__PURE__ */ n(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__ */ i(
90
- re,
89
+ elementToHighlight: /* @__PURE__ */ n(
90
+ te,
91
91
  {
92
92
  textToShowInsideIndicator: "2",
93
93
  onClick: () => {
94
94
  var m;
95
- (m = o.current) == null || m.goToIndex(1), u(r, !1, V);
95
+ (m = o.current) == null || m.goToIndex(1), u(t, !1, V);
96
96
  }
97
97
  }
98
98
  ),
99
99
  indicator: {
100
100
  nudge: "click",
101
- content: /* @__PURE__ */ i(A, { $renderAs: "ab1-bold", children: "Click to proceed" }),
101
+ content: /* @__PURE__ */ n(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__ */ i(
109
+ elementToHighlight: /* @__PURE__ */ n(
110
110
  D,
111
111
  {
112
112
  label: "",
113
113
  data: {
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) ?? "",
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) ?? "",
116
116
  isCompleted: !1,
117
- displayNameImage: (M = t == null ? void 0 : t.projectData) == null ? void 0 : M.displayNameImage,
117
+ displayNameImage: (M = r == null ? void 0 : r.projectData) == null ? void 0 : M.displayNameImage,
118
118
  onPress: () => {
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);
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);
120
120
  }
121
121
  }
122
122
  }
123
123
  ),
124
124
  indicator: {
125
125
  nudge: "click",
126
- content: /* @__PURE__ */ i(A, { $renderAs: l ? "ab2-bold" : "ab1-bold", children: l ? "Tap to start" : " Click to start" }),
126
+ content: /* @__PURE__ */ n(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
- _(r, F), (z = o.current) == null || z.goToIndex(0);
132
+ _(t, F), (z = o.current) == null || z.goToIndex(0);
133
133
  const b = setTimeout(() => {
134
- clearTimeout(b), u(r);
134
+ clearTimeout(b), u(t);
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((r) => clearTimeout(r)), L.current = [];
156
+ L.current.forEach((t) => clearTimeout(t)), L.current = [];
157
157
  }, [o]), v;
158
158
  };
159
159
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"use-game-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport {\n PLATFORM_EVENTS_STUDENT as AnalyticsLabel,\n PLATFORM_EVENTS_STUDENT,\n} from '../../../../analytics-events/platform-events-student';\nimport { type JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../../../journey/use-journey/journey-context-types';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport { useUIContext } from '../../../../ui/context/context';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ActionEvent } from '../../../enum/circle-onboarding-steps';\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { CircularGameCard } from '../../comps/circular-game-card/circular-game-card';\nimport { type ICircularGameCardRefs } from '../../comps/circular-game-card/circular-game-card-types';\nimport SwipeableCard from '../../comps/swipable-component/swipeable-component';\nimport type {\n Lesson,\n Puzzle,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport { type IProjectData } from '../../game-launcher-types';\nimport { SHOW_NUDGE_AFTER_MS, SLIDE_TO_LESSON_MS } from './constants';\nimport type { IUseGameLauncherJourneyProps } from './use-game-launcher-journey-types';\nimport { SwipableArea } from './use-game-launcher-journey-style';\nimport { CarouselIndicator } from '../../comps/carousel/carousel-indicator/carousel-indicator';\n\nexport const useGameLauncherJourney = ({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const firstCardRefs = useRef<ICircularGameCardRefs>(null);\n const secondCardRefs = useRef<ICircularGameCardRefs>(null);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const trackEventCompleted = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n step,\n });\n },\n [trackAnalytics],\n );\n\n const handleEndJourneyForPuzzle = useCallback(\n (puzzlesData: Puzzle, journeyId: JOURNEY_ID_STUDENT) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(ActionEvent.PUZZLE_ACTIVITY);\n endJourney(journeyId);\n onJourneyComplete(journeyId);\n },\n [endJourney, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const handleEndJourneyForLesson = useCallback(\n (lessonsData: Lesson, journeyId: JOURNEY_ID_STUDENT) => {\n onSegmentClick(lessonsData, ProjectType.LESSON);\n trackEventCompleted(ActionEvent.SKILL_ACTIVITY);\n endJourney(journeyId);\n onJourneyComplete(journeyId);\n },\n [endJourney, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const startJourney = useCallback(\n (journeyId: JOURNEY_ID_STUDENT, projectData?: IProjectData) => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n\n const launcherDims =\n firstCardRefs.current?.circularCardWrapperRef.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n // Exit early if required refs or data are missing\n if (paginationList?.length < 2 || !secondCardRefs.current || !firstCardRefs.current) {\n return;\n }\n\n // prepare journey projects based on the data available as\n // games and puzzles are not aviailbale for K-1\n const journeyProjectsData = [];\n\n if (projectData?.games?.data.length && projectData?.puzzles?.data.length) {\n journeyProjectsData.push(\n {\n projectData: projectData.games.data[0],\n type: ProjectType.GAME,\n },\n {\n projectData: projectData.puzzles.data[0],\n type: ProjectType.PUZZLE,\n },\n );\n }\n\n if (projectData?.lessons?.data.length) {\n journeyProjectsData.push(\n { projectData: projectData.lessons.data[0], type: ProjectType.LESSON },\n { projectData: projectData.lessons.data[1], type: ProjectType.LESSON },\n );\n }\n\n const secondProjectData = journeyProjectsData[1];\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step:\n journeyProjectsData[0]?.type === ProjectType.LESSON\n ? ActionEvent.SKILL_ACTIVITY\n : ActionEvent.GAMES_ACTIVITY,\n });\n\n const coachmarks: TCoachmarkJourneyProps[] = [\n isCompact\n ? {\n originalElementToHighlightRef: firstCardRefs.current.circularCardWrapperRef,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <SwipeableCard\n onSwipeLeft={() => {\n carouselRefs.current?.goToIndex(1);\n nextCoachmark(journeyId, false, SHOW_NUDGE_AFTER_MS);\n }}\n >\n <SwipableArea />\n </SwipeableCard>\n ),\n indicator: {\n nudge: 'swipe',\n content: <Text $renderAs=\"ab2-bold\">Swipe to explore</Text>,\n nudgePointerX: launcherDims.width / 2 - 30,\n nudgePointerY: launcherDims.height / 2,\n } as INudgeProps,\n }\n : {\n originalElementToHighlightRef: paginationList[1] as React.RefObject<HTMLDivElement>,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <CarouselIndicator\n textToShowInsideIndicator=\"2\"\n onClick={() => {\n carouselRefs.current?.goToIndex(1);\n nextCoachmark(journeyId, false, SHOW_NUDGE_AFTER_MS);\n }}\n />\n ),\n indicator: {\n nudge: 'click',\n content: <Text $renderAs=\"ab1-bold\">Click to proceed</Text>,\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n {\n originalElementToHighlightRef: secondCardRefs.current.circularCardWrapperRef,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <CircularGameCard\n label=\"\"\n data={{\n card: secondProjectData?.projectData?.cardLottie ?? '',\n name: secondProjectData?.projectData?.name ?? '',\n isCompleted: false,\n displayNameImage: secondProjectData?.projectData?.displayNameImage,\n onPress: () => {\n if (secondProjectData?.type === ProjectType.LESSON) {\n handleEndJourneyForLesson(secondProjectData.projectData as Lesson, journeyId);\n }\n\n if (secondProjectData?.type === ProjectType.PUZZLE) {\n handleEndJourneyForPuzzle(secondProjectData.projectData as Puzzle, journeyId);\n }\n },\n }}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs={isCompact ? 'ab2-bold' : 'ab1-bold'}>\n {isCompact ? 'Tap to start' : ' Click to start'}\n </Text>\n ),\n nudgePointerX: isCompact ? launcherDims.width / 2 : launcherDims.width / 1.3,\n nudgePointerY: isCompact ? launcherDims.height / 2 : launcherDims.height / 1.3,\n } as INudgeProps,\n },\n ];\n\n setJourney(journeyId, coachmarks);\n carouselRefs.current?.goToIndex(0);\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, SLIDE_TO_LESSON_MS);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [\n carouselRefs,\n trackAnalytics,\n isCompact,\n setJourney,\n nextCoachmark,\n handleEndJourneyForLesson,\n handleEndJourneyForPuzzle,\n ],\n );\n\n const data = useMemo(\n () => ({\n firstCardRefs,\n secondCardRefs,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [carouselRefs]);\n\n return data;\n};\n"],"names":["useGameLauncherJourney","carouselRefs","onSegmentClick","onJourneyComplete","device","useTheme","isCompact","EDeviceType","timerRefs","useRef","firstCardRefs","secondCardRefs","nextCoachmark","setJourney","endJourney","useJourney","trackAnalytics","useUIContext","trackEventCompleted","useCallback","step","AnalyticsLabel","handleEndJourneyForPuzzle","puzzlesData","journeyId","ProjectType","ActionEvent","handleEndJourneyForLesson","lessonsData","startJourney","projectData","paginationList","_a","launcherDims","_c","_b","journeyProjectsData","_d","_e","_f","secondProjectData","PLATFORM_EVENTS_STUDENT","_g","coachmarks","IndicatorType","jsx","SwipeableCard","SHOW_NUDGE_AFTER_MS","SwipableArea","Text","CarouselIndicator","CircularGameCard","_h","_i","_j","_k","delayBeforeStart","SLIDE_TO_LESSON_MS","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;AA8BO,MAAMA,KAAyB,CAAC;AAAA,EACrC,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAC5B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY,QAElCC,IAAYC,EAAwC,CAAA,CAAE,GAEtDC,IAAgBD,EAA8B,IAAI,GAClDE,IAAiBF,EAA8B,IAAI,GACnD,EAAE,eAAAG,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GACvD,EAAE,SAASC,EAAe,IAAIC,EAAa,GAE3CC,IAAsBC;AAAA,IAC1B,CAACC,MAAsB;AACrB,MAAAJ,EAAeK,EAAe,2BAA2B;AAAA,QACvD,MAAAD;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,CAACJ,CAAc;AAAA,EAAA,GAGXM,IAA4BH;AAAA,IAChC,CAACI,GAAqBC,MAAkC;AACvC,MAAAtB,EAAAqB,GAAaE,EAAY,MAAM,GAC9CP,EAAoBQ,EAAY,eAAe,GAC/CZ,EAAWU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V;AAAA,MACAO;AAAA,MACAD;AAAA,MACAe;AAAA,MACAL;AAAA,IACF;AAAA,EAAA,GAGIoC,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,eAAAjD;AAAA,MACA,gBAAAC;AAAA,MACA,cAAAkB;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIf,SAAA+B,EAAU,MACD,MAAM;AACX,IAAApD,EAAU,QAAQ,QAAQ,CAASqD,MAAA,aAAaA,CAAK,CAAC,GACtDrD,EAAU,UAAU;EAAC,GAEtB,CAACP,CAAY,CAAC,GAEVyD;AACT;"}
1
+ {"version":3,"file":"use-game-launcher-journey.js","sources":["../../../../../../src/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport {\n PLATFORM_EVENTS_STUDENT as AnalyticsLabel,\n PLATFORM_EVENTS_STUDENT,\n} from '../../../../analytics-events/platform-events-student';\nimport { type JOURNEY_ID_STUDENT } from '../../../../journey/journey-id/journey-id-student';\nimport { IndicatorType } from '../../../../journey/use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../../../journey/use-journey/journey-context-types';\nimport { useJourney } from '../../../../journey/use-journey/use-journey';\nimport { useUIContext } from '../../../../ui/context/context';\nimport type { INudgeProps } from '../../../../ui/nudge/nudge-types';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { CIRCLE_ONBOARDING_ANALYTICS_STEPS as ActionEvent } from '../../../enum/circle-onboarding-steps';\nimport { ProjectType } from '../../../games/web-view/enums';\nimport { CircularGameCard } from '../../comps/circular-game-card/circular-game-card';\nimport { type ICircularGameCardRefs } from '../../comps/circular-game-card/circular-game-card-types';\nimport SwipeableCard from '../../../../ui/swipeable-component/swipeable-component';\nimport type {\n Lesson,\n Puzzle,\n} from '../../dal/use-get-circle-home-details-dal/use-get-circle-home-dal-types';\nimport { type IProjectData } from '../../game-launcher-types';\nimport { SHOW_NUDGE_AFTER_MS, SLIDE_TO_LESSON_MS } from './constants';\nimport type { IUseGameLauncherJourneyProps } from './use-game-launcher-journey-types';\nimport { SwipableArea } from './use-game-launcher-journey-style';\nimport { CarouselIndicator } from '../../comps/carousel/carousel-indicator/carousel-indicator';\n\nexport const useGameLauncherJourney = ({\n carouselRefs,\n onSegmentClick,\n onJourneyComplete,\n}: IUseGameLauncherJourneyProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const firstCardRefs = useRef<ICircularGameCardRefs>(null);\n const secondCardRefs = useRef<ICircularGameCardRefs>(null);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n const { onEvent: trackAnalytics } = useUIContext();\n\n const trackEventCompleted = useCallback(\n (step: ActionEvent) => {\n trackAnalytics(AnalyticsLabel.ONBOARDING_STEP_COMPLETED, {\n step,\n });\n },\n [trackAnalytics],\n );\n\n const handleEndJourneyForPuzzle = useCallback(\n (puzzlesData: Puzzle, journeyId: JOURNEY_ID_STUDENT) => {\n onSegmentClick(puzzlesData, ProjectType.PUZZLE);\n trackEventCompleted(ActionEvent.PUZZLE_ACTIVITY);\n endJourney(journeyId);\n onJourneyComplete(journeyId);\n },\n [endJourney, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const handleEndJourneyForLesson = useCallback(\n (lessonsData: Lesson, journeyId: JOURNEY_ID_STUDENT) => {\n onSegmentClick(lessonsData, ProjectType.LESSON);\n trackEventCompleted(ActionEvent.SKILL_ACTIVITY);\n endJourney(journeyId);\n onJourneyComplete(journeyId);\n },\n [endJourney, onJourneyComplete, onSegmentClick, trackEventCompleted],\n );\n\n const startJourney = useCallback(\n (journeyId: JOURNEY_ID_STUDENT, projectData?: IProjectData) => {\n const paginationList = carouselRefs.current?.indicatorRefs;\n\n const launcherDims =\n firstCardRefs.current?.circularCardWrapperRef.current?.getBoundingClientRect() || {\n height: 0,\n width: 0,\n };\n\n // Exit early if required refs or data are missing\n if (paginationList?.length < 2 || !secondCardRefs.current || !firstCardRefs.current) {\n return;\n }\n\n // prepare journey projects based on the data available as\n // games and puzzles are not aviailbale for K-1\n const journeyProjectsData = [];\n\n if (projectData?.games?.data.length && projectData?.puzzles?.data.length) {\n journeyProjectsData.push(\n {\n projectData: projectData.games.data[0],\n type: ProjectType.GAME,\n },\n {\n projectData: projectData.puzzles.data[0],\n type: ProjectType.PUZZLE,\n },\n );\n }\n\n if (projectData?.lessons?.data.length) {\n journeyProjectsData.push(\n { projectData: projectData.lessons.data[0], type: ProjectType.LESSON },\n { projectData: projectData.lessons.data[1], type: ProjectType.LESSON },\n );\n }\n\n const secondProjectData = journeyProjectsData[1];\n\n trackAnalytics(PLATFORM_EVENTS_STUDENT.ONBOARDING_STEP_VIEWED, {\n step:\n journeyProjectsData[0]?.type === ProjectType.LESSON\n ? ActionEvent.SKILL_ACTIVITY\n : ActionEvent.GAMES_ACTIVITY,\n });\n\n const coachmarks: TCoachmarkJourneyProps[] = [\n isCompact\n ? {\n originalElementToHighlightRef: firstCardRefs.current.circularCardWrapperRef,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <SwipeableCard\n onSwipeLeft={() => {\n carouselRefs.current?.goToIndex(1);\n nextCoachmark(journeyId, false, SHOW_NUDGE_AFTER_MS);\n }}\n >\n <SwipableArea />\n </SwipeableCard>\n ),\n indicator: {\n nudge: 'swipe',\n content: <Text $renderAs=\"ab2-bold\">Swipe to explore</Text>,\n nudgePointerX: launcherDims.width / 2 - 30,\n nudgePointerY: launcherDims.height / 2,\n } as INudgeProps,\n }\n : {\n originalElementToHighlightRef: paginationList[1] as React.RefObject<HTMLDivElement>,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <CarouselIndicator\n textToShowInsideIndicator=\"2\"\n onClick={() => {\n carouselRefs.current?.goToIndex(1);\n nextCoachmark(journeyId, false, SHOW_NUDGE_AFTER_MS);\n }}\n />\n ),\n indicator: {\n nudge: 'click',\n content: <Text $renderAs=\"ab1-bold\">Click to proceed</Text>,\n nudgePointerX: 0,\n nudgePointerY: 0,\n } as INudgeProps,\n },\n {\n originalElementToHighlightRef: secondCardRefs.current.circularCardWrapperRef,\n type: IndicatorType.NUDGE,\n elementToHighlight: (\n <CircularGameCard\n label=\"\"\n data={{\n card: secondProjectData?.projectData?.cardLottie ?? '',\n name: secondProjectData?.projectData?.name ?? '',\n isCompleted: false,\n displayNameImage: secondProjectData?.projectData?.displayNameImage,\n onPress: () => {\n if (secondProjectData?.type === ProjectType.LESSON) {\n handleEndJourneyForLesson(secondProjectData.projectData as Lesson, journeyId);\n }\n\n if (secondProjectData?.type === ProjectType.PUZZLE) {\n handleEndJourneyForPuzzle(secondProjectData.projectData as Puzzle, journeyId);\n }\n },\n }}\n />\n ),\n indicator: {\n nudge: 'click',\n content: (\n <Text $renderAs={isCompact ? 'ab2-bold' : 'ab1-bold'}>\n {isCompact ? 'Tap to start' : ' Click to start'}\n </Text>\n ),\n nudgePointerX: isCompact ? launcherDims.width / 2 : launcherDims.width / 1.3,\n nudgePointerY: isCompact ? launcherDims.height / 2 : launcherDims.height / 1.3,\n } as INudgeProps,\n },\n ];\n\n setJourney(journeyId, coachmarks);\n carouselRefs.current?.goToIndex(0);\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, SLIDE_TO_LESSON_MS);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [\n carouselRefs,\n trackAnalytics,\n isCompact,\n setJourney,\n nextCoachmark,\n handleEndJourneyForLesson,\n handleEndJourneyForPuzzle,\n ],\n );\n\n const data = useMemo(\n () => ({\n firstCardRefs,\n secondCardRefs,\n startJourney,\n }),\n [startJourney],\n );\n\n // Cleanup on unmount\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, [carouselRefs]);\n\n return data;\n};\n"],"names":["useGameLauncherJourney","carouselRefs","onSegmentClick","onJourneyComplete","device","useTheme","isCompact","EDeviceType","timerRefs","useRef","firstCardRefs","secondCardRefs","nextCoachmark","setJourney","endJourney","useJourney","trackAnalytics","useUIContext","trackEventCompleted","useCallback","step","AnalyticsLabel","handleEndJourneyForPuzzle","puzzlesData","journeyId","ProjectType","ActionEvent","handleEndJourneyForLesson","lessonsData","startJourney","projectData","paginationList","_a","launcherDims","_c","_b","journeyProjectsData","_d","_e","_f","secondProjectData","PLATFORM_EVENTS_STUDENT","_g","coachmarks","IndicatorType","jsx","SwipeableCard","SHOW_NUDGE_AFTER_MS","SwipableArea","Text","CarouselIndicator","CircularGameCard","_h","_i","_j","_k","delayBeforeStart","SLIDE_TO_LESSON_MS","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;;;;;AA8BO,MAAMA,KAAyB,CAAC;AAAA,EACrC,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAoC;AAC5B,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY,QAElCC,IAAYC,EAAwC,CAAA,CAAE,GAEtDC,IAAgBD,EAA8B,IAAI,GAClDE,IAAiBF,EAA8B,IAAI,GACnD,EAAE,eAAAG,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GACvD,EAAE,SAASC,EAAe,IAAIC,EAAa,GAE3CC,IAAsBC;AAAA,IAC1B,CAACC,MAAsB;AACrB,MAAAJ,EAAeK,EAAe,2BAA2B;AAAA,QACvD,MAAAD;AAAA,MAAA,CACD;AAAA,IACH;AAAA,IACA,CAACJ,CAAc;AAAA,EAAA,GAGXM,IAA4BH;AAAA,IAChC,CAACI,GAAqBC,MAAkC;AACvC,MAAAtB,EAAAqB,GAAaE,EAAY,MAAM,GAC9CP,EAAoBQ,EAAY,eAAe,GAC/CZ,EAAWU,CAAS,GACpBrB,EAAkBqB,CAAS;AAAA,IAC7B;AAAA,IACA,CAACV,GAAY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EAAA,GAGIoC,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,eAAAjD;AAAA,MACA,gBAAAC;AAAA,MACA,cAAAkB;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIf,SAAA+B,EAAU,MACD,MAAM;AACX,IAAApD,EAAU,QAAQ,QAAQ,CAASqD,MAAA,aAAaA,CAAK,CAAC,GACtDrD,EAAU,UAAU;EAAC,GAEtB,CAACP,CAAY,CAAC,GAEVyD;AACT;"}
@@ -1,16 +1,16 @@
1
1
  import { jsx as t, jsxs as o } from "react/jsx-runtime";
2
2
  import { memo as a } from "react";
3
3
  import c from "../ui/layout/flex-view.js";
4
- import i from "../ui/text/text.js";
5
- const l = ({ label: r, title: e }) => /* @__PURE__ */ o(c, { children: [
6
- /* @__PURE__ */ t(c, { $background: "BLACK_T_60", $width: "fit-content", $gutterX: 0.25, children: /* @__PURE__ */ t(i, { $color: "WHITE", $renderAs: "ac4-black", children: r }) }),
7
- /* @__PURE__ */ t(i, { $renderAs: "ac4-black", children: e })
4
+ import n from "../ui/text/text.js";
5
+ const i = ({ label: r, title: l }) => /* @__PURE__ */ o(c, { children: [
6
+ /* @__PURE__ */ t(c, { $background: "BLACK_T_60", $width: "fit-content", $gutterX: 0.25, children: /* @__PURE__ */ t(n, { $color: "WHITE", $renderAs: "ac4-black", children: r }) }),
7
+ /* @__PURE__ */ t(n, { $renderAs: "ac4-black", children: l })
8
8
  ] }), m = ({
9
9
  cardHeader: r,
10
- nodeType: e,
11
- courseType: n
12
- }) => e === "MASTERY" ? /* @__PURE__ */ t(l, { label: "Smart", title: "Practice" }) : n === "REMEDIAL" ? /* @__PURE__ */ t(l, { label: "EXTRA", title: r }) : n === "EXAM" ? /* @__PURE__ */ t(l, { label: "CUSTOM", title: r }) : /* @__PURE__ */ t(i, { $renderAs: "ac4-black", children: r }), A = a(m);
10
+ nodeType: l,
11
+ courseType: e
12
+ }) => l === "MASTERY" ? /* @__PURE__ */ t(i, { label: "Smart", title: "Practice" }) : e && e === "REMEDIAL" ? /* @__PURE__ */ t(i, { label: "EXTRA", title: r }) : e && e === "EXAM" ? /* @__PURE__ */ t(i, { label: "CUSTOM", title: r }) : /* @__PURE__ */ t(n, { $renderAs: "ac4-black", children: r }), $ = a(m);
13
13
  export {
14
- A as default
14
+ $ as default
15
15
  };
16
16
  //# sourceMappingURL=card-title.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"card-title.js","sources":["../../../src/features/homework/card-title.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport type { TCourseType, TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\nconst LabelledTitle = ({ label, title }: { label: string; title: string }) => (\n <FlexView>\n <FlexView $background=\"BLACK_T_60\" $width=\"fit-content\" $gutterX={0.25}>\n <Text $color=\"WHITE\" $renderAs=\"ac4-black\">\n {label}\n </Text>\n </FlexView>\n <Text $renderAs=\"ac4-black\">{title}</Text>\n </FlexView>\n);\n\nconst CardTitle = ({\n cardHeader,\n nodeType,\n courseType,\n}: {\n cardHeader: string;\n nodeType: TNodeTypes;\n courseType: TCourseType;\n}) => {\n if (nodeType === 'MASTERY') {\n return <LabelledTitle label=\"Smart\" title=\"Practice\" />;\n }\n\n if (courseType === 'REMEDIAL') {\n return <LabelledTitle label=\"EXTRA\" title={cardHeader} />;\n }\n\n if (courseType === 'EXAM') {\n return <LabelledTitle label=\"CUSTOM\" title={cardHeader} />;\n }\n\n return <Text $renderAs=\"ac4-black\">{cardHeader}</Text>;\n};\n\nexport default memo(CardTitle);\n"],"names":["LabelledTitle","label","title","FlexView","jsx","Text","CardTitle","cardHeader","nodeType","courseType","CardTitle$1","memo"],"mappings":";;;;AAMA,MAAMA,IAAgB,CAAC,EAAE,OAAAC,GAAO,OAAAC,EAAM,wBACnCC,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACD,GAAS,EAAA,aAAY,cAAa,QAAO,eAAc,UAAU,MAChE,UAAC,gBAAAC,EAAAC,GAAA,EAAK,QAAO,SAAQ,WAAU,aAC5B,YACH,CAAA,GACF;AAAA,EACC,gBAAAD,EAAAC,GAAA,EAAK,WAAU,aAAa,UAAMH,GAAA;AAAA,EACrC,CAAA,GAGII,IAAY,CAAC;AAAA,EACjB,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,MAKMD,MAAa,YACP,gBAAAJ,EAAAJ,GAAA,EAAc,OAAM,SAAQ,OAAM,WAAW,CAAA,IAGnDS,MAAe,aACT,gBAAAL,EAAAJ,GAAA,EAAc,OAAM,SAAQ,OAAOO,EAAY,CAAA,IAGrDE,MAAe,SACT,gBAAAL,EAAAJ,GAAA,EAAc,OAAM,UAAS,OAAOO,EAAY,CAAA,IAGlD,gBAAAH,EAAAC,GAAA,EAAK,WAAU,aAAa,UAAWE,EAAA,CAAA,GAGlCG,IAAAC,EAAKL,CAAS;"}
1
+ {"version":3,"file":"card-title.js","sources":["../../../src/features/homework/card-title.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport type { TCourseType, TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\nconst LabelledTitle = ({ label, title }: { label: string; title: string }) => (\n <FlexView>\n <FlexView $background=\"BLACK_T_60\" $width=\"fit-content\" $gutterX={0.25}>\n <Text $color=\"WHITE\" $renderAs=\"ac4-black\">\n {label}\n </Text>\n </FlexView>\n <Text $renderAs=\"ac4-black\">{title}</Text>\n </FlexView>\n);\n\nconst CardTitle = ({\n cardHeader,\n nodeType,\n courseType,\n}: {\n cardHeader: string;\n nodeType: TNodeTypes;\n courseType?: TCourseType;\n}) => {\n if (nodeType === 'MASTERY') {\n return <LabelledTitle label=\"Smart\" title=\"Practice\" />;\n }\n\n if (courseType && courseType === 'REMEDIAL') {\n return <LabelledTitle label=\"EXTRA\" title={cardHeader} />;\n }\n\n if (courseType && courseType === 'EXAM') {\n return <LabelledTitle label=\"CUSTOM\" title={cardHeader} />;\n }\n\n return <Text $renderAs=\"ac4-black\">{cardHeader}</Text>;\n};\n\nexport default memo(CardTitle);\n"],"names":["LabelledTitle","label","title","FlexView","jsx","Text","CardTitle","cardHeader","nodeType","courseType","CardTitle$1","memo"],"mappings":";;;;AAMA,MAAMA,IAAgB,CAAC,EAAE,OAAAC,GAAO,OAAAC,EAAM,wBACnCC,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACD,GAAS,EAAA,aAAY,cAAa,QAAO,eAAc,UAAU,MAChE,UAAC,gBAAAC,EAAAC,GAAA,EAAK,QAAO,SAAQ,WAAU,aAC5B,YACH,CAAA,GACF;AAAA,EACC,gBAAAD,EAAAC,GAAA,EAAK,WAAU,aAAa,UAAMH,GAAA;AAAA,EACrC,CAAA,GAGII,IAAY,CAAC;AAAA,EACjB,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AACF,MAKMD,MAAa,YACP,gBAAAJ,EAAAJ,GAAA,EAAc,OAAM,SAAQ,OAAM,WAAW,CAAA,IAGnDS,KAAcA,MAAe,aACvB,gBAAAL,EAAAJ,GAAA,EAAc,OAAM,SAAQ,OAAOO,EAAY,CAAA,IAGrDE,KAAcA,MAAe,SACvB,gBAAAL,EAAAJ,GAAA,EAAc,OAAM,UAAS,OAAOO,EAAY,CAAA,IAGlD,gBAAAH,EAAAC,GAAA,EAAK,WAAU,aAAa,UAAWE,EAAA,CAAA,GAGlCG,IAAAC,EAAKL,CAAS;"}
@@ -2,12 +2,12 @@ import { jsxs as a, jsx as e } from "react/jsx-runtime";
2
2
  import { memo as f } from "react";
3
3
  import { useTheme as p } from "styled-components";
4
4
  import { ILLUSTRATIONS as s } from "../../../../assets/illustrations/illustrations.js";
5
- import l from "../../../auth/comps/linear-progress-bar/linear-progress-bar.js";
6
- import d from "../../../ui/image/image.js";
5
+ import l from "../../../ui/image/image.js";
7
6
  import t from "../../../ui/layout/flex-view.js";
8
- import { EDeviceType as u } from "../../../ui/theme/constants.js";
7
+ import { EDeviceType as d } from "../../../ui/theme/constants.js";
8
+ import u from "../../../ui/linear-progress-bar/linear-progress-bar.js";
9
9
  const T = ({ progressPercentage: r, showProgress: o, HeaderAvatar: m }) => {
10
- const { device: i } = p(), n = i <= u.TABLET, c = o && r;
10
+ const { device: i } = p(), n = i <= d.TABLET, c = o && r;
11
11
  return n ? /* @__PURE__ */ a(
12
12
  t,
13
13
  {
@@ -19,7 +19,7 @@ const T = ({ progressPercentage: r, showProgress: o, HeaderAvatar: m }) => {
19
19
  $flexColumnGapX: c ? 1 : 0,
20
20
  children: [
21
21
  m,
22
- o && r ? /* @__PURE__ */ e(l, { percentage: r, borderRadius: 8 }) : /* @__PURE__ */ e(t, { $flex: 1, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ e(d, { width: 90, src: s.CIRCLE_CUEMATH_LOGO_WHITE }) })
22
+ o && r ? /* @__PURE__ */ e(u, { percentage: r, borderRadius: 8 }) : /* @__PURE__ */ e(t, { $flex: 1, $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ e(l, { width: 90, src: s.CIRCLE_CUEMATH_LOGO_WHITE }) })
23
23
  ]
24
24
  }
25
25
  ) : null;
@@ -1 +1 @@
1
- {"version":3,"file":"compact-header.js","sources":["../../../../../src/features/parent-dashboard/comps/compact-header/compact-header.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport LinearProgressBar from '../../../auth/comps/linear-progress-bar/linear-progress-bar';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport type { ICompactHeaderProps } from './compact-header-types';\n\nconst CompactHeader = ({ progressPercentage, showProgress, HeaderAvatar }: ICompactHeaderProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n const showProgressBar = showProgress && progressPercentage;\n\n if (!isCompact) return null;\n\n return (\n <FlexView\n $gutterX={1}\n $gapX={1}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_T_05\"\n $flexColumnGapX={showProgressBar ? 1 : 0}\n >\n {HeaderAvatar}\n {showProgress && progressPercentage ? (\n <LinearProgressBar percentage={progressPercentage} borderRadius={8} />\n ) : (\n <FlexView $flex={1} $justifyContent=\"center\" $alignItems=\"center\">\n <Image width={90} src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} />\n </FlexView>\n )}\n </FlexView>\n );\n};\n\nexport default memo(CompactHeader);\n"],"names":["CompactHeader","progressPercentage","showProgress","HeaderAvatar","device","useTheme","isCompact","EDeviceType","showProgressBar","jsxs","FlexView","jsx","LinearProgressBar","Image","ILLUSTRATIONS","CompactHeader$1","memo"],"mappings":";;;;;;;;AAUA,MAAMA,IAAgB,CAAC,EAAE,oBAAAC,GAAoB,cAAAC,GAAc,cAAAC,QAAwC;AAC3F,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY,QAClCC,IAAkBN,KAAgBD;AAEpC,SAACK,IAGH,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,iBAAiBF,IAAkB,IAAI;AAAA,MAEtC,UAAA;AAAA,QAAAL;AAAA,QACAD,KAAgBD,IACf,gBAAAU,EAACC,GAAkB,EAAA,YAAYX,GAAoB,cAAc,EAAA,CAAG,IAEpE,gBAAAU,EAACD,GAAS,EAAA,OAAO,GAAG,iBAAgB,UAAS,aAAY,UACvD,UAAC,gBAAAC,EAAAE,GAAA,EAAM,OAAO,IAAI,KAAKC,EAAc,0BAAA,CAA2B,EAClE,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAjBiB;AAqBzB,GAEeC,IAAAC,EAAKhB,CAAa;"}
1
+ {"version":3,"file":"compact-header.js","sources":["../../../../../src/features/parent-dashboard/comps/compact-header/compact-header.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport type { ICompactHeaderProps } from './compact-header-types';\nimport LinearProgressBar from '../../../ui/linear-progress-bar/linear-progress-bar';\n\nconst CompactHeader = ({ progressPercentage, showProgress, HeaderAvatar }: ICompactHeaderProps) => {\n const { device } = useTheme();\n const isCompact = device <= EDeviceType.TABLET;\n const showProgressBar = showProgress && progressPercentage;\n\n if (!isCompact) return null;\n\n return (\n <FlexView\n $gutterX={1}\n $gapX={1}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_T_05\"\n $flexColumnGapX={showProgressBar ? 1 : 0}\n >\n {HeaderAvatar}\n {showProgress && progressPercentage ? (\n <LinearProgressBar percentage={progressPercentage} borderRadius={8} />\n ) : (\n <FlexView $flex={1} $justifyContent=\"center\" $alignItems=\"center\">\n <Image width={90} src={ILLUSTRATIONS.CIRCLE_CUEMATH_LOGO_WHITE} />\n </FlexView>\n )}\n </FlexView>\n );\n};\n\nexport default memo(CompactHeader);\n"],"names":["CompactHeader","progressPercentage","showProgress","HeaderAvatar","device","useTheme","isCompact","EDeviceType","showProgressBar","jsxs","FlexView","jsx","LinearProgressBar","Image","ILLUSTRATIONS","CompactHeader$1","memo"],"mappings":";;;;;;;;AAUA,MAAMA,IAAgB,CAAC,EAAE,oBAAAC,GAAoB,cAAAC,GAAc,cAAAC,QAAwC;AAC3F,QAAA,EAAE,QAAAC,MAAWC,KACbC,IAAYF,KAAUG,EAAY,QAClCC,IAAkBN,KAAgBD;AAEpC,SAACK,IAGH,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAU;AAAA,MACV,OAAO;AAAA,MACP,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,aAAY;AAAA,MACZ,iBAAiBF,IAAkB,IAAI;AAAA,MAEtC,UAAA;AAAA,QAAAL;AAAA,QACAD,KAAgBD,IACf,gBAAAU,EAACC,GAAkB,EAAA,YAAYX,GAAoB,cAAc,EAAA,CAAG,IAEpE,gBAAAU,EAACD,GAAS,EAAA,OAAO,GAAG,iBAAgB,UAAS,aAAY,UACvD,UAAC,gBAAAC,EAAAE,GAAA,EAAM,OAAO,IAAI,KAAKC,EAAc,0BAAA,CAA2B,EAClE,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAjBiB;AAqBzB,GAEeC,IAAAC,EAAKhB,CAAa;"}
@@ -0,0 +1,13 @@
1
+ import { createGetAPI as r, createPatchAPI as o } from "@cuemath/rest-api";
2
+ import { BASE_URL_V1 as e } from "../../../../constants/api.js";
3
+ const { useGet: p, invalidate: a } = r({
4
+ getURL: (t) => `${e}/monthly-progress-reports/${t}`
5
+ }), { usePatch: h } = o({
6
+ getURL: (t) => `${e}/monthly-progress-reports/${t}`
7
+ });
8
+ export {
9
+ a as invalidateMonthlyReport,
10
+ p as useMonthlyReportGet,
11
+ h as useMonthlyReportPatch
12
+ };
13
+ //# sourceMappingURL=use-monthly-report-get.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-monthly-report-get.js","sources":["../../../../../src/features/timeline/monthly-report/api/use-monthly-report-get.ts"],"sourcesContent":["import { createGetAPI, createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../../constants/api';\nimport { type IMonthlyReportResponse } from '../monthly-report-types';\n\nconst { useGet: useMonthlyReportGet, invalidate: invalidateMonthlyReport } =\n createGetAPI<IMonthlyReportResponse>({\n getURL: (reportId: string) => {\n return `${BASE_URL_V1}/monthly-progress-reports/${reportId}`;\n },\n });\n\nconst { usePatch: useMonthlyReportPatch } = createPatchAPI<\n IMonthlyReportResponse,\n { feedback: string }\n>({\n getURL: (reportId: string) => {\n return `${BASE_URL_V1}/monthly-progress-reports/${reportId}`;\n },\n});\n\nexport { useMonthlyReportGet, useMonthlyReportPatch, invalidateMonthlyReport };\n"],"names":["useMonthlyReportGet","invalidateMonthlyReport","createGetAPI","reportId","BASE_URL_V1","useMonthlyReportPatch","createPatchAPI"],"mappings":";;AAKA,MAAM,EAAE,QAAQA,GAAqB,YAAYC,EAAA,IAC/CC,EAAqC;AAAA,EACnC,QAAQ,CAACC,MACA,GAAGC,CAAW,6BAA6BD,CAAQ;AAE9D,CAAC,GAEG,EAAE,UAAUE,EAAsB,IAAIC,EAG1C;AAAA,EACA,QAAQ,CAACH,MACA,GAAGC,CAAW,6BAA6BD,CAAQ;AAE9D,CAAC;"}