@cuemath/leap 2.9.9-as4 → 2.9.9

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 (315) 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/analytics-events/platform-events-student.js +3 -3
  11. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  12. package/dist/features/analytics-events/whitelist-events.js +11 -13
  13. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  14. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +33 -99
  15. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  16. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +49 -92
  17. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  18. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  19. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  20. package/dist/features/chapters/chapters-list/chapters-list.js +70 -64
  21. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  22. package/dist/features/circle-games/games/tutorial/constants.js +2 -2
  23. package/dist/features/circle-games/games/tutorial/constants.js.map +1 -1
  24. package/dist/features/circle-games/games/tutorial/tutorial-styled.js +6 -6
  25. package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
  26. package/dist/features/circle-games/games/web-view/web-view.js +52 -45
  27. package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
  28. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +104 -74
  29. package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
  30. package/dist/features/circle-games/leaderboard/comps/banner/banner.js +6 -6
  31. package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
  32. package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js +1 -1
  33. package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js.map +1 -1
  34. package/dist/features/circle-games/leaderboard/leaderboard-styled.js +1 -1
  35. package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
  36. package/dist/features/circle-games/leaderboard/leaderboard.js +9 -9
  37. package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
  38. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +8 -8
  39. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
  40. package/dist/features/circle-games/sign-up/constants.js +9 -9
  41. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  42. package/dist/features/communication/pub-sub/constants.js +6 -12
  43. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  44. package/dist/features/journey/comps/coachmark/coachmark-styled.js +5 -12
  45. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  46. package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
  47. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  48. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  49. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  50. package/dist/features/journey/use-journey/journey-context-provider.js +28 -36
  51. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  52. package/dist/features/journey/use-journey/journey-styled.js +5 -10
  53. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  54. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  55. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  56. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +49 -42
  57. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  58. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +4 -12
  59. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  60. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +105 -128
  61. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  62. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +92 -0
  63. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +1 -0
  64. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +25 -0
  65. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +1 -0
  66. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +20 -14
  67. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  68. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +50 -26
  69. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  70. package/dist/features/milestone/create/milestone-create.js +43 -49
  71. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  72. package/dist/features/milestone/create/utils/index.js +38 -33
  73. package/dist/features/milestone/create/utils/index.js.map +1 -1
  74. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  75. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  76. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  77. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  78. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +53 -51
  79. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  80. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +40 -42
  81. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  82. package/dist/features/milestone/edit/goal-edit-container.js +62 -64
  83. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  84. package/dist/features/milestone/edit/goal-edit-helpers.js +53 -50
  85. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  86. package/dist/features/milestone/edit/milestone-edit-container.js +52 -54
  87. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  88. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  89. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  90. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +17 -9
  91. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  92. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  93. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  94. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +105 -138
  95. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  96. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +13 -0
  97. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +1 -0
  98. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +38 -0
  99. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +1 -0
  100. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +123 -107
  101. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  102. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +176 -157
  103. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  104. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +10 -24
  105. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  106. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +86 -80
  107. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  108. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +22 -10
  109. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  110. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +53 -0
  111. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +1 -0
  112. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +37 -70
  113. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  114. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +176 -114
  115. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  116. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +25 -0
  117. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +1 -0
  118. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +16 -29
  119. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  120. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +25 -17
  121. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  122. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +35 -23
  123. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  124. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +113 -110
  125. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  126. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
  127. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
  128. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  129. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  130. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  131. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  132. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +113 -116
  133. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  134. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
  135. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
  136. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +50 -46
  137. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  138. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
  139. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
  140. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
  141. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
  142. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +38 -0
  143. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -0
  144. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
  145. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
  146. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
  147. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
  148. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
  149. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
  150. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
  151. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
  152. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +135 -0
  153. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -0
  154. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  155. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  156. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +3 -4
  157. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  158. package/dist/features/ui/arc-button/constants.js +4 -4
  159. package/dist/features/ui/arc-button/constants.js.map +1 -1
  160. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +29 -30
  161. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  162. package/dist/features/ui/constants/z-index.js +1 -1
  163. package/dist/features/ui/constants/z-index.js.map +1 -1
  164. package/dist/features/ui/context-menu/context-menu-styled.js +14 -28
  165. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  166. package/dist/features/ui/context-menu/context-menu.js +15 -30
  167. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  168. package/dist/features/ui/lottie-animation/lottie-animation.js +13 -19
  169. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  170. package/dist/features/ui/theme/button.js +107 -22
  171. package/dist/features/ui/theme/button.js.map +1 -1
  172. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +96 -78
  173. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
  174. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +79 -47
  175. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  176. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +150 -147
  177. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  178. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  179. package/dist/features/worksheet/worksheet/worksheet.js +325 -300
  180. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  181. package/dist/index.d.ts +46 -355
  182. package/dist/index.js +471 -503
  183. package/dist/index.js.map +1 -1
  184. package/package.json +1 -1
  185. package/dist/assets/line-icons/icons/alarm.js +0 -41
  186. package/dist/assets/line-icons/icons/alarm.js.map +0 -1
  187. package/dist/assets/line-icons/icons/dart.js +0 -23
  188. package/dist/assets/line-icons/icons/dart.js.map +0 -1
  189. package/dist/assets/line-icons/icons/exclamation.js +0 -26
  190. package/dist/assets/line-icons/icons/exclamation.js.map +0 -1
  191. package/dist/assets/line-icons/icons/home2.js +0 -25
  192. package/dist/assets/line-icons/icons/home2.js.map +0 -1
  193. package/dist/assets/line-icons/icons/important.js +0 -23
  194. package/dist/assets/line-icons/icons/important.js.map +0 -1
  195. package/dist/assets/line-icons/icons/puzzle.js +0 -25
  196. package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
  197. package/dist/assets/line-icons/icons/recap.js +0 -32
  198. package/dist/assets/line-icons/icons/recap.js.map +0 -1
  199. package/dist/assets/line-icons/icons/skip-colored.js +0 -43
  200. package/dist/assets/line-icons/icons/skip-colored.js.map +0 -1
  201. package/dist/assets/line-icons/icons/status.js +0 -41
  202. package/dist/assets/line-icons/icons/status.js.map +0 -1
  203. package/dist/assets/line-icons/icons/testtube.js +0 -33
  204. package/dist/assets/line-icons/icons/testtube.js.map +0 -1
  205. package/dist/features/chapters-v2/api/chapter.js +0 -10
  206. package/dist/features/chapters-v2/api/chapter.js.map +0 -1
  207. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +0 -112
  208. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +0 -1
  209. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +0 -35
  210. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +0 -1
  211. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +0 -83
  212. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +0 -1
  213. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +0 -90
  214. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +0 -1
  215. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +0 -98
  216. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +0 -1
  217. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +0 -51
  218. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +0 -1
  219. package/dist/features/chapters-v2/chapter-details/chapter-details.js +0 -127
  220. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +0 -1
  221. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +0 -13
  222. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +0 -1
  223. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +0 -159
  224. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +0 -1
  225. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +0 -16
  226. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +0 -1
  227. package/dist/features/chapters-v2/comps/node-card/node-card.js +0 -12
  228. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +0 -1
  229. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +0 -31
  230. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +0 -1
  231. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +0 -32
  232. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +0 -1
  233. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +0 -9
  234. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +0 -1
  235. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +0 -189
  236. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +0 -1
  237. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +0 -194
  238. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +0 -1
  239. package/dist/features/chapters-v2/comps/tag/tag-styled.js +0 -13
  240. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +0 -1
  241. package/dist/features/chapters-v2/comps/tag/tag.js +0 -28
  242. package/dist/features/chapters-v2/comps/tag/tag.js.map +0 -1
  243. package/dist/features/chapters-v2/constants/block-constants.js +0 -20
  244. package/dist/features/chapters-v2/constants/block-constants.js.map +0 -1
  245. package/dist/features/chapters-v2/constants/node-constants.js +0 -14
  246. package/dist/features/chapters-v2/constants/node-constants.js.map +0 -1
  247. package/dist/features/chapters-v2/utils/index.js +0 -38
  248. package/dist/features/chapters-v2/utils/index.js.map +0 -1
  249. package/dist/features/chapters-v2/utils/node-card-utils.js +0 -177
  250. package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
  251. package/dist/features/homework/card-menu-option.js +0 -28
  252. package/dist/features/homework/card-menu-option.js.map +0 -1
  253. package/dist/features/homework/card-menu-options.js +0 -22
  254. package/dist/features/homework/card-menu-options.js.map +0 -1
  255. package/dist/features/homework/card-title.js +0 -16
  256. package/dist/features/homework/card-title.js.map +0 -1
  257. package/dist/features/homework/homework-analytics-events.js +0 -10
  258. package/dist/features/homework/homework-analytics-events.js.map +0 -1
  259. package/dist/features/homework/homework-card-view.js +0 -143
  260. package/dist/features/homework/homework-card-view.js.map +0 -1
  261. package/dist/features/homework/homework-card.js +0 -245
  262. package/dist/features/homework/homework-card.js.map +0 -1
  263. package/dist/features/homework/hw-card-list/api/get-homeworks.js +0 -10
  264. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +0 -1
  265. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +0 -63
  266. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +0 -1
  267. package/dist/features/homework/hw-card-list/hw-card-list.js +0 -191
  268. package/dist/features/homework/hw-card-list/hw-card-list.js.map +0 -1
  269. package/dist/features/homework/node-progress.js +0 -29
  270. package/dist/features/homework/node-progress.js.map +0 -1
  271. package/dist/features/homework/styles.js +0 -130
  272. package/dist/features/homework/styles.js.map +0 -1
  273. package/dist/features/homework/utils.js +0 -48
  274. package/dist/features/homework/utils.js.map +0 -1
  275. package/dist/features/journey/hooks/use-chapter-journey.js +0 -194
  276. package/dist/features/journey/hooks/use-chapter-journey.js.map +0 -1
  277. package/dist/features/journey/hooks/use-home-page-journey.js +0 -189
  278. package/dist/features/journey/hooks/use-home-page-journey.js.map +0 -1
  279. package/dist/features/journey/journey-id/journey-id-teacher.js +0 -5
  280. package/dist/features/journey/journey-id/journey-id-teacher.js.map +0 -1
  281. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +0 -587
  282. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +0 -1
  283. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
  284. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
  285. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
  286. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
  287. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -87
  288. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
  289. package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
  290. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
  291. package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
  292. package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
  293. package/dist/features/recent-chapters/recent-chapters.js +0 -39
  294. package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
  295. package/dist/features/sheet-v2/resource-list/resource-list.js +0 -45
  296. package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
  297. package/dist/node_modules/date-fns/differenceInDays.js +0 -17
  298. package/dist/node_modules/date-fns/differenceInDays.js.map +0 -1
  299. package/dist/static/chapter-header-bg-2.c8d96894.svg +0 -1
  300. package/dist/static/competitive-arena.b9c40801.json +0 -1
  301. package/dist/static/learn.71b13323.json +0 -1
  302. package/dist/static/node-custom-test-bg.d3b757be.svg +0 -1
  303. package/dist/static/node-learn-bg.b61f815c.svg +0 -1
  304. package/dist/static/node-practice-bg.16cbaf2a.svg +0 -1
  305. package/dist/static/node-project-bg.e6a33e28.svg +0 -1
  306. package/dist/static/node-puzzle-bg.3422135c.svg +0 -1
  307. package/dist/static/node-recap-bg.546154e4.svg +0 -1
  308. package/dist/static/node-test-prep-bg.42c0b9c4.svg +0 -1
  309. package/dist/static/node-video-bg.3df3f73a.svg +0 -1
  310. package/dist/static/practice.158dd488.json +0 -1
  311. package/dist/static/project.eb665827.json +0 -1
  312. package/dist/static/puzzle.b298c7e4.json +0 -1
  313. package/dist/static/recap.0dd2c1e2.json +0 -1
  314. package/dist/static/test.803d6036.json +0 -1
  315. package/dist/static/video.b41451e2.json +0 -1
