@cuemath/leap 2.9.4-as4 → 2.9.4-link.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (264) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -9
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/bin2.js +8 -7
  4. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  5. package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
  6. package/dist/assets/lottie/lottie.js +1 -9
  7. package/dist/assets/lottie/lottie.js.map +1 -1
  8. package/dist/constants/api.js +2 -3
  9. package/dist/constants/api.js.map +1 -1
  10. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +33 -99
  11. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  12. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +49 -92
  13. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  14. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  15. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  16. package/dist/features/chapters/chapters-list/chapters-list.js +70 -64
  17. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  18. package/dist/features/communication/pub-sub/constants.js +2 -5
  19. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  20. package/dist/features/journey/comps/coachmark/coachmark-styled.js +5 -12
  21. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  22. package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
  23. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  24. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  25. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  26. package/dist/features/journey/use-journey/journey-context-provider.js +28 -36
  27. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  28. package/dist/features/journey/use-journey/journey-styled.js +5 -10
  29. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  30. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  31. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  32. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +49 -42
  33. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  34. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +4 -12
  35. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  36. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +105 -128
  37. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  38. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +92 -0
  39. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +1 -0
  40. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +25 -0
  41. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +1 -0
  42. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +20 -14
  43. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  44. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +50 -26
  45. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  46. package/dist/features/milestone/create/milestone-create.js +43 -49
  47. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  48. package/dist/features/milestone/create/utils/index.js +38 -33
  49. package/dist/features/milestone/create/utils/index.js.map +1 -1
  50. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  51. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  52. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  53. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  54. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +53 -51
  55. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  56. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +40 -42
  57. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  58. package/dist/features/milestone/edit/goal-edit-container.js +62 -64
  59. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  60. package/dist/features/milestone/edit/goal-edit-helpers.js +53 -50
  61. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  62. package/dist/features/milestone/edit/milestone-edit-container.js +52 -54
  63. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  64. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  65. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  66. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +17 -9
  67. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  68. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  69. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  70. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +104 -136
  71. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  72. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +13 -0
  73. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +1 -0
  74. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +38 -0
  75. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +1 -0
  76. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +123 -107
  77. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  78. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +175 -155
  79. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  80. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +10 -24
  81. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  82. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +86 -80
  83. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  84. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +22 -10
  85. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  86. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +53 -0
  87. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +1 -0
  88. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +37 -70
  89. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  90. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +176 -114
  91. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  92. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +25 -0
  93. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +1 -0
  94. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +16 -29
  95. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  96. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +23 -19
  97. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  98. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +35 -23
  99. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  100. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +100 -96
  101. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  102. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  103. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  104. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +112 -114
  105. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  106. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +18 -16
  107. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  108. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
  109. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
  110. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
  111. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
  112. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +34 -6
  113. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
  114. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
  115. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
  116. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
  117. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
  118. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
  119. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
  120. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
  121. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
  122. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +135 -0
  123. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -0
  124. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  125. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  126. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +3 -4
  127. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  128. package/dist/features/trial-session/comps/offering-information/offering-information.js +21 -21
  129. package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
  130. package/dist/features/trial-session/comps/pricing/pricing-cards.js +46 -46
  131. package/dist/features/trial-session/comps/pricing/pricing-cards.js.map +1 -1
  132. package/dist/features/trial-session/comps/pricing/pricing.js +25 -25
  133. package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
  134. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +29 -30
  135. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  136. package/dist/features/ui/constants/z-index.js +1 -1
  137. package/dist/features/ui/constants/z-index.js.map +1 -1
  138. package/dist/features/ui/context-menu/context-menu-styled.js +14 -28
  139. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  140. package/dist/features/ui/context-menu/context-menu.js +15 -30
  141. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  142. package/dist/features/ui/theme/button.js +107 -22
  143. package/dist/features/ui/theme/button.js.map +1 -1
  144. package/dist/index.d.ts +32 -308
  145. package/dist/index.js +470 -498
  146. package/dist/index.js.map +1 -1
  147. package/package.json +1 -1
  148. package/dist/assets/line-icons/icons/alarm.js +0 -41
  149. package/dist/assets/line-icons/icons/alarm.js.map +0 -1
  150. package/dist/assets/line-icons/icons/dart.js +0 -23
  151. package/dist/assets/line-icons/icons/dart.js.map +0 -1
  152. package/dist/assets/line-icons/icons/exclamation.js +0 -26
  153. package/dist/assets/line-icons/icons/exclamation.js.map +0 -1
  154. package/dist/assets/line-icons/icons/home2.js +0 -25
  155. package/dist/assets/line-icons/icons/home2.js.map +0 -1
  156. package/dist/assets/line-icons/icons/important.js +0 -23
  157. package/dist/assets/line-icons/icons/important.js.map +0 -1
  158. package/dist/assets/line-icons/icons/puzzle.js +0 -25
  159. package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
  160. package/dist/assets/line-icons/icons/recap.js +0 -32
  161. package/dist/assets/line-icons/icons/recap.js.map +0 -1
  162. package/dist/assets/line-icons/icons/skip-colored.js +0 -43
  163. package/dist/assets/line-icons/icons/skip-colored.js.map +0 -1
  164. package/dist/assets/line-icons/icons/status.js +0 -41
  165. package/dist/assets/line-icons/icons/status.js.map +0 -1
  166. package/dist/assets/line-icons/icons/testtube.js +0 -33
  167. package/dist/assets/line-icons/icons/testtube.js.map +0 -1
  168. package/dist/features/chapters-v2/api/chapter.js +0 -10
  169. package/dist/features/chapters-v2/api/chapter.js.map +0 -1
  170. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +0 -112
  171. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +0 -1
  172. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +0 -26
  173. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +0 -1
  174. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +0 -73
  175. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +0 -1
  176. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +0 -90
  177. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +0 -1
  178. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +0 -97
  179. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +0 -1
  180. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +0 -52
  181. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +0 -1
  182. package/dist/features/chapters-v2/chapter-details/chapter-details.js +0 -103
  183. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +0 -1
  184. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +0 -13
  185. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +0 -1
  186. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +0 -153
  187. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +0 -1
  188. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +0 -16
  189. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +0 -1
  190. package/dist/features/chapters-v2/comps/node-card/node-card.js +0 -12
  191. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +0 -1
  192. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +0 -32
  193. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +0 -1
  194. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +0 -31
  195. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +0 -1
  196. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +0 -171
  197. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +0 -1
  198. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +0 -192
  199. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +0 -1
  200. package/dist/features/chapters-v2/comps/tag/tag-styled.js +0 -13
  201. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +0 -1
  202. package/dist/features/chapters-v2/comps/tag/tag.js +0 -28
  203. package/dist/features/chapters-v2/comps/tag/tag.js.map +0 -1
  204. package/dist/features/chapters-v2/constants/block-constants.js +0 -20
  205. package/dist/features/chapters-v2/constants/block-constants.js.map +0 -1
  206. package/dist/features/chapters-v2/constants/node-constants.js +0 -14
  207. package/dist/features/chapters-v2/constants/node-constants.js.map +0 -1
  208. package/dist/features/chapters-v2/utils/index.js +0 -41
  209. package/dist/features/chapters-v2/utils/index.js.map +0 -1
  210. package/dist/features/chapters-v2/utils/node-card-utils.js +0 -144
  211. package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
  212. package/dist/features/homework/card-menu-options.js +0 -38
  213. package/dist/features/homework/card-menu-options.js.map +0 -1
  214. package/dist/features/homework/card-title.js +0 -15
  215. package/dist/features/homework/card-title.js.map +0 -1
  216. package/dist/features/homework/homework-card-view.js +0 -131
  217. package/dist/features/homework/homework-card-view.js.map +0 -1
  218. package/dist/features/homework/homework-card.js +0 -205
  219. package/dist/features/homework/homework-card.js.map +0 -1
  220. package/dist/features/homework/hw-card-list/api/get-homeworks.js +0 -10
  221. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +0 -1
  222. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +0 -71
  223. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +0 -1
  224. package/dist/features/homework/hw-card-list/hw-card-list.js +0 -208
  225. package/dist/features/homework/hw-card-list/hw-card-list.js.map +0 -1
  226. package/dist/features/homework/node-progress.js +0 -29
  227. package/dist/features/homework/node-progress.js.map +0 -1
  228. package/dist/features/homework/styles.js +0 -130
  229. package/dist/features/homework/styles.js.map +0 -1
  230. package/dist/features/journey/hooks/use-home-page-journey.js +0 -189
  231. package/dist/features/journey/hooks/use-home-page-journey.js.map +0 -1
  232. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
  233. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
  234. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
  235. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
  236. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -85
  237. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
  238. package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
  239. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
  240. package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
  241. package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
  242. package/dist/features/recent-chapters/recent-chapters.js +0 -39
  243. package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
  244. package/dist/features/sheet-v2/resource-list/resource-list.js +0 -39
  245. package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
  246. package/dist/node_modules/date-fns/differenceInDays.js +0 -17
  247. package/dist/node_modules/date-fns/differenceInDays.js.map +0 -1
  248. package/dist/static/chapter-header-bg-2.c8d96894.svg +0 -1
  249. package/dist/static/competitive-arena.b9c40801.json +0 -1
  250. package/dist/static/learn.71b13323.json +0 -1
  251. package/dist/static/node-custom-test-bg.d3b757be.svg +0 -1
  252. package/dist/static/node-learn-bg.b61f815c.svg +0 -1
  253. package/dist/static/node-practice-bg.16cbaf2a.svg +0 -1
  254. package/dist/static/node-project-bg.e6a33e28.svg +0 -1
  255. package/dist/static/node-puzzle-bg.3422135c.svg +0 -1
  256. package/dist/static/node-recap-bg.546154e4.svg +0 -1
  257. package/dist/static/node-test-prep-bg.42c0b9c4.svg +0 -1
  258. package/dist/static/node-video-bg.3df3f73a.svg +0 -1
  259. package/dist/static/practice.158dd488.json +0 -1
  260. package/dist/static/project.eb665827.json +0 -1
  261. package/dist/static/puzzle.b298c7e4.json +0 -1
  262. package/dist/static/recap.0dd2c1e2.json +0 -1
  263. package/dist/static/test.803d6036.json +0 -1
  264. package/dist/static/video.b41451e2.json +0 -1
