@cuemath/leap 3.2.15-beta-0.1 → 3.2.15-link.1

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 (306) hide show
  1. package/dist/assets/illustrations/illustrations.js +6 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/after-noon.js +34 -0
  4. package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
  5. package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
  6. package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
  7. package/dist/assets/line-icons/icons/evening.js +35 -0
  8. package/dist/assets/line-icons/icons/evening.js.map +1 -0
  9. package/dist/assets/line-icons/icons/morning.js +35 -0
  10. package/dist/assets/line-icons/icons/morning.js.map +1 -0
  11. package/dist/assets/line-icons/icons/star3.js +32 -0
  12. package/dist/assets/line-icons/icons/star3.js.map +1 -0
  13. package/dist/assets/lottie/lottie.js +11 -6
  14. package/dist/assets/lottie/lottie.js.map +1 -1
  15. package/dist/features/analytics-events/platform-events-student.js +1 -2
  16. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  17. package/dist/features/analytics-events/platform-events-teacher.js +4 -6
  18. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  19. package/dist/features/analytics-events/whitelist-events.js +8 -10
  20. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  21. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
  22. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
  23. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +65 -0
  24. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
  25. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +92 -0
  26. package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
  27. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +18 -13
  28. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  29. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +12 -0
  30. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
  31. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
  32. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
  33. package/dist/features/auth/comps/otp-input/otp-input-styled.js +22 -0
  34. package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
  35. package/dist/features/auth/comps/otp-input/otp-input.js +51 -0
  36. package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
  37. package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
  38. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
  39. package/dist/features/auth/comps/pill-button/pill-button.js +75 -0
  40. package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
  41. package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
  42. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  43. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
  44. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
  45. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
  46. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
  47. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
  48. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  49. package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
  50. package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
  51. package/dist/features/auth/comps/tabs/tabs.js +5 -5
  52. package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
  53. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +19 -0
  54. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +1 -0
  55. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +32 -0
  56. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +1 -0
  57. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +44 -0
  58. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +1 -0
  59. package/dist/features/auth/signup-v2/signup-header/signup-header.js +54 -0
  60. package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +1 -0
  61. package/dist/features/auth/signup-v2/signup-options/signup-options.js +83 -0
  62. package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +1 -0
  63. package/dist/features/chapters-v2/utils/node-card-utils.js +9 -9
  64. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  65. package/dist/features/communication/pub-sub/constants.js +4 -7
  66. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  67. package/dist/features/homework/homework-card-view.js +97 -85
  68. package/dist/features/homework/homework-card-view.js.map +1 -1
  69. package/dist/features/homework/homework-card.js +42 -44
  70. package/dist/features/homework/homework-card.js.map +1 -1
  71. package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
  72. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  73. package/dist/features/homework/hw-card-list/hw-card-list.js +50 -57
  74. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  75. package/dist/features/homework/utils.js +27 -33
  76. package/dist/features/homework/utils.js.map +1 -1
  77. package/dist/features/journey/comps/coachmark/coachmark.js +28 -29
  78. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  79. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
  80. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  81. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  82. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  83. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  84. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  85. package/dist/features/journey/use-journey/journey-context-provider.js +72 -73
  86. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  87. package/dist/features/journey/use-journey/journey-styled.js +4 -6
  88. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  89. package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
  90. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  91. package/dist/features/puzzles/comps/puzzle-card.js +30 -64
  92. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  93. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
  94. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  95. package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
  96. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  97. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
  98. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  99. package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
  100. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  101. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
  102. package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
  103. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
  104. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
  105. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
  106. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
  107. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
  108. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
  109. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
  110. package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
  111. package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
  112. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
  113. package/dist/features/ui/accordion/accordion.js +62 -0
  114. package/dist/features/ui/accordion/accordion.js.map +1 -0
  115. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
  116. package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
  117. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
  118. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  119. package/dist/features/ui/image/image.js +1 -1
  120. package/dist/features/ui/image/image.js.map +1 -1
  121. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  122. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  123. package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
  124. package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
  125. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +5 -5
  126. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
  127. package/dist/features/ui/inputs/text-input/text-input.js +19 -18
  128. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  129. package/dist/features/ui/modals/modal-styled.js +43 -8
  130. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  131. package/dist/features/ui/modals/modal.js +37 -27
  132. package/dist/features/ui/modals/modal.js.map +1 -1
  133. package/dist/features/ui/nudge/nudge-styled.js +7 -14
  134. package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
  135. package/dist/features/ui/nudge/nudge.js +12 -13
  136. package/dist/features/ui/nudge/nudge.js.map +1 -1
  137. package/dist/features/ui/text/text.js +31 -29
  138. package/dist/features/ui/text/text.js.map +1 -1
  139. package/dist/features/ui/theme/button.js +78 -78
  140. package/dist/features/ui/theme/button.js.map +1 -1
  141. package/dist/features/worksheet/worksheet/worksheet-helpers.js +73 -75
  142. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  143. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +25 -29
  144. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  145. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
  146. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  147. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
  148. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  149. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
  150. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  151. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
  152. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  153. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  154. package/dist/features/worksheet/worksheet/worksheet.js +313 -307
  155. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  156. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  157. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  158. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
  159. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  160. package/dist/index.d.ts +156 -105
  161. package/dist/index.js +536 -520
  162. package/dist/index.js.map +1 -1
  163. package/dist/static/animated-avatar.1ad58b1d.json +1 -0
  164. package/dist/static/animated-avatar.69b07505.json +1 -0
  165. package/dist/static/animated-avatar.9c560b46.json +1 -0
  166. package/dist/static/calendar-purple.1a840b41.svg +1 -0
  167. package/dist/static/flying-disk.c7f6ed39.json +1 -0
  168. package/dist/static/graduation-cap.3be3340a.json +1 -0
  169. package/dist/static/handshake.287e7dfb.svg +1 -0
  170. package/dist/static/light-bulb.c6db0b23.json +1 -0
  171. package/dist/static/money.332aacf1.svg +1 -0
  172. package/dist/static/muscle.9bcfb8a7.json +1 -0
  173. package/dist/static/nudge-tap.5cb30093.json +1057 -0
  174. package/dist/static/parent-avatar.822c7b9b.svg +1 -0
  175. package/dist/static/pencil.23df9da0.json +1 -0
  176. package/dist/static/plus-sign.de6af957.json +1 -0
  177. package/dist/static/racing-car.2cbf864e.json +1 -0
  178. package/dist/static/rocket.0a3ccab0.json +1 -0
  179. package/dist/static/shovel.abeec04c.json +1 -0
  180. package/dist/static/stripe-blurple.6abf422f.svg +1 -0
  181. package/dist/static/trustpilot.bd3d79e1.svg +1 -0
  182. package/package.json +2 -3
  183. package/dist/assets/line-icons/icons/hint-fill.js +0 -35
  184. package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
  185. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
  186. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
  187. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
  188. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
  189. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
  190. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
  191. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
  192. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
  193. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
  194. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
  195. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
  196. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
  197. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
  198. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
  199. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
  200. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
  201. package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
  202. package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
  203. package/dist/features/puzzles/app/puzzle-app-styled.js +0 -81
  204. package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
  205. package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
  206. package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
  207. package/dist/features/puzzles/app/puzzle-app.js +0 -82
  208. package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
  209. package/dist/features/puzzles/constants/puzzle-container.js +0 -8
  210. package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
  211. package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
  212. package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
  213. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
  214. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
  215. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
  216. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
  217. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
  218. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
  219. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
  220. package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
  221. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
  222. package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
  223. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
  224. package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +0 -1
  225. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  226. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  227. package/dist/features/worksheet/worksheet/mocks/activity.js +0 -6
  228. package/dist/features/worksheet/worksheet/mocks/activity.js.map +0 -1
  229. package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js +0 -38
  230. package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js.map +0 -1
  231. package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js +0 -38
  232. package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js.map +0 -1
  233. package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js +0 -38
  234. package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js.map +0 -1
  235. package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js +0 -38
  236. package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js.map +0 -1
  237. package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js +0 -38
  238. package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js.map +0 -1
  239. package/dist/features/worksheet/worksheet/mocks/behaviors/index.js +0 -95
  240. package/dist/features/worksheet/worksheet/mocks/behaviors/index.js.map +0 -1
  241. package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js +0 -38
  242. package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js.map +0 -1
  243. package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js +0 -38
  244. package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js.map +0 -1
  245. package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js +0 -38
  246. package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js.map +0 -1
  247. package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js +0 -38
  248. package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js.map +0 -1
  249. package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js +0 -38
  250. package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js.map +0 -1
  251. package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js +0 -41
  252. package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js.map +0 -1
  253. package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js +0 -38
  254. package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js.map +0 -1
  255. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js +0 -41
  256. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js.map +0 -1
  257. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js +0 -39
  258. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js.map +0 -1
  259. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js +0 -39
  260. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js.map +0 -1
  261. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js +0 -39
  262. package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js.map +0 -1
  263. package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js +0 -39
  264. package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js.map +0 -1
  265. package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js +0 -39
  266. package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js.map +0 -1
  267. package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js +0 -38
  268. package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js.map +0 -1
  269. package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js +0 -38
  270. package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js.map +0 -1
  271. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js +0 -38
  272. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js.map +0 -1
  273. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js +0 -38
  274. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js.map +0 -1
  275. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js +0 -39
  276. package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js.map +0 -1
  277. package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js +0 -38
  278. package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js.map +0 -1
  279. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js +0 -38
  280. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js.map +0 -1
  281. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js +0 -38
  282. package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js.map +0 -1
  283. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js +0 -38
  284. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js.map +0 -1
  285. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js +0 -38
  286. package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js.map +0 -1
  287. package/dist/features/worksheet/worksheet/mocks/signed-requests.js +0 -5
  288. package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +0 -1
  289. package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +0 -57
  290. package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +0 -1
  291. package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +0 -231
  292. package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +0 -1
  293. package/dist/features/worksheet/worksheet/stories/worksheet-student.js +0 -174
  294. package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +0 -1
  295. package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +0 -255
  296. package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +0 -1
  297. package/dist/static/nudge-tap.0591aef4.json +0 -1
  298. package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
  299. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
  300. package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
  301. package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
  302. package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
  303. package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
  304. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
  305. package/dist/types/models/worksheet.js +0 -5
  306. package/dist/types/models/worksheet.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect } from 'react';\n\nimport { usePuzzleAssignedJourney } from '../../journey/hooks/use-puzzles-journey/use-puzzle-assigned';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport { getPuzzleCardData } from '../utils';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport HwCardListView from './hw-card-list-view';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({ studentId, stream, userType }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n canStartPuzzleAssignedJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n startHomePageJourney,\n canStartJourney,\n canStartPuzzleAssignedJourney,\n}) => {\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isProcessed,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n const { puzzleHWCardRef, startJourney: startPuzzleAssignedJourney } = usePuzzleAssignedJourney();\n\n useEffect(() => {\n if (isProcessed && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ studentId, stream, userType });\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isProcessed,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n useEffect(() => {\n const nodeData = getPuzzleCardData(hwDetails);\n\n if (\n canStartPuzzleAssignedJourney &&\n !isJourneyActive &&\n startPuzzleAssignedJourney &&\n nodeData\n ) {\n startPuzzleAssignedJourney(nodeData);\n }\n }, [canStartPuzzleAssignedJourney, hwDetails, isJourneyActive, startPuzzleAssignedJourney]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <div ref={homeworkRef}>\n <HwCardListView\n isHwProcessing={isProcessing}\n hwDetails={hwDetails}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onTestPreview={onTestPreview}\n onNodeView={onNodeView}\n onTestReview={onTestReview}\n onNodeReview={onNodeReview}\n onNodeUnassign={onNodeUnassign}\n userType={userType}\n studentId={studentId}\n puzzleHWCardRef={puzzleHWCardRef}\n />\n </div>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","startHomePageJourney","canStartJourney","canStartPuzzleAssignedJourney","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isProcessed","isStale","useGetHomeworks","isJourneyActive","useJourney","puzzleHWCardRef","startPuzzleAssignedJourney","usePuzzleAssignedJourney","useEffect","fetchHomeworks","useCallback","nodeData","getPuzzleCardData","jsx","HwCardListView","hwCardList","memo"],"mappings":";;;;;;;AA4BA,MAAMA,IAAwC,CAAC;AAAA,EAC7C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,+BAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,oBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,IACEC,EAAgBnB,CAAS,GACvB,EAAE,iBAAAoB,MAAoBC,KAEtB,EAAE,iBAAAC,GAAiB,cAAcC,MAA+BC,EAAyB;AAE/F,EAAAC,EAAU,MAAM;AACd,IAAIR,KAAeP,KAAwB,CAACU,KAAmBT,KAC7DD,EAAqB,EAAE,WAAAV,GAAW,QAAAC,GAAQ,UAAAF,EAAU,CAAA;AAAA,EACtD,GACC;AAAA,IACDY;AAAA,IACAS;AAAA,IACAH;AAAA,IACAP;AAAA,IACAT;AAAA,IACAD;AAAA,IACAD;AAAA,EAAA,CACD;AAEK,QAAA2B,IAAiBC,EAAY,MAAM;AACvC,IAAAd,EAAab,GAAW,QAAW,EAAE,QAAAC,EAAQ,CAAA;AAAA,EAC5C,GAAA,CAACY,GAAcZ,GAAQD,CAAS,CAAC;AAyBpC,SAvBAyB,EAAU,MAAM;AACV,IAAA,CAACT,KAAgBE,KACJQ;EAEhB,GAAA,CAACA,GAAgBV,GAAcE,CAAO,CAAC,GAE1CO,EAAU,MAAM;AACC,IAAAC;EAAA,GACd,CAACA,CAAc,CAAC,GAEnBD,EAAU,MAAM;AACR,UAAAG,IAAWC,EAAkBf,CAAS;AAE5C,IACEF,KACA,CAACQ,KACDG,KACAK,KAEAL,EAA2BK,CAAQ;AAAA,KAEpC,CAAChB,GAA+BE,GAAWM,GAAiBG,CAA0B,CAAC,GAEtFR,IACK,OAIP,gBAAAe,EAAC,OAAI,EAAA,KAAKrB,GACR,UAAA,gBAAAqB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBf;AAAA,MAChB,WAAAF;AAAA,MACA,aAAAZ;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAT;AAAA,MACA,WAAAC;AAAA,MACA,iBAAAsB;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEeU,IAAAC,EAAKnC,CAAU;"}
1
+ {"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect } from 'react';\n\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport HwCardListView from './hw-card-list-view';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({ studentId, stream, userType }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n startHomePageJourney,\n canStartJourney,\n}) => {\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isProcessed,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n useEffect(() => {\n if (isProcessed && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ studentId, stream, userType });\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isProcessed,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <div ref={homeworkRef}>\n <HwCardListView\n isHwProcessing={isProcessing}\n hwDetails={hwDetails}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onTestPreview={onTestPreview}\n onNodeView={onNodeView}\n onTestReview={onTestReview}\n onNodeReview={onNodeReview}\n onNodeUnassign={onNodeUnassign}\n userType={userType}\n studentId={studentId}\n />\n </div>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","startHomePageJourney","canStartJourney","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isProcessed","isStale","useGetHomeworks","isJourneyActive","useJourney","useEffect","fetchHomeworks","useCallback","jsx","HwCardListView","hwCardList","memo"],"mappings":";;;;;AAyBA,MAAMA,IAAwC,CAAC;AAAA,EAC7C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,oBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,IACEC,EAAgBlB,CAAS,GACvB,EAAE,iBAAAmB,MAAoBC;AAE5B,EAAAC,EAAU,MAAM;AACd,IAAIL,KAAeN,KAAwB,CAACS,KAAmBR,KAC7DD,EAAqB,EAAE,WAAAV,GAAW,QAAAC,GAAQ,UAAAF,EAAU,CAAA;AAAA,EACtD,GACC;AAAA,IACDY;AAAA,IACAQ;AAAA,IACAH;AAAA,IACAN;AAAA,IACAT;AAAA,IACAD;AAAA,IACAD;AAAA,EAAA,CACD;AAEK,QAAAuB,IAAiBC,EAAY,MAAM;AACvC,IAAAX,EAAaZ,GAAW,QAAW,EAAE,QAAAC,EAAQ,CAAA;AAAA,EAC5C,GAAA,CAACW,GAAcX,GAAQD,CAAS,CAAC;AAYpC,SAVAqB,EAAU,MAAM;AACV,IAAA,CAACN,KAAgBE,KACJK;EAEhB,GAAA,CAACA,GAAgBP,GAAcE,CAAO,CAAC,GAE1CI,EAAU,MAAM;AACC,IAAAC;EAAA,GACd,CAACA,CAAc,CAAC,GAEfR,IACK,OAIP,gBAAAU,EAAC,OAAI,EAAA,KAAKf,GACR,UAAA,gBAAAe;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBV;AAAA,MAChB,WAAAF;AAAA,MACA,aAAAX;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAT;AAAA,MACA,WAAAC;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEe0B,IAAAC,EAAK7B,CAAU;"}
@@ -1,54 +1,48 @@
1
1
  import { TESTS_CREATION_ANALYTICS_EVENTS as l } from "../milestone/milestone-tests/tests-creation/tests-creation-analytics-events.js";
2
- import { NODE_TYPE as n } from "../sheets/constants/sheet.js";
2
+ import { NODE_TYPE as E } from "../sheets/constants/sheet.js";
3
3
  import { HOMEWORK_ANALYTICS_EVENTS as c } from "./homework-analytics-events.js";
4
4
  const y = ({
5
- canResume: t,
6
- canStart: e,
7
- homeworkId: i,
8
- isHomeWork: o,
9
- isStudent: _,
10
- milestoneId: s,
11
- nodeType: r,
12
- studentId: a,
13
- userNodeId: d
5
+ canResume: a,
6
+ canStart: i,
7
+ homeworkId: e,
8
+ isHomeWork: _,
9
+ isStudent: o,
10
+ milestoneId: n,
11
+ nodeType: t,
12
+ studentId: r,
13
+ userNodeId: s
14
14
  }) => {
15
- if (_) {
16
- if (o)
17
- return e || t ? {
15
+ if (o) {
16
+ if (_)
17
+ return i || a ? {
18
18
  analyticsLabel: c.HOMEWORK_ATTEMPTED,
19
- analyticsProps: { student_id: a, node_type: r, homework_id: i }
19
+ analyticsProps: { student_id: r, node_type: t, homework_id: e }
20
20
  } : {
21
21
  analyticsLabel: "homework-student-menu",
22
- analyticsProps: { student_id: a, node_type: r, homework_id: i }
22
+ analyticsProps: { student_id: r, node_type: t, homework_id: e }
23
23
  };
24
- if (e || t)
24
+ if (i || a)
25
25
  return {
26
- analyticsLabel: r === n.DYNAMIC ? l.CUSTOM_TEST_ATTEMPTED : "node-attempted",
26
+ analyticsLabel: t === E.DYNAMIC ? l.CUSTOM_TEST_ATTEMPTED : "node-attempted",
27
27
  analyticsProps: {
28
- student_id: a,
29
- node_type: r,
30
- user_node_id: d,
31
- milestone_id: s,
32
- can_start: e,
33
- can_resume: t
28
+ student_id: r,
29
+ node_type: t,
30
+ user_node_id: s,
31
+ milestone_id: n,
32
+ can_start: i,
33
+ can_resume: a
34
34
  }
35
35
  };
36
36
  }
37
- return o ? {
37
+ return _ ? {
38
38
  analyticsLabel: "homework-card-teacher",
39
- analyticsProps: { student_id: a, node_type: r }
39
+ analyticsProps: { student_id: r, node_type: t }
40
40
  } : {
41
41
  analyticsLabel: "goals-card-teacher",
42
- analyticsProps: { student_id: a, node_type: r }
42
+ analyticsProps: { student_id: r, node_type: t }
43
43
  };
44
- }, T = (t) => {
45
- if (!t)
46
- return;
47
- const { assigned_homeworks: e } = t;
48
- return e.find((i) => i.node_type === n.PUZZLE_CARD);
49
44
  };
50
45
  export {
51
- y as getCardAnalyticProps,
52
- T as getPuzzleCardData
46
+ y as getCardAnalyticProps
53
47
  };
54
48
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomeworkDetails } from './hw-card-list/api/get-homeworks';\n\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../milestone/milestone-tests/tests-creation/tests-creation-analytics-events';\nimport { NODE_TYPE } from '../sheets/constants/sheet';\nimport { HOMEWORK_ANALYTICS_EVENTS } from './homework-analytics-events';\n\ninterface IGetCardAnalyticProps {\n canResume: boolean;\n canStart: boolean;\n homeworkId?: string;\n isHomeWork: boolean;\n isStudent: boolean;\n milestoneId?: string;\n nodeType: TNodeTypes;\n studentId: string;\n userNodeId: string | null;\n}\n\nconst getCardAnalyticProps = ({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n}: IGetCardAnalyticProps) => {\n if (isStudent) {\n if (isHomeWork) {\n if (canStart || canResume) {\n return {\n analyticsLabel: HOMEWORK_ANALYTICS_EVENTS.HOMEWORK_ATTEMPTED,\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n return {\n analyticsLabel: 'homework-student-menu',\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n if (canStart || canResume) {\n return {\n analyticsLabel:\n nodeType === NODE_TYPE.DYNAMIC\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : 'node-attempted',\n analyticsProps: {\n student_id: studentId,\n node_type: nodeType,\n user_node_id: userNodeId,\n milestone_id: milestoneId,\n can_start: canStart,\n can_resume: canResume,\n },\n };\n }\n }\n\n if (isHomeWork) {\n return {\n analyticsLabel: 'homework-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n }\n\n return {\n analyticsLabel: 'goals-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n};\n\nconst getPuzzleCardData = (hwDetails?: IHomeworkDetails) => {\n if (!hwDetails) {\n return undefined;\n }\n\n const { assigned_homeworks: assignedHomework } = hwDetails;\n\n return assignedHomework.find(homework => homework.node_type === NODE_TYPE.PUZZLE_CARD);\n};\n\nexport { getCardAnalyticProps, getPuzzleCardData };\n"],"names":["getCardAnalyticProps","canResume","canStart","homeworkId","isHomeWork","isStudent","milestoneId","nodeType","studentId","userNodeId","HOMEWORK_ANALYTICS_EVENTS","NODE_TYPE","TESTS_CREATION_ANALYTICS_EVENTS","getPuzzleCardData","hwDetails","assignedHomework","homework"],"mappings":";;;AAmBA,MAAMA,IAAuB,CAAC;AAAA,EAC5B,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAA6B;AAC3B,MAAIJ,GAAW;AACb,QAAID;AACF,aAAIF,KAAYD,IACP;AAAA,QACL,gBAAgBS,EAA0B;AAAA,QAC1C,gBAAgB,EAAE,YAAYF,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA,IAInF;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB,EAAE,YAAYK,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA;AAI1F,QAAID,KAAYD;AACP,aAAA;AAAA,QACL,gBACEM,MAAaI,EAAU,UACnBC,EAAgC,wBAChC;AAAA,QACN,gBAAgB;AAAA,UACd,YAAYJ;AAAA,UACZ,WAAWD;AAAA,UACX,cAAcE;AAAA,UACd,cAAcH;AAAA,UACd,WAAWJ;AAAA,UACX,YAAYD;AAAA,QACd;AAAA,MAAA;AAAA,EAGN;AAEA,SAAIG,IACK;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYI,GAAW,WAAWD,EAAS;AAAA,EAAA,IAI1D;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYC,GAAW,WAAWD,EAAS;AAAA,EAAA;AAEjE,GAEMM,IAAoB,CAACC,MAAiC;AAC1D,MAAI,CAACA;AACI;AAGH,QAAA,EAAE,oBAAoBC,EAAqB,IAAAD;AAEjD,SAAOC,EAAiB,KAAK,CAAAC,MAAYA,EAAS,cAAcL,EAAU,WAAW;AACvF;"}
1
+ {"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\n\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../milestone/milestone-tests/tests-creation/tests-creation-analytics-events';\nimport { NODE_TYPE } from '../sheets/constants/sheet';\nimport { HOMEWORK_ANALYTICS_EVENTS } from './homework-analytics-events';\n\ninterface IGetCardAnalyticProps {\n canResume: boolean;\n canStart: boolean;\n homeworkId?: string;\n isHomeWork: boolean;\n isStudent: boolean;\n milestoneId?: string;\n nodeType: TNodeTypes;\n studentId: string;\n userNodeId: string | null;\n}\n\nconst getCardAnalyticProps = ({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n}: IGetCardAnalyticProps) => {\n if (isStudent) {\n if (isHomeWork) {\n if (canStart || canResume) {\n return {\n analyticsLabel: HOMEWORK_ANALYTICS_EVENTS.HOMEWORK_ATTEMPTED,\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n return {\n analyticsLabel: 'homework-student-menu',\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n if (canStart || canResume) {\n return {\n analyticsLabel:\n nodeType === NODE_TYPE.DYNAMIC\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : 'node-attempted',\n analyticsProps: {\n student_id: studentId,\n node_type: nodeType,\n user_node_id: userNodeId,\n milestone_id: milestoneId,\n can_start: canStart,\n can_resume: canResume,\n },\n };\n }\n }\n\n if (isHomeWork) {\n return {\n analyticsLabel: 'homework-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n }\n\n return {\n analyticsLabel: 'goals-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n};\n\nexport { getCardAnalyticProps };\n"],"names":["getCardAnalyticProps","canResume","canStart","homeworkId","isHomeWork","isStudent","milestoneId","nodeType","studentId","userNodeId","HOMEWORK_ANALYTICS_EVENTS","NODE_TYPE","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;AAkBA,MAAMA,IAAuB,CAAC;AAAA,EAC5B,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAA6B;AAC3B,MAAIJ,GAAW;AACb,QAAID;AACF,aAAIF,KAAYD,IACP;AAAA,QACL,gBAAgBS,EAA0B;AAAA,QAC1C,gBAAgB,EAAE,YAAYF,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA,IAInF;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB,EAAE,YAAYK,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA;AAI1F,QAAID,KAAYD;AACP,aAAA;AAAA,QACL,gBACEM,MAAaI,EAAU,UACnBC,EAAgC,wBAChC;AAAA,QACN,gBAAgB;AAAA,UACd,YAAYJ;AAAA,UACZ,WAAWD;AAAA,UACX,cAAcE;AAAA,UACd,cAAcH;AAAA,UACd,WAAWJ;AAAA,UACX,YAAYD;AAAA,QACd;AAAA,MAAA;AAAA,EAGN;AAEA,SAAIG,IACK;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYI,GAAW,WAAWD,EAAS;AAAA,EAAA,IAI1D;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYC,GAAW,WAAWD,EAAS;AAAA,EAAA;AAEjE;"}
@@ -1,19 +1,18 @@
1
1
  import { jsx as i, jsxs as g, Fragment as m } from "react/jsx-runtime";
2
2
  import L from "../../../../node_modules/lodash.throttle/index.js";
3
- import { useState as a, useEffect as O, useMemo as p } from "react";
4
- import { useTheme as $ } from "styled-components";
3
+ import { useState as O, useEffect as $, useMemo as p } from "react";
4
+ import { useTheme as R } from "styled-components";
5
5
  import c from "../../../ui/arrow-tooltip/arrow-tooltip.js";
6
- import R from "../../../ui/nudge/nudge.js";
7
- import A from "../../../ui/portal/portal.js";
8
- import { EDeviceType as X } from "../../../ui/theme/constants.js";
6
+ import a from "../../../ui/nudge/nudge.js";
7
+ import { EDeviceType as A } from "../../../ui/theme/constants.js";
9
8
  import { IndicatorType as u } from "../../use-journey/constants.js";
10
- import { CoachmarkBody as Y, ClonedElementWrapper as h } from "./coachmark-styled.js";
11
- import { getTooltipXCoordinates as x } from "./coachmark-utils.js";
12
- const S = ({
9
+ import { CoachmarkBody as X, ClonedElementWrapper as h } from "./coachmark-styled.js";
10
+ import { getTooltipXCoordinates as Y } from "./coachmark-utils.js";
11
+ const V = ({
13
12
  coachmark: e,
14
13
  isInsideScrollView: T
15
14
  }) => {
16
- const t = e.originalElementToHighlightRef.current, { device: C, zIndex: I } = $(), [P, v] = a(() => {
15
+ const t = e.originalElementToHighlightRef.current, { device: C, zIndex: I } = R(), [v, E] = O(() => {
17
16
  const o = t == null ? void 0 : t.getBoundingClientRect();
18
17
  return {
19
18
  top: ((o == null ? void 0 : o.top) ?? 0) + window.scrollY,
@@ -21,32 +20,32 @@ const S = ({
21
20
  width: (o == null ? void 0 : o.width) ?? 0,
22
21
  height: (o == null ? void 0 : o.height) ?? 0
23
22
  };
24
- }), r = L(() => {
23
+ }), n = L(() => {
25
24
  const o = t == null ? void 0 : t.getBoundingClientRect();
26
- o && v({
25
+ o && E({
27
26
  top: o.top + window.scrollY,
28
27
  left: o.left + window.scrollX,
29
28
  width: o.width,
30
29
  height: o.height
31
30
  });
32
31
  }, 100), {
33
- top: n = 0,
32
+ top: r = 0,
34
33
  left: l = 0,
35
- height: E = 0,
34
+ height: P = 0,
36
35
  width: b = 0
37
- } = T ? P : (t == null ? void 0 : t.getBoundingClientRect()) ?? {};
38
- O(() => (window.addEventListener("resize", r), window.addEventListener("scroll", r), () => {
39
- window.removeEventListener("resize", r), window.removeEventListener("scroll", r);
40
- }), [r, t]);
41
- const f = C === X.MOBILE, d = I.JOURNEY_OVERLAY, s = p(() => t ? window.getComputedStyle(t).position === "absolute" : !1, [t]), w = p(() => {
36
+ } = T ? v : (t == null ? void 0 : t.getBoundingClientRect()) ?? {};
37
+ $(() => (window.addEventListener("resize", n), window.addEventListener("scroll", n), () => {
38
+ window.removeEventListener("resize", n), window.removeEventListener("scroll", n);
39
+ }), [n, t]);
40
+ const w = C === A.MOBILE, d = I.JOURNEY_OVERLAY, s = p(() => t ? window.getComputedStyle(t).position === "absolute" : !1, [t]), f = p(() => {
42
41
  const o = e.indicator;
43
42
  return {
44
- width: f ? 246 : 264,
43
+ width: w ? 246 : 264,
45
44
  // Can be over ridden
46
- tooltipXCoOrdinates: x(o),
45
+ tooltipXCoOrdinates: Y(o),
47
46
  zIndex: d + 1,
48
47
  ...o,
49
- tooltipItem: /* @__PURE__ */ i(Y, { children: o.tooltipItem }),
48
+ tooltipItem: /* @__PURE__ */ i(X, { children: o.tooltipItem }),
50
49
  alwaysVisible: !0,
51
50
  renderAs: "primary",
52
51
  // Deprecate this
@@ -56,31 +55,31 @@ const S = ({
56
55
  type: u.TOOLTIP,
57
56
  isAnimated: !0
58
57
  };
59
- }, [d, e.indicator, f]), y = p(() => {
58
+ }, [d, e.indicator, w]), y = p(() => {
60
59
  const o = e.indicator;
61
60
  return {
62
61
  ...o,
63
62
  nudgePointerX: l + (o.nudgePointerX ?? 0),
64
- nudgePointerY: n + (o.nudgePointerY ?? 0)
63
+ nudgePointerY: r + (o.nudgePointerY ?? 0)
65
64
  };
66
- }, [e.indicator, l, n]);
65
+ }, [e.indicator, l, r]);
67
66
  return !t || !e.isActive ? null : e.type === u.TOOLTIP ? s ? /* @__PURE__ */ g(m, { children: [
68
67
  e.elementToHighlight,
69
- /* @__PURE__ */ i(h, { $position: "absolute", $top: n, $left: l, children: /* @__PURE__ */ i(c, { ...w, children: /* @__PURE__ */ i("div", { style: { height: E, width: b } }) }) })
70
- ] }) : /* @__PURE__ */ i(h, { $position: "absolute", $top: n, $left: l, children: /* @__PURE__ */ i(c, { ...w, children: e.elementToHighlight }) }) : e.type === u.NUDGE ? /* @__PURE__ */ g(m, { children: [
68
+ /* @__PURE__ */ i(h, { $position: "absolute", $top: r, $left: l, children: /* @__PURE__ */ i(c, { ...f, children: /* @__PURE__ */ i("div", { style: { height: P, width: b } }) }) })
69
+ ] }) : /* @__PURE__ */ i(h, { $position: "absolute", $top: r, $left: l, children: /* @__PURE__ */ i(c, { ...f, children: e.elementToHighlight }) }) : e.type === u.NUDGE ? /* @__PURE__ */ g(m, { children: [
71
70
  /* @__PURE__ */ i(
72
71
  h,
73
72
  {
74
- $top: s ? 0 : n,
73
+ $top: s ? 0 : r,
75
74
  $left: s ? 0 : l,
76
75
  $position: s ? "relative" : "absolute",
77
76
  children: e.elementToHighlight
78
77
  }
79
78
  ),
80
- /* @__PURE__ */ i(A, { portalId: "tooltip-root", children: /* @__PURE__ */ i(R, { zIndex: d + 1, ...y }) })
79
+ /* @__PURE__ */ i(a, { zIndex: d + 1, ...y })
81
80
  ] }) : null;
82
81
  };
83
82
  export {
84
- S as Coachmark
83
+ V as Coachmark
85
84
  };
86
85
  //# sourceMappingURL=coachmark.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport throttle from 'lodash.throttle';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport Portal from '../../../ui/portal/portal';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { getTooltipXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps; isInsideScrollView: boolean }> = ({\n coachmark,\n isInsideScrollView,\n}) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { device, zIndex } = useTheme();\n\n const [position, setPosition] = useState(() => {\n const rect = targetElement?.getBoundingClientRect();\n\n return {\n top: (rect?.top ?? 0) + window.scrollY,\n left: rect?.left ?? 0 + window.scrollX,\n width: rect?.width ?? 0,\n height: rect?.height ?? 0,\n };\n });\n\n const handlePositionChange = throttle(() => {\n const rect = targetElement?.getBoundingClientRect();\n\n if (rect) {\n setPosition({\n top: rect.top + window.scrollY,\n left: rect.left + window.scrollX,\n width: rect.width,\n height: rect.height,\n });\n }\n }, 100);\n\n const {\n top = 0,\n left = 0,\n height = 0,\n width = 0,\n } = isInsideScrollView ? position : targetElement?.getBoundingClientRect() ?? {};\n\n useEffect(() => {\n window.addEventListener('resize', handlePositionChange);\n window.addEventListener('scroll', handlePositionChange);\n\n return () => {\n window.removeEventListener('resize', handlePositionChange);\n window.removeEventListener('scroll', handlePositionChange);\n };\n }, [handlePositionChange, targetElement]);\n\n const isMobile = device === EDeviceType.MOBILE;\n\n const BLUR_OVERLAY_Z_INDEX = zIndex.JOURNEY_OVERLAY;\n\n const isAbsolute = useMemo(() => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: isMobile ? 246 : 264, // Can be over ridden\n tooltipXCoOrdinates: getTooltipXCoordinates(arrowToolTipProps),\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: arrowToolTipProps.arrowColor || 'WHITE',\n borderColor: arrowToolTipProps.borderColor || 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [BLUR_OVERLAY_Z_INDEX, coachmark.indicator, isMobile]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute ? 0 : top}\n $left={isAbsolute ? 0 : left}\n $position={isAbsolute ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Portal portalId=\"tooltip-root\">\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </Portal>\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","isInsideScrollView","targetElement","device","zIndex","useTheme","position","setPosition","useState","rect","handlePositionChange","throttle","top","left","height","width","useEffect","isMobile","EDeviceType","BLUR_OVERLAY_Z_INDEX","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","getTooltipXCoordinates","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Portal","Nudge"],"mappings":"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"}
1
+ {"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport throttle from 'lodash.throttle';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { getTooltipXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps; isInsideScrollView: boolean }> = ({\n coachmark,\n isInsideScrollView,\n}) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { device, zIndex } = useTheme();\n\n const [position, setPosition] = useState(() => {\n const rect = targetElement?.getBoundingClientRect();\n\n return {\n top: (rect?.top ?? 0) + window.scrollY,\n left: rect?.left ?? 0 + window.scrollX,\n width: rect?.width ?? 0,\n height: rect?.height ?? 0,\n };\n });\n\n const handlePositionChange = throttle(() => {\n const rect = targetElement?.getBoundingClientRect();\n\n if (rect) {\n setPosition({\n top: rect.top + window.scrollY,\n left: rect.left + window.scrollX,\n width: rect.width,\n height: rect.height,\n });\n }\n }, 100);\n\n const {\n top = 0,\n left = 0,\n height = 0,\n width = 0,\n } = isInsideScrollView ? position : targetElement?.getBoundingClientRect() ?? {};\n\n useEffect(() => {\n window.addEventListener('resize', handlePositionChange);\n window.addEventListener('scroll', handlePositionChange);\n\n return () => {\n window.removeEventListener('resize', handlePositionChange);\n window.removeEventListener('scroll', handlePositionChange);\n };\n }, [handlePositionChange, targetElement]);\n\n const isMobile = device === EDeviceType.MOBILE;\n\n const BLUR_OVERLAY_Z_INDEX = zIndex.JOURNEY_OVERLAY;\n\n const isAbsolute = useMemo(() => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: isMobile ? 246 : 264, // Can be over ridden\n tooltipXCoOrdinates: getTooltipXCoordinates(arrowToolTipProps),\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: arrowToolTipProps.arrowColor || 'WHITE',\n borderColor: arrowToolTipProps.borderColor || 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [BLUR_OVERLAY_Z_INDEX, coachmark.indicator, isMobile]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute ? 0 : top}\n $left={isAbsolute ? 0 : left}\n $position={isAbsolute ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","isInsideScrollView","targetElement","device","zIndex","useTheme","position","setPosition","useState","rect","handlePositionChange","throttle","top","left","height","width","useEffect","isMobile","EDeviceType","BLUR_OVERLAY_Z_INDEX","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","getTooltipXCoordinates","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":"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"}
@@ -1,28 +1,22 @@
1
- import { jsxs as l, jsx as o, Fragment as s } from "react/jsx-runtime";
2
- import { memo as n } from "react";
3
- import d from "../../../ui/buttons/button/button.js";
4
- import p from "../../../ui/layout/flex-view.js";
5
- import a from "../../../ui/text/text.js";
6
- const c = ({
7
- text: e,
8
- element: r,
9
- buttonLabel: t,
10
- onButtonClick: m,
11
- ctaWidth: i
12
- }) => /* @__PURE__ */ l(p, { $flexRowGapX: 0.75, children: [
13
- r ? /* @__PURE__ */ o(s, { children: r }) : /* @__PURE__ */ o(a, { $renderAs: "ab2-bold", children: e }),
1
+ import { jsxs as i, jsx as o, Fragment as l } from "react/jsx-runtime";
2
+ import { memo as s } from "react";
3
+ import n from "../../../ui/buttons/button/button.js";
4
+ import d from "../../../ui/layout/flex-view.js";
5
+ import p from "../../../ui/text/text.js";
6
+ const a = ({ text: e, element: r, buttonLabel: t, onButtonClick: m }) => /* @__PURE__ */ i(d, { $flexRowGapX: 0.75, children: [
7
+ r ? /* @__PURE__ */ o(l, { children: r }) : /* @__PURE__ */ o(p, { $renderAs: "ab2-bold", children: e }),
14
8
  /* @__PURE__ */ o(
15
- d,
9
+ n,
16
10
  {
17
11
  label: t,
18
12
  size: "xsmall",
19
- width: i || 96,
13
+ widthX: 6,
20
14
  renderAs: "secondary",
21
15
  onClick: m
22
16
  }
23
17
  )
24
- ] }), T = n(c);
18
+ ] }), w = s(a);
25
19
  export {
26
- T as default
20
+ w as default
27
21
  };
28
22
  //# sourceMappingURL=tooltip-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip-item.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/tooltip-item.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface ITooltipItemProps {\n text?: string;\n element?: JSX.Element;\n buttonLabel: string;\n onButtonClick: () => void;\n ctaWidth?: string;\n}\n\nconst TooltipItem = ({\n text,\n element,\n buttonLabel,\n onButtonClick,\n ctaWidth,\n}: ITooltipItemProps) => (\n <FlexView $flexRowGapX={0.75}>\n {element ? <>{element}</> : <Text $renderAs=\"ab2-bold\">{text}</Text>}\n <Button\n label={buttonLabel}\n size=\"xsmall\"\n width={ctaWidth || 96}\n renderAs=\"secondary\"\n onClick={onButtonClick}\n />\n </FlexView>\n);\n\nexport default memo(TooltipItem);\n"],"names":["TooltipItem","text","element","buttonLabel","onButtonClick","ctaWidth","jsxs","FlexView","Text","jsx","Button","TooltipItem$1","memo"],"mappings":";;;;;AAgBA,MAAMA,IAAc,CAAC;AAAA,EACnB,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AACF,MACE,gBAAAC,EAACC,GAAS,EAAA,cAAc,MACrB,UAAA;AAAA,EAAAL,2BAAa,UAAQA,EAAA,CAAA,sBAAOM,GAAK,EAAA,WAAU,YAAY,UAAKP,EAAA,CAAA;AAAA,EAC7D,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOP;AAAA,MACP,MAAK;AAAA,MACL,OAAOE,KAAY;AAAA,MACnB,UAAS;AAAA,MACT,SAASD;AAAA,IAAA;AAAA,EACX;AAAA,EACF,CAAA,GAGaO,IAAAC,EAAKZ,CAAW;"}
1
+ {"version":3,"file":"tooltip-item.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/tooltip-item.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface ITooltipItemProps {\n text?: string;\n element?: JSX.Element;\n buttonLabel: string;\n onButtonClick: () => void;\n}\n\nconst TooltipItem = ({ text, element, buttonLabel, onButtonClick }: ITooltipItemProps) => (\n <FlexView $flexRowGapX={0.75}>\n {element ? <>{element}</> : <Text $renderAs=\"ab2-bold\">{text}</Text>}\n <Button\n label={buttonLabel}\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={onButtonClick}\n />\n </FlexView>\n);\n\nexport default memo(TooltipItem);\n"],"names":["TooltipItem","text","element","buttonLabel","onButtonClick","jsxs","FlexView","Text","jsx","Button","TooltipItem$1","memo"],"mappings":";;;;;AAeA,MAAMA,IAAc,CAAC,EAAE,MAAAC,GAAM,SAAAC,GAAS,aAAAC,GAAa,eAAAC,QACjD,gBAAAC,EAACC,GAAS,EAAA,cAAc,MACrB,UAAA;AAAA,EAAAJ,2BAAa,UAAQA,EAAA,CAAA,sBAAOK,GAAK,EAAA,WAAU,YAAY,UAAKN,EAAA,CAAA;AAAA,EAC7D,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAON;AAAA,MACP,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,UAAS;AAAA,MACT,SAASC;AAAA,IAAA;AAAA,EACX;AAAA,EACF,CAAA,GAGaM,IAAAC,EAAKX,CAAW;"}
@@ -1,5 +1,5 @@
1
- var R = /* @__PURE__ */ ((E) => (E.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", E.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", E.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", E.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", E.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", E.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", E.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.PUZZLE_ASSIGNED_JOURNEY = "PUZZLE_ASSIGNED_JOURNEY", E.PUZZLE_DASHBOARD_JOURNEY = "PUZZLE_DASHBOARD_JOURNEY", E))(R || {});
1
+ var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", R.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", R.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", R.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", R))(E || {});
2
2
  export {
3
- R as JOURNEY_ID_STUDENT
3
+ E as JOURNEY_ID_STUDENT
4
4
  };
5
5
  //# sourceMappingURL=journey-id-student.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n PUZZLE_ATTEMPT_JOURNEY = 'PUZZLE_ATTEMPT_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n PUZZLE_ASSIGNED_JOURNEY = 'PUZZLE_ASSIGNED_JOURNEY',\n PUZZLE_DASHBOARD_JOURNEY = 'PUZZLE_DASHBOARD_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCAGnCA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,0BAA0B,2BAC1BA,EAAA,2BAA2B,4BAhBjBA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCAGnCA,EAAA,kCAAkC,mCAClCA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAdhBA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,5 +1,5 @@
1
- var N = /* @__PURE__ */ ((E) => (E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.PUZZLE_ASSIGN_JOURNEY = "PUZZLE_ASSIGN_JOURNEY", E.PUZZLE_INTRO_JOURNEY = "PUZZLE_INTRO_JOURNEY", E.PUZZLE_REVIEW_JOURNEY = "PUZZLE_REVIEW_JOURNEY", E.PUZZLE_PROGRESS_JOURNEY = "PUZZLE_PROGRESS_JOURNEY", E.PUZZLE_UNASSIGN_JOURNEY = "PUZZLE_UNASSIGN_JOURNEY", E))(N || {});
1
+ var A = /* @__PURE__ */ ((E) => (E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E))(A || {});
2
2
  export {
3
- N as JOURNEY_ID_TEACHER
3
+ A as JOURNEY_ID_TEACHER
4
4
  };
5
5
  //# sourceMappingURL=journey-id-teacher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-id-teacher.js","sources":["../../../../src/features/journey/journey-id/journey-id-teacher.ts"],"sourcesContent":["export enum JOURNEY_ID_TEACHER {\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n PUZZLE_ASSIGN_JOURNEY = 'PUZZLE_ASSIGN_JOURNEY',\n PUZZLE_INTRO_JOURNEY = 'PUZZLE_INTRO_JOURNEY',\n PUZZLE_REVIEW_JOURNEY = 'PUZZLE_REVIEW_JOURNEY',\n PUZZLE_PROGRESS_JOURNEY = 'PUZZLE_PROGRESS_JOURNEY',\n PUZZLE_UNASSIGN_JOURNEY = 'PUZZLE_UNASSIGN_JOURNEY',\n}\n"],"names":["JOURNEY_ID_TEACHER"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAC1BA,EAAA,wBAAwB,yBACxBA,EAAA,uBAAuB,wBACvBA,EAAA,wBAAwB,yBACxBA,EAAA,0BAA0B,2BAC1BA,EAAA,0BAA0B,2BARhBA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"journey-id-teacher.js","sources":["../../../../src/features/journey/journey-id/journey-id-teacher.ts"],"sourcesContent":["export enum JOURNEY_ID_TEACHER {\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n}\n"],"names":["JOURNEY_ID_TEACHER"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAHhBA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,55 +1,55 @@
1
- import { jsxs as R, jsx as j } from "react/jsx-runtime";
2
- import { createContext as W, useState as s, useRef as k, useCallback as h, useMemo as M, useEffect as O } from "react";
3
- import { Coachmark as V } from "../comps/coachmark/coachmark.js";
4
- import { usePostUserJourney as G, useGetUserJourney as F } from "../user-journey-api/user-journey-api.js";
5
- import { Overlay as I } from "./journey-styled.js";
6
- const K = W(null), re = ({ children: T, appId: a, userId: c }) => {
7
- const [b, U] = s(!0), [q, z] = s(!1), [v, p] = s(null), [l, y] = s([]), [J, x] = s(!1), m = k(-1), t = k(void 0), f = k([]), [D, H] = s(!1), [A, L] = s({
1
+ import { jsxs as L, jsx as O } from "react/jsx-runtime";
2
+ import { createContext as N, useState as c, useRef as v, useCallback as h, useMemo as R, useEffect as T } from "react";
3
+ import { Coachmark as W } from "../comps/coachmark/coachmark.js";
4
+ import { usePostUserJourney as M, useGetUserJourney as V } from "../user-journey-api/user-journey-api.js";
5
+ import { Overlay as G } from "./journey-styled.js";
6
+ const F = N(null), I = ({ children: b, appId: i, userId: u }) => {
7
+ const [U, q] = c(!1), [k, p] = c(null), [a, l] = c([]), [f, x] = c(!1), m = v(-1), t = v(void 0), w = v([]), [z, B] = c(!1), [A, D] = c({
8
8
  height: window.innerHeight,
9
9
  width: window.innerWidth
10
- }), { post: $ } = G(), { data: w = null, get: _ } = F(), B = h(
11
- (e, r, o, C = !0) => {
12
- var d, n;
13
- if (l.length > 0) {
10
+ }), { post: _ } = M(), { data: C = null, get: $ } = V(), E = h(
11
+ (e, r, o) => {
12
+ var J, y;
13
+ if (a.length > 0) {
14
14
  console.error(
15
15
  `setJourney: Other Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
16
16
  );
17
17
  return;
18
18
  }
19
- x(!0), U(C), t.current = e, m.current = -1, y(
20
- r.map((u) => ({
21
- ...u,
19
+ x(!0), t.current = e, m.current = -1, l(
20
+ r.map((n) => ({
21
+ ...n,
22
22
  isActive: !1
23
23
  // New coachmarks are inactive by default
24
24
  }))
25
- ), o && (L({
26
- height: ((d = o.current) == null ? void 0 : d.clientHeight) || window.innerHeight,
27
- width: ((n = o.current) == null ? void 0 : n.clientWidth) || window.innerWidth
28
- }), H(!0));
25
+ ), o && (D({
26
+ height: ((J = o.current) == null ? void 0 : J.clientHeight) || window.innerHeight,
27
+ width: ((y = o.current) == null ? void 0 : y.clientWidth) || window.innerWidth
28
+ }), B(!0));
29
29
  },
30
- [l.length]
31
- ), i = h(() => {
32
- f.current.forEach((e) => {
30
+ [a.length]
31
+ ), s = h(() => {
32
+ w.current.forEach((e) => {
33
33
  clearTimeout(e);
34
- }), f.current = [], t.current = void 0, m.current = -1, y([]), x(!1);
35
- }, []), E = h(
34
+ }), w.current = [], t.current = void 0, m.current = -1, l([]), x(!1);
35
+ }, []), P = h(
36
36
  (e) => {
37
- i(), p((r) => r && !r.includes(e) ? [...r, e] : r), $({
38
- app_id: a,
39
- user_id: c,
37
+ s(), p((r) => r && !r.includes(e) ? [...r, e] : r), _({
38
+ app_id: i,
39
+ user_id: u,
40
40
  journey_id: e,
41
41
  journey_status: "COMPLETED"
42
42
  });
43
43
  },
44
- [a, i, $, c]
45
- ), P = h((e, r) => {
44
+ [i, s, _, u]
45
+ ), S = h((e, r) => {
46
46
  if (!t.current || e !== t.current) {
47
47
  console.error(
48
48
  t.current ? `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}` : "addCoachmark was called before setJourney and Journey ID is undefined"
49
49
  );
50
50
  return;
51
51
  }
52
- y((o) => [
52
+ l((o) => [
53
53
  ...o,
54
54
  {
55
55
  ...r,
@@ -57,87 +57,86 @@ const K = W(null), re = ({ children: T, appId: a, userId: c }) => {
57
57
  // New coachmarks are inactive by default
58
58
  }
59
59
  ]);
60
- }, []), S = h(
61
- (e, r = !1, o = 0, C = !1) => {
60
+ }, []), j = h(
61
+ (e, r = !1, o = 0, J = !1) => {
62
62
  if (!t.current || e !== t.current) {
63
63
  console.error(
64
64
  t.current ? "nextCoachmark was called before setJourney" : `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
65
65
  );
66
66
  return;
67
67
  }
68
- z(C), o !== 0 && y((n) => n.map((u) => ({ ...u, isActive: !1 })));
69
- const d = setTimeout(() => {
70
- clearTimeout(d);
68
+ q(J), o !== 0 && l((n) => n.map((d) => ({ ...d, isActive: !1 })));
69
+ const y = setTimeout(() => {
70
+ clearTimeout(y);
71
71
  const n = m.current + 1;
72
- y((u) => {
73
- if (n >= u.length || u.length === 0)
74
- return i(), [];
72
+ l((d) => {
73
+ if (n >= d.length || d.length === 0)
74
+ return s(), [];
75
75
  m.current = n;
76
- const g = [...u];
76
+ const g = [...d];
77
77
  return g[n].isActive = !0, n > 0 && (g[n - 1].isActive = r), g;
78
78
  });
79
79
  }, o);
80
- f.current.push(d);
80
+ w.current.push(y);
81
81
  },
82
- [i]
83
- ), N = M(
82
+ [s]
83
+ ), H = R(
84
84
  () => ({
85
- nextCoachmark: S,
86
- setJourney: B,
87
- addCoachmark: P,
88
- clearJourney: i,
89
- endJourney: E,
90
- coachmarks: l,
91
- userCompletedJourneyIds: v,
92
- isJourneyActive: J
85
+ nextCoachmark: j,
86
+ setJourney: E,
87
+ addCoachmark: S,
88
+ clearJourney: s,
89
+ endJourney: P,
90
+ coachmarks: a,
91
+ userCompletedJourneyIds: k,
92
+ isJourneyActive: f
93
93
  }),
94
94
  [
95
+ j,
96
+ E,
95
97
  S,
96
- B,
98
+ s,
97
99
  P,
98
- i,
99
- E,
100
- l,
101
- v,
102
- J
100
+ a,
101
+ k,
102
+ f
103
103
  ]
104
104
  );
105
- return O(() => {
106
- a && c && _(c, {
107
- app_id: a,
108
- user_id: c,
105
+ return T(() => {
106
+ i && u && $(u, {
107
+ app_id: i,
108
+ user_id: u,
109
109
  journey_status: "COMPLETED"
110
110
  });
111
- }, [a, _, c]), O(() => {
112
- if (w) {
113
- const e = w.map((r) => r.journey_id);
111
+ }, [i, $, u]), T(() => {
112
+ if (C) {
113
+ const e = C.map((r) => r.journey_id);
114
114
  p(e);
115
115
  }
116
- }, [w]), /* @__PURE__ */ R(K.Provider, { value: N, children: [
117
- J && /* @__PURE__ */ j(
118
- I,
116
+ }, [C]), /* @__PURE__ */ L(F.Provider, { value: H, children: [
117
+ f && /* @__PURE__ */ O(
118
+ G,
119
119
  {
120
120
  about: "journey-overlay",
121
121
  height: A.height,
122
122
  width: A.width,
123
- $isJourneyBlurred: q,
124
- $isBlockingJourney: b,
123
+ $isJourneyBlurred: U,
125
124
  "data-testid": t.current,
126
- children: l.map((e, r) => /* @__PURE__ */ j(
127
- V,
125
+ children: a.map((e, r) => /* @__PURE__ */ O(
126
+ W,
128
127
  {
129
128
  coachmark: e,
130
- isInsideScrollView: D
129
+ isInsideScrollView: z
131
130
  },
132
131
  `coachmark-${r}`
133
132
  ))
134
133
  }
135
134
  ),
136
- T
135
+ b
137
136
  ] });
138
137
  };
139
138
  export {
140
- K as JourneyContext,
141
- re as JourneyProvider
139
+ F as JourneyContext,
140
+ I as JourneyProvider
142
141
  };
143
142
  //# sourceMappingURL=journey-context-provider.js.map