@cuemath/leap 2.9.5 → 2.9.6-as2

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 (266) hide show
  1. package/dist/assets/illustrations/illustrations.js +9 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/alarm.js +41 -0
  4. package/dist/assets/line-icons/icons/alarm.js.map +1 -0
  5. package/dist/assets/line-icons/icons/bin2.js +7 -8
  6. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  7. package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
  8. package/dist/assets/line-icons/icons/dart.js +23 -0
  9. package/dist/assets/line-icons/icons/dart.js.map +1 -0
  10. package/dist/assets/line-icons/icons/exclamation.js +26 -0
  11. package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
  12. package/dist/assets/line-icons/icons/home2.js +25 -0
  13. package/dist/assets/line-icons/icons/home2.js.map +1 -0
  14. package/dist/assets/line-icons/icons/important.js +23 -0
  15. package/dist/assets/line-icons/icons/important.js.map +1 -0
  16. package/dist/assets/line-icons/icons/puzzle.js +25 -0
  17. package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
  18. package/dist/assets/line-icons/icons/recap.js +32 -0
  19. package/dist/assets/line-icons/icons/recap.js.map +1 -0
  20. package/dist/assets/line-icons/icons/skip-colored.js +43 -0
  21. package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
  22. package/dist/assets/line-icons/icons/status.js +41 -0
  23. package/dist/assets/line-icons/icons/status.js.map +1 -0
  24. package/dist/assets/line-icons/icons/testtube.js +33 -0
  25. package/dist/assets/line-icons/icons/testtube.js.map +1 -0
  26. package/dist/assets/lottie/lottie.js +9 -1
  27. package/dist/assets/lottie/lottie.js.map +1 -1
  28. package/dist/constants/api.js +3 -2
  29. package/dist/constants/api.js.map +1 -1
  30. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
  31. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  32. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
  33. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  34. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  35. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  36. package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
  37. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  38. package/dist/features/chapters-v2/api/chapter.js +10 -0
  39. package/dist/features/chapters-v2/api/chapter.js.map +1 -0
  40. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
  41. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
  42. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +26 -0
  43. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
  44. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +89 -0
  45. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
  46. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
  47. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
  48. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +97 -0
  49. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
  50. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +51 -0
  51. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
  52. package/dist/features/chapters-v2/chapter-details/chapter-details.js +103 -0
  53. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
  54. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
  55. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
  56. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +153 -0
  57. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
  58. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
  59. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
  60. package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
  61. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
  62. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
  63. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
  64. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +31 -0
  65. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
  66. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +180 -0
  67. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
  68. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +192 -0
  69. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
  70. package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
  71. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
  72. package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
  73. package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
  74. package/dist/features/chapters-v2/constants/block-constants.js +20 -0
  75. package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
  76. package/dist/features/chapters-v2/constants/node-constants.js +14 -0
  77. package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
  78. package/dist/features/chapters-v2/utils/index.js +41 -0
  79. package/dist/features/chapters-v2/utils/index.js.map +1 -0
  80. package/dist/features/chapters-v2/utils/node-card-utils.js +175 -0
  81. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
  82. package/dist/features/communication/pub-sub/constants.js +12 -6
  83. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  84. package/dist/features/homework/card-menu-options.js +38 -0
  85. package/dist/features/homework/card-menu-options.js.map +1 -0
  86. package/dist/features/homework/card-title.js +15 -0
  87. package/dist/features/homework/card-title.js.map +1 -0
  88. package/dist/features/homework/homework-card-view.js +141 -0
  89. package/dist/features/homework/homework-card-view.js.map +1 -0
  90. package/dist/features/homework/homework-card.js +206 -0
  91. package/dist/features/homework/homework-card.js.map +1 -0
  92. package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
  93. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
  94. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +63 -0
  95. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
  96. package/dist/features/homework/hw-card-list/hw-card-list.js +185 -0
  97. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
  98. package/dist/features/homework/node-progress.js +29 -0
  99. package/dist/features/homework/node-progress.js.map +1 -0
  100. package/dist/features/homework/styles.js +130 -0
  101. package/dist/features/homework/styles.js.map +1 -0
  102. package/dist/features/journey/comps/coachmark/coachmark-styled.js +12 -5
  103. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  104. package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
  105. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  106. package/dist/features/journey/hooks/use-home-page-journey.js +188 -0
  107. package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -0
  108. package/dist/features/journey/journey-id/journey-id-student.js +3 -2
  109. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  110. package/dist/features/journey/use-journey/journey-context-provider.js +65 -57
  111. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  112. package/dist/features/journey/use-journey/journey-styled.js +10 -5
  113. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  114. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  115. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  116. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
  117. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  118. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
  119. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  120. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
  121. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  122. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
  123. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  124. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
  125. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  126. package/dist/features/milestone/create/milestone-create.js +49 -43
  127. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  128. package/dist/features/milestone/create/utils/index.js +33 -38
  129. package/dist/features/milestone/create/utils/index.js.map +1 -1
  130. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  131. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  132. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  133. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  134. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
  135. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  136. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
  137. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  138. package/dist/features/milestone/edit/goal-edit-container.js +64 -62
  139. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  140. package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
  141. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  142. package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
  143. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  144. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  145. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  146. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
  147. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  148. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  149. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  150. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +137 -105
  151. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  152. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
  153. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  154. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +155 -175
  155. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  156. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
  157. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  158. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
  159. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  160. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
  161. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  162. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
  163. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  164. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
  165. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  166. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
  167. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  168. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +19 -23
  169. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  170. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
  171. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  172. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +118 -120
  173. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  174. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
  175. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
  176. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  177. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  178. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  179. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  180. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +114 -112
  181. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  182. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
  183. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
  184. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
  185. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
  186. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +85 -0
  187. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
  188. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
  189. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
  190. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +46 -50
  191. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  192. package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
  193. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
  194. package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
  195. package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
  196. package/dist/features/recent-chapters/recent-chapters.js +39 -0
  197. package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
  198. package/dist/features/sentry/constants/ignored.js +33 -0
  199. package/dist/features/sentry/constants/ignored.js.map +1 -0
  200. package/dist/features/sheet-v2/resource-list/resource-list.js +39 -0
  201. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
  202. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  203. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  204. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
  205. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  206. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
  207. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  208. package/dist/features/ui/constants/z-index.js +1 -1
  209. package/dist/features/ui/constants/z-index.js.map +1 -1
  210. package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
  211. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  212. package/dist/features/ui/context-menu/context-menu.js +30 -15
  213. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  214. package/dist/features/ui/theme/button.js +22 -107
  215. package/dist/features/ui/theme/button.js.map +1 -1
  216. package/dist/index.d.ts +336 -35
  217. package/dist/index.js +500 -468
  218. package/dist/index.js.map +1 -1
  219. package/dist/node_modules/date-fns/differenceInDays.js +17 -0
  220. package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
  221. package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
  222. package/dist/static/competitive-arena.b9c40801.json +1 -0
  223. package/dist/static/learn.71b13323.json +1 -0
  224. package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
  225. package/dist/static/node-learn-bg.b61f815c.svg +1 -0
  226. package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
  227. package/dist/static/node-project-bg.e6a33e28.svg +1 -0
  228. package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
  229. package/dist/static/node-recap-bg.546154e4.svg +1 -0
  230. package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
  231. package/dist/static/node-video-bg.3df3f73a.svg +1 -0
  232. package/dist/static/practice.158dd488.json +1 -0
  233. package/dist/static/project.eb665827.json +1 -0
  234. package/dist/static/puzzle.b298c7e4.json +1 -0
  235. package/dist/static/recap.0dd2c1e2.json +1 -0
  236. package/dist/static/test.803d6036.json +1 -0
  237. package/dist/static/video.b41451e2.json +1 -0
  238. package/package.json +1 -1
  239. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
  240. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
  241. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
  242. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
  243. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
  244. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
  245. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
  246. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
  247. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
  248. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
  249. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
  250. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
  251. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
  252. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
  253. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
  254. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
  255. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
  256. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
  257. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
  258. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
  259. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
  260. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
  261. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
  262. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
  263. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
  264. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
  265. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
  266. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