@@ -1,15 +1,14 @@
1
1
  import r from "styled-components";
2
2
  import { MILESTONE_WIDGET_MIN_HEIGHT as o } from "../../milestone/constants.js";
3
- import i from "../../ui/layout/flex-view.js";
4
- const s = r(i)`
3
+ import p from "../../ui/layout/flex-view.js";
4
+ const s = r(p)`
5
5
  position: relative;
6
6
  min-height: ${o}px;
7
7
  `, n = r.div`
8
8
  display: grid;
9
- grid-template-columns: repeat(4, 1fr);
9
+ grid-template-columns: repeat(2, 1fr);
10
10
  align-content: start;
11
- `;
12
- r.div(({ theme: t }) => `
11
+ `, d = r.div(({ theme: t }) => `
13
12
  position: absolute;
14
13
  bottom: ${t.layout.gutter}px;
15
14
  right: ${t.layout.gutter}px;
@@ -17,6 +16,7 @@ r.div(({ theme: t }) => `
17
16
  border-radius: 50%;
18
17
  `);
19
18
  export {
19
+ d as AddChapterIconWrapper,
20
20
  s as ChaptersListContainer,
21
21
  n as ChaptersWrapper
22
22
  };
@@ -1 +1 @@
1
- {"version":3,"file":"chapters-list-styled.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../milestone/constants';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ChaptersListContainer = styled(FlexView)`\n position: relative;\n min-height: ${MILESTONE_WIDGET_MIN_HEIGHT}px;\n`;\n\nconst ChaptersWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n align-content: start;\n`;\n\nconst AddChapterIconWrapper = styled.div(({ theme }) => {\n return `\n position: absolute;\n bottom: ${theme.layout.gutter}px;\n right: ${theme.layout.gutter}px;\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n border-radius: 50%;\n `;\n});\n\nexport { ChaptersListContainer, ChaptersWrapper, AddChapterIconWrapper };\n"],"names":["ChaptersListContainer","styled","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","ChaptersWrapper","theme"],"mappings":";;;AAKM,MAAAA,IAAwBC,EAAOC,CAAQ;AAAA;AAAA,gBAE7BC,CAA2B;AAAA,GAGrCC,IAAkBH,EAAO;AAAA;AAAA;AAAA;AAAA;AAMDA,EAAO,IAAI,CAAC,EAAE,OAAAI,QACnC;AAAA;AAAA,cAEKA,EAAM,OAAO,MAAM;AAAA,aACpBA,EAAM,OAAO,MAAM;AAAA,oCACIA,EAAM,OAAO,UAAU;AAAA;AAAA,GAG1D;"}
1
+ {"version":3,"file":"chapters-list-styled.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../milestone/constants';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ChaptersListContainer = styled(FlexView)`\n position: relative;\n min-height: ${MILESTONE_WIDGET_MIN_HEIGHT}px;\n`;\n\nconst ChaptersWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(2, 1fr);\n align-content: start;\n`;\n\nconst AddChapterIconWrapper = styled.div(({ theme }) => {\n return `\n position: absolute;\n bottom: ${theme.layout.gutter}px;\n right: ${theme.layout.gutter}px;\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n border-radius: 50%;\n `;\n});\n\nexport { ChaptersListContainer, ChaptersWrapper, AddChapterIconWrapper };\n"],"names":["ChaptersListContainer","styled","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","ChaptersWrapper","AddChapterIconWrapper","theme"],"mappings":";;;AAKM,MAAAA,IAAwBC,EAAOC,CAAQ;AAAA;AAAA,gBAE7BC,CAA2B;AAAA,GAGrCC,IAAkBH,EAAO;AAAA;AAAA;AAAA;AAAA,GAMzBI,IAAwBJ,EAAO,IAAI,CAAC,EAAE,OAAAK,QACnC;AAAA;AAAA,cAEKA,EAAM,OAAO,MAAM;AAAA,aACpBA,EAAM,OAAO,MAAM;AAAA,oCACIA,EAAM,OAAO,UAAU;AAAA;AAAA,GAG1D;"}
@@ -1,78 +1,84 @@
1
- import { jsxs as p, jsx as r, Fragment as A } from "react/jsx-runtime";
2
- import { memo as T, useCallback as b } from "react";
1
+ import { jsxs as i, jsx as r, Fragment as T } from "react/jsx-runtime";
2
+ import { memo as b, useCallback as y } from "react";
3
3
  import { IMAGES as g } from "../../../assets/images/images.js";