@@ -1 +1 @@
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
+ {"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,5 +1,5 @@
1
1
  import { createPostAPI as t } from "@cuemath/rest-api";
2
- import { BASE_URL_V3_2 as e } from "../../../../constants/api.js";
2
+ import { BASE_URL_V3_1 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_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;"}
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,68 +1,75 @@
1
1
  import { jsxs as n, jsx as t } from "react/jsx-runtime";
2
- import { memo as B, useState as G, useRef as L, useCallback as s } from "react";
3
- import { SHEET_STATE as p } from "../../../../sheets/constants/sheet.js";
4
- import N from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
5
- import O from "../../../../ui/hooks/use-context-menu-click-handler.js";
6
- import X from "../../../../ui/image/image.js";
2
+ import { memo as G, useState as L, useRef as N, useCallback as p } from "react";
3
+ import { SHEET_STATE as c } from "../../../../sheets/constants/sheet.js";
4
+ import O from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import X from "../../../../ui/hooks/use-context-menu-click-handler.js";
6
+ import j from "../../../../ui/image/image.js";
7
7
  import w from "../../../../ui/layout/flex-view.js";
8
- import j from "../sheets-list/sheets-list.js";
9
- import { ChapterInfoWrapper as F, ChapterInfoIcon as K, SheetsListWrapper as P, ChapterListWrapper as U, ChapterProgressSVG as q, ChapterProgressSVGCircle as A, StyledText as E } from "./chapter-item-styled.js";
10
- const z = [
8
+ import F from "../sheets-list/sheets-list.js";
9
+ import { ChapterInfoWrapper as K, ChapterInfoIcon as P, SheetsListWrapper as U, ChapterListWrapper as q, ChapterProgressSVG as z, ChapterProgressSVGCircle as _, StyledText as A } from "./chapter-item-styled.js";
10
+ const J = [
11
11
  "STARTED",
12
- p.FAMILIAR,
13
- p.PROFICIENT,
14
- p.MASTERED
15
- ], ie = B((_) => {
16
- const { chapterData: x, onChapterItemClick: h, isThisPrimaryChapter: R, showChapterTags: k, canAddChapter: l } = _, {
12
+ c.FAMILIAR,
13
+ c.PROFICIENT,
14
+ c.MASTERED
15
+ ], le = G((E) => {
16
+ const { chapterData: x, onChapterItemClick: h, isThisPrimaryChapter: R, showChapterTags: k, canAddChapter: l } = E, {
17
17
  name: d,
18
- image_url: W,
18
+ image_url: y,
19
19
  added: m,
20
20
  learning_sheet_data: g,
21
+ total_supplementary_sheets: W,
21
22
  id: f,
22
23
  chapter_tags: H,
23
24
  state: a
24
- } = x, M = a && z.includes(a) && g.length > 0, u = a === "MASTERED", [e, C] = G(null), i = L(null), V = s(() => {
25
- var b;
26
- const { current: I } = i;
27
- if (I) {
28
- const r = (b = I.children[0]) == null ? void 0 : b.getBoundingClientRect();
25
+ } = x, M = a && J.includes(a) && g.length > 0, u = a === "MASTERED", [e, C] = L(null), i = N(null), V = p(() => {
26
+ var I;
27
+ const { current: T } = i;
28
+ if (T) {
29
+ const r = (I = T.children[0]) == null ? void 0 : I.getBoundingClientRect();
29
30
  if (r) {
30
- const v = window.innerWidth, S = window.innerHeight, o = {};
31
- r.left + 296 < v ? o.left = r.left : o.left = r.left + 20 - 296, r.top + 252 < S ? o.top = r.top + 20 : o.bottom = S - r.top + 8, Object.keys(o).length && C({ ...o });
31
+ const B = window.innerWidth, b = window.innerHeight, o = {};
32
+ r.left + 296 < B ? o.left = r.left : o.left = r.left + 20 - 296, r.top + 252 < b ? o.top = r.top + 20 : o.bottom = b - r.top + 8, Object.keys(o).length && C({ ...o });
32
33
  }
33
34
  }
34
35
  }, [C, i]), {
35
- menuVisible: c,
36
+ menuVisible: s,
36
37
  onMenuClick: $,
37
- hideMenu: T
38
- } = O(i, V), y = s(() => {
39
- c ? T() : $();
40
- }, [$, T, c]), D = s(() => {
38
+ hideMenu: S
39
+ } = X(i, V), D = p(() => {
40
+ s ? S() : $();
41
+ }, [$, S, s]), v = p(() => {
41
42
  if (!l) return null;
42
43
  h(f);
43
44
  }, [l, f, h]);
44
45
  return /* @__PURE__ */ n(w, { $flexGap: 4, $position: "relative", children: [
45
- /* @__PURE__ */ n(F, { ref: i, onClick: y, children: [
46
- /* @__PURE__ */ t(K, { className: "goal-chapter-info-icon" }),
47
- c && /* @__PURE__ */ t(
48
- P,
46
+ /* @__PURE__ */ n(K, { ref: i, onClick: D, children: [
47
+ /* @__PURE__ */ t(P, { className: "goal-chapter-info-icon" }),
48
+ s && /* @__PURE__ */ t(
49
+ U,
49
50
  {
50
51
  $top: e == null ? void 0 : e.top,
51
52
  $left: e == null ? void 0 : e.left,
52
53
  $bottom: e == null ? void 0 : e.bottom,
53
- children: /* @__PURE__ */ t(j, { learningSheetData: g })
54
+ children: /* @__PURE__ */ t(
55
+ F,
56
+ {
57
+ learningSheetData: g,
58
+ supplementarySheetsCount: W
59
+ }
60
+ )
54
61
  }
55
62
  )
56
63
  ] }),
57
64
  /* @__PURE__ */ t(
58
- N,
65
+ O,
59
66
  {
60
67
  position: "bottom",
61
68
  renderAs: "primary",
62
69
  tooltipItem: "Duplicates can’t be added",
63
70
  hidden: !R,
64
71
  children: /* @__PURE__ */ n(
65
- U,
72
+ q,
66
73
  {
67
74
  $widthX: 9.5,
68
75
  $heightX: 8.875,
@@ -74,13 +81,13 @@ const z = [
74
81
  $selectable: l,
75
82
  $borderColor: m ? "BLACK_T_87" : "WHITE_5",
76
83
  $background: m ? "WHITE_3" : "WHITE_1",
77
- onClick: D,
84
+ onClick: v,
78
85
  children: [
79
86
  /* @__PURE__ */ n(w, { $position: "relative", children: [
80
- M && /* @__PURE__ */ n(q, { width: "62px", height: "62px", children: [
81
- /* @__PURE__ */ t(A, { $progress: 0, r: "30", cx: "31", cy: "31" }),
87
+ M && /* @__PURE__ */ n(z, { width: "62px", height: "62px", children: [
88
+ /* @__PURE__ */ t(_, { $progress: 0, r: "30", cx: "31", cy: "31" }),
82
89
  /* @__PURE__ */ t(
83
- A,
90
+ _,
84
91
  {
85
92
  $progressCircle: !0,
86
93
  $progressBackground: u ? "GREEN_5" : "BLACK",
@@ -92,9 +99,9 @@ const z = [
92
99
  )
93
100
  ] }),
94
101
  /* @__PURE__ */ t(
95
- X,
102
+ j,
96
103
  {
97
- src: W || "",
104
+ src: y || "",
98
105
  alt: d,
99
106
  withLoader: !0,
100
107
  width: 56,
@@ -103,16 +110,16 @@ const z = [
103
110
  }
104
111
  )
105
112
  ] }),
106
- /* @__PURE__ */ t(E, { $renderAs: "ab3", $align: "center", children: d })
113
+ /* @__PURE__ */ t(A, { $renderAs: "ab3", $align: "center", children: d })
107
114
  ]
108
115
  }
109
116
  )
110
117
  }
111
118
  ),
112
- k && /* @__PURE__ */ t(E, { $renderAs: "ab3", $lineClampNo: 1, $color: "BLACK_T_60", children: H })
119
+ k && /* @__PURE__ */ t(A, { $renderAs: "ab3", $lineClampNo: 1, $color: "BLACK_T_60", children: H })
113
120
  ] });
114
121
  });
115
122
  export {
116
- ie as default
123
+ le as default
117
124
  };
118
125
  //# sourceMappingURL=chapter-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-item.js","sources":["../../../../../../src/features/milestone/create/comps/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItem, ISheetsListPosition } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef, useState } from 'react';\n\nimport { SHEET_STATE } from '../../../../sheets/constants/sheet';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SheetsList from '../sheets-list/sheets-list';\nimport * as Styled from './chapter-item-styled';\n\nconst progressVisibleStates = [\n 'STARTED',\n SHEET_STATE.FAMILIAR,\n SHEET_STATE.PROFICIENT,\n SHEET_STATE.MASTERED,\n];\n\nconst ChapterItemV2: FC<IChapterItem> = memo(props => {\n const { chapterData, onChapterItemClick, isThisPrimaryChapter, showChapterTags, canAddChapter } =\n props;\n const {\n name,\n image_url: imageUrl,\n added,\n learning_sheet_data: learningSheetData,\n id: chapterId,\n chapter_tags: chapterTags,\n state,\n } = chapterData;\n\n const showProgress =\n state && progressVisibleStates.includes(state) && learningSheetData.length > 0;\n const isMastered = state === 'MASTERED';\n\n const [sheetsListPositionCoordinates, setSheetsListPositionCoordinates] =\n useState<ISheetsListPosition | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const handleSetCoordinates = useCallback(() => {\n const { current } = containerRef;\n\n if (current) {\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n\n if (boundingClientRect) {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n const positions: ISheetsListPosition = {};\n\n //* 288 (Width of card) + 8 (left position) = 296\n if (boundingClientRect.left + 296 < viewportWidth) {\n positions.left = boundingClientRect.left;\n } else {\n positions.left = boundingClientRect.left + 20 - 296;\n }\n\n //* 252 (Max height of card)\n if (boundingClientRect.top + 252 < viewportHeight) {\n positions.top = boundingClientRect.top + 20;\n } else {\n positions.bottom = viewportHeight - boundingClientRect.top + 8;\n }\n\n if (Object.keys(positions).length) {\n setSheetsListPositionCoordinates({ ...positions });\n }\n }\n }\n }, [setSheetsListPositionCoordinates, containerRef]);\n\n const {\n menuVisible,\n onMenuClick: onMenuClick,\n hideMenu,\n } = useContextMenuClickHandler(containerRef, handleSetCoordinates);\n\n const handleOnSheetsView = useCallback(() => {\n if (!menuVisible) {\n onMenuClick();\n } else {\n hideMenu();\n }\n }, [onMenuClick, hideMenu, menuVisible]);\n\n const handleOnChapterItemClick = useCallback(() => {\n if (!canAddChapter) return null;\n\n onChapterItemClick(chapterId);\n }, [canAddChapter, chapterId, onChapterItemClick]);\n\n return (\n <FlexView $flexGap={4} $position=\"relative\">\n <Styled.ChapterInfoWrapper ref={containerRef} onClick={handleOnSheetsView}>\n <Styled.ChapterInfoIcon className=\"goal-chapter-info-icon\" />\n {menuVisible && (\n <Styled.SheetsListWrapper\n $top={sheetsListPositionCoordinates?.top}\n $left={sheetsListPositionCoordinates?.left}\n $bottom={sheetsListPositionCoordinates?.bottom}\n >\n <SheetsList learningSheetData={learningSheetData} />\n </Styled.SheetsListWrapper>\n )}\n </Styled.ChapterInfoWrapper>\n\n <ArrowTooltip\n position=\"bottom\"\n renderAs=\"primary\"\n tooltipItem=\"Duplicates can’t be added\"\n hidden={!isThisPrimaryChapter}\n >\n <Styled.ChapterListWrapper\n $widthX={9.5}\n $heightX={8.875}\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n $position=\"relative\"\n $alignItems=\"center\"\n $selectable={canAddChapter}\n $borderColor={added ? 'BLACK_T_87' : 'WHITE_5'}\n $background={added ? 'WHITE_3' : 'WHITE_1'}\n onClick={handleOnChapterItemClick}\n >\n <FlexView $position=\"relative\">\n {showProgress && (\n <Styled.ChapterProgressSVG width=\"62px\" height=\"62px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"30\" cx=\"31\" cy=\"31\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={isMastered ? 'GREEN_5' : 'BLACK'}\n $progress={isMastered ? 360 : 95}\n r=\"30\"\n cx=\"31\"\n cy=\"31\"\n />\n </Styled.ChapterProgressSVG>\n )}\n <Image\n src={imageUrl || ''}\n alt={name}\n withLoader\n width={56}\n height={56}\n borderRadius={50}\n />\n </FlexView>\n\n <Styled.StyledText $renderAs=\"ab3\" $align=\"center\">\n {name}\n </Styled.StyledText>\n </Styled.ChapterListWrapper>\n </ArrowTooltip>\n\n {showChapterTags && (\n <Styled.StyledText $renderAs=\"ab3\" $lineClampNo={1} $color=\"BLACK_T_60\">\n {chapterTags}\n </Styled.StyledText>\n )}\n </FlexView>\n );\n});\n\nexport default ChapterItemV2;\n"],"names":["progressVisibleStates","SHEET_STATE","ChapterItemV2","memo","props","chapterData","onChapterItemClick","isThisPrimaryChapter","showChapterTags","canAddChapter","name","imageUrl","added","learningSheetData","chapterId","chapterTags","state","showProgress","isMastered","sheetsListPositionCoordinates","setSheetsListPositionCoordinates","useState","containerRef","useRef","handleSetCoordinates","useCallback","current","boundingClientRect","_a","viewportWidth","viewportHeight","positions","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleOnSheetsView","handleOnChapterItemClick","jsxs","FlexView","Styled.ChapterInfoWrapper","jsx","Styled.ChapterInfoIcon","Styled.SheetsListWrapper","SheetsList","ArrowTooltip","Styled.ChapterListWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Image","Styled.StyledText"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAwB;AAAA,EAC5B;AAAA,EACAC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd,GAEMC,KAAkCC,EAAK,CAASC,MAAA;AACpD,QAAM,EAAE,aAAAC,GAAa,oBAAAC,GAAoB,sBAAAC,GAAsB,iBAAAC,GAAiB,eAAAC,EAC9E,IAAAL,GACI;AAAA,IACJ,MAAAM;A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sBAC9C,WAAWA,IAAa,MAAM;AAAA,sBAC9B,GAAE;AAAA,sBACF,IAAG;AAAA,sBACH,IAAG;AAAA,oBAAA;AAAA,kBACL;AAAA,gBAAA,GACF;AAAA,gBAEF,gBAAAuB;AAAA,kBAACQ;AAAA,kBAAA;AAAA,oBACC,KAAKtC,KAAY;AAAA,oBACjB,KAAKD;AAAA,oBACL,YAAU;AAAA,oBACV,OAAO;AAAA,oBACP,QAAQ;AAAA,oBACR,cAAc;AAAA,kBAAA;AAAA,gBAChB;AAAA,cAAA,GACF;AAAA,cAEA,gBAAA+B,EAACS,GAAA,EAAkB,WAAU,OAAM,QAAO,UACvC,UACHxC,GAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,IAECF,KACE,gBAAAiC,EAAAS,GAAA,EAAkB,WAAU,OAAM,cAAc,GAAG,QAAO,cACxD,UACHnC,EAAA,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"chapter-item.js","sources":["../../../../../../src/features/milestone/create/comps/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItem, ISheetsListPosition } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef, useState } from 'react';\n\nimport { SHEET_STATE } from '../../../../sheets/constants/sheet';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SheetsList from '../sheets-list/sheets-list';\nimport * as Styled from './chapter-item-styled';\n\nconst progressVisibleStates = [\n 'STARTED',\n SHEET_STATE.FAMILIAR,\n SHEET_STATE.PROFICIENT,\n SHEET_STATE.MASTERED,\n];\n\nconst ChapterItemV2: FC<IChapterItem> = memo(props => {\n const { chapterData, onChapterItemClick, isThisPrimaryChapter, showChapterTags, canAddChapter } =\n props;\n const {\n name,\n image_url: imageUrl,\n added,\n learning_sheet_data: learningSheetData,\n total_supplementary_sheets: totalSupplementarySheets,\n id: chapterId,\n chapter_tags: chapterTags,\n state,\n } = chapterData;\n\n const showProgress =\n state && progressVisibleStates.includes(state) && learningSheetData.length > 0;\n const isMastered = state === 'MASTERED';\n\n const [sheetsListPositionCoordinates, setSheetsListPositionCoordinates] =\n useState<ISheetsListPosition | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const handleSetCoordinates = useCallback(() => {\n const { current } = containerRef;\n\n if (current) {\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n\n if (boundingClientRect) {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n const positions: ISheetsListPosition = {};\n\n //* 288 (Width of card) + 8 (left position) = 296\n if (boundingClientRect.left + 296 < viewportWidth) {\n positions.left = boundingClientRect.left;\n } else {\n positions.left = boundingClientRect.left + 20 - 296;\n }\n\n //* 252 (Max height of card)\n if (boundingClientRect.top + 252 < viewportHeight) {\n positions.top = boundingClientRect.top + 20;\n } else {\n positions.bottom = viewportHeight - boundingClientRect.top + 8;\n }\n\n if (Object.keys(positions).length) {\n setSheetsListPositionCoordinates({ ...positions });\n }\n }\n }\n }, [setSheetsListPositionCoordinates, containerRef]);\n\n const {\n menuVisible,\n onMenuClick: onMenuClick,\n hideMenu,\n } = useContextMenuClickHandler(containerRef, handleSetCoordinates);\n\n const handleOnSheetsView = useCallback(() => {\n if (!menuVisible) {\n onMenuClick();\n } else {\n hideMenu();\n }\n }, [onMenuClick, hideMenu, menuVisible]);\n\n const handleOnChapterItemClick = useCallback(() => {\n if (!canAddChapter) return null;\n\n onChapterItemClick(chapterId);\n }, [canAddChapter, chapterId, onChapterItemClick]);\n\n return (\n <FlexView $flexGap={4} $position=\"relative\">\n <Styled.ChapterInfoWrapper ref={containerRef} onClick={handleOnSheetsView}>\n <Styled.ChapterInfoIcon className=\"goal-chapter-info-icon\" />\n {menuVisible && (\n <Styled.SheetsListWrapper\n $top={sheetsListPositionCoordinates?.top}\n $left={sheetsListPositionCoordinates?.left}\n $bottom={sheetsListPositionCoordinates?.bottom}\n >\n <SheetsList\n learningSheetData={learningSheetData}\n supplementarySheetsCount={totalSupplementarySheets}\n />\n </Styled.SheetsListWrapper>\n )}\n </Styled.ChapterInfoWrapper>\n\n <ArrowTooltip\n position=\"bottom\"\n renderAs=\"primary\"\n tooltipItem=\"Duplicates can’t be added\"\n hidden={!isThisPrimaryChapter}\n >\n <Styled.ChapterListWrapper\n $widthX={9.5}\n $heightX={8.875}\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n $position=\"relative\"\n $alignItems=\"center\"\n $selectable={canAddChapter}\n $borderColor={added ? 'BLACK_T_87' : 'WHITE_5'}\n $background={added ? 'WHITE_3' : 'WHITE_1'}\n onClick={handleOnChapterItemClick}\n >\n <FlexView $position=\"relative\">\n {showProgress && (\n <Styled.ChapterProgressSVG width=\"62px\" height=\"62px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"30\" cx=\"31\" cy=\"31\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={isMastered ? 'GREEN_5' : 'BLACK'}\n $progress={isMastered ? 360 : 95}\n r=\"30\"\n cx=\"31\"\n cy=\"31\"\n />\n </Styled.ChapterProgressSVG>\n )}\n <Image\n src={imageUrl || ''}\n alt={name}\n withLoader\n width={56}\n height={56}\n borderRadius={50}\n />\n </FlexView>\n\n <Styled.StyledText $renderAs=\"ab3\" $align=\"center\">\n {name}\n </Styled.StyledText>\n </Styled.ChapterListWrapper>\n </ArrowTooltip>\n\n {showChapterTags && (\n <Styled.StyledText $renderAs=\"ab3\" $lineClampNo={1} $color=\"BLACK_T_60\">\n {chapterTags}\n </Styled.StyledText>\n )}\n </FlexView>\n );\n});\n\nexport default ChapterItemV2;\n"],"names":["progressVisibleStates","SHEET_STATE","ChapterItemV2","memo","props","chapterData","onChapterItemClick","isThisPrimaryChapter","showChapterTags","canAddChapter","name","imageUrl","added","learningSheetData","totalSupplementarySheets","chapterId","chapterTags","state","showProgress","isMastered","sheetsListPositionCoordinates","setSheetsListPositionCoordinates","useState","containerRef","useRef","handleSetCoordinates","useCallback","current","boundingClientRect","_a","viewportWidth","viewportHeight","positions","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleOnSheetsView","handleOnChapterItemClick","jsxs","FlexView","Styled.ChapterInfoWrapper","jsx","Styled.ChapterInfoIcon","Styled.SheetsListWrapper","SheetsList","ArrowTooltip","Styled.ChapterListWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Image","Styled.StyledText"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAwB;AAAA,EAC5B;AAAA,EACAC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd,GAEMC,KAAkCC,EAAK,CAASC,MAAA;AACpD,QAAM,EAAE,aAAAC,GAAa,oBAAAC,GAAoB,sBAAAC,GAAsB,iBAAAC,GAAiB,eAAAC,EAC9E,IAAAL,GACI;AAAA,IACJ,MAAAM;AAAA,IACA,WAAWC;AAAA,IACX,OAAAC;AAAA,IACA,qBAAqBC;AAAA,IACrB,4BAA4BC;AAAA,IAC5B,IAAIC;AAAA,IACJ,cAAcC;AAAA,IACd,OAAAC;AAAA,EACE,IAAAZ,GAEEa,IACJD,KAASjB,EAAsB,SAASiB,CAAK,KAAKJ,EAAkB,SAAS,GACzEM,IAAaF,MAAU,YAEvB,CAACG,GAA+BC,CAAgC,IACpEC,EAAqC,IAAI,GACrCC,IAAeC,EAAuB,IAAI,GAE1CC,IAAuBC,EAAY,MAAM;;AACvC,UAAA,EAAE,SAAAC,EAAY,IAAAJ;AAEpB,QAAII,GAAS;AACX,YAAMC,KAAqBC,IAAAF,EAAQ,SAAS,CAAC,MAAlB,gBAAAE,EAAqB;AAEhD,UAAID,GAAoB;AACtB,cAAME,IAAgB,OAAO,YACvBC,IAAiB,OAAO,aAExBC,IAAiC,CAAA;AAGnC,QAAAJ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gBAAAkC,EAAAS,GAAA,EAAkB,WAAU,OAAM,cAAc,GAAG,QAAO,cACxD,UACHnC,EAAA,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
@@ -1,17 +1,9 @@
1
1
  import r from "styled-components";
2
- import o from "../../../../ui/layout/flex-view.js";
3
- const x = r(o)(({ theme: t }) => `
4
- box-shadow: 0px 10px 20px 0px ${t.colors.BLACK_T_20};
5
- `), n = r(o)(() => `
6
- margin-left: auto;
7
-
8
- svg {
9
- width: 24px;
10
- height: 24px;
11
- }
2
+ import p from "../../../../ui/layout/flex-view.js";
3
+ const e = r(p)(({ theme: o }) => `
4
+ box-shadow: 0px 10px 20px 0px ${o.colors.BLACK_T_20};
12
5
  `);
13
6
  export {
14
- n as BinIconWrapper,
15
- x as ButtonWrapper
7
+ e as ButtonWrapper
16
8
  };
17
9
  //# sourceMappingURL=chapters-selection-step-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chapters-selection-step-styled.js","sources":["../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n `;\n});\n\nconst BinIconWrapper = styled(FlexView)(() => {\n return `\n margin-left: auto;\n \n svg {\n width: 24px;\n height: 24px;\n }\n `;\n});\n\nexport { ButtonWrapper, BinIconWrapper };\n"],"names":["ButtonWrapper","styled","FlexView","theme","BinIconWrapper"],"mappings":";;AAIA,MAAMA,IAAgBC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QACjC;AAAA,oCAC2BA,EAAM,OAAO,UAAU;AAAA,GAE1D,GAEKC,IAAiBH,EAAOC,CAAQ,EAAE,MAC/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQR;"}
1
+ {"version":3,"file":"chapters-selection-step-styled.js","sources":["../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n `;\n});\n\nexport { ButtonWrapper };\n"],"names":["ButtonWrapper","styled","FlexView","theme"],"mappings":";;AAIA,MAAMA,IAAgBC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QACjC;AAAA,oCAC2BA,EAAM,OAAO,UAAU;AAAA,GAE1D;"}
@@ -1,84 +1,81 @@
1
- import { jsx as t, jsxs as $ } from "react/jsx-runtime";
2
- import { memo as q, useContext as V, useMemo as J, useCallback as u } from "react";
3
- import K from "../../../../../assets/line-icons/icons/bin2.js";
4
- import Q from "../../../../../assets/line-icons/icons/plus.js";
5
- import f from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
6
- import Y from "../../../../ui/buttons/button/button.js";
7
- import k from "../../../../ui/buttons/icon-button/icon-button.js";
8
- import { useUIContext as Z } from "../../../../ui/context/context.js";
9
- import P from "../../../../ui/layout/flex-view.js";
10
- import ee from "../../../../ui/text/text.js";
11
- import { WARNING_MESSAGES as te } from "../../../constants.js";
12
- import { GOAL_EDIT_FLOWS as oe } from "../../milestone-create-constants.js";
13
- import re from "../../milestone-create-context.js";
14
- import ne from "../body-layout/body-layout.js";
15
- import se from "../class-details-step/class-details-step.js";
16
- import ae from "./chapter-selection-step-v2/chapter-selection.js";
17
- import { BinIconWrapper as de, ButtonWrapper as R } from "./chapters-selection-step-styled.js";
18
- import { useChapterListUpdate as ie } from "./use-chapter-list-update.js";
19
- import { computeChangeDetection as le } from "./utils.js";
20
- const $e = q((G) => {
1
+ import { jsx as t, jsxs as w } from "react/jsx-runtime";
2
+ import { memo as H, useContext as W, useMemo as U, useCallback as u } from "react";
3
+ import q from "../../../../../assets/line-icons/icons/plus.js";
4
+ import P from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
5
+ import y from "../../../../ui/buttons/button/button.js";
6
+ import V from "../../../../ui/buttons/icon-button/icon-button.js";
7
+ import { useUIContext as J } from "../../../../ui/context/context.js";
8
+ import $ from "../../../../ui/layout/flex-view.js";
9
+ import K from "../../../../ui/text/text.js";
10
+ import { WARNING_MESSAGES as Q } from "../../../constants.js";
11
+ import { GOAL_EDIT_FLOWS as Y } from "../../milestone-create-constants.js";
12
+ import Z from "../../milestone-create-context.js";
13
+ import ee from "../body-layout/body-layout.js";
14
+ import te from "../class-details-step/class-details-step.js";
15
+ import oe from "./chapter-selection-step-v2/chapter-selection.js";
16
+ import { ButtonWrapper as k } from "./chapters-selection-step-styled.js";
17
+ import { useChapterListUpdate as re } from "./use-chapter-list-update.js";
18
+ import { computeChangeDetection as ne } from "./utils.js";
19
+ const xe = H((N) => {
21
20
  const {
22
- currentStep: g,
23
- onFormDataChange: s,
24
- onChapterExitWarning: d,
25
- formData: l,
26
- studentName: A,
27
- studentId: I,
21
+ currentStep: f,
22
+ onFormDataChange: n,
23
+ onChapterExitWarning: a,
24
+ formData: c,
25
+ studentName: g,
26
+ studentId: A,
28
27
  config: m,
29
- isGoalCreation: a,
30
- onPreSubmit: c,
28
+ isGoalCreation: d,
29
+ onPreSubmit: l,
31
30
  courseStream: _,
32
- classRatio: b,
33
- enrollmentType: C,
34
- canDeleteGoal: N,
35
- onDeleteGoal: L
36
- } = G, { flow: o } = V(re), { onEvent: D } = Z(), {
31
+ classRatio: C,
32
+ enrollmentType: S
33
+ } = N, { flow: s } = W(Z), { onEvent: b } = J(), {
37
34
  action_plan: {
38
- green: { share_message_template: S }
35
+ green: { share_message_template: I }
39
36
  }
40
- } = m, { buttonLabel: X, name: E, title: z } = g, F = {
41
- step: E
42
- }, { testType: O, primaryChaptersList: e, board: x, major: T, region: w, chapterGoalCategory: j } = l, { primaryGoalCategory: r } = j || {}, y = N && (o === "DRAFT_EDIT" || o === "EDIT"), { isProcessing: p, isProcessed: M } = ie({
43
- formData: l,
44
- onFormDataChange: s,
45
- studentId: I
46
- }), B = J(() => e ? e.some((n) => n.added) : !1, [e]), W = u(() => {
47
- const n = e == null ? void 0 : e.filter((i) => !!i.added), h = (e == null ? void 0 : e.filter(
48
- (i) => i.program_id !== (r == null ? void 0 : r.program_code) && i.added
49
- ).length) ?? 0, U = (e == null ? void 0 : e.filter((i) => i.program_id === (r == null ? void 0 : r.program_id)).length) ?? 0;
50
- D("CHAPTER_DETAILS_ADDED", {
51
- total_chapter_added: (n == null ? void 0 : n.length) ?? 0,
37
+ } = m, { buttonLabel: R, name: x, title: G } = f, L = {
38
+ step: x
39
+ }, { testType: O, primaryChaptersList: e, board: E, major: D, region: T, chapterGoalCategory: X } = c, { primaryGoalCategory: o } = X || {}, { isProcessing: p, isProcessed: j } = re({
40
+ formData: c,
41
+ onFormDataChange: n,
42
+ studentId: A
43
+ }), B = U(() => e ? e.some((r) => r.added) : !1, [e]), M = u(() => {
44
+ const r = e == null ? void 0 : e.filter((i) => !!i.added), h = (e == null ? void 0 : e.filter(
45
+ (i) => i.program_id !== (o == null ? void 0 : o.program_code) && i.added
46
+ ).length) ?? 0, F = (e == null ? void 0 : e.filter((i) => i.program_id === (o == null ? void 0 : o.program_id)).length) ?? 0;
47
+ b("CHAPTER_DETAILS_ADDED", {
48
+ total_chapter_added: (r == null ? void 0 : r.length) ?? 0,
52
49
  searched_chapter_added: h,
53
- suggested_chapter_added: U
54
- }), a ? s({
50
+ suggested_chapter_added: F
51
+ }), d ? n({
55
52
  primaryChaptersList: e,
56
- selectedChaptersList: n,
53
+ selectedChaptersList: r,
57
54
  searchedChaptersList: [],
58
55
  chapterSubStages: "date-selection",
59
56
  committed: {
60
57
  selectedChaptersList: !0,
61
58
  chapterSubStages: !0,
62
59
  grade: !0,
63
- board: !!x,
64
- major: !!T,
65
- region: !!w
60
+ board: !!E,
61
+ major: !!D,
62
+ region: !!T
66
63
  }
67
- }) : o && (c == null || c({ isDraftPlan: !1, flow: o, submitBaseMessage: S }));
64
+ }) : s && (l == null || l({ isDraftPlan: !1, flow: s, submitBaseMessage: I }));
68
65
  }, [
69
66
  e,
70
- x,
71
- T,
72
- w,
67
+ E,
73
68
  D,
69
+ T,
70
+ b,
71
+ n,
72
+ l,
74
73
  s,
75
- c,
76
- o,
77
- a,
78
- S,
79
- r
74
+ d,
75
+ I,
76
+ o
80
77
  ]), v = u(() => {
81
- s({
78
+ n({
82
79
  chapterSubStages: "custom-chapters",
83
80
  selectedChaptersList: void 0,
84
81
  committed: {
@@ -86,92 +83,72 @@ const $e = q((G) => {
86
83
  selectedChaptersList: !1
87
84
  }
88
85
  });
89
- }, [s]), H = u(
90
- (n) => {
91
- if (!o) return null;
92
- const h = le(e, r);
93
- oe.includes(o) || !(e != null && e.length) || !h ? n() : d == null || d({
94
- onSuccess: n,
95
- description: te.CHAPTER_EXIT_WARNING
86
+ }, [n]), z = u(
87
+ (r) => {
88
+ if (!s) return null;
89
+ const h = ne(e, o);
90
+ Y.includes(s) || !(e != null && e.length) || !h ? r() : a == null || a({
91
+ onSuccess: r,
92
+ description: Q.CHAPTER_EXIT_WARNING
96
93
  });
97
94
  },
98
- [d, o, e, r]
95
+ [a, s, e, o]
99
96
  );
100
97
  return /* @__PURE__ */ t(
101
- ne,
98
+ ee,
102
99
  {
103
- stepName: E,
104
- headerElement: /* @__PURE__ */ $(P, { $flexDirection: "row", $alignItems: "center", $flexGapX: 1, $width: "100%", children: [
105
- /* @__PURE__ */ t(ee, { $renderAs: "ab2", children: a ? z : "Chapters" }),
106
- a && o === "CREATE" && /* @__PURE__ */ t(
107
- se,
100
+ stepName: x,
101
+ headerElement: /* @__PURE__ */ w($, { $flexDirection: "row", $alignItems: "center", $flexGapX: 1, children: [
102
+ /* @__PURE__ */ t(K, { $renderAs: "ab2", children: d ? G : "Chapters" }),
103
+ d && s === "CREATE" && /* @__PURE__ */ t(
104
+ te,
108
105
  {
109
- studentName: A,
110
- studentId: I,
111
- currentStep: g,
106
+ studentName: g,
107
+ studentId: A,
108
+ currentStep: f,
112
109
  config: m,
113
- formData: l,
110
+ formData: c,
114
111
  courseStream: _,
115
- classRatio: b,
116
- onFormDataChange: s,
117
- onChapterExitWarning: d,
118
- enrollmentType: C
112
+ classRatio: C,
113
+ onFormDataChange: n,
114
+ onChapterExitWarning: a,
115
+ enrollmentType: S
119
116
  }
120
- ),
121
- a && y && /* @__PURE__ */ t(de, { children: /* @__PURE__ */ t(
122
- f,
123
- {
124
- renderAs: "primary",
125
- position: "bottom",
126
- tooltipItem: "Delete goal",
127
- zIndex: 10,
128
- widthX: 6,
129
- children: /* @__PURE__ */ t(
130
- k,
131
- {
132
- size: "xsmall",
133
- renderAs: "tertiary",
134
- Icon: K,
135
- analyticsLabel: "delete_goal_plan",
136
- onClick: L
137
- }
138
- )
139
- }
140
- ) })
117
+ )
141
118
  ] }),
142
119
  bodyHeight: "100%",
143
- onBackButtonClick: H,
120
+ onBackButtonClick: z,
144
121
  bodyElement: /* @__PURE__ */ t(
145
- ae,
122
+ oe,
146
123
  {
147
124
  config: m,
148
- classRatio: b,
149
- isGoalCreation: a,
150
- formData: l,
151
- studentName: A,
152
- isProcessed: M,
125
+ classRatio: C,
126
+ isGoalCreation: d,
127
+ formData: c,
128
+ studentName: g,
129
+ isProcessed: j,
153
130
  isProcessing: p,
154
131
  courseStream: _,
155
- onFormDataChange: s,
156
- onChapterExitWarning: d,
157
- enrollmentType: C
132
+ onFormDataChange: n,
133
+ onChapterExitWarning: a,
134
+ enrollmentType: S
158
135
  }
159
136
  ),
160
- footerElement: /* @__PURE__ */ $(P, { $flexDirection: "row", $flexGap: 12, $alignItems: "center", children: [
161
- (!a || O === "no-test") && /* @__PURE__ */ t(
162
- f,
137
+ footerElement: /* @__PURE__ */ w($, { $flexDirection: "row", $flexGap: 12, $alignItems: "center", children: [
138
+ (!d || O === "no-test") && /* @__PURE__ */ t(
139
+ P,
163
140
  {
164
141
  renderAs: "primary",
165
142
  position: "top",
166
143
  widthX: 6.5,
167
144
  zIndex: 20,
168
145
  tooltipItem: "Add a chapter",
169
- children: /* @__PURE__ */ t(R, { $borderRadius: 50, children: /* @__PURE__ */ t(
170
- k,
146
+ children: /* @__PURE__ */ t(k, { $borderRadius: 50, children: /* @__PURE__ */ t(
147
+ V,
171
148
  {
172
149
  renderAs: "secondary",
173
150
  analyticsLabel: "Add custom chapters",
174
- Icon: Q,
151
+ Icon: q,
175
152
  disabled: p,
176
153
  onClick: v
177
154
  }
@@ -179,7 +156,7 @@ const $e = q((G) => {
179
156
  }
180
157
  ),
181
158
  /* @__PURE__ */ t(
182
- f,
159
+ P,
183
160
  {
184
161
  renderAs: "primary",
185
162
  position: "top",
@@ -187,19 +164,19 @@ const $e = q((G) => {
187
164
  zIndex: 20,
188
165
  tooltipItem: "Please select atleast one chapter",
189
166
  hidden: B,
190
- children: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
191
- Y,
167
+ children: /* @__PURE__ */ t(k, { children: /* @__PURE__ */ t(
168
+ y,
192
169
  {
193
170
  renderAs: "primary",
194
171
  size: "small",
195
172
  shape: "square",
196
173
  widthX: 9,
197
- label: X,
198
- onClick: W,
174
+ label: R,
175
+ onClick: M,
199
176
  iconPosition: "right",
200
177
  busy: p,
201
178
  disabled: !B,
202
- analyticsProps: F
179
+ analyticsProps: L
203
180
  }
204
181
  ) })
205
182
  }
@@ -209,6 +186,6 @@ const $e = q((G) => {
209
186
  );
210
187
  });
211
188
  export {
212
- $e as default
189
+ xe as default
213
190
  };
214
191
  //# sourceMappingURL=chapters-selection-step.js.map