@@ -0,0 +1,188 @@
1
+ import { jsx as e, jsxs as p, Fragment as S } from "react/jsx-runtime";
2
+ import { useRef as a, useCallback as L, useMemo as B, useEffect as N } from "react";
3
+ import G from "../../homework/homework-card.js";
4
+ import P from "../../homework/hw-card-list/hw-card-list.js";
5
+ import $ from "../../recent-chapters/recent-chapters.js";
6
+ import h from "../../ui/buttons/button/button.js";
7
+ import s from "../../ui/layout/flex-view.js";
8
+ import u from "../../ui/text/text.js";
9
+ import { ELementWrapper as H } from "../comps/coachmark/coachmark-styled.js";
10
+ import { JOURNEY_ID_STUDENT as T } from "../journey-id/journey-id-student.js";
11
+ import { IndicatorType as C } from "../use-journey/constants.js";
12
+ import { useJourney as J } from "../use-journey/use-journey.js";
13
+ const V = () => {
14
+ const o = T.HOMEPAGE_JOURNEY, i = a(null), n = a(null), l = a(null), c = a(null), f = a([]), { nextCoachmark: r, setJourney: A, endJourney: w, addCoachmark: E } = J(), b = L(
15
+ (t, d, m) => {
16
+ c.current ? (E(T.HOMEPAGE_JOURNEY, {
17
+ originalElementToHighlightRef: c,
18
+ elementToHighlight: /* @__PURE__ */ e(s, { $widthX: 45, children: /* @__PURE__ */ e(
19
+ $,
20
+ {
21
+ studentId: t,
22
+ courseStream: m,
23
+ userType: d ? "STUDENT" : "TEACHER",
24
+ onChapterClick: () => null
25
+ }
26
+ ) }),
27
+ isActive: !1,
28
+ type: C.TOOLTIP,
29
+ indicator: {
30
+ tooltipItem: /* @__PURE__ */ p(s, { $flexRowGapX: 0.75, $justifyContent: "flex-start", children: [
31
+ /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: "Access all your recent chapters in one place." }),
32
+ /* @__PURE__ */ e(
33
+ h,
34
+ {
35
+ label: "Got it",
36
+ size: "xsmall",
37
+ widthX: 6,
38
+ renderAs: "secondary",
39
+ onClick: () => w(T.HOMEPAGE_JOURNEY)
40
+ }
41
+ )
42
+ ] }),
43
+ position: "top",
44
+ renderAs: "primary",
45
+ tooltipXCoOrdinates: -227,
46
+ tooltipYCoOrdinates: 12,
47
+ arrowXCoOrdinates: -110,
48
+ backgroundColor: "YELLOW_4",
49
+ borderColor: "BLACK",
50
+ arrowColor: "BLACK",
51
+ arrowSize: 12,
52
+ width: 264
53
+ }
54
+ }), r(o, !1, 0, !0)) : w(o);
55
+ },
56
+ [r, o, E, w]
57
+ ), y = L(
58
+ ({ hwDetails: t, studentId: d, stream: m, userType: g }) => {
59
+ const { title: k, subtext: X } = t[0], O = g === "STUDENT";
60
+ if (!(i != null && i.current) || !(n != null && n.current) || !(l != null && l.current))
61
+ return;
62
+ const I = [
63
+ {
64
+ originalElementToHighlightRef: i,
65
+ isActive: !1,
66
+ type: C.TOOLTIP,
67
+ elementToHighlight: /* @__PURE__ */ e(S, {}),
68
+ indicator: {
69
+ position: "top",
70
+ tooltipXCoOrdinates: 360,
71
+ tooltipYCoOrdinates: 30,
72
+ backgroundColor: "BLUE_4",
73
+ borderColor: "BLACK",
74
+ arrowColor: "BLACK",
75
+ arrowSize: 12,
76
+ width: 264,
77
+ tooltipItem: /* @__PURE__ */ p(s, { $flexRowGapX: 0.75, children: [
78
+ /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: O ? "Welcome to the all new learning homepage." : "Welcome to the all new tutoring homepage." }),
79
+ /* @__PURE__ */ e(
80
+ h,
81
+ {
82
+ label: "Next",
83
+ size: "xsmall",
84
+ widthX: 6,
85
+ renderAs: "secondary",
86
+ onClick: () => r(o, !1, 0, !0)
87
+ }
88
+ )
89
+ ] })
90
+ }
91
+ },
92
+ {
93
+ originalElementToHighlightRef: n,
94
+ elementToHighlight: /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(P, { userType: g, studentId: d, stream: m }) }),
95
+ type: C.TOOLTIP,
96
+ indicator: {
97
+ position: "top",
98
+ tooltipXCoOrdinates: -197,
99
+ tooltipYCoOrdinates: -12,
100
+ arrowXCoOrdinates: -110,
101
+ backgroundColor: "GREEN_4",
102
+ borderColor: "BLACK",
103
+ arrowColor: "BLACK",
104
+ width: 264,
105
+ arrowSize: 12,
106
+ tooltipItem: /* @__PURE__ */ p(s, { $flexRowGapX: 0.75, children: [
107
+ /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: O ? "Homework is now easy to access and easy to complete!" : "Homework is now easy to access and easy to review!" }),
108
+ /* @__PURE__ */ e(
109
+ h,
110
+ {
111
+ label: "Next",
112
+ size: "xsmall",
113
+ widthX: 6,
114
+ renderAs: "secondary",
115
+ onClick: () => r(o, !1, 0, !0)
116
+ }
117
+ )
118
+ ] })
119
+ },
120
+ isActive: !1
121
+ },
122
+ {
123
+ originalElementToHighlightRef: l,
124
+ elementToHighlight: /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(
125
+ G,
126
+ {
127
+ isInQueue: !1,
128
+ userType: g,
129
+ header: k,
130
+ subHeader: X || "",
131
+ nodeData: t[0],
132
+ renderAs: "homework",
133
+ shouldOpenOnRight: !1
134
+ }
135
+ ) }),
136
+ type: C.TOOLTIP,
137
+ indicator: {
138
+ position: "top",
139
+ tooltipXCoOrdinates: -35,
140
+ tooltipYCoOrdinates: -7,
141
+ backgroundColor: "PURPLE_4",
142
+ borderColor: "BLACK",
143
+ arrowColor: "BLACK",
144
+ arrowXCoOrdinates: -97,
145
+ arrowSize: 12,
146
+ width: 264,
147
+ tooltipItem: /* @__PURE__ */ p(s, { $flexRowGapX: 0.75, children: [
148
+ /* @__PURE__ */ e(u, { $renderAs: "ab2-bold", children: "Track homework status and their due dates." }),
149
+ /* @__PURE__ */ e(
150
+ h,
151
+ {
152
+ label: c.current ? "Next" : "Got it",
153
+ size: "xsmall",
154
+ widthX: 6,
155
+ renderAs: "secondary",
156
+ onClick: () => b(d, O, m)
157
+ }
158
+ )
159
+ ] })
160
+ },
161
+ isActive: !1
162
+ }
163
+ ];
164
+ A(o, I);
165
+ const x = setTimeout(() => {
166
+ clearTimeout(x), r(o);
167
+ }, 200);
168
+ f.current.push(x);
169
+ },
170
+ [A, o, r, b]
171
+ ), R = B(
172
+ () => ({
173
+ homepageRef: i,
174
+ homeworkRef: n,
175
+ individualHomeworkRef: l,
176
+ recentChaptersRef: c,
177
+ startJourney: y
178
+ }),
179
+ [y]
180
+ );
181
+ return N(() => () => {
182
+ f.current.forEach((t) => clearTimeout(t)), f.current = [];
183
+ }, []), R;
184
+ };
185
+ export {
186
+ V as useHomePageJourney
187
+ };
188
+ //# sourceMappingURL=use-home-page-journey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-home-page-journey.js","sources":["../../../../src/features/journey/hooks/use-home-page-journey.tsx"],"sourcesContent":["import type { IHomeworkData } from '../../homework/hw-card-list/api/get-homeworks';\nimport type { TCourseStream } from '../../milestone/create/milestone-create-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { IHomepageStartJourneyProps } from '../types/homepage-journey-types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport HWCardList from '../../homework/hw-card-list/hw-card-list';\nimport RecentChapters from '../../recent-chapters/recent-chapters';\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { ELementWrapper } from '../comps/coachmark/coachmark-styled';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\n\nexport const useHomePageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY;\n\n const homepageRef = useRef<HTMLDivElement>(null);\n const homeworkRef = useRef<HTMLDivElement>(null);\n const individualHomeworkRef = useRef<HTMLDivElement>(null);\n const recentChaptersRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney, addCoachmark } = useJourney();\n\n const handleLastStep = useCallback(\n (userId: string, isStudent: boolean, courseValue: string) => {\n if (recentChaptersRef.current) {\n addCoachmark(JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY, {\n originalElementToHighlightRef: recentChaptersRef,\n elementToHighlight: (\n <FlexView $widthX={45}>\n <RecentChapters\n studentId={userId}\n courseStream={courseValue as TCourseStream}\n userType={isStudent ? 'STUDENT' : 'TEACHER'}\n onChapterClick={() => null}\n />\n </FlexView>\n ),\n isActive: false,\n type: IndicatorType.TOOLTIP,\n indicator: {\n tooltipItem: (\n <FlexView $flexRowGapX={0.75} $justifyContent=\"flex-start\">\n <Text $renderAs=\"ab2-bold\">Access all your recent chapters in one place.</Text>\n <Button\n label=\"Got it\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => endJourney(JOURNEY_ID_STUDENT.HOMEPAGE_JOURNEY)}\n />\n </FlexView>\n ),\n position: 'top',\n renderAs: 'primary',\n tooltipXCoOrdinates: -227,\n tooltipYCoOrdinates: 12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'YELLOW_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n } as IArrowTooltipProps,\n });\n nextCoachmark(journeyId, false, 0, true);\n } else {\n endJourney(journeyId);\n }\n },\n [nextCoachmark, journeyId, addCoachmark, endJourney],\n );\n\n const startJourney = useCallback(\n ({ hwDetails, studentId, stream, userType }: IHomepageStartJourneyProps) => {\n const { title, subtext } = hwDetails[0] as IHomeworkData;\n const isStudent = userType === 'STUDENT';\n\n if (!homepageRef?.current || !homeworkRef?.current || !individualHomeworkRef?.current) {\n return;\n }\n\n const homepageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: homepageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: <></>,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: 360,\n tooltipYCoOrdinates: 30,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Welcome to the all new learning homepage.'\n : 'Welcome to the all new tutoring homepage.'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: homeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HWCardList userType={userType} studentId={studentId} stream={stream} />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -197,\n tooltipYCoOrdinates: -12,\n arrowXCoOrdinates: -110,\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n {isStudent\n ? 'Homework is now easy to access and easy to complete!'\n : 'Homework is now easy to access and easy to review!'}\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: individualHomeworkRef,\n elementToHighlight: (\n <ELementWrapper>\n <HomeworkCard\n isInQueue={false}\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={hwDetails[0] as IHomeworkData}\n renderAs=\"homework\"\n shouldOpenOnRight={false}\n />\n </ELementWrapper>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipXCoOrdinates: -35,\n tooltipYCoOrdinates: -7,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowXCoOrdinates: -97,\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">Track homework status and their due dates.</Text>\n <Button\n label={recentChaptersRef.current ? 'Next' : 'Got it'}\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => handleLastStep(studentId, isStudent, stream)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, homepageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId);\n }, 200);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n },\n [setJourney, journeyId, nextCoachmark, handleLastStep],\n );\n\n const data = useMemo(\n () => ({\n homepageRef,\n homeworkRef,\n individualHomeworkRef,\n recentChaptersRef,\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 }, []);\n\n return data;\n};\n"],"names":["useHomePageJourney","journeyId","JOURNEY_ID_STUDENT","homepageRef","useRef","homeworkRef","individualHomeworkRef","recentChaptersRef","timerRefs","nextCoachmark","setJourney","endJourney","addCoachmark","useJourney","handleLastStep","useCallback","userId","isStudent","courseValue","jsx","FlexView","RecentChapters","IndicatorType","jsxs","Text","Button","startJourney","hwDetails","studentId","stream","userType","title","subtext","homepageSteps","Fragment","ELementWrapper","HWCardList","HomeworkCard","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;;AAmBO,MAAMA,IAAqB,MAAM;AACtC,QAAMC,IAAYC,EAAmB,kBAE/BC,IAAcC,EAAuB,IAAI,GACzCC,IAAcD,EAAuB,IAAI,GACz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Y", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R))(E || {});
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_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", R))(E || {}), C = /* @__PURE__ */ ((R) => (R.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", R))(C || {});
2
2
  export {
3
- E as JOURNEY_ID_STUDENT
3
+ E as JOURNEY_ID_STUDENT,
4
+ C as JOURNEY_ID_TEACHER
4
5
  };