4
- import k from "../../ui/arrow-tooltip/arrow-tooltip.js";
5
- import x from "../../ui/buttons/button/button.js";
4
+ import k from "../../../assets/line-icons/icons/plus2.js";
5
+ import x from "../../ui/arrow-tooltip/arrow-tooltip.js";
6
+ import E from "../../ui/buttons/button/button.js";
7
+ import I from "../../ui/buttons/icon-button/icon-button.js";
6
8
  import { useUIContext as $ } from "../../ui/context/context.js";
7
- import m from "../../ui/separator/separator.js";
8
- import y from "../../ui/text/text.js";
9
- import E from "./chapter-item/chapter-item.js";
10
- import { ChaptersListContainer as l, ChaptersWrapper as X } from "./chapters-list-styled.js";
11
- const I = T(
12
- ({ milestoneId: t, canUpdatePlan: c, chapters: o, ...d }) => {
13
- const { isGoalCreation: i, userType: h, onChapterClick: C, onAddChapter: e, isMilestoneActive: a } = d, { onClick: n } = $(), f = b(() => {
14
- n({
9
+ import d from "../../ui/separator/separator.js";
10
+ import L from "../../ui/text/text.js";
11
+ import X from "./chapter-item/chapter-item.js";
12
+ import { ChaptersListContainer as h, ChaptersWrapper as M, AddChapterIconWrapper as S } from "./chapters-list-styled.js";
13
+ const j = b(
14
+ ({ milestoneId: t, canUpdatePlan: n, chapters: a, ...C }) => {
15
+ const { isGoalCreation: s, userType: o, onChapterClick: f, onAddChapter: e, isMilestoneActive: p } = C, A = o === "TEACHER" && e && n, { onClick: c } = $(), m = y(() => {
16
+ c({
15
17
  label: "add_chapter_icon",
16
18
  props: {
17
19
  milestone_id: t
18
20
  }
19
- }), e == null || e({ milestoneId: t, isGoalCreation: i });
20
- }, [t, i, e, n]);
21
- return o.length ? /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(X, { children: o.map((s, u) => {
22
- const { id: _ } = s;
23
- return /* @__PURE__ */ r(
24
- E,
21
+ }), e == null || e({ milestoneId: t, isGoalCreation: s });
22
+ }, [t, s, e, c]);
23
+ return a.length ? /* @__PURE__ */ i(h, { children: [
24
+ /* @__PURE__ */ r(M, { children: a.map((l, u) => {
25
+ const { id: _ } = l;
26
+ return /* @__PURE__ */ r(
27
+ X,
28
+ {
29
+ milestoneId: t,
30
+ userType: o,
31
+ chapter: l,
32
+ onChapterClick: f,
33
+ itemIndex: u
34
+ },
35
+ _
36
+ );
37
+ }) }),
38
+ A && /* @__PURE__ */ r(S, { children: /* @__PURE__ */ r(
39
+ I,
25
40
  {
26
- milestoneId: t,
27
- chapter: s,
28
- onChapterClick: C,
29
- itemIndex: u
30
- },
31
- _
32
- );
33
- }) }) }) : /* @__PURE__ */ p(
34
- l,
35
- {
36
- $gapX: 6.75,
37
- $alignItems: "center",
38
- $justifyContent: "center",
39
- $background: "WHITE",
40
- children: [
41
- /* @__PURE__ */ r("img", { src: g.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
42
- /* @__PURE__ */ r(m, { heightX: 2 }),
43
- h === "TEACHER" ? /* @__PURE__ */ p(A, { children: [
44
- /* @__PURE__ */ r(
45
- k,
41
+ Icon: k,
42
+ renderAs: "secondary",
43
+ size: "small",
44
+ analyticsLabel: "add_chapter_icon",
45
+ onClick: m
46
+ }
47
+ ) })
48
+ ] }) : /* @__PURE__ */ i(h, { $gapX: 6.75, $alignItems: "center", $justifyContent: "center", children: [
49
+ /* @__PURE__ */ r("img", { src: g.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
50
+ /* @__PURE__ */ r(d, { heightX: 2 }),
51
+ o === "TEACHER" ? /* @__PURE__ */ i(T, { children: [
52
+ /* @__PURE__ */ r(
53
+ x,
54
+ {
55
+ renderAs: "primary",
56
+ position: "bottom",
57
+ hidden: p,
58
+ tooltipItem: "Plan is completed",
59
+ children: /* @__PURE__ */ r(
60
+ E,
46
61
  {
62
+ widthX: 10,
47
63
  renderAs: "primary",
48
- position: "bottom",
49
- hidden: a,
50
- tooltipItem: "Plan is completed",
51
- children: /* @__PURE__ */ r(
52
- x,
53
- {
54
- widthX: 10,
55
- renderAs: "primary",
56
- shape: "square",
57
- size: "small",
58
- label: "Add chapter",
59
- onClick: f,
60
- disabled: !a || !c,
61
- analyticsProps: {
62
- milestone_id: t
63
- }
64
- }
65
- )
64
+ shape: "square",
65
+ size: "small",
66
+ label: "Add chapter",
67
+ onClick: m,
68
+ disabled: !p || !n,
69
+ analyticsProps: {
70
+ milestone_id: t
71
+ }
66
72
  }
67
- ),
68
- /* @__PURE__ */ r(m, { heightX: 2 })
69
- ] }) : /* @__PURE__ */ r(y, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to add a chapter" })
70
- ]
71
- }
72
- );
73
+ )
74
+ }
75
+ ),
76
+ /* @__PURE__ */ r(d, { heightX: 2 })
77
+ ] }) : /* @__PURE__ */ r(L, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to add a chapter" })
78
+ ] });
73
79
  }
74
- ), O = I;
80
+ ), K = j;
75
81
  export {
76
- O as default
82
+ K as default
77
83
  };
78
84
  //# sourceMappingURL=chapters-list.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapters-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport { IMAGES } from '../../../assets/images/images';\nimport ArrowTooltip from '../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../ui/buttons/button/button';\nimport { useUIContext } from '../../ui/context/context';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport ChapterItem from './chapter-item/chapter-item';\nimport * as Styled from './chapters-list-styled';\n\nconst ChaptersList: FC<IChaptersListProps> = memo(\n ({ milestoneId, canUpdatePlan, chapters, ...restChaptersList }) => {\n const { isGoalCreation, userType, onChapterClick, onAddChapter, isMilestoneActive } =\n restChaptersList;\n\n const { onClick: trackOnClick } = useUIContext();\n\n const handleOnAddChapter = useCallback(() => {\n trackOnClick({\n label: 'add_chapter_icon',\n props: {\n milestone_id: milestoneId,\n },\n });\n onAddChapter?.({ milestoneId, isGoalCreation });\n }, [milestoneId, isGoalCreation, onAddChapter, trackOnClick]);\n\n if (!chapters.length) {\n return (\n <Styled.ChaptersListContainer\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={isMilestoneActive}\n tooltipItem=\"Plan is completed\"\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Add chapter\"\n onClick={handleOnAddChapter}\n disabled={!isMilestoneActive || !canUpdatePlan}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to add a chapter\n </Text>\n )}\n </Styled.ChaptersListContainer>\n );\n }\n\n return (\n <Styled.ChaptersListContainer>\n <Styled.ChaptersWrapper>\n {chapters.map((chapter, idx) => {\n const { id } = chapter;\n\n return (\n <ChapterItem\n key={id}\n milestoneId={milestoneId}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n );\n })}\n </Styled.ChaptersWrapper>\n </Styled.ChaptersListContainer>\n );\n },\n);\n\nexport default ChaptersList;\n"],"names":["ChaptersList","memo","milestoneId","canUpdatePlan","chapters","restChaptersList","isGoalCreation","userType","onChapterClick","onAddChapter","isMilestoneActive","trackOnClick","useUIContext","handleOnAddChapter","useCallback","jsx","Styled.ChaptersListContainer","Styled.ChaptersWrapper","chapter","idx","id","ChapterItem","jsxs","IMAGES","Separator","Fragment","ArrowTooltip","Button","Text","ChaptersList$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAuCC;AAAA,EAC3C,CAAC,EAAE,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,GAAGC,QAAuB;AACjE,UAAM,EAAE,gBAAAC,GAAgB,UAAAC,GAAU,gBAAAC,GAAgB,cAAAC,GAAc,mBAAAC,EAC9D,IAAAL,GAEI,EAAE,SAASM,EAAa,IAAIC,EAAa,GAEzCC,IAAqBC,EAAY,MAAM;AAC9B,MAAAH,EAAA;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,UACL,cAAcT;AAAA,QAChB;AAAA,MAAA,CACD,GACcO,KAAA,QAAAA,EAAA,EAAE,aAAAP,GAAa,gBAAAI,EAAA;AAAA,OAC7B,CAACJ,GAAaI,GAAgBG,GAAcE,CAAY,CAAC;AAExD,WAACP,EAAS,SA2CX,gBAAAW,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAE,GAAA,EACE,UAASb,EAAA,IAAI,CAACc,GAASC,MAAQ;AACxB,YAAA,EAAE,IAAAC,EAAO,IAAAF;AAGb,aAAA,gBAAAH;AAAA,QAACM;AAAA,QAAA;AAAA,UAEC,aAAAnB;AAAA,UACA,SAAAgB;AAAA,UACA,gBAAAV;AAAA,UACA,WAAWW;AAAA,QAAA;AAAA,QAJNC;AAAA,MAAA;AAAA,IAKP,CAEH,GACH,EACF,CAAA,IAzDE,gBAAAE;AAAA,MAACN;AAAAA,MAAA;AAAA,QACC,OAAO;AAAA,QACP,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,aAAY;AAAA,QAEZ,UAAA;AAAA,UAAA,gBAAAD,EAAC,OAAI,EAAA,KAAKQ,EAAO,iBAAiB,KAAI,mBAAkB;AAAA,UACxD,gBAAAR,EAACS,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UACtBjB,MAAa,YAEV,gBAAAe,EAAAG,GAAA,EAAA,UAAA;AAAA,YAAA,gBAAAV;AAAA,cAACW;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,UAAS;AAAA,gBACT,QAAQhB;AAAA,gBACR,aAAY;AAAA,gBAEZ,UAAA,gBAAAK;AAAA,kBAACY;AAAA,kBAAA;AAAA,oBACC,QAAQ;AAAA,oBACR,UAAS;AAAA,oBACT,OAAM;AAAA,oBACN,MAAK;AAAA,oBACL,OAAM;AAAA,oBACN,SAASd;AAAA,oBACT,UAAU,CAACH,KAAqB,CAACP;AAAA,oBACjC,gBAAgB;AAAA,sBACd,cAAcD;AAAA,oBAChB;AAAA,kBAAA;AAAA,gBACF;AAAA,cAAA;AAAA,YACF;AAAA,YACA,gBAAAa,EAACS,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UAAA,EAAA,CACzB,IAEC,gBAAAT,EAAAa,GAAA,EAAK,WAAU,YAAW,QAAO,cAAa,UAE/C,yCAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAyBV;AACF,GAEAC,IAAe7B;"}
1
+ {"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapters-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport { IMAGES } from '../../../assets/images/images';\nimport Plus2Icon from '../../../assets/line-icons/icons/plus2';\nimport ArrowTooltip from '../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../ui/context/context';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport ChapterItem from './chapter-item/chapter-item';\nimport * as Styled from './chapters-list-styled';\n\nconst ChaptersList: FC<IChaptersListProps> = memo(\n ({ milestoneId, canUpdatePlan, chapters, ...restChaptersList }) => {\n const { isGoalCreation, userType, onChapterClick, onAddChapter, isMilestoneActive } =\n restChaptersList;\n\n const canAddChapter = userType === 'TEACHER' && onAddChapter && canUpdatePlan;\n const { onClick: trackOnClick } = useUIContext();\n\n const handleOnAddChapter = useCallback(() => {\n trackOnClick({\n label: 'add_chapter_icon',\n props: {\n milestone_id: milestoneId,\n },\n });\n onAddChapter?.({ milestoneId, isGoalCreation });\n }, [milestoneId, isGoalCreation, onAddChapter, trackOnClick]);\n\n if (!chapters.length) {\n return (\n <Styled.ChaptersListContainer $gapX={6.75} $alignItems=\"center\" $justifyContent=\"center\">\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={isMilestoneActive}\n tooltipItem=\"Plan is completed\"\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Add chapter\"\n onClick={handleOnAddChapter}\n disabled={!isMilestoneActive || !canUpdatePlan}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to add a chapter\n </Text>\n )}\n </Styled.ChaptersListContainer>\n );\n }\n\n return (\n <Styled.ChaptersListContainer>\n <Styled.ChaptersWrapper>\n {chapters.map((chapter, idx) => {\n const { id } = chapter;\n\n return (\n <ChapterItem\n key={id}\n milestoneId={milestoneId}\n userType={userType}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n );\n })}\n </Styled.ChaptersWrapper>\n {canAddChapter && (\n <Styled.AddChapterIconWrapper>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n size=\"small\"\n analyticsLabel=\"add_chapter_icon\"\n onClick={handleOnAddChapter}\n />\n </Styled.AddChapterIconWrapper>\n )}\n </Styled.ChaptersListContainer>\n );\n },\n);\n\nexport default ChaptersList;\n"],"names":["ChaptersList","memo","milestoneId","canUpdatePlan","chapters","restChaptersList","isGoalCreation","userType","onChapterClick","onAddChapter","isMilestoneActive","canAddChapter","trackOnClick","useUIContext","handleOnAddChapter","useCallback","jsxs","Styled.ChaptersListContainer","jsx","Styled.ChaptersWrapper","chapter","idx","id","ChapterItem","Styled.AddChapterIconWrapper","IconButton","Plus2Icon","IMAGES","Separator","Fragment","ArrowTooltip","Button","Text","ChaptersList$1"],"mappings":";;;;;;;;;;;;AAgBA,MAAMA,IAAuCC;AAAA,EAC3C,CAAC,EAAE,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,GAAGC,QAAuB;AACjE,UAAM,EAAE,gBAAAC,GAAgB,UAAAC,GAAU,gBAAAC,GAAgB,cAAAC,GAAc,mBAAAC,EAC9D,IAAAL,GAEIM,IAAgBJ,MAAa,aAAaE,KAAgBN,GAC1D,EAAE,SAASS,EAAa,IAAIC,EAAa,GAEzCC,IAAqBC,EAAY,MAAM;AAC9B,MAAAH,EAAA;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,UACL,cAAcV;AAAA,QAChB;AAAA,MAAA,CACD,GACcO,KAAA,QAAAA,EAAA,EAAE,aAAAP,GAAa,gBAAAI,EAAA;AAAA,OAC7B,CAACJ,GAAaI,GAAgBG,GAAcG,CAAY,CAAC;AAExD,WAACR,EAAS,SAsCZ,gBAAAY,EAACC,GAAA,EACC,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EACE,YAAS,IAAI,CAACC,GAASC,MAAQ;AACxB,cAAA,EAAE,IAAAC,EAAO,IAAAF;AAGb,eAAA,gBAAAF;AAAA,UAACK;AAAA,UAAA;AAAA,YAEC,aAAArB;AAAA,YACA,UAAAK;AAAA,YACA,SAAAa;AAAA,YACA,gBAAAZ;AAAA,YACA,WAAWa;AAAA,UAAA;AAAA,UALNC;AAAA,QAAA;AAAA,MAQV,CAAA,GACH;AAAA,MACCX,KACC,g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ONE_TEST_ASSIGNED"
26
26
  }, T = {
27
- HOMEWORK_UNASSIGN: "HOMEWORK_UNASSIGN"
28
- }, A = {
29
27
  ...E,
30
28
  ..._,
31
- ...S,
32
- ...T
29
+ ...S
33
30
  };
34
31
  export {
35
- A as EVENTS
32
+ T as EVENTS
36
33
  };
37
34
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/features/communication/pub-sub/constants.ts"],"sourcesContent":["const CHAPTER_SHEET_EVENTS = {\n CHAPTER_UPDATED: 'CHAPTER_UPDATED',\n LESSONS_MARKED_AS_FAMILIAR: 'LESSONS_MARKED_AS_FAMILIAR',\n LESSONS_MARKED_AS_IRRELEVANT: 'LESSONS_MARKED_AS_IRRELEVANT',\n LESSONS_PROGRESS_RESET: 'LESSONS_PROGRESS_RESET',\n UNLOCK_SHEETS: 'UNLOCK_SHEETS',\n EXTRA_PRACTICE_ASSIGNED: 'EXTRA_PRACTICE_ASSIGNED',\n CHANGE_LOCATION: 'CHANGE_LOCATION',\n SHEET_STARTED: 'SHEET_STARTED',\n SHEET_UNASSIGNED: 'SHEET_UNASSIGNED',\n} as const;\n\nconst GOAL_EVENTS = {\n GOAL_CREATED: 'GOAL_CREATED',\n GOAL_EDITED: 'GOAL_EDITED',\n GOAL_DELETED: 'GOAL_DELETED',\n GOAL_OUTCOME_ADDED: 'GOAL_OUTCOME_ADDED',\n} as const;\n\nconst MILESTONE_EVENTS = {\n MILESTONE_NAME_UPDATED: 'MILESTONE_NAME_UPDATED',\n MILESTONE_DATE_UPDATED: 'MILESTONE_DATE_UPDATED',\n MILESTONE_DELETED: 'MILESTONE_DELETED',\n MILESTONE_EDITED: 'MILESTONE_EDITED',\n MILESTONE_RESOURCE_ASSIGNED: 'MILESTONE_RESOURCE_ASSIGNED',\n MILESTONE_RESOURCE_UNASSIGNED: 'MILESTONE_RESOURCE_UNASSIGNED',\n MILESTONE_RESOURCE_RESET: 'MILESTONE_RESOURCE_RESET',\n PAST_MILESTONE_OUTCOME_ADDED: 'PAST_MILESTONE_OUTCOME_ADDED',\n MILESTONE_TEST_ASSIGNED: 'MILESTONE_TEST_ASSIGNED',\n} as const;\n\nconst HOMEWORK_EVENTS = {\n HOMEWORK_UNASSIGN: 'HOMEWORK_UNASSIGN',\n} as const;\n\nconst EVENTS = {\n ...CHAPTER_SHEET_EVENTS,\n ...MILESTONE_EVENTS,\n ...GOAL_EVENTS,\n ...HOMEWORK_EVENTS,\n};\n\nexport { EVENTS };\n"],"names":["CHAPTER_SHEET_EVENTS","GOAL_EVENTS","MILESTONE_EVENTS","HOMEWORK_EVENTS","EVENTS"],"mappings":"AAAA,MAAMA,IAAuB;AAAA,EAC3B,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,kBAAkB;AACpB,GAEMC,IAAc;AAAA,EAClB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AACtB,GAEMC,IAAmB;AAAA,EACvB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,yBAAyB;AAC3B,GAEMC,IAAkB;AAAA,EACtB,mBAAmB;AACrB,GAEMC,IAAS;AAAA,EACb,GAAGJ;AAAA,EACH,GAAGE;AAAA,EACH,GAAGD;AAAA,EACH,GAAGE;AACL;"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/features/communication/pub-sub/constants.ts"],"sourcesContent":["const CHAPTER_SHEET_EVENTS = {\n CHAPTER_UPDATED: 'CHAPTER_UPDATED',\n LESSONS_MARKED_AS_FAMILIAR: 'LESSONS_MARKED_AS_FAMILIAR',\n LESSONS_MARKED_AS_IRRELEVANT: 'LESSONS_MARKED_AS_IRRELEVANT',\n LESSONS_PROGRESS_RESET: 'LESSONS_PROGRESS_RESET',\n UNLOCK_SHEETS: 'UNLOCK_SHEETS',\n EXTRA_PRACTICE_ASSIGNED: 'EXTRA_PRACTICE_ASSIGNED',\n CHANGE_LOCATION: 'CHANGE_LOCATION',\n SHEET_STARTED: 'SHEET_STARTED',\n SHEET_UNASSIGNED: 'SHEET_UNASSIGNED',\n} as const;\n\nconst GOAL_EVENTS = {\n GOAL_CREATED: 'GOAL_CREATED',\n GOAL_EDITED: 'GOAL_EDITED',\n GOAL_DELETED: 'GOAL_DELETED',\n GOAL_OUTCOME_ADDED: 'GOAL_OUTCOME_ADDED',\n} as const;\n\nconst MILESTONE_EVENTS = {\n MILESTONE_NAME_UPDATED: 'MILESTONE_NAME_UPDATED',\n MILESTONE_DATE_UPDATED: 'MILESTONE_DATE_UPDATED',\n MILESTONE_DELETED: 'MILESTONE_DELETED',\n MILESTONE_EDITED: 'MILESTONE_EDITED',\n MILESTONE_RESOURCE_ASSIGNED: 'MILESTONE_RESOURCE_ASSIGNED',\n MILESTONE_RESOURCE_UNASSIGNED: 'MILESTONE_RESOURCE_UNASSIGNED',\n MILESTONE_RESOURCE_RESET: 'MILESTONE_RESOURCE_RESET',\n PAST_MILESTONE_OUTCOME_ADDED: 'PAST_MILESTONE_OUTCOME_ADDED',\n MILESTONE_TEST_ASSIGNED: 'MILESTONE_TEST_ASSIGNED',\n} as const;\n\nconst EVENTS = {\n ...CHAPTER_SHEET_EVENTS,\n ...MILESTONE_EVENTS,\n ...GOAL_EVENTS,\n};\n\nexport { EVENTS };\n"],"names":["CHAPTER_SHEET_EVENTS","GOAL_EVENTS","MILESTONE_EVENTS","EVENTS"],"mappings":"AAAA,MAAMA,IAAuB;AAAA,EAC3B,iBAAiB;AAAA,EACjB,4BAA4B;AAAA,EAC5B,8BAA8B;AAAA,EAC9B,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,yBAAyB;AAAA,EACzB,iBAAiB;AAAA,EACjB,eAAe;AAAA,EACf,kBAAkB;AACpB,GAEMC,IAAc;AAAA,EAClB,cAAc;AAAA,EACd,aAAa;AAAA,EACb,cAAc;AAAA,EACd,oBAAoB;AACtB,GAEMC,IAAmB;AAAA,EACvB,wBAAwB;AAAA,EACxB,wBAAwB;AAAA,EACxB,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,6BAA6B;AAAA,EAC7B,+BAA+B;AAAA,EAC/B,0BAA0B;AAAA,EAC1B,8BAA8B;AAAA,EAC9B,yBAAyB;AAC3B,GAEMC,IAAS;AAAA,EACb,GAAGH;AAAA,EACH,GAAGE;AAAA,EACH,GAAGD;AACL;"}
@@ -1,24 +1,17 @@
1
1
  import e from "styled-components";
2
- import r from "../../../ui/layout/flex-view.js";
3
- const d = e(r)`
2
+ import p from "../../../ui/layout/flex-view.js";
3
+ const d = e(p)`
4
4
  top: ${({ $top: t }) => t}px;
5
5
  left: ${({ $left: t }) => t}px;
6
- `, a = e(r)(({ theme: t }) => {
6
+ `, l = e(p)(({ theme: t }) => {
7
7
  const { gutter: o } = t.layout;
8
8
  return `
9
9
  width: 100%;
10
10
  padding: ${o * 0.75}px ${o * 0.5}px;
11
11
  `;
12
- }), i = e.div`
13
- pointer-events: none;
14
- width: 720px;
15
- overflow: hidden;
16
- padding: 30px;
17
- background-color: transparent;
18
- `;
12
+ });
19
13
  export {
20
14
  d as ClonedElementWrapper,
21
- a as CoachmarkBody,
22
- i as ELementWrapper
15
+ l as CoachmarkBody
23
16
  };
24
17
  //# sourceMappingURL=coachmark-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n\nexport const ELementWrapper = styled.div`\n pointer-events: none;\n width: 720px;\n overflow: hidden;\n padding: 30px;\n background-color: transparent;\n`;\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter","ELementWrapper"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC,GAEYC,IAAiBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
1
+ {"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC;"}
@@ -1,43 +1,43 @@
1
- import { jsx as e, jsxs as g, Fragment as f } from "react/jsx-runtime";
2
- import { useMemo as d } from "react";
1
+ import { jsx as o, jsxs as g, Fragment as f } from "react/jsx-runtime";
2
+ import { useMemo as p } from "react";
3
3
  import m from "../../../ui/arrow-tooltip/arrow-tooltip.js";
4
- import b from "../../../ui/nudge/nudge.js";
5
- import { BLUR_OVERLAY_Z_INDEX as T, IndicatorType as p } from "../../use-journey/constants.js";
6
- import { CoachmarkBody as w, ClonedElementWrapper as s } from "./coachmark-styled.js";
7
- import { toolTipGetXCoordinates as y } from "./coachmark-utils.js";
4
+ import y from "../../../ui/nudge/nudge.js";
5
+ import { BLUR_OVERLAY_Z_INDEX as T, IndicatorType as d } from "../../use-journey/constants.js";
6
+ import { CoachmarkBody as P, ClonedElementWrapper as s } from "./coachmark-styled.js";
7
+ import { toolTipGetXCoordinates as $ } from "./coachmark-utils.js";
8
8
  const H = ({ coachmark: t }) => {
9
- const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: C = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, l = d(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), u = d(() => {
10
- const o = t.indicator;
9
+ const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: C = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, l = p(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), u = p(() => {
10
+ const e = t.indicator;
11
11
  return {
12
12
  width: 264,
13
13
  // Can be over ridden
14
- tooltipXCoOrdinates: y(o.position) + (o.tooltipXCoOrdinates ?? 0),
14
+ tooltipXCoOrdinates: $(e.position) + (e.tooltipXCoOrdinates ?? 0),
15
15
  // For absolutely positioned elements
16
16
  zIndex: T + 1,
17
- ...o,
18
- tooltipItem: /* @__PURE__ */ e(w, { children: o.tooltipItem }),
17
+ ...e,
18
+ tooltipItem: /* @__PURE__ */ o(P, { children: e.tooltipItem }),
19
19
  alwaysVisible: !0,
20
20
  renderAs: "primary",
21
21
  // Deprecate this
22
22
  borderWidth: 1,
23
- arrowColor: o.arrowColor || "WHITE",
24
- borderColor: o.borderColor || "WHITE",
25
- type: p.TOOLTIP,
23
+ arrowColor: "WHITE",
24
+ borderColor: "WHITE",
25
+ type: d.TOOLTIP,
26
26
  isAnimated: !0
27
27
  };
28
- }, [t.indicator]), I = d(() => {
29
- const o = t.indicator;
28
+ }, [t.indicator]), I = p(() => {
29
+ const e = t.indicator;
30
30
  return {
31
- ...o,
32
- nudgePointerX: n + (o.nudgePointerX ?? 0),
33
- nudgePointerY: r + (o.nudgePointerY ?? 0)
31
+ ...e,
32
+ nudgePointerX: n + (e.nudgePointerX ?? 0),
33
+ nudgePointerY: r + (e.nudgePointerY ?? 0)
34
34
  };
35
35
  }, [t.indicator, n, r]);
36
- return !i || !t.isActive ? null : t.type === p.TOOLTIP ? l() ? /* @__PURE__ */ g(f, { children: [
36
+ return !i || !t.isActive ? null : t.type === d.TOOLTIP ? l() ? /* @__PURE__ */ g(f, { children: [
37
37
  t.elementToHighlight,
38
- /* @__PURE__ */ e(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(m, { ...u, children: /* @__PURE__ */ e("div", { style: { height: h, width: C } }) }) })
39
- ] }) : /* @__PURE__ */ e(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(m, { ...u, children: t.elementToHighlight }) }) : t.type === p.NUDGE ? /* @__PURE__ */ g(f, { children: [
40
- /* @__PURE__ */ e(
38
+ /* @__PURE__ */ o(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ o(m, { ...u, children: /* @__PURE__ */ o("div", { style: { height: h, width: C } }) }) })
39
+ ] }) : /* @__PURE__ */ o(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ o(m, { ...u, children: t.elementToHighlight }) }) : t.type === d.NUDGE ? /* @__PURE__ */ g(f, { children: [
40
+ /* @__PURE__ */ o(
41
41
  s,
42
42
  {
43
43
  $top: l() ? 0 : r,
@@ -46,7 +46,7 @@ const H = ({ coachmark: t }) => {
46
46
  children: t.elementToHighlight
47
47
  }
48
48
  ),
49
- /* @__PURE__ */ e(b, { zIndex: T + 1, ...I })
49
+ /* @__PURE__ */ o(y, { zIndex: T + 1, ...I })
50
50
  ] }) : null;
51
51
  };
52
52
  export {
@@ -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 React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\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 }, [coachmark.indicator]);\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","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQE,IAAuB;AAAA,MAC/B,GAAGF;AAAA,MACH,aAAc,gBAAAG,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,YAAYJ,EAAkB,cAAc;AAAA,MAC5C,aAAaA,EAAkB,eAAe;AAAA,MAC9C,MAAMK,EAAc;AAAA,MACpB,YAAY;AAAA,IAAA;AAAA,EACd,GACC,CAACd,EAAU,SAAS,CAAC,GAElBe,IAAaR,EAAQ,MAAM;AAC/B,UAAMS,IAAqBhB,EAAU;AAE9B,WAAA;AAAA,MACL,GAAGgB;AAAA,MACH,eAAeb,KAAQa,EAAM,iBAAiB;AAAA,MAC9C,eAAed,KAAOc,EAAM,iBAAiB;AAAA,IAAA;AAAA,KAE9C,CAAChB,EAAU,WAAWG,GAAMD,CAAG,CAAC;AAEnC,SAAI,CAACD,KAAiB,CAACD,EAAU,WACxB,OAGLA,EAAU,SAASc,EAAc,UAC/BR,MAGG,gBAAAW,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAUlB,EAAA;AAAA,IACX,gBAAAY,EAACO,GAAA,EAAuB,WAAU,YAAW,MAAMjB,GAAK,OAAOC,GAC7D,UAAA,gBAAAS,EAACQ,KAAc,GAAGZ,GAChB,4BAAC,OAAI,EAAA,OAAO,EAAE,QAAAJ,GAAQ,OAAAC,EAAA,GAAS,EAAA,CACjC,EACF,CAAA;AAAA,EACF,EAAA,CAAA,sBAKDc,GAAA,EAAuB,WAAU,YAAW,MAAMjB,GAAK,OAAOC,GAC7D,4BAACiB,GAAc,EAAA,GAAGZ,GAAe,UAAAR,EAAU,oBAAmB,EAChE,CAAA,IAIAA,EAAU,SAASc,EAAc,QAG/B,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN;AAAA,MAACO;AAAAA,MAAA;AAAA,QACC,MAAMb,MAAe,IAAIJ;AAAA,QACzB,OAAOI,MAAe,IAAIH;AAAA,QAC1B,WAAWG,MAAe,aAAa;AAAA,QAEtC,UAAUN,EAAA;AAAA,MAAA;AAAA,IACb;AAAA,sBACCqB,GAAM,EAAA,QAAQV,IAAuB,GAAI,GAAGI,GAAY;AAAA,EAC3D,EAAA,CAAA,IAIG;AACT;"}
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 React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\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: 'WHITE',\n borderColor: 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [coachmark.indicator]);\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","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQE,IAAuB;AAAA,MAC/B,GAAGF;AAAA,MACH,aAAc,gBAAAG,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,aAAa;AAA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=> (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 || {});
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))(E || {});
2
2
  export {
3
3
  E as JOURNEY_ID_STUDENT
4
4
  };