5
6
  //# 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\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_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,+BAG9BA,EAAA,kCAAkC,mCATxBA,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\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}\n\nexport enum JOURNEY_ID_TEACHER {\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT","JOURNEY_ID_TEACHER"],"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,+BAG9BA,EAAA,kCAAkC,mCAClCA,EAAA,mBAAmB,oBAVTA,IAAAA,KAAA,CAAA,CAAA,GAaAC,sBAAAA,OACVA,EAAA,mBAAmB,oBADTA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,105 +1,113 @@
1
- import { jsxs as O, jsx as w } from "react/jsx-runtime";
2
- import { createContext as U, useState as h, useRef as k, useCallback as l, useMemo as q, useEffect as R } from "react";
3
- import { Coachmark as D } from "../comps/coachmark/coachmark.js";
4
- import { usePostUserJourney as L, useGetUserJourney as N } from "../user-journey-api/user-journey-api.js";
5
- import { Overlay as M } from "./journey-styled.js";
6
- const z = U(null), H = ({ children: T, appId: s, userId: o }) => {
7
- const [x, p] = h(null), [c, a] = h([]), [J, v] = h(!1), m = k(-1), t = k(), d = k([]), { post: _ } = L(), { data: f = null, get: g } = N(), A = l(
8
- (e, r) => {
9
- if (c.length > 0) {
1
+ import { jsxs as D, jsx as R } from "react/jsx-runtime";
2
+ import { createContext as L, useState as J, useRef as k, useCallback as y, useMemo as N, useEffect as T } from "react";
3
+ import { Coachmark as B } from "../comps/coachmark/coachmark.js";
4
+ import { usePostUserJourney as M, useGetUserJourney as z } from "../user-journey-api/user-journey-api.js";
5
+ import { Overlay as G } from "./journey-styled.js";
6
+ const S = L(null), W = ({ children: b, appId: c, userId: o }) => {
7
+ const [O, x] = J(!1), [p, v] = J(null), [a, i] = J([]), [d, _] = J(!1), m = k(-1), t = k(), f = k([]), { post: g } = M(), { data: C = null, get: A } = z(), $ = y(
8
+ (e, r, s) => {
9
+ if (a.length > 0) {
10
10
  console.error(
11
11
  `setJourney: Other Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
12
12
  );
13
13
  return;
14
14
  }
15
- v(!0), t.current = e, m.current = -1, a([...r]);
15
+ _(!0), t.current = e, m.current = -1, i([...r]), x(!!s);
16
16
  },
17
- [c.length]
18
- ), u = l(() => {
19
- d.current.forEach((e) => {
17
+ [a.length]
18
+ ), u = y(() => {
19
+ f.current.forEach((e) => {
20
20
  clearTimeout(e);
21
- }), d.current = [], t.current = void 0, m.current = -1, a([]), v(!1);
22
- }, []), $ = l(
21
+ }), f.current = [], t.current = void 0, m.current = -1, i([]), _(!1);
22
+ }, []), E = y(
23
23
  (e) => {
24
- u(), p((r) => r && !r.includes(e) ? [...r, e] : r), _({
25
- app_id: s,
24
+ u(), v((r) => r && !r.includes(e) ? [...r, e] : r), g({
25
+ app_id: c,
26
26
  user_id: o,
27
27
  journey_id: e,
28
28
  journey_status: "COMPLETED"
29
29
  });
30
30
  },
31
- [s, u, _, o]
32
- ), E = l((e, r) => {
31
+ [c, u, g, o]
32
+ ), P = y((e, r) => {
33
33
  if (!t.current || e !== t.current) {
34
34
  console.error(
35
35
  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"
36
36
  );
37
37
  return;
38
38
  }
39
- a((y) => [...y, r]);
40
- }, []), P = l(
41
- (e, r = !1, y = 0) => {
39
+ i((s) => [...s, r]);
40
+ }, []), j = y(
41
+ (e, r = !1, s = 0, q = !1) => {
42
42
  if (!t.current || e !== t.current) {
43
43
  console.error(
44
44
  t.current ? "nextCoachmark was called before setJourney" : `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
45
45
  );
46
46
  return;
47
47
  }
48
- y !== 0 && a((n) => n.map((i) => ({ ...i, isActive: !1 })));
49
- const j = setTimeout(() => {
50
- clearTimeout(j);
48
+ x(q), s !== 0 && i((n) => n.map((l) => ({ ...l, isActive: !1 })));
49
+ const w = setTimeout(() => {
50
+ clearTimeout(w);
51
51
  const n = m.current + 1;
52
- a((i) => {
53
- if (n >= i.length || i.length === 0)
52
+ i((l) => {
53
+ if (n >= l.length || l.length === 0)
54
54
  return u(), [];
55
55
  m.current = n;
56
- const C = [...i];
57
- return C[n].isActive = !0, n > 0 && (C[n - 1].isActive = r), C;
56
+ const h = [...l];
57
+ return h[n].isActive = !0, n > 0 && (h[n - 1].isActive = r), h;
58
58
  });
59
- }, y);
60
- d.current.push(j);
59
+ }, s);
60
+ f.current.push(w);
61
61
  },
62
62
  [u]
63
- ), b = q(
63
+ ), U = N(
64
64
  () => ({
65
- nextCoachmark: P,
66
- setJourney: A,
67
- addCoachmark: E,
65
+ nextCoachmark: j,
66
+ setJourney: $,
67
+ addCoachmark: P,
68
68
  clearJourney: u,
69
- endJourney: $,
70
- coachmarks: c,
71
- userCompletedJourneyIds: x,
72
- isJourneyActive: J
69
+ endJourney: E,
70
+ coachmarks: a,
71
+ userCompletedJourneyIds: p,
72
+ isJourneyActive: d
73
73
  }),
74
74
  [
75
+ j,
76
+ $,
75
77
  P,
76
- A,
77
- E,
78
78
  u,
79
- $,
80
- c,
81
- x,
82
- J
79
+ E,
80
+ a,
81
+ p,
82
+ d
83
83
  ]
84
84
  );
85
- return R(() => {
86
- s && o && g(o, {
87
- app_id: s,
85
+ return T(() => {
86
+ c && o && A(o, {
87
+ app_id: c,
88
88
  user_id: o,
89
89
  journey_status: "COMPLETED"
90
90
  });
91
- }, [s, g, o]), R(() => {
92
- if (f) {
93
- const e = f.map((r) => r.journey_id);
94
- p(e);
91
+ }, [c, A, o]), T(() => {
92
+ if (C) {
93
+ const e = C.map((r) => r.journey_id);
94
+ v(e);
95
95
  }
96
- }, [f]), /* @__PURE__ */ O(z.Provider, { value: b, children: [
97
- J && /* @__PURE__ */ w(M, { about: "journey-overlay", "data-testid": t.current, children: c.map((e, r) => /* @__PURE__ */ w(D, { coachmark: e }, `coachmark-${r}`)) }),
98
- T
96
+ }, [C]), /* @__PURE__ */ D(S.Provider, { value: U, children: [
97
+ d && /* @__PURE__ */ R(
98
+ G,
99
+ {
100
+ about: "journey-overlay",
101
+ isJourneyBlurred: O,
102
+ "data-testid": t.current,
103
+ children: a.map((e, r) => /* @__PURE__ */ R(B, { coachmark: e }, `coachmark-${r}`))
104
+ }
105
+ ),
106
+ b
99
107
  ] });
100
108
  };
101
109
  export {
102
- z as JourneyContext,
103
- H as JourneyProvider
110
+ S as JourneyContext,
111
+ W as JourneyProvider
104
112
  };
105
113
  //# sourceMappingURL=journey-context-provider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (id: TJourneyId, keepPrevActive: boolean = false, delayInMs: number = 0) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay about=\"journey-overlay\" data-testid={currentJourneyId.current}>\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","userCompletedJourneyIds","setUserCompletedJourneyIds","useState","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAyBC,CAA0B,IAAIC,EAA8B,IAAI,GAC1F,CAACC,GAAeC,CAAgB,IAAIF,EAA4B,CAAE,CAAA,GAClE,CAACG,GAAiBC,CAAkB,IAAIJ,EAAS,EAAK,GACtDK,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,MAAkC;AAC7C,UAAAhB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BS,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAZ,EAAmB,EAAI,GACvBG,EAAiB,UAAUS,GAC3BX,EAAa,UAAU,IACNH,EAAA,CAAC,GAAGe,CAAU,CAAC;AAAA,IAClC;AAAA,IACA,CAAChB,EAAc,MAAM;AAAA,EAAA,GAGjBiB,IAAeH,EAAY,MAAM;AAE3B,IAAAP,EAAA,QAAQ,QAAQ,CAASW,MAAA;AACjC,mBAAaA,CAAK;AAAA,IAAA,CACnB,GACDX,EAAU,UAAU,IACpBD,EAAiB,UAAU,QAC3BF,EAAa,UAAU,IACvBH,EAAiB,CAAE,CAAA,GACnBE,EAAmB,EAAK;AAAA,EAC1B,GAAG,CAAE,CAAA,GAECgB,IAAaL;AAAA,IACjB,CAACM,MAA0B;AACZ,MAAAH,KACbnB,EAA2B,CAAQuB,MAC7BA,KAAQ,CAACA,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["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[], shouldBlueInitialJourney?: boolean) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n setIsJourneyBlurred(!!shouldBlueInitialJourney);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n setIsJourneyBlurred(shouldBlurNextJourney);\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n isJourneyBlurred={isJourneyBlurred}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isJourneyBlurred","setIsJourneyBlurred","useState","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","shouldBlueInitialJourney","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAkB,EAAK,GACjE,CAACC,GAAyBC,CAA0B,IAAIF,EAA8B,IAAI,GAC1F,CAACG,GAAeC,CAAgB,IAAIJ,EAA4B,CAAE,CAAA,GAClE,CAACK,GAAiBC,CAAkB,IAAIN,EAAS,EAAK,GACtDO,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,GAA+BC,MAAuC;AACjF,UAAAjB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BS,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAZ,EAAmB,EAAI,GACvBG,EAAiB,UAAUS,GAC3BX,EAAa,UAAU,IACNH,EAAA,CAAC,GAAGe,CAAU,CAAC,GACZpB,EAAA,CAAC,CAACqB,CAAwB;AAAA,IAChD;AAAA,IACA,CAACjB,EAAc,MAAM;AAAA,EAAA,GAGjBkB,IAAeJ,EAAY,MAAM;AAE3B,IAAAP,EAAA,QAAQ,QAAQ,CAASY,MAAA;AACjC,mBAAaA,CAAK;AAAA,IAAA,CACnB,GACDZ,EAAU,UAAU,IACpBD,EAAiB,UAAU,QAC3BF,EAAa,UAAU,IACvBH,EAAiB,CAAE,CAAA,GACnBE,EAAmB,EAAK;AAAA,EAC1B,GAAG,CAAE,CAAA,GAECiB,IAAaN;AAAA,IACjB,CAACO,MA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AG,GAAA,EAAqC,WAAAlB,EAAtB,GAAA,aAAaiB,CAAK,EAA0B,CAC7D;AAAA,MAAA;AAAA,IACH;AAAA,IAEDjD;AAAA,EACH,EAAA,CAAA;AAEJ;"}
@@ -1,14 +1,19 @@
1
- import o from "styled-components";
2
- import { BLUR_OVERLAY_Z_INDEX as t } from "./constants.js";
3
- const e = o.div`
1
+ import t, { css as i } from "styled-components";
2
+ import { BLUR_OVERLAY_Z_INDEX as e } from "./constants.js";
3
+ const b = t.div`
4
4
  position: fixed;
5
5
  top: 0;
6
6
  right: 0;
7
7
  bottom: 0;
8
8
  left: 0;
9
- z-index: ${t};
9
+ z-index: ${e};
10
+ ${({ isJourneyBlurred: o, theme: r }) => o && i`
11
+ background: ${r.colors.BLACK_T_38};
12
+ backdrop-filter: blur(80px);
13
+ -webkit-backdrop-filter: blur(80px);
14
+ `}
10
15
  `;
11
16
  export {
12
- e as Overlay
17
+ b as Overlay
13
18
  };
14
19
  //# sourceMappingURL=journey-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n`;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX"],"mappings":";;AAIO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA;"}
1
+ {"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\nimport { css } from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div<{ isJourneyBlurred: boolean }>`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n ${({ isJourneyBlurred, theme }) =>\n isJourneyBlurred &&\n css`\n background: ${theme.colors.BLACK_T_38};\n backdrop-filter: blur(80px);\n -webkit-backdrop-filter: blur(80px);\n `}\n`;\n``;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX","isJourneyBlurred","theme","css"],"mappings":";;AAKO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA,IAC7B,CAAC,EAAE,kBAAAC,GAAkB,OAAAC,EAAA,MACrBD,KACAE;AAAA,oBACgBD,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,KAGtC;AAAA;"}
@@ -1,5 +1,5 @@
1
1
  import { createPostAPI as t } from "@cuemath/rest-api";
2
- import { BASE_URL_V3_1 as e } from "../../../../constants/api.js";
2
+ import { BASE_URL_V3_2 as e } from "../../../../constants/api.js";
3
3
  const { usePost: i } = t({
4
4
  getURL: (s, { studentId: o }) => `${e}/users/${o}/milestones/`
5
5
  });
@@ -1 +1 @@
1
- {"version":3,"file":"goal-submit.js","sources":["../../../../../src/features/milestone/create/api/goal-submit.ts"],"sourcesContent":["import type { TMilestonePayload } from '../milestone-create-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../constants/api';\n\nconst { usePost: useGoalCreationPost } = createPostAPI<\n { id: string },\n TMilestonePayload,\n { studentId: string }\n>({\n getURL: (_, { studentId }) => `${BASE_URL_V3_1}/users/${studentId}/milestones/`,\n});\n\nexport { useGoalCreationPost };\n"],"names":["useGoalCreationPost","createPostAPI","_","studentId","BASE_URL_V3_1"],"mappings":";;AAMA,MAAM,EAAE,SAASA,EAAoB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,EAAgB,MAAA,GAAGC,CAAa,UAAUD,CAAS;AACnE,CAAC;"}
1
+ {"version":3,"file":"goal-submit.js","sources":["../../../../../src/features/milestone/create/api/goal-submit.ts"],"sourcesContent":["import type { TMilestonePayload } from '../milestone-create-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_2 } from '../../../../constants/api';\n\nconst { usePost: useGoalCreationPost } = createPostAPI<\n { id: string },\n TMilestonePayload,\n { studentId: string }\n>({\n getURL: (_, { studentId }) => `${BASE_URL_V3_2}/users/${studentId}/milestones/`,\n});\n\nexport { useGoalCreationPost };\n"],"names":["useGoalCreationPost","createPostAPI","_","studentId","BASE_URL_V3_2"],"mappings":";;AAMA,MAAM,EAAE,SAASA,EAAoB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,EAAgB,MAAA,GAAGC,CAAa,UAAUD,CAAS;AACnE,CAAC;"}