@@ -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 HOMEPAGE_JOURNEY = 'HOMEPAGE_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,mCAClCA,EAAA,mBAAmB,oBAVTA,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}\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,10 +1,10 @@
1
- import { jsxs as D, jsx as w } from "react/jsx-runtime";
2
- import { createContext as L, useState as J, useRef as k, useCallback as l, useMemo as N, useEffect as R } 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: T, appId: s, userId: o }) => {
7
- const [b, O] = J(!1), [x, p] = J(null), [c, a] = J([]), [d, v] = J(!1), y = k(-1), t = k(), f = k([]), { post: _ } = M(), { data: C = null, get: g } = z(), A = l(
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
8
  (e, r) => {
9
9
  if (c.length > 0) {
10
10
  console.error(
@@ -12,13 +12,13 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
12
12
  );
13
13
  return;
14
14
  }
15
- v(!0), t.current = e, y.current = -1, a([...r]);
15
+ v(!0), t.current = e, m.current = -1, a([...r]);
16
16
  },
17
17
  [c.length]
18
18
  ), u = l(() => {
19
- f.current.forEach((e) => {
19
+ d.current.forEach((e) => {
20
20
  clearTimeout(e);
21
- }), f.current = [], t.current = void 0, y.current = -1, a([]), v(!1);
21
+ }), d.current = [], t.current = void 0, m.current = -1, a([]), v(!1);
22
22
  }, []), $ = l(
23
23
  (e) => {
24
24
  u(), p((r) => r && !r.includes(e) ? [...r, e] : r), _({
@@ -36,31 +36,31 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
36
36
  );
37
37
  return;
38
38
  }
39
- a((m) => [...m, r]);
39
+ a((y) => [...y, r]);
40
40
  }, []), P = l(
41
- (e, r = !1, m = 0, q = !1) => {
41
+ (e, r = !1, y = 0) => {
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
- O(q), m !== 0 && a((n) => n.map((i) => ({ ...i, isActive: !1 })));
48
+ y !== 0 && a((n) => n.map((i) => ({ ...i, isActive: !1 })));
49
49
  const j = setTimeout(() => {
50
50
  clearTimeout(j);
51
- const n = y.current + 1;
51
+ const n = m.current + 1;
52
52
  a((i) => {
53
53
  if (n >= i.length || i.length === 0)
54
54
  return u(), [];
55
- y.current = n;
56
- const h = [...i];
57
- return h[n].isActive = !0, n > 0 && (h[n - 1].isActive = r), h;
55
+ m.current = n;
56
+ const C = [...i];
57
+ return C[n].isActive = !0, n > 0 && (C[n - 1].isActive = r), C;
58
58
  });
59
- }, m);
60
- f.current.push(j);
59
+ }, y);
60
+ d.current.push(j);
61
61
  },
62
62
  [u]
63
- ), U = N(
63
+ ), b = q(
64
64
  () => ({
65
65
  nextCoachmark: P,
66
66
  setJourney: A,
@@ -69,7 +69,7 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
69
69
  endJourney: $,
70
70
  coachmarks: c,
71
71
  userCompletedJourneyIds: x,
72
- isJourneyActive: d
72
+ isJourneyActive: J
73
73
  }),
74
74
  [
75
75
  P,
@@ -79,7 +79,7 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
79
79
  $,
80
80
  c,
81
81
  x,
82
- d
82
+ J
83
83
  ]
84
84
  );
85
85
  return R(() => {
@@ -89,25 +89,17 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
89
89
  journey_status: "COMPLETED"
90
90
  });
91
91
  }, [s, g, o]), R(() => {
92
- if (C) {
93
- const e = C.map((r) => r.journey_id);
92
+ if (f) {
93
+ const e = f.map((r) => r.journey_id);
94
94
  p(e);
95
95
  }
96
- }, [C]), /* @__PURE__ */ D(S.Provider, { value: U, children: [
97
- d && /* @__PURE__ */ w(
98
- G,
99
- {
100
- about: "journey-overlay",
101
- isJourneyBlurred: b,
102
- "data-testid": t.current,
103
- children: c.map((e, r) => /* @__PURE__ */ w(B, { coachmark: e }, `coachmark-${r}`))
104
- }
105
- ),
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}`)) }),
106
98
  T
107
99
  ] });
108
100
  };
109
101
  export {
110
- S as JourneyContext,
111
- W as JourneyProvider
102
+ z as JourneyContext,
103
+ H as JourneyProvider
112
104
  };
113
105
  //# 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 [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[]) => {\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 (\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","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,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,eAAAT;AAAA,MACA,YAAAX;AAAA,MACA,cAAAS;AAAA,MACA,cAAAL;AAAA,MACA,YAAAE;AAAA,MACA,YAAYnB;AAAA,MACZ,yBAAAF;AAAA,MACA,iBAAAI;AAAA,IAAA;AAAA,IAEF;AAAA,MACEsB;AAAA,MACAX;AAAA,MACAS;AAAA,MACAL;AAAA,MACAE;AAAA,MACAnB;AAAA,MACAF;AAAA,MACAI;AAAA,IACF;AAAA,EAAA;AAIF,SAAAgC,EAAU,MAAM;AACd,IAAIzC,KAASC,KACXiB,EAAmBjB,GAAQ;AAAA,MACzB,QAAQD;AAAA,MACR,SAASC;AAAA,MACT,gBAAgB;AAAA,IAAA,CACjB;AAAA,EAEF,GAAA,CAACD,GAAOkB,GAAoBjB,CAAM,CAAC,GAGtCwC,EAAU,MAAM;AACd,QAAIxB,GAAuB;AACzB,YAAMyB,IAA2BzB,EAAsB,IAAI,CAAA0B,MAAWA,EAAQ,UAAU;AAExF,MAAArC,EAA2BoC,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAACzB,CAAqB,CAAC,GAGvB,gBAAA2B,EAAAhD,EAAe,UAAf,EAAwB,OAAO2C,GAC7B,UAAA;AAAA,IACC9B,KAAA,gBAAAoC;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,kBAAA5C;AAAA,QACA,eAAaW,EAAiB;AAAA,QAE7B,UAAAN,EAAc,IAAI,CAACuB,GAAWiB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAlB,EAAtB,GAAA,aAAaiB,CAAK,EAA0B,CAC7D;AAAA,MAAA;AAAA,IACH;AAAA,IAEDhD;AAAA,EACH,EAAA,CAAA;AAEJ;"}
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,IAA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