@cuemath/leap 3.5.3-j1 → 3.5.4-as1

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 (268) hide show
  1. package/dist/assets/illustrations/illustrations.js +4 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/images/images.js +12 -0
  4. package/dist/assets/images/images.js.map +1 -1
  5. package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
  6. package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js.map +1 -1
  7. package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +1 -1
  8. package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js.map +1 -1
  9. package/dist/features/av/av-preview/av-preview.js.map +1 -1
  10. package/dist/features/av/av-preview/hooks/use-media-devices.js.map +1 -1
  11. package/dist/features/chapters/chapter/comps/chapter-banner/chapter-banner.js.map +1 -1
  12. package/dist/features/chapters/chapter/comps/core-lessons/core-lessons.js.map +1 -1
  13. package/dist/features/chapters/chapter/comps/supplementary-resources/supplementary-resources.js.map +1 -1
  14. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  15. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  16. package/dist/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block.js.map +1 -1
  17. package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/teacher-actions/teacher-actions.js.map +1 -1
  18. package/dist/features/chapters/lpar-chapter/comps/chapter-progress.js.map +1 -1
  19. package/dist/features/chapters/lpar-milestone-chapter/block-section/chapter-block/chapter-block.js.map +1 -1
  20. package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/rewards-n-actions.js.map +1 -1
  21. package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/student-actions.js.map +1 -1
  22. package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions.js.map +1 -1
  23. package/dist/features/chapters/lpar-milestone-chapter/block-section/sheet-item/sheet-info.js.map +1 -1
  24. package/dist/features/chapters/lpar-milestone-chapter/extra-practice-section/extra-practice-section.js.map +1 -1
  25. package/dist/features/chapters/lpar-milestone-chapter/lpar-milestone-chapter.js.map +1 -1
  26. package/dist/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-card.js.map +1 -1
  27. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
  28. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -1
  29. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  30. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
  31. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -1
  32. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -1
  33. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
  34. package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test.js.map +1 -1
  35. package/dist/features/circle-games/game-launcher/comps/card-container/card-container.js.map +1 -1
  36. package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
  37. package/dist/features/circle-games/game-launcher/comps/tables-card/spl-events-text/spl-events-text.js.map +1 -1
  38. package/dist/features/circle-games/game-launcher/comps/tables-card/table-mode/table-mode.js.map +1 -1
  39. package/dist/features/circle-games/game-launcher/game-launcher.js.map +1 -1
  40. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  41. package/dist/features/circle-games/games/web-view/hooks/use-webview-games.js.map +1 -1
  42. package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
  43. package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
  44. package/dist/features/circle-games/leaderboard/comps/progress-item/progress-item.js.map +1 -1
  45. package/dist/features/circle-games/leaderboard/comps/progress-list-item/progress-list-item.js.map +1 -1
  46. package/dist/features/circle-games/leaderboard/comps/timer/timer.js.map +1 -1
  47. package/dist/features/circle-games/leaderboard/comps/with-grade/with-grade.js.map +1 -1
  48. package/dist/features/circle-games/leaderboard/hooks/use-timer/use-timer.js.map +1 -1
  49. package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps.js.map +1 -1
  50. package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -1
  51. package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
  52. package/dist/features/cue-canvas/sidebar/homework/homework.js.map +1 -1
  53. package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js.map +1 -1
  54. package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js.map +1 -1
  55. package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -1
  56. package/dist/features/cue-canvas/sidebar/tiles/tile.js.map +1 -1
  57. package/dist/features/cue-canvas/toolbar/color-picker-menu.js.map +1 -1
  58. package/dist/features/cue-canvas/toolbar/pen-tool-menu.js.map +1 -1
  59. package/dist/features/cue-canvas/toolbar/tool.js.map +1 -1
  60. package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
  61. package/dist/features/extra-practice/list/list.js.map +1 -1
  62. package/dist/features/homework/card-menu-options.js.map +1 -1
  63. package/dist/features/homework/homework-card-view.js.map +1 -1
  64. package/dist/features/homework/homework-card.js.map +1 -1
  65. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  66. package/dist/features/hooks/use-auto-play-permission/use-auto-play-permission-context-provider.js.map +1 -1
  67. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  68. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  69. package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js.map +1 -1
  70. package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
  71. package/dist/features/milestone/create/comps/add-custom-chapter/search-chapter/search-chapters.js.map +1 -1
  72. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapter-item.js.map +1 -1
  73. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/selected-chapters.js.map +1 -1
  74. package/dist/features/milestone/create/comps/add-custom-chapter/selected-chapters/tags-render.js.map +1 -1
  75. package/dist/features/milestone/create/comps/body-layout/body-layout.js.map +1 -1
  76. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  77. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/category-card.js.map +1 -1
  78. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
  79. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-selection.js.map +1 -1
  80. package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapters-list.js.map +1 -1
  81. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  82. package/dist/features/milestone/create/comps/confirmation-modals/chapter-clearance-confirmation.js.map +1 -1
  83. package/dist/features/milestone/create/comps/confirmation-modals/goal-creation-confirmation.js.map +1 -1
  84. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector-view.js.map +1 -1
  85. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js.map +1 -1
  86. package/dist/features/milestone/create/comps/milestone-progress/milestone-progress.js.map +1 -1
  87. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  88. package/dist/features/milestone/create/comps/test-type-step/category-component.js.map +1 -1
  89. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  90. package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone.js.map +1 -1
  91. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  92. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-loader/milestone-loader.js.map +1 -1
  93. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  94. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  95. package/dist/features/milestone/milestone-resources/resources-assign/added-resource-and-filters.js.map +1 -1
  96. package/dist/features/milestone/milestone-resources/resources-assign/api/get-resource.js.map +1 -1
  97. package/dist/features/milestone/milestone-resources/resources-assign/comps/filter-item/filter-item.js.map +1 -1
  98. package/dist/features/milestone/milestone-resources/resources-assign/comps/resource-item/resource-item.js.map +1 -1
  99. package/dist/features/milestone/milestone-resources/resources-assign/resource-items/resource-items.js.map +1 -1
  100. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  101. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  102. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
  103. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
  104. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-selection.js.map +1 -1
  105. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection.js.map +1 -1
  106. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/test-radio-card/test-card-lottie-animation.js.map +1 -1
  107. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/difficulty-and-duration-selection/test-radio-card/test-radio-card.js.map +1 -1
  108. package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
  109. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  110. package/dist/features/milestone/outcome/comps/outcome-collection/outcome-form/outcome-form.js.map +1 -1
  111. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -1
  112. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  113. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -1
  114. package/dist/features/post-game-stats/accuracy/accuracy.js.map +1 -1
  115. package/dist/features/post-game-stats/clock/clock.js.map +1 -1
  116. package/dist/features/post-game-stats/number-count-animation/number-count-animation.js.map +1 -1
  117. package/dist/features/post-game-stats/points/points.js.map +1 -1
  118. package/dist/features/post-game-stats/score/score.js.map +1 -1
  119. package/dist/features/post-game-stats/streak/streak.js.map +1 -1
  120. package/dist/features/puzzles/app/puzzle-app-view.js.map +1 -1
  121. package/dist/features/puzzles/app/puzzle-app.js.map +1 -1
  122. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  123. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -1
  124. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  125. package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
  126. package/dist/features/recent-chapters/recent-chapters.js.map +1 -1
  127. package/dist/features/sheet-tools/desmos-calculator/desmos-calculator.js.map +1 -1
  128. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
  129. package/dist/features/sheets/comps/sheet-button/index.js.map +1 -1
  130. package/dist/features/sheets/lessons-list/lesson-item/context-menu-helper/menu-element.js.map +1 -1
  131. package/dist/features/sheets/lessons-list/lesson-item/context-menu-helper/target-element.js.map +1 -1
  132. package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js.map +1 -1
  133. package/dist/features/sheets/lessons-list/lesson-item/lesson-item-view.js.map +1 -1
  134. package/dist/features/sheets/lessons-list/lesson-item/lesson-item.js.map +1 -1
  135. package/dist/features/sheets/lessons-list/lessons-list.js.map +1 -1
  136. package/dist/features/sheets/reference-sheet/reference-sheet.js.map +1 -1
  137. package/dist/features/sheets/resources-list/resource-item/context-menu-helper/menu-element.js.map +1 -1
  138. package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
  139. package/dist/features/sheets/resources-list/resources-list.js.map +1 -1
  140. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js.map +1 -1
  141. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js.map +1 -1
  142. package/dist/features/sheets/sheets-list/sheets-list.js.map +1 -1
  143. package/dist/features/stickers/sticker-selector/comps/sticker/sticker.js.map +1 -1
  144. package/dist/features/stickers/sticker-selector/comps/stiker-selector-grid/sticker-selector-grid.js.map +1 -1
  145. package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
  146. package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js.map +1 -1
  147. package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -1
  148. package/dist/features/student-details/class-details/class-details.js.map +1 -1
  149. package/dist/features/student-details/student-details.js.map +1 -1
  150. package/dist/features/talk-meter/ripple/index.js.map +1 -1
  151. package/dist/features/talk-meter/talk-meter-view/talk-meter-view.js.map +1 -1
  152. package/dist/features/talk-meter/talk-meter.js.map +1 -1
  153. package/dist/features/timeline/api/use-daily-timeline-get.js +10 -0
  154. package/dist/features/timeline/api/use-daily-timeline-get.js.map +1 -0
  155. package/dist/features/timeline/comps/accordion-item/accordion-item.js +53 -0
  156. package/dist/features/timeline/comps/accordion-item/accordion-item.js.map +1 -0
  157. package/dist/features/timeline/comps/accordion-item/utils.js +66 -0
  158. package/dist/features/timeline/comps/accordion-item/utils.js.map +1 -0
  159. package/dist/features/timeline/daily-timeline/daily-timeline-items/daily-timeline-items-styled.js +13 -0
  160. package/dist/features/timeline/daily-timeline/daily-timeline-items/daily-timeline-items-styled.js.map +1 -0
  161. package/dist/features/timeline/daily-timeline/daily-timeline-items/daily-timeline-items.js +50 -0
  162. package/dist/features/timeline/daily-timeline/daily-timeline-items/daily-timeline-items.js.map +1 -0
  163. package/dist/features/timeline/daily-timeline/daily-timeline-styled.js +33 -0
  164. package/dist/features/timeline/daily-timeline/daily-timeline-styled.js.map +1 -0
  165. package/dist/features/timeline/daily-timeline/daily-timeline.js +119 -0
  166. package/dist/features/timeline/daily-timeline/daily-timeline.js.map +1 -0
  167. package/dist/features/trial-session/comps/av-panels/student-av-panel/student-av-panel.js.map +1 -1
  168. package/dist/features/trial-session/comps/av-panels/teacher-av-panel/teacher-av-panel.js.map +1 -1
  169. package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
  170. package/dist/features/trial-session/comps/learning-plan/use-learning-plan-scroll-sync.js.map +1 -1
  171. package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -1
  172. package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -1
  173. package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
  174. package/dist/features/trial-session/comps/slide-header/index.js.map +1 -1
  175. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -1
  176. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  177. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  178. package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game-launch-screen/trial-circle-game-launch-screen.js.map +1 -1
  179. package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
  180. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  181. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  182. package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -1
  183. package/dist/features/ui/arc-button/arc-button.js.map +1 -1
  184. package/dist/features/ui/avatar/avatar-mapping.js.map +1 -1
  185. package/dist/features/ui/avatar/avatar.js.map +1 -1
  186. package/dist/features/ui/context/use-tracking-context.js.map +1 -1
  187. package/dist/features/ui/drawer/drawer.js.map +1 -1
  188. package/dist/features/ui/hooks/use-context-menu-click-handler.js.map +1 -1
  189. package/dist/features/ui/inputs/base-select-input/select-option/select-option.js.map +1 -1
  190. package/dist/features/ui/inputs/base-select-input/select-section/select-section.js.map +1 -1
  191. package/dist/features/ui/inputs/google-places-search-input/google-places-search-input.js.map +1 -1
  192. package/dist/features/ui/inputs/radio-input/radio-option/radio-option.js.map +1 -1
  193. package/dist/features/ui/inputs/searchable-select-input/searchable-select-input.js.map +1 -1
  194. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  195. package/dist/features/ui/loader/reverse-circular-bar/reverse-circular-bar.js.map +1 -1
  196. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  197. package/dist/features/ui/modals/modal-provider.js.map +1 -1
  198. package/dist/features/ui/modals/modal.js.map +1 -1
  199. package/dist/features/ui/section-list/section-list.js.map +1 -1
  200. package/dist/features/ui/simple-accordian/accordion-styled.js +18 -0
  201. package/dist/features/ui/simple-accordian/accordion-styled.js.map +1 -0
  202. package/dist/features/ui/simple-accordian/accordion.js +59 -0
  203. package/dist/features/ui/simple-accordian/accordion.js.map +1 -0
  204. package/dist/features/ui/superscript/superscript-styled.js.map +1 -1
  205. package/dist/features/ui/superscript/superscript.js.map +1 -1
  206. package/dist/features/ui/theme/text.js +15 -0
  207. package/dist/features/ui/theme/text.js.map +1 -1
  208. package/dist/features/wins-dashboard/student-badges/hooks/use-student-badge-list-hook.js.map +1 -1
  209. package/dist/features/wins-dashboard/student-badges/student-badges-lists.js.map +1 -1
  210. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
  211. package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
  212. package/dist/features/worksheet/worksheet/hooks/use-learnosity-append.js.map +1 -1
  213. package/dist/features/worksheet/worksheet/hooks/use-learnosity.js.map +1 -1
  214. package/dist/features/worksheet/worksheet/question-tips.js.map +1 -1
  215. package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
  216. package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-intervention.js.map +1 -1
  217. package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-review-available.js.map +1 -1
  218. package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-review.js.map +1 -1
  219. package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/exit-ticket-student-submission.js.map +1 -1
  220. package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/optional-items-assignment.js.map +1 -1
  221. package/dist/features/worksheet/worksheet/worksheet-blocker/blockers/optional-items-skip.js.map +1 -1
  222. package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker.js.map +1 -1
  223. package/dist/features/worksheet/worksheet/worksheet-container.js.map +1 -1
  224. package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-navigation/worksheet-item-navigation.js.map +1 -1
  225. package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js.map +1 -1
  226. package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js.map +1 -1
  227. package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-section-navigation/worksheet-section-navigation.js.map +1 -1
  228. package/dist/features/worksheet/worksheet/worksheet-question/header/validated-animation.js.map +1 -1
  229. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  230. package/dist/features/worksheet/worksheet/worksheet-question/question-backdrop/question-backdrop.js.map +1 -1
  231. package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js.map +1 -1
  232. package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -1
  233. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  234. package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js.map +1 -1
  235. package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js.map +1 -1
  236. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  237. package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
  238. package/dist/features/worksheet/worksheet-preview/worksheet-preview-styled.js.map +1 -1
  239. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  240. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  241. package/dist/index.d.ts +50 -24
  242. package/dist/index.js +241 -239
  243. package/dist/index.js.map +1 -1
  244. package/dist/node_modules/date-fns/endOfDay.js +10 -0
  245. package/dist/node_modules/date-fns/endOfDay.js.map +1 -0
  246. package/dist/node_modules/date-fns/endOfMonth.js +10 -0
  247. package/dist/node_modules/date-fns/endOfMonth.js.map +1 -0
  248. package/dist/node_modules/date-fns/isLastDayOfMonth.js +12 -0
  249. package/dist/node_modules/date-fns/isLastDayOfMonth.js.map +1 -0
  250. package/dist/node_modules/date-fns/parseISO.js +123 -0
  251. package/dist/node_modules/date-fns/parseISO.js.map +1 -0
  252. package/dist/static/apr.09a50ff7.png +0 -0
  253. package/dist/static/aug.7179d37e.png +0 -0
  254. package/dist/static/circle-icon.1027df3c.svg +1 -0
  255. package/dist/static/cw-icon.c61f9779.svg +1 -0
  256. package/dist/static/dec.09f7e315.png +0 -0
  257. package/dist/static/feb.9e72504d.png +0 -0
  258. package/dist/static/hw-icon.6d78e885.svg +1 -0
  259. package/dist/static/jan.da91944a.png +0 -0
  260. package/dist/static/jul.5a1c4932.png +0 -0
  261. package/dist/static/jun.62639c2f.png +0 -0
  262. package/dist/static/mar.f51bcfa6.png +0 -0
  263. package/dist/static/may.7c542020.png +0 -0
  264. package/dist/static/no-activity.0451dcbb.svg +1 -0
  265. package/dist/static/nov.058343e7.png +0 -0
  266. package/dist/static/oct.573ee19d.png +0 -0
  267. package/dist/static/sep.3ccb6468.png +0 -0
  268. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { FC } from 'react';\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';\nimport type { IChaptersListProps } from './chapters-list-types';\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 shouldShowItemIndex\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":";;;;;;;;;;AAaA,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,UACX,qBAAmB;AAAA,QAAA;AAAA,QALdC;AAAA,MAAA;AAAA,IAMP,CAEH,GACH,EACF,CAAA,IA1DE,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,EA0BV;AACF,GAEAC,IAAe7B;"}
1
+ {"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import { memo, useCallback, type FC } 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';\nimport type { IChaptersListProps } from './chapters-list-types';\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 shouldShowItemIndex\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":";;;;;;;;;;AAYA,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,UACX,qBAAmB;AAAA,QAAA;AAAA,QALdC;AAAA,MAAA;AAAA,IAMP,CAEH,GACH,EACF,CAAA,IA1DE,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,EA0BV;AACF,GAEAC,IAAe7B;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-block.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useState } from 'react';\n\nimport AccordionSection from '../../../../ui/accordion-section/accordion-section';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { BLOCK_TYPE } from '../../constants';\nimport { BLOCK_ICONS } from '../../constants/block-icons';\nimport SATSheetItem from '../sat-sheet-item/sat-sheet-item';\nimport SheetItem from '../sheet-item/sheet-item';\nimport ChapterBlockHeader from './chapter-block-header';\nimport * as Styled from './chapter-block-styled';\nimport type { IChapterBlock } from './chapter-block-types';\nimport { getBlockStatus, isAllSheetsLocked } from './chapter-block-utils';\n\nconst { GOAL, SAT_MOCK_TEST } = BLOCK_TYPE;\n\nconst ChapterBlock: FC<IChapterBlock> = ({\n blockData,\n goalIndex,\n isClassOngoing,\n ...restChapterBlockProps\n}) => {\n const {\n isLastBlock,\n isMasteryEnabledUserAndProgram,\n userType,\n onMenuActionAttempt,\n onReview,\n onSATReview,\n onSATStartOrResume,\n onSATUnlock,\n onStartOrResume,\n onView,\n } = restChapterBlockProps;\n\n const {\n block_type: blockType,\n name: blockName,\n sheets,\n block_stats: blockStats,\n can_access: canAccess,\n id: blockId,\n } = blockData;\n\n const {\n block_status: blockStatusFromData,\n sat_score: satScore,\n sat_max_score: satMaxScore,\n } = blockStats;\n const isGoalBlockType = blockType === GOAL;\n const isSATBlockType = blockType === SAT_MOCK_TEST;\n const HeaderIcon = BLOCK_ICONS[blockType] || BLOCK_ICONS.DEFAULT;\n const { blockStatus: calculatedBlockStatus, optionalStatus } = getBlockStatus(sheets, blockType);\n\n const [expandBlock, setExpandBlock] = useState(() =>\n Boolean(isSATBlockType || (userType === 'STUDENT' && !canAccess) || isAllSheetsLocked(sheets)),\n );\n\n const blockStatus = isMasteryEnabledUserAndProgram ? blockStatusFromData : calculatedBlockStatus;\n\n return (\n <FlexView>\n <Styled.ChapterBlockWrapper $borderRadiusX={1} $background=\"GREY_1\">\n <AccordionSection\n visible={expandBlock}\n onBodyVisibilityChange={() => setExpandBlock(prev => !prev)}\n bodyOverFlow=\"unset\"\n headerElement={\n <ChapterBlockHeader\n blockName={blockName}\n blockStatus={blockStatus}\n blockType={blockType}\n expandBlock={expandBlock}\n goalIndex={goalIndex}\n isGoalBlockType={isGoalBlockType}\n userType={userType}\n HeaderIcon={HeaderIcon}\n optionalStatus={optionalStatus}\n />\n }\n bodyElement={\n <FlexView>\n {isSATBlockType ? (\n <>\n <SATSheetItem\n userType={userType}\n sheets={sheets}\n blockStatus={blockStatusFromData}\n satScore={satScore}\n satMaxScore={satMaxScore}\n blockId={blockId}\n onSATReview={onSATReview}\n onSATStartOrResume={onSATStartOrResume}\n onSATUnlock={onSATUnlock}\n />\n </>\n ) : (\n <>\n {sheets.map((sheet, idx) => {\n return (\n <SheetItem\n key={sheet.id}\n sheet={sheet}\n isLastSheet={idx === sheets.length - 1}\n userType={userType}\n onView={onView}\n onMenuActionAttempt={onMenuActionAttempt}\n onStartOrResume={onStartOrResume}\n onReview={onReview}\n isClassOngoing={isClassOngoing}\n />\n );\n })}\n </>\n )}\n </FlexView>\n }\n />\n </Styled.ChapterBlockWrapper>\n\n {!isLastBlock && <Styled.VerticalLine />}\n </FlexView>\n );\n};\n\nexport default ChapterBlock;\n"],"names":["GOAL","SAT_MOCK_TEST","BLOCK_TYPE","ChapterBlock","blockData","goalIndex","isClassOngoing","restChapterBlockProps","isLastBlock","isMasteryEnabledUserAndProgram","userType","onMenuActionAttempt","onReview","onSATReview","onSATStartOrResume","onSATUnlock","onStartOrResume","onView","blockType","blockName","sheets","blockStats","canAccess","blockId","blockStatusFromData","satScore","satMaxScore","isGoalBlockType","isSATBlockType","HeaderIcon","BLOCK_ICONS","calculatedBlockStatus","optionalStatus","getBlockStatus","expandBlock","setExpandBlock","useState","isAllSheetsLocked","FlexView","jsx","Styled.ChapterBlockWrapper","AccordionSection","prev","ChapterBlockHeader","Fragment","SATSheetItem","sheet","idx","SheetItem","Styled.VerticalLine"],"mappings":";;;;;;;;;;;AAcA,MAAM,EAAE,MAAAA,GAAM,eAAAC,EAAkB,IAAAC,GAE1BC,KAAkC,CAAC;AAAA,EACvC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,gCAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAA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A,SAAAH;AAAA,YACA,aAAAV;AAAA,YACA,oBAAAC;AAAA,YACA,aAAAC;AAAA,UAAA;AAAA,QAAA,GAEJ,IAEA,gBAAAwB,EAAAK,GAAA,EACG,YAAO,IAAI,CAACE,GAAOC,MAEhB,gBAAAR;AAAA,UAACS;AAAA,UAAA;AAAA,YAEC,OAAAF;AAAA,YACA,aAAaC,MAAQ3B,EAAO,SAAS;AAAA,YACrC,UAAAV;AAAA,YACA,QAAAO;AAAA,YACA,qBAAAN;AAAA,YACA,iBAAAK;AAAA,YACA,UAAAJ;AAAA,YACA,gBAAAN;AAAA,UAAA;AAAA,UARKwC,EAAM;AAAA,QAAA,CAWhB,GACH,EAEJ,CAAA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,IAEC,CAACtC,KAAgB,gBAAA+B,EAAAU,GAAA,EAAoB;AAAA,EACxC,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"chapter-block.js","sources":["../../../../../../src/features/chapters/lpar-chapter/block-section/chapter-block/chapter-block.tsx"],"sourcesContent":["import { useState, type FC } from 'react';\n\nimport AccordionSection from '../../../../ui/accordion-section/accordion-section';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { BLOCK_TYPE } from '../../constants';\nimport { BLOCK_ICONS } from '../../constants/block-icons';\nimport SATSheetItem from '../sat-sheet-item/sat-sheet-item';\nimport SheetItem from '../sheet-item/sheet-item';\nimport ChapterBlockHeader from './chapter-block-header';\nimport * as Styled from './chapter-block-styled';\nimport type { IChapterBlock } from './chapter-block-types';\nimport { getBlockStatus, isAllSheetsLocked } from './chapter-block-utils';\n\nconst { GOAL, SAT_MOCK_TEST } = BLOCK_TYPE;\n\nconst ChapterBlock: FC<IChapterBlock> = ({\n blockData,\n goalIndex,\n isClassOngoing,\n ...restChapterBlockProps\n}) => {\n const {\n isLastBlock,\n isMasteryEnabledUserAndProgram,\n userType,\n onMenuActionAttempt,\n onReview,\n onSATReview,\n onSATStartOrResume,\n onSATUnlock,\n onStartOrResume,\n onView,\n } = restChapterBlockProps;\n\n const {\n block_type: blockType,\n name: blockName,\n sheets,\n block_stats: blockStats,\n can_access: canAccess,\n id: blockId,\n } = blockData;\n\n const {\n block_status: blockStatusFromData,\n sat_score: satScore,\n sat_max_score: satMaxScore,\n } = blockStats;\n const isGoalBlockType = blockType === GOAL;\n const isSATBlockType = blockType === SAT_MOCK_TEST;\n const HeaderIcon = BLOCK_ICONS[blockType] || BLOCK_ICONS.DEFAULT;\n const { blockStatus: calculatedBlockStatus, optionalStatus } = getBlockStatus(sheets, blockType);\n\n const [expandBlock, setExpandBlock] = useState(() =>\n Boolean(isSATBlockType || (userType === 'STUDENT' && !canAccess) || isAllSheetsLocked(sheets)),\n );\n\n const blockStatus = isMasteryEnabledUserAndProgram ? blockStatusFromData : calculatedBlockStatus;\n\n return (\n <FlexView>\n <Styled.ChapterBlockWrapper $borderRadiusX={1} $background=\"GREY_1\">\n <AccordionSection\n visible={expandBlock}\n onBodyVisibilityChange={() => setExpandBlock(prev => !prev)}\n bodyOverFlow=\"unset\"\n headerElement={\n <ChapterBlockHeader\n blockName={blockName}\n blockStatus={blockStatus}\n blockType={blockType}\n expandBlock={expandBlock}\n goalIndex={goalIndex}\n isGoalBlockType={isGoalBlockType}\n userType={userType}\n HeaderIcon={HeaderIcon}\n optionalStatus={optionalStatus}\n />\n }\n bodyElement={\n <FlexView>\n {isSATBlockType ? (\n <>\n <SATSheetItem\n userType={userType}\n sheets={sheets}\n blockStatus={blockStatusFromData}\n satScore={satScore}\n satMaxScore={satMaxScore}\n blockId={blockId}\n onSATReview={onSATReview}\n onSATStartOrResume={onSATStartOrResume}\n onSATUnlock={onSATUnlock}\n />\n </>\n ) : (\n <>\n {sheets.map((sheet, idx) => {\n return (\n <SheetItem\n key={sheet.id}\n sheet={sheet}\n isLastSheet={idx === sheets.length - 1}\n userType={userType}\n onView={onView}\n onMenuActionAttempt={onMenuActionAttempt}\n onStartOrResume={onStartOrResume}\n onReview={onReview}\n isClassOngoing={isClassOngoing}\n />\n );\n })}\n </>\n )}\n </FlexView>\n }\n />\n </Styled.ChapterBlockWrapper>\n\n {!isLastBlock && <Styled.VerticalLine />}\n </FlexView>\n );\n};\n\nexport default ChapterBlock;\n"],"names":["GOAL","SAT_MOCK_TEST","BLOCK_TYPE","ChapterBlock","blockData","goalIndex","isClassOngoing","restChapterBlockProps","isLastBlock","isMasteryEnabledUserAndProgram","userType","onMenuActionAttempt","onReview","onSATReview","onSATStartOrResume","onSATUnlock","onStartOrResume","onView","blockType","blockName","sheets","blockStats","canAccess","blockId","blockStatusFromData","satScore","satMaxScore","isGoalBlockType","isSATBlockType","HeaderIcon","BLOCK_ICONS","calculatedBlockStatus","optionalStatus","getBlockStatus","expandBlock","setExpandBlock","useState","isAllSheetsLocked","FlexView","jsx","Styled.ChapterBlockWrapper","AccordionSection","prev","ChapterBlockHeader","Fragment","SATSheetItem","sheet","idx","SheetItem","Styled.VerticalLine"],"mappings":";;;;;;;;;;;AAaA,MAAM,EAAE,MAAAA,GAAM,eAAAC,EAAkB,IAAAC,GAE1BC,KAAkC,CAAC;AAAA,EACvC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,gCAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAV,GAEE;AAAA,IACJ,YAAYW;AAAA,IACZ,MAAMC;AAAA,IACN,QAAAC;AAAA,IACA,aAAaC;AAAA,IACb,YAAYC;AAAA,IACZ,IAAIC;AAAA,EACF,IAAAnB,GAEE;AAAA,IACJ,cAAcoB;AAAA,IACd,WAAWC;AAAA,IACX,eAAeC;AAAA,EACb,IAAAL,GACEM,IAAkBT,MAAclB,GAChC4B,IAAi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AAAV;AAAA,YACA,QAAAO;AAAA,YACA,qBAAAN;AAAA,YACA,iBAAAK;AAAA,YACA,UAAAJ;AAAA,YACA,gBAAAN;AAAA,UAAA;AAAA,UARKwC,EAAM;AAAA,QAAA,CAWhB,GACH,EAEJ,CAAA;AAAA,MAAA;AAAA,IAAA,GAGN;AAAA,IAEC,CAACtC,KAAgB,gBAAA+B,EAAAU,GAAA,EAAoB;AAAA,EACxC,EAAA,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/chapters/lpar-chapter/block-section/sat-sheet-item/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport type { TBlockStatus } from '../../block-section-types';\nimport ContextMenuElement from '../../sheet-item/context-menu-helper/menu-element';\nimport ContextMenuTargetElement from '../../sheet-item/context-menu-helper/target-element';\n\ninterface ITeacherActions {\n handleOnReview: () => void;\n isMenuVisible: boolean;\n handleOnUnlock: () => void;\n blockStatus: TBlockStatus;\n analyticsProps: Record<string, unknown>;\n}\n\nconst TeacherActions: FC<ITeacherActions> = ({\n analyticsProps,\n isMenuVisible,\n blockStatus,\n handleOnReview,\n handleOnUnlock,\n}) => {\n const isBlockLocked = blockStatus === 'LOCKED';\n const options = useMemo(\n () => [\n {\n key: 'sat-review-sheet',\n label: 'Review sheet',\n visible: true,\n onClick: handleOnReview,\n },\n ],\n [handleOnReview],\n );\n\n return (\n <>\n {isBlockLocked && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n widthX={6}\n label=\"Unlock\"\n onClick={handleOnUnlock}\n analyticsProps={analyticsProps}\n />\n )}\n\n {isMenuVisible && (\n <ContextMenu\n targetElement={<ContextMenuTargetElement />}\n menuElement={<ContextMenuElement options={options} />}\n menuOffset={5}\n menuZIndex={1}\n placeTop={true}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","analyticsProps","isMenuVisible","blockStatus","handleOnReview","handleOnUnlock","isBlockLocked","options","useMemo","jsxs","Fragment","jsx","Button","ContextMenu","ContextMenuTargetElement","ContextMenuElement"],"mappings":";;;;;;AAiBA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAMC,IAAgBH,MAAgB,UAChCI,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,KAAK;AAAA,QACL,OAAO;AAAA,QACP,SAAS;AAAA,QACT,SAASJ;AAAA,MACX;AAAA,IACF;AAAA,IACA,CAACA,CAAc;AAAA,EAAA;AAGjB,SAEK,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCJ,KAAA,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,MAAK;AAAA,QACL,QAAQ;AAAA,QACR,OAAM;AAAA,QACN,SAASP;AAAA,QACT,gBAAAJ;AAAA,MAAA;AAAA,IACF;AAAA,IAGDC,KACC,gBAAAS;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,iCAAgBC,GAAyB,EAAA;AAAA,QACzC,aAAc,gBAAAH,EAAAI,GAAA,EAAmB,SAAAR,EAAkB,CAAA;AAAA,QACnD,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/chapters/lpar-chapter/block-section/sat-sheet-item/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import { useMemo, type FC } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport type { TBlockStatus } from '../../block-section-types';\nimport ContextMenuElement from '../../sheet-item/context-menu-helper/menu-element';\nimport ContextMenuTargetElement from '../../sheet-item/context-menu-helper/target-element';\n\ninterface ITeacherActions {\n handleOnReview: () => void;\n isMenuVisible: boolean;\n handleOnUnlock: () => void;\n blockStatus: TBlockStatus;\n analyticsProps: Record<string, unknown>;\n}\n\nconst TeacherActions: FC<ITeacherActions> = ({\n analyticsProps,\n isMenuVisible,\n blockStatus,\n handleOnReview,\n handleOnUnlock,\n}) => {\n const isBlockLocked = blockStatus === 'LOCKED';\n const options = useMemo(\n () => [\n {\n key: 'sat-review-sheet',\n label: 'Review sheet',\n visible: true,\n onClick: handleOnReview,\n },\n ],\n [handleOnReview],\n );\n\n return (\n <>\n {isBlockLocked && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n widthX={6}\n label=\"Unlock\"\n onClick={handleOnUnlock}\n analyticsProps={analyticsProps}\n />\n )}\n\n {isMenuVisible && (\n <ContextMenu\n targetElement={<ContextMenuTargetElement />}\n menuElement={<ContextMenuElement options={options} />}\n menuOffset={5}\n menuZIndex={1}\n placeTop={true}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","analyticsProps","isMenuVisible","blockStatus","handleOnReview","handleOnUnlock","isBlockLocked","options","useMemo","jsxs","Fragment","jsx","Button","ContextMenu","ContextMenuTargetElement","ContextMenuElement"],"mappings":";;;;;;AAgBA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAMC,IAAgBH,MAAgB,UAChCI,IAAUC;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,KAAK;AAAA,QACL,OAAO;AAAA,QACP,SAAS;AAAA,QACT,SAASJ;AAAA,MACX;AAAA,IACF;AAAA,IACA,CAACA,CAAc;AAAA,EAAA;AAGjB,SAEK,gBAAAK,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCJ,KAAA,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,MAAK;AAAA,QACL,QAAQ;AAAA,QACR,OAAM;AAAA,QACN,SAASP;AAAA,QACT,gBAAAJ;AAAA,MAAA;AAAA,IACF;AAAA,IAGDC,KACC,gBAAAS;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,iCAAgBC,GAAyB,EAAA;AAAA,QACzC,aAAc,gBAAAH,EAAAI,GAAA,EAAmB,SAAAR,EAAkB,CAAA;AAAA,QACnD,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-progress.js","sources":["../../../../../src/features/chapters/lpar-chapter/comps/chapter-progress.tsx"],"sourcesContent":["import type { FC, ReactElement } from 'react';\nimport { memo } from 'react';\nimport styled, { useTheme } from 'styled-components';\n\nimport type { FlexViewProps } from '../../../ui/layout/flex-view';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ntype TProgressProps = {\n $progress?: number;\n};\n\nconst Progress = styled.div<TProgressProps>(({ theme, $progress }) => {\n const { REAL_BLACK_15, GREEN_4, BLACK } = theme.colors;\n\n return `\n width: 100%;\n height: 4px;\n border-radius: 16px;\n background-color: ${REAL_BLACK_15};\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n width: ${$progress}%;\n height: 4px;\n border-radius: 16px;\n background-color: ${$progress === 100 ? GREEN_4 : BLACK}\n }\n `;\n});\n\nconst FlexText = styled(Text)`\n display: inline-flex;\n`;\n\ninterface IProgressStatsProps {\n progress: number;\n progressStats: ReactElement;\n width?: number | string;\n flexDirection?: FlexViewProps['$flexDirection'];\n}\n\nconst ProgressStats: FC<IProgressStatsProps> = memo(\n ({ progress, progressStats, width, flexDirection }) => {\n const theme = useTheme();\n\n return (\n <FlexView\n $width={width ?? theme.layout.gutter * 7.5}\n $flexGap={4}\n $flexDirection={flexDirection}\n >\n <Progress $progress={progress} />\n <FlexText $renderAs=\"body2\">{progressStats}</FlexText>\n </FlexView>\n );\n },\n);\n\nexport default ProgressStats;\n"],"names":["Progress","styled","theme","$progress","REAL_BLACK_15","GREEN_4","BLACK","FlexText","Text","ProgressStats","memo","progress","progressStats","width","flexDirection","useTheme","jsxs","FlexView","jsx"],"mappings":";;;;;AAYA,MAAMA,IAAWC,EAAO,IAAoB,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgB;AACpE,QAAM,EAAE,eAAAC,GAAe,SAAAC,GAAS,OAAAC,EAAA,IAAUJ,EAAM;AAEzC,SAAA;AAAA;AAAA;AAAA;AAAA,wBAIeE,CAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOtBD,CAAS;AAAA;AAAA;AAAA,0BAGEA,MAAc,MAAME,IAAUC,CAAK;AAAA;AAAA;AAG7D,CAAC,GAEKC,IAAWN,EAAOO,CAAI;AAAA;AAAA,GAWtBC,IAAyCC;AAAA,EAC7C,CAAC,EAAE,UAAAC,GAAU,eAAAC,GAAe,OAAAC,GAAO,eAAAC,QAAoB;AACrD,UAAMZ,IAAQa;AAGZ,WAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQJ,KAASX,EAAM,OAAO,SAAS;AAAA,QACvC,UAAU;AAAA,QACV,gBAAgBY;AAAA,QAEhB,UAAA;AAAA,UAAC,gBAAAI,EAAAlB,GAAA,EAAS,WAAWW,EAAU,CAAA;AAAA,UAC9B,gBAAAO,EAAAX,GAAA,EAAS,WAAU,SAAS,UAAcK,GAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjD;AACF;"}
1
+ {"version":3,"file":"chapter-progress.js","sources":["../../../../../src/features/chapters/lpar-chapter/comps/chapter-progress.tsx"],"sourcesContent":["import { memo, type FC, type ReactElement } from 'react';\nimport styled, { useTheme } from 'styled-components';\n\nimport FlexView, { type FlexViewProps } from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ntype TProgressProps = {\n $progress?: number;\n};\n\nconst Progress = styled.div<TProgressProps>(({ theme, $progress }) => {\n const { REAL_BLACK_15, GREEN_4, BLACK } = theme.colors;\n\n return `\n width: 100%;\n height: 4px;\n border-radius: 16px;\n background-color: ${REAL_BLACK_15};\n position: relative;\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n width: ${$progress}%;\n height: 4px;\n border-radius: 16px;\n background-color: ${$progress === 100 ? GREEN_4 : BLACK}\n }\n `;\n});\n\nconst FlexText = styled(Text)`\n display: inline-flex;\n`;\n\ninterface IProgressStatsProps {\n progress: number;\n progressStats: ReactElement;\n width?: number | string;\n flexDirection?: FlexViewProps['$flexDirection'];\n}\n\nconst ProgressStats: FC<IProgressStatsProps> = memo(\n ({ progress, progressStats, width, flexDirection }) => {\n const theme = useTheme();\n\n return (\n <FlexView\n $width={width ?? theme.layout.gutter * 7.5}\n $flexGap={4}\n $flexDirection={flexDirection}\n >\n <Progress $progress={progress} />\n <FlexText $renderAs=\"body2\">{progressStats}</FlexText>\n </FlexView>\n );\n },\n);\n\nexport default ProgressStats;\n"],"names":["Progress","styled","theme","$progress","REAL_BLACK_15","GREEN_4","BLACK","FlexText","Text","ProgressStats","memo","progress","progressStats","width","flexDirection","useTheme","jsxs","FlexView","jsx"],"mappings":";;;;;AAUA,MAAMA,IAAWC,EAAO,IAAoB,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgB;AACpE,QAAM,EAAE,eAAAC,GAAe,SAAAC,GAAS,OAAAC,EAAA,IAAUJ,EAAM;AAEzC,SAAA;AAAA;AAAA;AAAA;AAAA,wBAIeE,CAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOtBD,CAAS;AAAA;AAAA;AAAA,0BAGEA,MAAc,MAAME,IAAUC,CAAK;AAAA;AAAA;AAG7D,CAAC,GAEKC,IAAWN,EAAOO,CAAI;AAAA;AAAA,GAWtBC,IAAyCC;AAAA,EAC7C,CAAC,EAAE,UAAAC,GAAU,eAAAC,GAAe,OAAAC,GAAO,eAAAC,QAAoB;AACrD,UAAMZ,IAAQa;AAGZ,WAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,QAAQJ,KAASX,EAAM,OAAO,SAAS;AAAA,QACvC,UAAU;AAAA,QACV,gBAAgBY;AAAA,QAEhB,UAAA;AAAA,UAAC,gBAAAI,EAAAlB,GAAA,EAAS,WAAWW,EAAU,CAAA;AAAA,UAC9B,gBAAAO,EAAAX,GAAA,EAAS,WAAU,SAAS,UAAcK,GAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGjD;AACF;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-block.js","sources":["../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/chapter-block/chapter-block.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useState } from 'react';\n\nimport AccordionSection from '../../../../ui/accordion-section/accordion-section';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport ChapterBlockHeader from '../../../lpar-chapter/block-section/chapter-block/chapter-block-header';\nimport { ChapterBlockWrapper } from '../../../lpar-chapter/block-section/chapter-block/chapter-block-styled';\nimport { BLOCK_TYPE } from '../../../lpar-chapter/constants';\nimport { BLOCK_ICONS } from '../../../lpar-chapter/constants/block-icons';\nimport SheetItem from '../sheet-item/sheet-item';\nimport type { IChapterBlock } from './chapter-block-type';\n\nconst { GOAL } = BLOCK_TYPE;\n\nconst ChapterBlock: FC<IChapterBlock> = ({\n blockData,\n goalIndex,\n userType,\n ...restChapterBlock\n}) => {\n const {\n onChangeLocation,\n onMarkAsFamiliar,\n onPreview,\n onReattempt,\n onReset,\n onResume,\n onReview,\n onStart,\n onUnassign,\n onUnlock,\n } = restChapterBlock;\n const { sheets, state, name: blockName, block_type: blockType } = blockData;\n\n const [expandBlock, setExpandBlock] = useState(false);\n\n const isGoalBlockType = blockType === GOAL;\n const HeaderIcon = BLOCK_ICONS[blockType] || BLOCK_ICONS.DEFAULT;\n\n return (\n <FlexView>\n <ChapterBlockWrapper $borderRadiusX={1} $background=\"GREY_1\">\n <AccordionSection\n visible={expandBlock}\n onBodyVisibilityChange={() => setExpandBlock(prev => !prev)}\n bodyOverFlow=\"unset\"\n headerElement={\n <ChapterBlockHeader\n blockName={blockName}\n blockStatus={state}\n blockType={blockType}\n expandBlock={expandBlock}\n goalIndex={goalIndex}\n HeaderIcon={HeaderIcon}\n isGoalBlockType={isGoalBlockType}\n optionalStatus={null}\n userType={userType}\n />\n }\n bodyElement={\n <FlexView $flexGapX={1.5} $marginBottomX={1}>\n {sheets.map((sheet, idx) => {\n const isLastSheet = idx === sheets.length - 1;\n\n return (\n <SheetItem\n isLastSheet={isLastSheet}\n key={sheet.node_id}\n sheetData={sheet}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onMarkAsFamiliar={onMarkAsFamiliar}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onReset={onReset}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n );\n })}\n </FlexView>\n }\n />\n </ChapterBlockWrapper>\n </FlexView>\n );\n};\n\nexport default ChapterBlock;\n"],"names":["GOAL","BLOCK_TYPE","ChapterBlock","blockData","goalIndex","userType","restChapterBlock","onChangeLocation","onMarkAsFamiliar","onPreview","onReattempt","onReset","onResume","onReview","onStart","onUnassign","onUnlock","sheets","state","blockName","blockType","expandBlock","setExpandBlock","useState","isGoalBlockType","HeaderIcon","BLOCK_ICONS","FlexView","jsx","ChapterBlockWrapper","AccordionSection","prev","ChapterBlockHeader","sheet","idx","isLastSheet","SheetItem"],"mappings":";;;;;;;;;AAYA,MAAM,EAAE,MAAAA,EAAS,IAAAC,GAEXC,IAAkC,CAAC;AAAA,EACvC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;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A,UAAAC;AAAA,YACA,SAAAC;AAAA,YACA,YAAAC;AAAA,YACA,UAAAC;AAAA,UAAA;AAAA,UAZKiB,EAAM;AAAA,QAAA;AAAA,MAehB,CAAA,GACH;AAAA,IAAA;AAAA,EAAA,EAGN,CAAA,EACF,CAAA;AAEJ;"}
1
+ {"version":3,"file":"chapter-block.js","sources":["../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/chapter-block/chapter-block.tsx"],"sourcesContent":["import { useState, type FC } from 'react';\n\nimport AccordionSection from '../../../../ui/accordion-section/accordion-section';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport ChapterBlockHeader from '../../../lpar-chapter/block-section/chapter-block/chapter-block-header';\nimport { ChapterBlockWrapper } from '../../../lpar-chapter/block-section/chapter-block/chapter-block-styled';\nimport { BLOCK_TYPE } from '../../../lpar-chapter/constants';\nimport { BLOCK_ICONS } from '../../../lpar-chapter/constants/block-icons';\nimport SheetItem from '../sheet-item/sheet-item';\nimport type { IChapterBlock } from './chapter-block-type';\n\nconst { GOAL } = BLOCK_TYPE;\n\nconst ChapterBlock: FC<IChapterBlock> = ({\n blockData,\n goalIndex,\n userType,\n ...restChapterBlock\n}) => {\n const {\n onChangeLocation,\n onMarkAsFamiliar,\n onPreview,\n onReattempt,\n onReset,\n onResume,\n onReview,\n onStart,\n onUnassign,\n onUnlock,\n } = restChapterBlock;\n const { sheets, state, name: blockName, block_type: blockType } = blockData;\n\n const [expandBlock, setExpandBlock] = useState(false);\n\n const isGoalBlockType = blockType === GOAL;\n const HeaderIcon = BLOCK_ICONS[blockType] || BLOCK_ICONS.DEFAULT;\n\n return (\n <FlexView>\n <ChapterBlockWrapper $borderRadiusX={1} $background=\"GREY_1\">\n <AccordionSection\n visible={expandBlock}\n onBodyVisibilityChange={() => setExpandBlock(prev => !prev)}\n bodyOverFlow=\"unset\"\n headerElement={\n <ChapterBlockHeader\n blockName={blockName}\n blockStatus={state}\n blockType={blockType}\n expandBlock={expandBlock}\n goalIndex={goalIndex}\n HeaderIcon={HeaderIcon}\n isGoalBlockType={isGoalBlockType}\n optionalStatus={null}\n userType={userType}\n />\n }\n bodyElement={\n <FlexView $flexGapX={1.5} $marginBottomX={1}>\n {sheets.map((sheet, idx) => {\n const isLastSheet = idx === sheets.length - 1;\n\n return (\n <SheetItem\n isLastSheet={isLastSheet}\n key={sheet.node_id}\n sheetData={sheet}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onMarkAsFamiliar={onMarkAsFamiliar}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onReset={onReset}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n );\n })}\n </FlexView>\n }\n />\n </ChapterBlockWrapper>\n </FlexView>\n );\n};\n\nexport default ChapterBlock;\n"],"names":["GOAL","BLOCK_TYPE","ChapterBlock","blockData","goalIndex","userType","restChapterBlock","onChangeLocation","onMarkAsFamiliar","onPreview","onReattempt","onReset","onResume","onReview","onStart","onUnassign","onUnlock","sheets","state","blockName","blockType","expandBlock","setExpandBlock","useState","isGoalBlockType","HeaderIcon","BLOCK_ICONS","FlexView","jsx","ChapterBlockWrapper","AccordionSection","prev","ChapterBlockHeader","sheet","idx","isLastSheet","SheetItem"],"mappings":";;;;;;;;;AAWA,MAAM,EAAE,MAAAA,EAAS,IAAAC,GAEXC,IAAkC,CAAC;AAAA,EACvC,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAV,GACE,EAAE,QAAAW,GAAQ,OAAAC,GAAO,MAAMC,GAAW,YAAYC,EAAc,IAAAjB,GAE5D,CAACkB,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAE9CC,IAAkBJ,MAAcpB,GAChCyB,IAAaC,EAAYN,CAAS,KAAKM,EAAY;AAEzD,2BACGC,GACC,EAAA,UAAA,gBAAAC,EAACC,KAAoB,gBAAgB,GAAG,aAAY,UAClD,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,SAAST;AAAA,MACT,wBAAwB,MAAMC,EAAe,CAAAS,MAAQ,CAACA,CAAI;AAAA,MAC1D,cAAa;AAAA,MACb,eACE,gBAAAH;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,WAAAb;AAAA,UACA,aAAaD;AAAA,UACb,WAAAE;AAAA,UACA,aAAAC;AAAA,UACA,WAAAjB;AAAA,UACA,YAAAqB;AAAA,UACA,iBAAAD;AAAA,UACA,gBAAgB;AAAA,UAChB,UAAAnB;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,aACG,gBAAAuB,EAAAD,GAAA,EAAS,WAAW,KAAK,gBAAgB,GACvC,UAAOV,EAAA,IAAI,CAACgB,GAAOC,MAAQ;AACpB,cAAAC,IAAcD,MAAQjB,EAAO,SAAS;AAG1C,eAAA,gBAAAW;AAAA,UAACQ;AAAA,UAAA;AAAA,YACC,aAAAD;AAAA,YAEA,WAAWF;AAAA,YACX,UAAA5B;AAAA,YACA,kBAAAE;AAAA,YACA,kBAAAC;AAAA,YACA,WAAAC;AAAA,YACA,aAAAC;AAAA,YACA,SAAAC;AAAA,YACA,UAAAC;AAAA,YACA,UAAAC;AAAA,YACA,SAAAC;AAAA,YACA,YAAAC;AAAA,YACA,UAAAC;AAAA,UAAA;AAAA,UAZKiB,EAAM;AAAA,QAAA;AAAA,MAehB,CAAA,GACH;AAAA,IAAA;AAAA,EAAA,EAGN,CAAA,EACF,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"rewards-n-actions.js","sources":["../../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/rewards-n-actions.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useMemo } from 'react';\n\nimport { NODE_TYPE, SHEET_ATTEMPT_STATE } from '../../../../../sheets/constants/sheet';\nimport { getRewardsBadgeUrl } from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/reward-n-actions-utils';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport {\n RewardAccuracy,\n RewardImage,\n} from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport type { IRewardNActions } from './rewards-n-actions-types';\nimport StudentActions from './student-actions';\nimport TeacherActions from './teacher-actions';\n\nconst RewardNActions: FC<IRewardNActions> = props => {\n const { userType, sheetData } = props;\n\n const { accuracy, rewards, attempt_state: attemptState, node_type: nodeType } = sheetData;\n\n const waitingForReview =\n nodeType === NODE_TYPE.SUBJECTIVE &&\n attemptState &&\n attemptState === SHEET_ATTEMPT_STATE.WAIT_FOR_REVIEW;\n const renderAccuracy =\n typeof accuracy === 'number' && (userType === 'STUDENT' ? !waitingForReview : true);\n const rewardsBadgeUrl = useMemo(\n () => (rewards ? getRewardsBadgeUrl(rewards) : undefined),\n [rewards],\n );\n\n return (\n <FlexView $flexGap={8} $alignItems=\"center\" $flexDirection=\"row\">\n {renderAccuracy && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n {rewardsBadgeUrl && <RewardImage src={rewardsBadgeUrl} alt=\"Reward\" />}\n <RewardAccuracy $renderAs=\"eyebrow2\" $align=\"center\">\n {`${Math.ceil(accuracy)}%`}\n </RewardAccuracy>\n </FlexView>\n )}\n\n {userType === 'TEACHER' ? <TeacherActions {...props} /> : <StudentActions {...props} />}\n </FlexView>\n );\n};\n\nexport default RewardNActions;\n"],"names":["RewardNActions","props","userType","sheetData","accuracy","rewards","attemptState","nodeType","waitingForReview","NODE_TYPE","SHEET_ATTEMPT_STATE","renderAccuracy","rewardsBadgeUrl","useMemo","getRewardsBadgeUrl","FlexView","jsxs","jsx","RewardImage","RewardAccuracy","TeacherActions","StudentActions"],"mappings":";;;;;;;;AAcA,MAAMA,IAAsC,CAASC,MAAA;AAC7C,QAAA,EAAE,UAAAC,GAAU,WAAAC,EAAc,IAAAF,GAE1B,EAAE,UAAAG,GAAU,SAAAC,GAAS,eAAeC,GAAc,WAAWC,EAAa,IAAAJ,GAE1EK,IACJD,MAAaE,EAAU,cACvBH,KACAA,MAAiBI,EAAoB,iBACjCC,IACJ,OAAOP,KAAa,aAAaF,MAAa,YAAY,CAACM,IAAmB,KAC1EI,IAAkBC;AAAA,IACtB,MAAOR,IAAUS,EAAmBT,CAAO,IAAI;AAAA,IAC/C,CAACA,CAAO;AAAA,EAAA;AAGV,2BACGU,GAAS,EAAA,UAAU,GAAG,aAAY,UAAS,gBAAe,OACxD,UAAA;AAAA,IAAAJ,KACE,gBAAAK,EAAAD,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC5C,UAAA;AAAA,MAAAH,KAAoB,gBAAAK,EAAAC,GAAA,EAAY,KAAKN,GAAiB,KAAI,UAAS;AAAA,MACpE,gBAAAK,EAACE,GAAe,EAAA,WAAU,YAAW,QAAO,UACzC,UAAA,GAAG,KAAK,KAAKf,CAAQ,CAAC,IACzB,CAAA;AAAA,IAAA,GACF;AAAA,IAGDF,MAAa,YAAY,gBAAAe,EAACG,GAAgB,EAAA,GAAGnB,GAAO,IAAK,gBAAAgB,EAACI,GAAgB,EAAA,GAAGpB,EAAO,CAAA;AAAA,EACvF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"rewards-n-actions.js","sources":["../../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/rewards-n-actions.tsx"],"sourcesContent":["import { useMemo, type FC } from 'react';\n\nimport { NODE_TYPE, SHEET_ATTEMPT_STATE } from '../../../../../sheets/constants/sheet';\nimport { getRewardsBadgeUrl } from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/reward-n-actions-utils';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport {\n RewardAccuracy,\n RewardImage,\n} from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport type { IRewardNActions } from './rewards-n-actions-types';\nimport StudentActions from './student-actions';\nimport TeacherActions from './teacher-actions';\n\nconst RewardNActions: FC<IRewardNActions> = props => {\n const { userType, sheetData } = props;\n\n const { accuracy, rewards, attempt_state: attemptState, node_type: nodeType } = sheetData;\n\n const waitingForReview =\n nodeType === NODE_TYPE.SUBJECTIVE &&\n attemptState &&\n attemptState === SHEET_ATTEMPT_STATE.WAIT_FOR_REVIEW;\n const renderAccuracy =\n typeof accuracy === 'number' && (userType === 'STUDENT' ? !waitingForReview : true);\n const rewardsBadgeUrl = useMemo(\n () => (rewards ? getRewardsBadgeUrl(rewards) : undefined),\n [rewards],\n );\n\n return (\n <FlexView $flexGap={8} $alignItems=\"center\" $flexDirection=\"row\">\n {renderAccuracy && (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n {rewardsBadgeUrl && <RewardImage src={rewardsBadgeUrl} alt=\"Reward\" />}\n <RewardAccuracy $renderAs=\"eyebrow2\" $align=\"center\">\n {`${Math.ceil(accuracy)}%`}\n </RewardAccuracy>\n </FlexView>\n )}\n\n {userType === 'TEACHER' ? <TeacherActions {...props} /> : <StudentActions {...props} />}\n </FlexView>\n );\n};\n\nexport default RewardNActions;\n"],"names":["RewardNActions","props","userType","sheetData","accuracy","rewards","attemptState","nodeType","waitingForReview","NODE_TYPE","SHEET_ATTEMPT_STATE","renderAccuracy","rewardsBadgeUrl","useMemo","getRewardsBadgeUrl","FlexView","jsxs","jsx","RewardImage","RewardAccuracy","TeacherActions","StudentActions"],"mappings":";;;;;;;;AAaA,MAAMA,IAAsC,CAASC,MAAA;AAC7C,QAAA,EAAE,UAAAC,GAAU,WAAAC,EAAc,IAAAF,GAE1B,EAAE,UAAAG,GAAU,SAAAC,GAAS,eAAeC,GAAc,WAAWC,EAAa,IAAAJ,GAE1EK,IACJD,MAAaE,EAAU,cACvBH,KACAA,MAAiBI,EAAoB,iBACjCC,IACJ,OAAOP,KAAa,aAAaF,MAAa,YAAY,CAACM,IAAmB,KAC1EI,IAAkBC;AAAA,IACtB,MAAOR,IAAUS,EAAmBT,CAAO,IAAI;AAAA,IAC/C,CAACA,CAAO;AAAA,EAAA;AAGV,2BACGU,GAAS,EAAA,UAAU,GAAG,aAAY,UAAS,gBAAe,OACxD,UAAA;AAAA,IAAAJ,KACE,gBAAAK,EAAAD,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC5C,UAAA;AAAA,MAAAH,KAAoB,gBAAAK,EAAAC,GAAA,EAAY,KAAKN,GAAiB,KAAI,UAAS;AAAA,MACpE,gBAAAK,EAACE,GAAe,EAAA,WAAU,YAAW,QAAO,UACzC,UAAA,GAAG,KAAK,KAAKf,CAAQ,CAAC,IACzB,CAAA;AAAA,IAAA,GACF;AAAA,IAGDF,MAAa,YAAY,gBAAAe,EAACG,GAAgB,EAAA,GAAGnB,GAAO,IAAK,gBAAAgB,EAACI,GAAgB,EAAA,GAAGpB,EAAO,CAAA;AAAA,EACvF,EAAA,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/student-actions.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useMemo, useCallback } from 'react';\n\nimport { SHEET_ATTEMPT_STATE } from '../../../../../sheets/constants/sheet';\nimport MenuElement from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/context-menu-helper/menu-element/menu-element';\nimport { MENU_OPTIONS } from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions-constant';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport ContextMenuTargetElement from '../../../../lpar-chapter/block-section/sheet-item/context-menu-helper/target-element';\nimport { StyledButton } from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport { getPrimaryCtaLabel } from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions-utils';\nimport type { IRewardNActions } from './rewards-n-actions-types';\n\nconst StudentActions: FC<IRewardNActions> = ({\n isExtraPractice,\n sheetData,\n onReattempt,\n ...restStudentActions\n}) => {\n const { onResume, onReview, onStart } = restStudentActions;\n const {\n attempt_state: attemptState,\n node_id: nodeId,\n permissions,\n user_node_id: userNodeId,\n } = sheetData;\n const {\n can_reattempt: canReattempt,\n can_resume: canResume,\n can_review: canReview,\n can_start: canStart,\n is_review_disabled: isReviewDisabled,\n } = permissions;\n\n const handleOnPrimaryCtaClick = useCallback(() => {\n if (canStart && typeof onStart === 'function') {\n onStart(nodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(nodeId);\n\n return;\n }\n\n if (typeof onReattempt === 'function') {\n onReattempt(nodeId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canResume, canStart, nodeId, onResume, onStart, onReattempt]);\n\n const handleOnReview = useCallback(() => {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n onReview(userNodeId);\n }, [userNodeId, onReview]);\n\n const renderPrimaryCta = canStart || canResume || canReattempt;\n const primaryCtaLabel = useMemo(\n () => getPrimaryCtaLabel({ canStart, canResume }),\n [canStart, canResume],\n );\n\n const options = useMemo(\n () => [\n {\n show: canReview,\n label: MENU_OPTIONS.REVIEW,\n disable: isReviewDisabled,\n },\n ],\n [canReview, isReviewDisabled],\n );\n\n return (\n <>\n {renderPrimaryCta && (\n <StyledButton\n renderAs=\"primary\"\n label={primaryCtaLabel}\n size=\"small\"\n onClick={handleOnPrimaryCtaClick}\n />\n )}\n\n {canReview && attemptState !== SHEET_ATTEMPT_STATE.WAIT_FOR_REVIEW && (\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover={isExtraPractice} />}\n menuElement={\n <MenuElement\n width={184}\n options={options}\n handleOnMenuOptionSelection={handleOnReview}\n />\n }\n menuOffset={5}\n menuZIndex={1}\n />\n )}\n </>\n );\n};\n\nexport default StudentActions;\n"],"names":["StudentActions","isExtraPractice","sheetData","onReattempt","restStudentActions","onResume","onReview","onStart","attemptState","nodeId","permissions","userNodeId","canReattempt","canResume","canReview","canStart","isReviewDisabled","handleOnPrimaryCtaClick","useCallback","handleOnReview","renderPrimaryCta","primaryCtaLabel","useMemo","getPrimaryCtaLabel","options","MENU_OPTIONS","jsxs","Fragment","jsx","StyledButton","SHEET_ATTEMPT_STATE","ContextMenu","ContextMenuTargetElement","MenuElement"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,UAAAC,GAAU,UAAAC,GAAU,SAAAC,EAAA,IAAYH,GAClC;AAAA,IACJ,eAAeI;AAAA,IACf,SAASC;AAAA,IACT,aAAAC;AAAA,IACA,cAAcC;AAAA,EACZ,IAAAT,GACE;AAAA,IACJ,eAAeU;AAAA,IACf,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,oBAAoBC;AAAA,EAClB,IAAAN,GAEEO,IAA0BC,EAAY,MAAM;AAC5C,QAAAH,KAAY,OAAOR,KAAY,YAAY;AAC7C,MAAAA,EAAQE,CAAM;AAEd;AAAA,IACF;AAEI,QAAAI,KAAa,OAAOR,KAAa,YAAY;AAC/C,MAAAA,EAASI,CAAM;AAEf;AAAA,IACF;AAEI,QAAA,OAAON,KAAgB,YAAY;AACrC,MAAAA,EAAYM,CAAM;AAElB;AAAA,IACF;AAEM,UAAA,IAAI,MAAM,yDAAyD;AAAA,EAAA,GACxE,CAACI,GAAWE,GAAUN,GAAQJ,GAAUE,GAASJ,CAAW,CAAC,GAE1DgB,IAAiBD,EAAY,MAAM;AACnC,QAAA,OAAOZ,KAAa;AAChB,YAAA,IAAI,MAAM,6BAA6B;AAG/C,IAAAA,EAASK,CAAU;AAAA,EAAA,GAClB,CAACA,GAAYL,CAAQ,CAAC,GAEnBc,IAAmBL,KAAYF,KAAaD,GAC5CS,IAAkBC;AAAA,IACtB,MAAMC,EAAmB,EAAE,UAAAR,GAAU,WAAAF,GAAW;AAAA,IAChD,CAACE,GAAUF,CAAS;AAAA,EAAA,GAGhBW,IAAUF;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,MAAMR;AAAA,QACN,OAAOW,EAAa;AAAA,QACpB,SAAST;AAAA,MACX;AAAA,IACF;AAAA,IACA,CAACF,GAAWE,CAAgB;AAAA,EAAA;AAG9B,SAEK,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCP,KAAA,gBAAAQ;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAOR;AAAA,QACP,MAAK;AAAA,QACL,SAASJ;AAAA,MAAA;AAAA,IACX;AAAA,IAGDH,KAAaN,MAAiBsB,EAAoB,mBACjD,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,eAAe,gBAAAH,EAACI,GAAyB,EAAA,aAAa/B,EAAiB,CAAA;AAAA,QACvE,aACE,gBAAA2B;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,SAAAT;AAAA,YACA,6BAA6BL;AAAA,UAAA;AAAA,QAC/B;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,MAAA;AAAA,IACd;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/student-actions.tsx"],"sourcesContent":["import { useMemo, useCallback, type FC } from 'react';\n\nimport { SHEET_ATTEMPT_STATE } from '../../../../../sheets/constants/sheet';\nimport MenuElement from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/context-menu-helper/menu-element/menu-element';\nimport { MENU_OPTIONS } from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions-constant';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport ContextMenuTargetElement from '../../../../lpar-chapter/block-section/sheet-item/context-menu-helper/target-element';\nimport { StyledButton } from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport { getPrimaryCtaLabel } from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions-utils';\nimport type { IRewardNActions } from './rewards-n-actions-types';\n\nconst StudentActions: FC<IRewardNActions> = ({\n isExtraPractice,\n sheetData,\n onReattempt,\n ...restStudentActions\n}) => {\n const { onResume, onReview, onStart } = restStudentActions;\n const {\n attempt_state: attemptState,\n node_id: nodeId,\n permissions,\n user_node_id: userNodeId,\n } = sheetData;\n const {\n can_reattempt: canReattempt,\n can_resume: canResume,\n can_review: canReview,\n can_start: canStart,\n is_review_disabled: isReviewDisabled,\n } = permissions;\n\n const handleOnPrimaryCtaClick = useCallback(() => {\n if (canStart && typeof onStart === 'function') {\n onStart(nodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(nodeId);\n\n return;\n }\n\n if (typeof onReattempt === 'function') {\n onReattempt(nodeId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canResume, canStart, nodeId, onResume, onStart, onReattempt]);\n\n const handleOnReview = useCallback(() => {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n onReview(userNodeId);\n }, [userNodeId, onReview]);\n\n const renderPrimaryCta = canStart || canResume || canReattempt;\n const primaryCtaLabel = useMemo(\n () => getPrimaryCtaLabel({ canStart, canResume }),\n [canStart, canResume],\n );\n\n const options = useMemo(\n () => [\n {\n show: canReview,\n label: MENU_OPTIONS.REVIEW,\n disable: isReviewDisabled,\n },\n ],\n [canReview, isReviewDisabled],\n );\n\n return (\n <>\n {renderPrimaryCta && (\n <StyledButton\n renderAs=\"primary\"\n label={primaryCtaLabel}\n size=\"small\"\n onClick={handleOnPrimaryCtaClick}\n />\n )}\n\n {canReview && attemptState !== SHEET_ATTEMPT_STATE.WAIT_FOR_REVIEW && (\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover={isExtraPractice} />}\n menuElement={\n <MenuElement\n width={184}\n options={options}\n handleOnMenuOptionSelection={handleOnReview}\n />\n }\n menuOffset={5}\n menuZIndex={1}\n />\n )}\n </>\n );\n};\n\nexport default StudentActions;\n"],"names":["StudentActions","isExtraPractice","sheetData","onReattempt","restStudentActions","onResume","onReview","onStart","attemptState","nodeId","permissions","userNodeId","canReattempt","canResume","canReview","canStart","isReviewDisabled","handleOnPrimaryCtaClick","useCallback","handleOnReview","renderPrimaryCta","primaryCtaLabel","useMemo","getPrimaryCtaLabel","options","MENU_OPTIONS","jsxs","Fragment","jsx","StyledButton","SHEET_ATTEMPT_STATE","ContextMenu","ContextMenuTargetElement","MenuElement"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,iBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAM,EAAE,UAAAC,GAAU,UAAAC,GAAU,SAAAC,EAAA,IAAYH,GAClC;AAAA,IACJ,eAAeI;AAAA,IACf,SAASC;AAAA,IACT,aAAAC;AAAA,IACA,cAAcC;AAAA,EACZ,IAAAT,GACE;AAAA,IACJ,eAAeU;AAAA,IACf,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,oBAAoBC;AAAA,EAClB,IAAAN,GAEEO,IAA0BC,EAAY,MAAM;AAC5C,QAAAH,KAAY,OAAOR,KAAY,YAAY;AAC7C,MAAAA,EAAQE,CAAM;AAEd;AAAA,IACF;AAEI,QAAAI,KAAa,OAAOR,KAAa,YAAY;AAC/C,MAAAA,EAASI,CAAM;AAEf;AAAA,IACF;AAEI,QAAA,OAAON,KAAgB,YAAY;AACrC,MAAAA,EAAYM,CAAM;AAElB;AAAA,IACF;AAEM,UAAA,IAAI,MAAM,yDAAyD;AAAA,EAAA,GACxE,CAACI,GAAWE,GAAUN,GAAQJ,GAAUE,GAASJ,CAAW,CAAC,GAE1DgB,IAAiBD,EAAY,MAAM;AACnC,QAAA,OAAOZ,KAAa;AAChB,YAAA,IAAI,MAAM,6BAA6B;AAG/C,IAAAA,EAASK,CAAU;AAAA,EAAA,GAClB,CAACA,GAAYL,CAAQ,CAAC,GAEnBc,IAAmBL,KAAYF,KAAaD,GAC5CS,IAAkBC;AAAA,IACtB,MAAMC,EAAmB,EAAE,UAAAR,GAAU,WAAAF,GAAW;AAAA,IAChD,CAACE,GAAUF,CAAS;AAAA,EAAA,GAGhBW,IAAUF;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,MAAMR;AAAA,QACN,OAAOW,EAAa;AAAA,QACpB,SAAST;AAAA,MACX;AAAA,IACF;AAAA,IACA,CAACF,GAAWE,CAAgB;AAAA,EAAA;AAG9B,SAEK,gBAAAU,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCP,KAAA,gBAAAQ;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAOR;AAAA,QACP,MAAK;AAAA,QACL,SAASJ;AAAA,MAAA;AAAA,IACX;AAAA,IAGDH,KAAaN,MAAiBsB,EAAoB,mBACjD,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,eAAe,gBAAAH,EAACI,GAAyB,EAAA,aAAa/B,EAAiB,CAAA;AAAA,QACvE,aACE,gBAAA2B;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,SAAAT;AAAA,YACA,6BAA6BL;AAAA,UAAA;AAAA,QAC/B;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,MAAA;AAAA,IACd;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useCallback, useMemo } from 'react';\n\nimport { NODE_TYPE } from '../../../../../sheets/constants/sheet';\nimport MenuElement from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/context-menu-helper/menu-element/menu-element';\nimport { TEACHER_MENU_OPTIONS } from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport ContextMenuTargetElement from '../../../../lpar-chapter/block-section/sheet-item/context-menu-helper/target-element';\nimport {\n StyledEyeIcon,\n StyledButton,\n} from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport type { IRewardNActions } from './rewards-n-actions-types';\n\nconst TeacherActions: FC<IRewardNActions> = ({\n isExtraPractice,\n isLastSheet,\n sheetData,\n ...restTeacherActionsProps\n}) => {\n const { onChangeLocation, onMarkAsFamiliar, onPreview, onReset, onReview, onUnassign, onUnlock } =\n restTeacherActionsProps;\n\n const {\n attempt_state: attemptState,\n completed_on_ts: completedOnTs,\n course_type: courseType,\n node_id: nodeId,\n permissions,\n user_node_id: userNodeId,\n } = sheetData;\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_reset: canReset,\n can_teacher_review: canTeacherReview,\n can_unlock: canUnlock,\n } = permissions;\n\n const unAssign = (!attemptState || completedOnTs) && courseType === NODE_TYPE.REMEDIAL;\n\n const menuOptions = useMemo(\n () => [\n {\n show: true,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n disable: !canChangeAttemptLocation,\n separatorVisible: true,\n },\n {\n show: !isExtraPractice,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n disable: !canMarkFamiliar,\n separatorVisible: true,\n },\n {\n show: !isExtraPractice,\n disable: !canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: Boolean(isExtraPractice),\n disable: !unAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [canChangeAttemptLocation, canMarkFamiliar, canReset, isExtraPractice, unAssign],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheetData);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheetData, userNodeId]);\n\n const handleOnMenuOptionSelection = useCallback(\n (selectedOption: string) => {\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheetData);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnassign !== 'function') {\n throw new Error('onUnassign must be a function');\n }\n\n onUnassign(sheetData);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheetData);\n\n return;\n }\n },\n [sheetData, nodeId, onChangeLocation, onMarkAsFamiliar, onUnassign, onReset],\n );\n\n const handleOnUnlock = useCallback(() => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(sheetData);\n }, [onUnlock, sheetData]);\n\n return (\n <>\n {canUnlock && (\n <StyledButton\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"small\"\n width={102}\n onClick={handleOnUnlock}\n />\n )}\n\n <StyledEyeIcon $invertHover={isExtraPractice} onClick={handleOnSheetView} />\n\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover={isExtraPractice} />}\n menuElement={\n <MenuElement\n width={184}\n options={menuOptions}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n hideTooltip\n />\n }\n menuOffset={5}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","isExtraPractice","isLastSheet","sheetData","restTeacherActionsProps","onChangeLocation","onMarkAsFamiliar","onPreview","onReset","onReview","onUnassign","onUnlock","attemptState","completedOnTs","courseType","nodeId","permissions","userNodeId","canChangeAttemptLocation","canMarkFamiliar","canReset","canTeacherReview","canUnlock","unAssign","NODE_TYPE","menuOptions","useMemo","TEACHER_MENU_OPTIONS","handleOnSheetView","useCallback","handleOnMenuOptionSelection","selectedOption","handleOnUnlock","jsxs","Fragment","jsx","StyledButton","StyledEyeIcon","ContextMenu","ContextMenuTargetElement","MenuElement"],"mappings":";;;;;;;;AAcA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,iBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA,EAAE,kBAAAC,GAAkB,kBAAAC,GAAkB,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,YAAAC,GAAY,UAAAC,EACpF,IAAAP,GAEI;AAAA,IACJ,eAAeQ;AAAA,IACf,iBAAiBC;AAAA,IACjB,aAAaC;AAAA,IACb,SAASC;AAAA,IACT,aAAAC;AAAA,IACA,cAAcC;AAAA,EACZ,IAAAd,GACE;AAAA,IACJ,6BAA6Be;AAAA,IAC7B,mBAAmBC;AAAA,IACnB,WAAWC;AAAA,IACX,oBAAoBC;AAAA,IACpB,YAAYC;AAAA,EACV,IAAAN,GAEEO,KAAY,CAACX,KAAgBC,MAAkBC,MAAeU,EAAU,UAExEC,IAAcC;AAAA,IAClB,MAAM;AAAA,MACJ;AAAA,QACE,MAAM;AAAA,QACN,OAAOC,EAAqB;AAAA,QAC5B,SAAS,CAACT;AAAA,QACV,kBAAkB;AAAA,MACpB;AAAA,MACA;AAAA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F;AAAA,IACA,CAACA,GAAWY,GAAQV,GAAkBC,GAAkBI,GAAYF,CAAO;AAAA,EAAA,GAGvEwB,IAAiBH,EAAY,MAAM;AACnC,QAAA,OAAOlB,KAAa;AAChB,YAAA,IAAI,MAAM,6BAA6B;AAG/C,IAAAA,EAASR,CAAS;AAAA,EAAA,GACjB,CAACQ,GAAUR,CAAS,CAAC;AAExB,SAEK,gBAAA8B,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCZ,KAAA,gBAAAa;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAM;AAAA,QACN,MAAK;AAAA,QACL,OAAO;AAAA,QACP,SAASJ;AAAA,MAAA;AAAA,IACX;AAAA,IAGD,gBAAAG,EAAAE,GAAA,EAAc,cAAcpC,GAAiB,SAAS2B,GAAmB;AAAA,IAE1E,gBAAAO;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,eAAe,gBAAAH,EAACI,GAAyB,EAAA,aAAatC,EAAiB,CAAA;AAAA,QACvE,aACE,gBAAAkC;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,SAASf;AAAA,YACT,6BAAAK;AAAA,YACA,aAAW;AAAA,UAAA;AAAA,QACb;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU5B;AAAA,MAAA;AAAA,IACZ;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions.tsx"],"sourcesContent":["import { useCallback, useMemo, type FC } from 'react';\n\nimport { NODE_TYPE } from '../../../../../sheets/constants/sheet';\nimport MenuElement from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/context-menu-helper/menu-element/menu-element';\nimport { TEACHER_MENU_OPTIONS } from '../../../../../sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport ContextMenuTargetElement from '../../../../lpar-chapter/block-section/sheet-item/context-menu-helper/target-element';\nimport {\n StyledEyeIcon,\n StyledButton,\n} from '../../../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport type { IRewardNActions } from './rewards-n-actions-types';\n\nconst TeacherActions: FC<IRewardNActions> = ({\n isExtraPractice,\n isLastSheet,\n sheetData,\n ...restTeacherActionsProps\n}) => {\n const { onChangeLocation, onMarkAsFamiliar, onPreview, onReset, onReview, onUnassign, onUnlock } =\n restTeacherActionsProps;\n\n const {\n attempt_state: attemptState,\n completed_on_ts: completedOnTs,\n course_type: courseType,\n node_id: nodeId,\n permissions,\n user_node_id: userNodeId,\n } = sheetData;\n const {\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_reset: canReset,\n can_teacher_review: canTeacherReview,\n can_unlock: canUnlock,\n } = permissions;\n\n const unAssign = (!attemptState || completedOnTs) && courseType === NODE_TYPE.REMEDIAL;\n\n const menuOptions = useMemo(\n () => [\n {\n show: true,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n disable: !canChangeAttemptLocation,\n separatorVisible: true,\n },\n {\n show: !isExtraPractice,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n disable: !canMarkFamiliar,\n separatorVisible: true,\n },\n {\n show: !isExtraPractice,\n disable: !canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: Boolean(isExtraPractice),\n disable: !unAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [canChangeAttemptLocation, canMarkFamiliar, canReset, isExtraPractice, unAssign],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheetData);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheetData, userNodeId]);\n\n const handleOnMenuOptionSelection = useCallback(\n (selectedOption: string) => {\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheetData);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnassign !== 'function') {\n throw new Error('onUnassign must be a function');\n }\n\n onUnassign(sheetData);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheetData);\n\n return;\n }\n },\n [sheetData, nodeId, onChangeLocation, onMarkAsFamiliar, onUnassign, onReset],\n );\n\n const handleOnUnlock = useCallback(() => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(sheetData);\n }, [onUnlock, sheetData]);\n\n return (\n <>\n {canUnlock && (\n <StyledButton\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"small\"\n width={102}\n onClick={handleOnUnlock}\n />\n )}\n\n <StyledEyeIcon $invertHover={isExtraPractice} onClick={handleOnSheetView} />\n\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover={isExtraPractice} />}\n menuElement={\n <MenuElement\n width={184}\n options={menuOptions}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n hideTooltip\n />\n }\n menuOffset={5}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","isExtraPractice","isLastSheet","sheetData","restTeacherActionsProps","onChangeLocation","onMarkAsFamiliar","onPreview","onReset","onReview","onUnassign","onUnlock","attemptState","completedOnTs","courseType","nodeId","permissions","userNodeId","canChangeAttemptLocation","canMarkFamiliar","canReset","canTeacherReview","canUnlock","unAssign","NODE_TYPE","menuOptions","useMemo","TEACHER_MENU_OPTIONS","handleOnSheetView","useCallback","handleOnMenuOptionSelection","selectedOption","handleOnUnlock","jsxs","Fragment","jsx","StyledButton","StyledEyeIcon","ContextMenu","ContextMenuTargetElement","MenuElement"],"mappings":";;;;;;;;AAaA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,iBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA,EAAE,kBAAAC,GAAkB,kBAAAC,GAAkB,WAAAC,GAAW,SAAAC,GAAS,UAAAC,GAAU,YAAAC,GAAY,UAAAC,EACpF,IAAAP,GAEI;AAAA,IACJ,eAAeQ;AAAA,IACf,iBAAiBC;AAAA,IACjB,aAAaC;AAAA,IACb,SAASC;AAAA,IACT,aAAAC;AAAA,IACA,cAAcC;AAAA,EACZ,IAAAd,GACE;AAAA,IACJ,6BAA6Be;AAAA,IAC7B,mBAAmBC;AAAA,IACnB,WAAWC;AAAA,IACX,oBAAoBC;AAAA,IACpB,YAAYC;AAAA,EACV,IAAAN,GAEEO,KAAY,CAACX,KAAgBC,MAAkBC,MAAeU,EAAU,UAExEC,IAAcC;AAAA,IAClB,MAAM;AAAA,MACJ;AAAA,QACE,MAAM;AAAA,QACN,OAAOC,EAAqB;AAAA,QAC5B,SAAS,CAACT;AAAA,QACV,kBAAkB;AAAA,MACpB;AAAA,MACA;AAAA,QACE,MAAM,CAACjB;AAAA,QACP,OAAO0B,EAAqB;AAAA,QAC5B,SAAS,CAACR;AAAA,QACV,kBAAkB;AAAA,MACpB;AAAA,MACA;AAAA,QACE,MAAM,CAAClB;AAAA,QACP,SAAS,CAACmB;AAAA,QACV,OAAOO,EAAqB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,MAAM,EAAQ1B;AAAA,QACd,SAAS,CAACsB;AAAA,QACV,OAAOI,EAAqB;AAAA,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Z,KAAA,gBAAAa;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAM;AAAA,QACN,MAAK;AAAA,QACL,OAAO;AAAA,QACP,SAASJ;AAAA,MAAA;AAAA,IACX;AAAA,IAGD,gBAAAG,EAAAE,GAAA,EAAc,cAAcpC,GAAiB,SAAS2B,GAAmB;AAAA,IAE1E,gBAAAO;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,eAAe,gBAAAH,EAACI,GAAyB,EAAA,aAAatC,EAAiB,CAAA;AAAA,QACvE,aACE,gBAAAkC;AAAA,UAACK;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,SAASf;AAAA,YACT,6BAAAK;AAAA,YACA,aAAW;AAAA,UAAA;AAAA,QACb;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU5B;AAAA,MAAA;AAAA,IACZ;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"sheet-info.js","sources":["../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/sheet-info.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useMemo } from 'react';\n\nimport { SHEET_STATE } from '../../../../sheets/constants/sheet';\nimport SheetItemIcon from '../../../../sheets/sheets-list/sheet-item/sheet-item-icon';\nimport { SheetStateIconWrapper } from '../../../../sheets/sheets-list/sheet-item/sheet-item-styled';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport {\n getLocationBasedTag,\n getSheetTitleNodeLabels,\n} from '../../../lpar-chapter/block-section/sheet-item/sheet-item-utils';\nimport type { ISheetInfo } from './sheet-item-types';\n\nconst { LOCKED } = SHEET_STATE;\n\nconst SheetInfo: FC<ISheetInfo> = ({\n attemptLocation,\n nodeType,\n sheetStatement,\n ...restSheetInfoProps\n}) => {\n const { state, title } = restSheetInfoProps;\n const nodeLabel = useMemo(() => getSheetTitleNodeLabels(nodeType), [nodeType]);\n const attemptLocationTag = useMemo(() => getLocationBasedTag(attemptLocation), [attemptLocation]);\n const isLocked = useMemo(() => state === LOCKED, [state]);\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $width=\"70%\" $flexGap={8}>\n <SheetStateIconWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $disabled={isLocked}\n >\n <SheetItemIcon state={state} />\n </SheetStateIconWrapper>\n\n <FlexView $justifyContent=\"center\" $width=\"100%\">\n <Text\n $renderAs=\"eyebrow2\"\n $color=\"BLACK_75\"\n $opacity={isLocked ? 0.5 : 1}\n >{`${nodeLabel} • ${attemptLocationTag}`}</Text>\n\n <Text $renderAs=\"body1Medium\" $opacity={isLocked ? 0.5 : 1}>\n {title}\n </Text>\n\n <Text $renderAs=\"body2\" $color=\"BLACK_75\">\n {sheetStatement}\n </Text>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default SheetInfo;\n"],"names":["LOCKED","SHEET_STATE","SheetInfo","attemptLocation","nodeType","sheetStatement","restSheetInfoProps","state","title","nodeLabel","useMemo","getSheetTitleNodeLabels","attemptLocationTag","getLocationBasedTag","isLocked","jsxs","FlexView","jsx","SheetStateIconWrapper","SheetItemIcon","Text"],"mappings":";;;;;;;;AAcA,MAAM,EAAE,QAAAA,EAAW,IAAAC,GAEbC,IAA4B,CAAC;AAAA,EACjC,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA,EAAE,OAAAC,GAAO,OAAAC,EAAU,IAAAF,GACnBG,IAAYC,EAAQ,MAAMC,EAAwBP,CAAQ,GAAG,CAACA,CAAQ,CAAC,GACvEQ,IAAqBF,EAAQ,MAAMG,EAAoBV,CAAe,GAAG,CAACA,CAAe,CAAC,GAC1FW,IAAWJ,EAAQ,MAAMH,MAAUP,GAAQ,CAACO,CAAK,CAAC;AAGtD,SAAA,gBAAAQ,EAACC,KAAS,gBAAe,OAAM,aAAY,UAAS,QAAO,OAAM,UAAU,GACzE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,WAAWJ;AAAA,QAEX,UAAA,gBAAAG,EAACE,KAAc,OAAAZ,EAAc,CAAA;AAAA,MAAA;AAAA,IAC/B;AAAA,IAEC,gBAAAQ,EAAAC,GAAA,EAAS,iBAAgB,UAAS,QAAO,QACxC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,QAAO;AAAA,UACP,UAAUN,IAAW,MAAM;AAAA,UAC3B,UAAA,GAAGL,CAAS,MAAMG,CAAkB;AAAA,QAAA;AAAA,MAAG;AAAA,MAEzC,gBAAAK,EAACG,KAAK,WAAU,eAAc,UAAUN,IAAW,MAAM,GACtD,UACHN,EAAA,CAAA;AAAA,wBAECY,GAAK,EAAA,WAAU,SAAQ,QAAO,YAC5B,UACHf,GAAA;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"sheet-info.js","sources":["../../../../../../src/features/chapters/lpar-milestone-chapter/block-section/sheet-item/sheet-info.tsx"],"sourcesContent":["import { useMemo, type FC } from 'react';\n\nimport { SHEET_STATE } from '../../../../sheets/constants/sheet';\nimport SheetItemIcon from '../../../../sheets/sheets-list/sheet-item/sheet-item-icon';\nimport { SheetStateIconWrapper } from '../../../../sheets/sheets-list/sheet-item/sheet-item-styled';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport {\n getLocationBasedTag,\n getSheetTitleNodeLabels,\n} from '../../../lpar-chapter/block-section/sheet-item/sheet-item-utils';\nimport type { ISheetInfo } from './sheet-item-types';\n\nconst { LOCKED } = SHEET_STATE;\n\nconst SheetInfo: FC<ISheetInfo> = ({\n attemptLocation,\n nodeType,\n sheetStatement,\n ...restSheetInfoProps\n}) => {\n const { state, title } = restSheetInfoProps;\n const nodeLabel = useMemo(() => getSheetTitleNodeLabels(nodeType), [nodeType]);\n const attemptLocationTag = useMemo(() => getLocationBasedTag(attemptLocation), [attemptLocation]);\n const isLocked = useMemo(() => state === LOCKED, [state]);\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $width=\"70%\" $flexGap={8}>\n <SheetStateIconWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $disabled={isLocked}\n >\n <SheetItemIcon state={state} />\n </SheetStateIconWrapper>\n\n <FlexView $justifyContent=\"center\" $width=\"100%\">\n <Text\n $renderAs=\"eyebrow2\"\n $color=\"BLACK_75\"\n $opacity={isLocked ? 0.5 : 1}\n >{`${nodeLabel} • ${attemptLocationTag}`}</Text>\n\n <Text $renderAs=\"body1Medium\" $opacity={isLocked ? 0.5 : 1}>\n {title}\n </Text>\n\n <Text $renderAs=\"body2\" $color=\"BLACK_75\">\n {sheetStatement}\n </Text>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default SheetInfo;\n"],"names":["LOCKED","SHEET_STATE","SheetInfo","attemptLocation","nodeType","sheetStatement","restSheetInfoProps","state","title","nodeLabel","useMemo","getSheetTitleNodeLabels","attemptLocationTag","getLocationBasedTag","isLocked","jsxs","FlexView","jsx","SheetStateIconWrapper","SheetItemIcon","Text"],"mappings":";;;;;;;;AAaA,MAAM,EAAE,QAAAA,EAAW,IAAAC,GAEbC,IAA4B,CAAC;AAAA,EACjC,iBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA,EAAE,OAAAC,GAAO,OAAAC,EAAU,IAAAF,GACnBG,IAAYC,EAAQ,MAAMC,EAAwBP,CAAQ,GAAG,CAACA,CAAQ,CAAC,GACvEQ,IAAqBF,EAAQ,MAAMG,EAAoBV,CAAe,GAAG,CAACA,CAAe,CAAC,GAC1FW,IAAWJ,EAAQ,MAAMH,MAAUP,GAAQ,CAACO,CAAK,CAAC;AAGtD,SAAA,gBAAAQ,EAACC,KAAS,gBAAe,OAAM,aAAY,UAAS,QAAO,OAAM,UAAU,GACzE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,iBAAgB;AAAA,QAChB,WAAWJ;AAAA,QAEX,UAAA,gBAAAG,EAACE,KAAc,OAAAZ,EAAc,CAAA;AAAA,MAAA;AAAA,IAC/B;AAAA,IAEC,gBAAAQ,EAAAC,GAAA,EAAS,iBAAgB,UAAS,QAAO,QACxC,UAAA;AAAA,MAAA,gBAAAC;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,WAAU;AAAA,UACV,QAAO;AAAA,UACP,UAAUN,IAAW,MAAM;AAAA,UAC3B,UAAA,GAAGL,CAAS,MAAMG,CAAkB;AAAA,QAAA;AAAA,MAAG;AAAA,MAEzC,gBAAAK,EAACG,KAAK,WAAU,eAAc,UAAUN,IAAW,MAAM,GACtD,UACHN,EAAA,CAAA;AAAA,wBAECY,GAAK,EAAA,WAAU,SAAQ,QAAO,YAC5B,UACHf,GAAA;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ;"}
@@ -1 +1 @@
1
- {"version":3,"file":"extra-practice-section.js","sources":["../../../../../src/features/chapters/lpar-milestone-chapter/extra-practice-section/extra-practice-section.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { Fragment, useCallback } from 'react';\n\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { StyledButton } from '../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport SheetItem from '../block-section/sheet-item/sheet-item';\nimport type { IExtraPracticeSection } from './extra-practice-section-types';\n\nconst ExtraPracticeSection: FC<IExtraPracticeSection> = ({\n extraPracticeData,\n userType,\n onChangeLocation,\n ...restExtraPracticeSectionProps\n}) => {\n const {\n onCreateExtraPractice,\n onPreview,\n onReattempt,\n onResume,\n onReview,\n onStart,\n onUnassign,\n onUnlock,\n } = restExtraPracticeSectionProps;\n const handleOnCreateExtraPractice = useCallback(() => {\n if (typeof onCreateExtraPractice !== 'function') {\n throw new Error('onCreateExtraPractice must be a function');\n }\n\n onCreateExtraPractice();\n }, [onCreateExtraPractice]);\n\n return (\n <FlexView $flexGapX={1}>\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $width=\"100%\"\n >\n <Text $renderAs=\"eyebrow2\">All practice sheets</Text>\n\n {userType === 'TEACHER' && (\n <StyledButton\n label=\"Extra practice sheet\"\n Icon={PlusIcon}\n renderAs=\"primary\"\n size=\"small\"\n analyticsLabel=\"Extra practice sheet (Lesson V3)\"\n onClick={handleOnCreateExtraPractice}\n />\n )}\n </FlexView>\n\n <FlexView $flexGapX={1.5} $marginBottomX={1}>\n {extraPracticeData.map((extraPracticeSheet, idx) => {\n const { node_id: nodeId } = extraPracticeSheet;\n const isLastSheet = idx === extraPracticeData.length - 1;\n\n return (\n <Fragment key={nodeId}>\n <SheetItem\n isExtraPractice\n isLastSheet={isLastSheet}\n sheetData={extraPracticeSheet}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n\n <Separator height={1} background=\"GREY_2\" />\n </Fragment>\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default ExtraPracticeSection;\n"],"names":["ExtraPracticeSection","extraPracticeData","userType","onChangeLocation","restExtraPracticeSectionProps","onCreateExtraPractice","onPreview","onReattempt","onResume","onReview","onStart","onUnassign","onUnlock","handleOnCreateExtraPractice","useCallback","jsxs","FlexView","jsx","Text","StyledButton","PlusIcon","extraPracticeSheet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Ae;AAAA,YACf,aAAAF;AAAA,YACA,WAAWH;AAAA,YACX,UAAAnB;AAAA,YACA,kBAAAC;AAAA,YACA,WAAAG;AAAA,YACA,aAAAC;AAAA,YACA,UAAAC;AAAA,YACA,UAAAC;AAAA,YACA,SAAAC;AAAA,YACA,YAAAC;AAAA,YACA,UAAAC;AAAA,UAAA;AAAA,QACF;AAAA,QAEC,gBAAAK,EAAAU,GAAA,EAAU,QAAQ,GAAG,YAAW,UAAS;AAAA,MAAA,EAAA,GAhB7BJ,CAiBf;AAAA,IAEH,CAAA,GACH;AAAA,EACF,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"extra-practice-section.js","sources":["../../../../../src/features/chapters/lpar-milestone-chapter/extra-practice-section/extra-practice-section.tsx"],"sourcesContent":["import { Fragment, useCallback, type FC } from 'react';\n\nimport PlusIcon from '../../../../assets/line-icons/icons/plus';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { StyledButton } from '../../lpar-chapter/block-section/sheet-item/rewards-n-actions/reward-n-actions-styled';\nimport SheetItem from '../block-section/sheet-item/sheet-item';\nimport type { IExtraPracticeSection } from './extra-practice-section-types';\n\nconst ExtraPracticeSection: FC<IExtraPracticeSection> = ({\n extraPracticeData,\n userType,\n onChangeLocation,\n ...restExtraPracticeSectionProps\n}) => {\n const {\n onCreateExtraPractice,\n onPreview,\n onReattempt,\n onResume,\n onReview,\n onStart,\n onUnassign,\n onUnlock,\n } = restExtraPracticeSectionProps;\n const handleOnCreateExtraPractice = useCallback(() => {\n if (typeof onCreateExtraPractice !== 'function') {\n throw new Error('onCreateExtraPractice must be a function');\n }\n\n onCreateExtraPractice();\n }, [onCreateExtraPractice]);\n\n return (\n <FlexView $flexGapX={1}>\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $width=\"100%\"\n >\n <Text $renderAs=\"eyebrow2\">All practice sheets</Text>\n\n {userType === 'TEACHER' && (\n <StyledButton\n label=\"Extra practice sheet\"\n Icon={PlusIcon}\n renderAs=\"primary\"\n size=\"small\"\n analyticsLabel=\"Extra practice sheet (Lesson V3)\"\n onClick={handleOnCreateExtraPractice}\n />\n )}\n </FlexView>\n\n <FlexView $flexGapX={1.5} $marginBottomX={1}>\n {extraPracticeData.map((extraPracticeSheet, idx) => {\n const { node_id: nodeId } = extraPracticeSheet;\n const isLastSheet = idx === extraPracticeData.length - 1;\n\n return (\n <Fragment key={nodeId}>\n <SheetItem\n isExtraPractice\n isLastSheet={isLastSheet}\n sheetData={extraPracticeSheet}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n\n <Separator height={1} background=\"GREY_2\" />\n </Fragment>\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default ExtraPracticeSection;\n"],"names":["ExtraPracticeSection","extraPracticeData","userType","onChangeLocation","restExtraPracticeSectionProps","onCreateExtraPractice","onPreview","onReattempt","onResume","onReview","onStart","onUnassign","onUnlock","handleOnCreateExtraPractice","useCallback","jsxs","FlexView","jsx","Text","StyledButton","PlusIcon","extraPracticeSheet","idx","nodeId","isLastSheet","Fragment","SheetItem","Separator"],"mappings":";;;;;;;;AAUA,MAAMA,IAAkD,CAAC;AAAA,EACvD,mBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,uBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,EACE,IAAAR,GACES,IAA8BC,EAAY,MAAM;AAChD,QAAA,OAAOT,KAA0B;AAC7B,YAAA,IAAI,MAAM,0CAA0C;AA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","sources":["../../../../src/features/chapters/lpar-milestone-chapter/lpar-milestone-chapter.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useMemo, useState } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport ChapterBanner from '../chapter/comps/chapter-banner/chapter-banner';\nimport TabsSection from '../lpar-chapter/comps/tab-section';\nimport { MILESTONE_CHAPTER_TAB_CODES } from '../lpar-chapter/constants';\nimport BlockSection from './block-section/block-section';\nimport ExtraPracticeSection from './extra-practice-section/extra-practice-section';\nimport * as Styled from './lpar-milestone-chapter-styled';\nimport type { ILPARMilestoneChapter } from './lpar-milestone-chapter-types';\nimport PuzzleSection from './puzzle-section/puzzle-section';\n\nconst { MASTERY, EXTRA_PRACTICE, PUZZLE_CARDS } = MILESTONE_CHAPTER_TAB_CODES;\n\nconst getDefaultTab = ({\n hasMasteryData,\n hasExtraPracticeData,\n hasPuzzleCardData,\n}: {\n hasMasteryData: boolean;\n hasExtraPracticeData: boolean;\n hasPuzzleCardData: boolean;\n}) => {\n //* If MASTERY is not present, we don't consider looking for Extra Practice.\n //* Extra Practice is not shown if MASTERY is not present and PUZZLE_CARD is present at the same time.\n if (!hasMasteryData && hasPuzzleCardData) return PUZZLE_CARDS;\n\n if (hasMasteryData) return MASTERY;\n\n if (hasExtraPracticeData) return EXTRA_PRACTICE;\n\n return PUZZLE_CARDS;\n};\n\nconst getLPARMilestoneChapterTabs = ({\n hasMasteryData,\n hasExtraPracticeData,\n hasPuzzleCardData,\n}: {\n hasMasteryData: boolean;\n hasExtraPracticeData: boolean;\n hasPuzzleCardData: boolean;\n}) => {\n const TABS = [\n {\n key: 'chapter-tab-mastery',\n label: 'Mastery',\n value: MASTERY,\n visible: hasMasteryData,\n },\n {\n key: 'chapter-tab-extra-practice',\n label: 'Extra practice',\n value: EXTRA_PRACTICE,\n visible: hasExtraPracticeData,\n },\n {\n key: 'chapter-tab-puzzle-cards',\n label: 'Puzzle cards',\n value: PUZZLE_CARDS,\n visible: hasPuzzleCardData,\n },\n ];\n\n const showTabs = TABS.filter(tab => tab.visible).length > 1;\n\n return { TABS, showTabs };\n};\n\nconst LPARMilestoneChapter: FC<ILPARMilestoneChapter> = ({\n chapterData,\n userType,\n loading,\n ...restLPARMilestoneChapterProps\n}) => {\n const {\n onChangeLocation,\n onCreateExtraPractice,\n onMarkAsFamiliar,\n onPreview,\n onPuzzleCardClick,\n onReattempt,\n onReset,\n onResume,\n onReview,\n onStart,\n onUnassign,\n onUnlock,\n } = restLPARMilestoneChapterProps;\n\n const {\n image_hue: imageHue,\n image_url: imageUrl,\n name: chapterName,\n tabs,\n user_chapter_progress: userChapterProgress,\n } = chapterData;\n const {\n mastery: masteryData,\n puzzle_cards: puzzleData,\n extra_practice: extraPracticeData,\n } = tabs;\n\n const hasMasteryData = masteryData.length > 0;\n const hasPuzzleCardData = puzzleData.length > 0;\n const hasExtraPracticeData = extraPracticeData.length > 0;\n\n const [selectedChapterTab, setSelectedChapterTab] = useState<string>(() =>\n getDefaultTab({\n hasMasteryData,\n hasExtraPracticeData,\n hasPuzzleCardData,\n }),\n );\n\n const isMasteryTabSelected = selectedChapterTab === MASTERY;\n const isExtraPracticeTabSelected = selectedChapterTab === EXTRA_PRACTICE;\n const isPuzzleTabSelected = selectedChapterTab === PUZZLE_CARDS;\n\n const canViewMastery = hasMasteryData && isMasteryTabSelected;\n const canViewExtraPractice = hasExtraPracticeData && isExtraPracticeTabSelected;\n const canViewPuzzleCards = hasPuzzleCardData && isPuzzleTabSelected;\n\n const { TABS, showTabs } = useMemo(\n () =>\n getLPARMilestoneChapterTabs({\n hasExtraPracticeData: !hasMasteryData && puzzleData ? false : hasExtraPracticeData,\n hasMasteryData,\n hasPuzzleCardData,\n }),\n [hasMasteryData, hasExtraPracticeData, hasPuzzleCardData, puzzleData],\n );\n\n return (\n <Styled.ChapterWrapper $disablePointerEvents={loading} $flexGapX={1.5}>\n {loading && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n <ChapterBanner\n backgroundColor={`${imageHue || 'GREY'}_1`}\n imageUrl={imageUrl}\n name={chapterName}\n userChapterProgress={userChapterProgress}\n />\n\n {showTabs && (\n <TabsSection\n selectedChapterTab={selectedChapterTab}\n tabs={TABS}\n setSelectedChapterTab={setSelectedChapterTab}\n />\n )}\n\n {canViewMastery && (\n <BlockSection\n masteryData={masteryData}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onMarkAsFamiliar={onMarkAsFamiliar}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onReset={onReset}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n )}\n\n {canViewExtraPractice && (\n <ExtraPracticeSection\n extraPracticeData={extraPracticeData}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onCreateExtraPractice={onCreateExtraPractice}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n )}\n\n {canViewPuzzleCards && (\n <PuzzleSection\n puzzleCards={puzzleData}\n userType={userType}\n onCardClick={onPuzzleCardClick}\n />\n )}\n </Styled.ChapterWrapper>\n );\n};\n\nexport default LPARMilestoneChapter;\n"],"names":["MASTERY","EXTRA_PRACTICE","PUZZLE_CARDS","MILESTONE_CHAPTER_TAB_CODES","getDefaultTab","hasMasteryData","hasExtraPracticeData","hasPuzzleCardData","getLPARMilestoneChapterTabs","TABS","showTabs","tab","LPARMilestoneChapter","chapterData","userType","loading","restLPARMilestoneChapterProps","onChangeLocation","onCreateExtraPractice","onMarkAsFamiliar","onPreview","onPuzzleCardClick","onReattempt","onReset","onResume","onReview","onStart","onUnassign","onUnlock","imageHue","imageUrl","chapterName","tabs","userChapterProgress","masteryData","puzzleData","extraPracticeData","selectedChapterTab","setSelectedChapterTab","useState","isMasteryTabSelected","isExtraPracticeTabSelected","isPuzzleTabSelected","canViewMastery","canViewExtraPractice","canViewPuzzleCards","useMemo","Styled.ChapterWrapper","jsx","Styled.LoaderWrapper","ILLUSTRATIONS","ChapterBanner","TabsSection","BlockSection","ExtraPracticeSection","PuzzleSection","LPARMilestoneChapter$1"],"mappings":";;;;;;;;;;AAaA,MAAM,EAAE,SAAAA,GAAS,gBAAAC,GAAgB,cAAAC,EAAA,IAAiBC,GAE5CC,IAAgB,CAAC;AAAA,EACrB,gBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AACF,MAOM,CAACF,KAAkBE,IAA0BL,IAE7CG,IAAuBL,IAEvBM,IAA6BL,IAE1BC,GAGHM,KAA8B,CAAC;AAAA,EACnC,gBAAAH;AAAA,EACA,sBAAAC;AAAA,EACA,mBAAAC;AACF,MAIM;AACJ,QAAME,IAAO;AAAA,IACX;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,OAAOT;AAAA,MACP,SAASK;AAAA,IACX;AAAA,IACA;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,OAAOJ;AAAA,MACP,SAASK;AAAA,IACX;AAAA,IACA;AAAA,MACE,KAAK;AAAA,MACL,OAAO;AAAA,MACP,OAAOJ;AAAA,MACP,SAASK;AAAA,IACX;AAAA,EAAA,GAGIG,IAAWD,EAAK,OAAO,OAAOE,EAAI,OAAO,EAAE,SAAS;AAEnD,SAAA,EAAE,MAAAF,GAAM,UAAAC;AACjB,GAEME,KAAkD,CAAC;AAAA,EACvD,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,kBAAAC;AAAA,IACA,uBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAA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MAAA;AAAA,IACF;AAAA,IAECvB,KACC,gBAAAsC;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,oBAAAf;AAAA,QACA,MAAM5B;AAAA,QACN,uBAAA6B;AAAA,MAAA;AAAA,IACF;AAAA,IAGDK,KACC,gBAAAK;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,aAAAnB;AAAA,QACA,UAAApB;AAAA,QACA,kBAAAG;AAAA,QACA,kBAAAE;AAAA,QACA,WAAAC;AAAA,QACA,aAAAE;AAAA,QACA,SAAAC;AAAA,QACA,UAAAC;AAAA,QACA,UAAAC;AAAA,QACA,SAAAC;AAAA,QACA,YAAAC;AAAA,QACA,UAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAGDgB,KACC,gBAAAI;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,mBAAAlB;AAAA,QACA,UAAAtB;AAAA,QACA,kBAAAG;AAAA,QACA,uBAAAC;AAAA,QACA,WAAAE;AAAA,QACA,aAAAE;AAAA,QACA,UAAAE;AAAA,QACA,UAAAC;AAAA,QACA,SAAAC;AAAA,QACA,YAAAC;AAAA,QACA,UAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAGDiB,KACC,gBAAAG;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,aAAapB;AAAA,QACb,UAAArB;AAAA,QACA,aAAaO;AAAA,MAAA;AAAA,IACf;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEAmC,KAAe5C;"}
1
+ {"version":3,"file":"lpar-milestone-chapter.js","sources":["../../../../src/features/chapters/lpar-milestone-chapter/lpar-milestone-chapter.tsx"],"sourcesContent":["import { useMemo, useState, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport ChapterBanner from '../chapter/comps/chapter-banner/chapter-banner';\nimport TabsSection from '../lpar-chapter/comps/tab-section';\nimport { MILESTONE_CHAPTER_TAB_CODES } from '../lpar-chapter/constants';\nimport BlockSection from './block-section/block-section';\nimport ExtraPracticeSection from './extra-practice-section/extra-practice-section';\nimport * as Styled from './lpar-milestone-chapter-styled';\nimport type { ILPARMilestoneChapter } from './lpar-milestone-chapter-types';\nimport PuzzleSection from './puzzle-section/puzzle-section';\n\nconst { MASTERY, EXTRA_PRACTICE, PUZZLE_CARDS } = MILESTONE_CHAPTER_TAB_CODES;\n\nconst getDefaultTab = ({\n hasMasteryData,\n hasExtraPracticeData,\n hasPuzzleCardData,\n}: {\n hasMasteryData: boolean;\n hasExtraPracticeData: boolean;\n hasPuzzleCardData: boolean;\n}) => {\n //* If MASTERY is not present, we don't consider looking for Extra Practice.\n //* Extra Practice is not shown if MASTERY is not present and PUZZLE_CARD is present at the same time.\n if (!hasMasteryData && hasPuzzleCardData) return PUZZLE_CARDS;\n\n if (hasMasteryData) return MASTERY;\n\n if (hasExtraPracticeData) return EXTRA_PRACTICE;\n\n return PUZZLE_CARDS;\n};\n\nconst getLPARMilestoneChapterTabs = ({\n hasMasteryData,\n hasExtraPracticeData,\n hasPuzzleCardData,\n}: {\n hasMasteryData: boolean;\n hasExtraPracticeData: boolean;\n hasPuzzleCardData: boolean;\n}) => {\n const TABS = [\n {\n key: 'chapter-tab-mastery',\n label: 'Mastery',\n value: MASTERY,\n visible: hasMasteryData,\n },\n {\n key: 'chapter-tab-extra-practice',\n label: 'Extra practice',\n value: EXTRA_PRACTICE,\n visible: hasExtraPracticeData,\n },\n {\n key: 'chapter-tab-puzzle-cards',\n label: 'Puzzle cards',\n value: PUZZLE_CARDS,\n visible: hasPuzzleCardData,\n },\n ];\n\n const showTabs = TABS.filter(tab => tab.visible).length > 1;\n\n return { TABS, showTabs };\n};\n\nconst LPARMilestoneChapter: FC<ILPARMilestoneChapter> = ({\n chapterData,\n userType,\n loading,\n ...restLPARMilestoneChapterProps\n}) => {\n const {\n onChangeLocation,\n onCreateExtraPractice,\n onMarkAsFamiliar,\n onPreview,\n onPuzzleCardClick,\n onReattempt,\n onReset,\n onResume,\n onReview,\n onStart,\n onUnassign,\n onUnlock,\n } = restLPARMilestoneChapterProps;\n\n const {\n image_hue: imageHue,\n image_url: imageUrl,\n name: chapterName,\n tabs,\n user_chapter_progress: userChapterProgress,\n } = chapterData;\n const {\n mastery: masteryData,\n puzzle_cards: puzzleData,\n extra_practice: extraPracticeData,\n } = tabs;\n\n const hasMasteryData = masteryData.length > 0;\n const hasPuzzleCardData = puzzleData.length > 0;\n const hasExtraPracticeData = extraPracticeData.length > 0;\n\n const [selectedChapterTab, setSelectedChapterTab] = useState<string>(() =>\n getDefaultTab({\n hasMasteryData,\n hasExtraPracticeData,\n hasPuzzleCardData,\n }),\n );\n\n const isMasteryTabSelected = selectedChapterTab === MASTERY;\n const isExtraPracticeTabSelected = selectedChapterTab === EXTRA_PRACTICE;\n const isPuzzleTabSelected = selectedChapterTab === PUZZLE_CARDS;\n\n const canViewMastery = hasMasteryData && isMasteryTabSelected;\n const canViewExtraPractice = hasExtraPracticeData && isExtraPracticeTabSelected;\n const canViewPuzzleCards = hasPuzzleCardData && isPuzzleTabSelected;\n\n const { TABS, showTabs } = useMemo(\n () =>\n getLPARMilestoneChapterTabs({\n hasExtraPracticeData: !hasMasteryData && puzzleData ? false : hasExtraPracticeData,\n hasMasteryData,\n hasPuzzleCardData,\n }),\n [hasMasteryData, hasExtraPracticeData, hasPuzzleCardData, puzzleData],\n );\n\n return (\n <Styled.ChapterWrapper $disablePointerEvents={loading} $flexGapX={1.5}>\n {loading && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n <ChapterBanner\n backgroundColor={`${imageHue || 'GREY'}_1`}\n imageUrl={imageUrl}\n name={chapterName}\n userChapterProgress={userChapterProgress}\n />\n\n {showTabs && (\n <TabsSection\n selectedChapterTab={selectedChapterTab}\n tabs={TABS}\n setSelectedChapterTab={setSelectedChapterTab}\n />\n )}\n\n {canViewMastery && (\n <BlockSection\n masteryData={masteryData}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onMarkAsFamiliar={onMarkAsFamiliar}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onReset={onReset}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n )}\n\n {canViewExtraPractice && (\n <ExtraPracticeSection\n extraPracticeData={extraPracticeData}\n userType={userType}\n onChangeLocation={onChangeLocation}\n onCreateExtraPractice={onCreateExtraPractice}\n onPreview={onPreview}\n onReattempt={onReattempt}\n onResume={onResume}\n onReview={onReview}\n onStart={onStart}\n onUnassign={onUnassign}\n onUnlock={onUnlock}\n />\n )}\n\n {canViewPuzzleCards && (\n <PuzzleSection\n puzzleCards={puzzleData}\n userType={userType}\n onCardClick={onPuzzleCardClick}\n />\n )}\n </Styled.ChapterWrapper>\n );\n};\n\nexport default LPARMilestoneChapter;\n"],"names":["MASTERY","EXTRA_PRACTICE","PUZZLE_CARDS","MILESTONE_CHAPTER_TAB_CODES","getDefaultTab","hasMasteryData","hasExtraPracticeData","hasPuzzleCardData","getLPARMilestoneChapterTabs","TABS","showTabs","tab","LPARMilestoneChapter","chapterData","userType","loading","restLPARMilestoneChapterProps","onChangeLocation","onCreateExtraPractice","onMarkAsFamiliar","onPreview","onPuzzleCardClick","onReattempt","onReset","onResume","onReview","onStart","onUnassign","onUnlock","imageHue","imageUrl","chapterName","tabs","userChapterProgress","masteryData","puzzleData","extraPracticeData","selectedChapterTab","setSelectedChapterTab","useState","isMasteryTabSelected","isExtraPracticeTabSelected","isPuzzleTabSelected","canViewMastery","canViewExtraPractice","canViewPuzzleCards","useMemo","Styled.ChapterWrapper","jsx","Styled.LoaderWrapper","ILLUSTRATIONS","ChapterBanner","TabsSection","BlockSection","ExtraPracticeSection","PuzzleSection","LPARMilestoneChapter$1"],"mappings":";;;;;;;;;;AAYA,MAAM,EAAE,SAAAA,GAAS,gBAAAC,GAAgB,cAAAC,EAAA,IAAiBC,GAE5CC,IAAgB,CAAC;AAAA,EACrB,gBAAAC;AA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AAAE;AAAA,QACA,SAAAC;AAAA,QACA,UAAAC;AAAA,QACA,UAAAC;AAAA,QACA,SAAAC;AAAA,QACA,YAAAC;AAAA,QACA,UAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAGDgB,KACC,gBAAAI;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,mBAAAlB;AAAA,QACA,UAAAtB;AAAA,QACA,kBAAAG;AAAA,QACA,uBAAAC;AAAA,QACA,WAAAE;AAAA,QACA,aAAAE;AAAA,QACA,UAAAE;AAAA,QACA,UAAAC;AAAA,QACA,SAAAC;AAAA,QACA,YAAAC;AAAA,QACA,UAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAGDiB,KACC,gBAAAG;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,aAAapB;AAAA,QACb,UAAArB;AAAA,QACA,aAAaO;AAAA,MAAA;AAAA,IACf;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEAmC,KAAe5C;"}
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-card.js","sources":["../../../../../src/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-card.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { useCallback } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport {\n PUZZLE_CARD_IMAGES,\n PUZZLE_CARD_STATE,\n PUZZLE_CARD_STATE_BASED_COLOR,\n} from '../../lpar-chapter/constants/puzzle-card';\nimport CueCoins from '../../lpar-chapter/puzzle-section/puzzle-card/cue-coins';\nimport {\n PuzzleCardOverView,\n HeaderText,\n ColoredLine,\n StyledText,\n BadgeCompleted,\n CueCoinWrapper,\n} from '../../lpar-chapter/puzzle-section/puzzle-card/puzzle-card-styled';\nimport { getRewardCoins } from '../../lpar-chapter/puzzle-section/puzzle-section-utils';\nimport { getPuzzleCardBlockStatus } from './puzzle-card-util';\nimport type { IPuzzleCard } from './puzzle-section-types';\n\nconst PuzzleCard: FC<IPuzzleCard> = ({ blockId, programId, puzzleNo, ...restPuzzleCardProps }) => {\n const { sheetData, onCardClick } = restPuzzleCardProps;\n\n const blockStatus = getPuzzleCardBlockStatus(sheetData);\n const rewardCoins = getRewardCoins(sheetData);\n\n const { node_type: nodeType, title } = sheetData;\n const state = !blockStatus ? PUZZLE_CARD_STATE.LOCKED : PUZZLE_CARD_STATE[blockStatus];\n const cardImage =\n PUZZLE_CARD_IMAGES[nodeType as keyof typeof PUZZLE_CARD_IMAGES] ??\n PUZZLE_CARD_IMAGES.PUZZLE_EASY;\n const puzzleStatus = PUZZLE_CARD_STATE_BASED_COLOR[state];\n const isLocked = state === PUZZLE_CARD_STATE.LOCKED;\n\n const handleOnClick = useCallback(() => {\n if (isLocked) return null;\n\n if (typeof onCardClick !== 'function') {\n throw new Error('onCardClick is not a function');\n }\n\n onCardClick(sheetData, {\n blockStatus: blockStatus,\n chapterName: puzzleNo,\n blockId,\n programId,\n });\n }, [blockId, blockStatus, onCardClick, programId, puzzleNo, sheetData, isLocked]);\n\n return (\n <PuzzleCardOverView\n $widthX={12.5}\n $heightX={17.125}\n $gutterX={1.5625}\n $gapX={1.5625}\n $bgImage={cardImage}\n $borderRadius={8}\n $opacity={state === PUZZLE_CARD_STATE.LOCKED ? 0.6 : 1}\n onClick={handleOnClick}\n $disable={isLocked}\n >\n <HeaderText\n $widthX={6.6875}\n $color={puzzleStatus?.textColor}\n $bgColor={puzzleStatus?.background}\n $renderAs=\"eyebrow2\"\n $align=\"center\"\n >\n {state}\n </HeaderText>\n\n <ColoredLine />\n\n <Text $renderAs=\"body3\" $color=\"WHITE\" $align=\"center\">\n Puzzle {puzzleNo}\n </Text>\n\n <StyledText\n $renderAs=\"body1Medium\"\n $completed={state === PUZZLE_CARD_STATE.COMPLETED}\n $color=\"WHITE\"\n $align=\"center\"\n >\n {title}\n </StyledText>\n\n {state === PUZZLE_CARD_STATE.COMPLETED && (\n <BadgeCompleted $justifyContent=\"center\">\n <Text $renderAs=\"cta3\" $color=\"BLUE_6\" $opacity={0.5} $align=\"center\">\n YOU EARNED\n </Text>\n <FlexView $flexDirection=\"row\" $justifyContent=\"center\">\n <CueCoins coins={rewardCoins} size=\"small\" />\n </FlexView>\n </BadgeCompleted>\n )}\n\n {state !== PUZZLE_CARD_STATE.COMPLETED && state !== PUZZLE_CARD_STATE.SKIPPED && (\n <CueCoinWrapper $flexDirection=\"row\" $justifyContent=\"center\" $width=\"100%\">\n <CueCoins coins={rewardCoins} size=\"medium\" />\n </CueCoinWrapper>\n )}\n </PuzzleCardOverView>\n );\n};\n\nexport default PuzzleCard;\n"],"names":["PuzzleCard","blockId","programId","puzzleNo","restPuzzleCardProps","sheetData","onCardClick","blockStatus","getPuzzleCardBlockStatus","rewardCoins","getRewardCoins","nodeType","title","state","PUZZLE_CARD_STATE","cardImage","PUZZLE_CARD_IMAGES","puzzleStatus","PUZZLE_CARD_STATE_BASED_COLOR","isLocked","handleOnClick","useCallback","jsxs","PuzzleCardOverView","jsx","HeaderText","ColoredLine","Text","StyledText","BadgeCompleted","FlexView","CueCoins","CueCoinWrapper"],"mappings":";;;;;;;;;AAuBM,MAAAA,IAA8B,CAAC,EAAE,SAAAC,GAAS,WAAAC,GAAW,UAAAC,GAAU,GAAGC,QAA0B;AAC1F,QAAA,EAAE,WAAAC,GAAW,aAAAC,EAAgB,IAAAF,GAE7BG,IAAcC,EAAyBH,CAAS,GAChDI,IAAcC,EAAeL,CAAS,GAEtC,EAAE,WAAWM,GAAU,OAAAC,EAAA,IAAUP,GACjCQ,IAASN,IAAyCO,EAAkBP,CAAW,IAAxDO,EAAkB,QACzCC,IACJC,EAAmBL,CAA2C,KAC9DK,EAAmB,aACfC,IAAeC,EAA8BL,CAAK,GAClDM,IAAWN,MAAUC,EAAkB,QAEvCM,IAAgBC,EAAY,MAAM;AACtC,QAAIF,EAAiB,QAAA;AAEjB,QAAA,OAAOb,KAAgB;AACnB,YAAA,IAAI,MAAM,+BAA+B;AAGjD,IAAAA,EAAYD,GAAW;AAAA,MAC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OAAOtB,GAAa,MAAK,QAAQ,CAAA,GAC7C;AAAA,QAAA,GACF;AAAA,QAGDI,MAAUC,EAAkB,aAAaD,MAAUC,EAAkB,WACpE,gBAAAU,EAACQ,KAAe,gBAAe,OAAM,iBAAgB,UAAS,QAAO,QACnE,UAAC,gBAAAR,EAAAO,GAAA,EAAS,OAAOtB,GAAa,MAAK,UAAS,EAC9C,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR;"}
1
+ {"version":3,"file":"puzzle-card.js","sources":["../../../../../src/features/chapters/lpar-milestone-chapter/puzzle-section/puzzle-card.tsx"],"sourcesContent":["import { useCallback, type FC } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport {\n PUZZLE_CARD_IMAGES,\n PUZZLE_CARD_STATE,\n PUZZLE_CARD_STATE_BASED_COLOR,\n} from '../../lpar-chapter/constants/puzzle-card';\nimport CueCoins from '../../lpar-chapter/puzzle-section/puzzle-card/cue-coins';\nimport {\n PuzzleCardOverView,\n HeaderText,\n ColoredLine,\n StyledText,\n BadgeCompleted,\n CueCoinWrapper,\n} from '../../lpar-chapter/puzzle-section/puzzle-card/puzzle-card-styled';\nimport { getRewardCoins } from '../../lpar-chapter/puzzle-section/puzzle-section-utils';\nimport { getPuzzleCardBlockStatus } from './puzzle-card-util';\nimport type { IPuzzleCard } from './puzzle-section-types';\n\nconst PuzzleCard: FC<IPuzzleCard> = ({ blockId, programId, puzzleNo, ...restPuzzleCardProps }) => {\n const { sheetData, onCardClick } = restPuzzleCardProps;\n\n const blockStatus = getPuzzleCardBlockStatus(sheetData);\n const rewardCoins = getRewardCoins(sheetData);\n\n const { node_type: nodeType, title } = sheetData;\n const state = !blockStatus ? PUZZLE_CARD_STATE.LOCKED : PUZZLE_CARD_STATE[blockStatus];\n const cardImage =\n PUZZLE_CARD_IMAGES[nodeType as keyof typeof PUZZLE_CARD_IMAGES] ??\n PUZZLE_CARD_IMAGES.PUZZLE_EASY;\n const puzzleStatus = PUZZLE_CARD_STATE_BASED_COLOR[state];\n const isLocked = state === PUZZLE_CARD_STATE.LOCKED;\n\n const handleOnClick = useCallback(() => {\n if (isLocked) return null;\n\n if (typeof onCardClick !== 'function') {\n throw new Error('onCardClick is not a function');\n }\n\n onCardClick(sheetData, {\n blockStatus: blockStatus,\n chapterName: puzzleNo,\n blockId,\n programId,\n });\n }, [blockId, blockStatus, onCardClick, programId, puzzleNo, sheetData, isLocked]);\n\n return (\n <PuzzleCardOverView\n $widthX={12.5}\n $heightX={17.125}\n $gutterX={1.5625}\n $gapX={1.5625}\n $bgImage={cardImage}\n $borderRadius={8}\n $opacity={state === PUZZLE_CARD_STATE.LOCKED ? 0.6 : 1}\n onClick={handleOnClick}\n $disable={isLocked}\n >\n <HeaderText\n $widthX={6.6875}\n $color={puzzleStatus?.textColor}\n $bgColor={puzzleStatus?.background}\n $renderAs=\"eyebrow2\"\n $align=\"center\"\n >\n {state}\n </HeaderText>\n\n <ColoredLine />\n\n <Text $renderAs=\"body3\" $color=\"WHITE\" $align=\"center\">\n Puzzle {puzzleNo}\n </Text>\n\n <StyledText\n $renderAs=\"body1Medium\"\n $completed={state === PUZZLE_CARD_STATE.COMPLETED}\n $color=\"WHITE\"\n $align=\"center\"\n >\n {title}\n </StyledText>\n\n {state === PUZZLE_CARD_STATE.COMPLETED && (\n <BadgeCompleted $justifyContent=\"center\">\n <Text $renderAs=\"cta3\" $color=\"BLUE_6\" $opacity={0.5} $align=\"center\">\n YOU EARNED\n </Text>\n <FlexView $flexDirection=\"row\" $justifyContent=\"center\">\n <CueCoins coins={rewardCoins} size=\"small\" />\n </FlexView>\n </BadgeCompleted>\n )}\n\n {state !== PUZZLE_CARD_STATE.COMPLETED && state !== PUZZLE_CARD_STATE.SKIPPED && (\n <CueCoinWrapper $flexDirection=\"row\" $justifyContent=\"center\" $width=\"100%\">\n <CueCoins coins={rewardCoins} size=\"medium\" />\n </CueCoinWrapper>\n )}\n </PuzzleCardOverView>\n );\n};\n\nexport default PuzzleCard;\n"],"names":["PuzzleCard","blockId","programId","puzzleNo","restPuzzleCardProps","sheetData","onCardClick","blockStatus","getPuzzleCardBlockStatus","rewardCoins","getRewardCoins","nodeType","title","state","PUZZLE_CARD_STATE","cardImage","PUZZLE_CARD_IMAGES","puzzleStatus","PUZZLE_CARD_STATE_BASED_COLOR","isLocked","handleOnClick","useCallback","jsxs","PuzzleCardOverView","jsx","HeaderText","ColoredLine","Text","StyledText","BadgeCompleted","FlexView","CueCoins","CueCoinWrapper"],"mappings":";;;;;;;;;AAsBM,MAAAA,IAA8B,CAAC,EAAE,SAAAC,GAAS,WAAAC,GAAW,UAAAC,GAAU,GAAGC,QAA0B;AAC1F,QAAA,EAAE,WAAAC,GAAW,aAAAC,EAAgB,IAAAF,GAE7BG,IAAcC,EAAyBH,CAAS,GAChDI,IAAcC,EAAeL,CAAS,GAEtC,EAAE,WAAWM,GAAU,OAAAC,EAAA,IAAUP,GACjCQ,IAASN,IAAyCO,EAAkBP,CAAW,IAAxDO,EAAkB,QACzCC,IACJC,EAAmBL,CAA2C,KAC9DK,EAAmB,aACfC,IAAeC,EAA8BL,CAAK,GAClDM,IAAWN,MAAUC,EAAkB,QAEvCM,IAAgBC,EAAY,MAAM;AACtC,QAAIF,EAAiB,QAAA;AAEjB,QAAA,OAAOb,KAAgB;AACnB,YAAA,IAAI,MAAM,+BAA+B;AAGjD,IAAAA,EAAYD,GAAW;AAAA,MACrB,aAAAE;AAAA,MACA,aAAaJ;AAAA,MACb,SAAAF;AAAA,MACA,WAAAC;AAAA,IAAA,CACD;AAAA,EAAA,GACA,CAACD,GAASM,GAAaD,GAAaJ,GAAWC,GAAUE,GAAWc,CAAQ,CAAC;AAG9E,SAAA,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAAS;AAAA,MACT,UAAU;AAAA,MACV,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAUR;AAAA,MACV,eAAe;AAAA,MACf,UAAUF,M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js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { memo, useMemo } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\nimport type { IBlockSectionsProps } from './block-sections-types';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings":";;;;;AAQA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,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C9B,gBAAM,EAAE,UAAUG,GAAS,YAAYD,MAAcF,GAG/CW,IAAwBT,MAAc,qBAAqB,CAACZ,GAE5DsB,IAAkBV,MAAc,eAAe,CAACX;AAEtD,iBAAIoB,MACqBrB,IAAA,KAGrBsB,MACoBrB,IAAA,KAItB,gBAAAQ;AAAA,YAACW;AAAA,YAAA;AAAA,cAEC,WAAAV;AAAA,cACA,UAAAjB;AAAA,cACA,UAAAD;AAAA,cACC,GAAGM;AAAA,cACJ,iBACEuB,IACI1B,IACA2B,IACE1B,IACA;AAAA,YAAA;AAAA,YAVHiB;AAAA,UAAA;AAAA,QAYP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
1
+ {"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\nimport type { IBlockSectionsProps } from './block-sections-types';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings":";;;;;AAOA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAR;AAEJ,MAAIS,IAAc,GACdC,IAAuB,IACvBC,IAAsB;AAEpB,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;AAAA,IACpC,MACEb,EAAO;AAAA,MACL,CAACc,GAAKC,OAEFA,EAAM,iBAAiBrB,KACvBqB,EAAM,iBAAiBpB,KACvBoB,EAAM,eAAexB,IAEjBuB,EAAA,WAAW,KAAKC,CAAK,IAErBD,EAAA,cAAc,KAAKC,CAAK,GAGvBD;AAAA,MAET,EAAE,YAAY,CAAA,GAAqB,eAAe,GAAoB;AAAA,IACxE;AAAA,IACF,CAACd,CAAM;AAAA,EAAA;AAIP,SAAA,gBAAAgB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,aAAcL,EAAc,SAAqB,YAAZ;AAAA,MAErC,UAAA;AAAA,QAAA,gBAAAM,EAAC,SAAI,KAAKf,GACP,YAAW,IAAI,CAACgB,GAAWC,MAAQ;AAClC,gBAAM,EAAE,YAAYC,GAAW,UAAUC,GAAS,aAAAC,GAAa,QAAAC,EAAW,IAAAL;AAC1E,cAAIM,IAAY;AAEV,gBAAAC,IAAcN,MAAQT,EAAW,SAAS,GAE1CgB,IAAaH,EAAO,KAAK,CAASI,MAAAA,EAAM,cAAc,KAAK;AAE7D,kBAAAP,MAAc7B,KAAQ6B,MAAc9B,OACjCgC,EAAY,gBACAf,KAAA,IAGLiB,IAAAjB,IAIZ,gBAAAU;AAAA,YAACW;AAAA,YAAA;AAAA,cACC,WAAAV;AAAA,cACA,UAAAjB;AAAA,cACA,aAAAwB;AAAA,cAEA,WAAAD;AAAA,cACA,UAAAxB;AAAA,cACA,aAAW;AAAA,cACV,GAAGM;AAAA,cACJ,iBAAiBoB,IAAarB,IAAuB;AAAA,YAAA;AAAA,YALhDgB;AAAA,UAAA;AAAA,QAQV,CAAA,GACH;AAAA,QAECV,EAAc,IAAI,CAAaO,MAAA;AAC9B,gBAAM,EAAE,UAAUG,GAAS,YAAYD,MAAcF,GAG/CW,IAAwBT,MAAc,qBAAqB,CAACZ,GAE5DsB,IAAkBV,MAAc,eAAe,CAACX;AAEtD,iBAAIoB,MACqBrB,IAAA,KAGrBsB,MACoBrB,IAAA,KAItB,gBAAAQ;AAAA,YAACW;AAAA,YAAA;AAAA,cAEC,WAAAV;AAAA,cACA,UAAAjB;AAAA,cACA,UAAAD;AAAA,cACC,GAAGM;AAAA,cACJ,iBACEuB,IACI1B,IACA2B,IACE1B,IACA;AAAA,YAAA;AAAA,YAVHiB;AAAA,UAAA;AAAA,QAYP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-banner.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { memo, useMemo, useRef } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport Text from '../../../ui/text/text';\nimport Tag from '../../comps/tag/tag';\nimport { getChapterCompletionPercentage } from '../../utils';\nimport * as Styled from './chapter-banner-styled';\nimport type { IChapterBannerProps } from './chapter-banner-types';\n\nconst PROGRESS_CIRCLE_RADIUS = 52;\nconst PROGRESS_CIRCLE_CENTER_X = 54;\nconst PROGRESS_CIRCLE_CENTER_Y = 54;\n\nconst sheetCompletedLottieSettings = {\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n rendererSettings: {\n dpr: window.devicePixelRatio || 1,\n // You might also consider preserveAspectRatio if the Lottie is being scaled\n preserveAspectRatio: 'xMidYMid slice', // Example\n },\n};\n\n// This component renders a banner for a chapter, displaying its title, progress, and associated tags.\n// It includes an image, progress visualization, and details about the chapter's core and supplementary sheets.\n// It calculates the completion percentage and dynamically positions an icon based on progress.\nconst ChapterBanner: FC<IChapterBannerProps> = memo(props => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const { progressStats, imageHue, title, imageUrl, bannerRef } = props;\n\n const completionPercentage = useMemo(() => {\n return getChapterCompletionPercentage(progressStats);\n }, [progressStats]);\n\n const { iconTopVal, iconLeftVal } = useMemo(() => {\n //* Calculate the position of the important icon based on the completion percentage\n //* Convert degrees to radians\n const angleInDegree = completionPercentage === 100 ? 60 : completionPercentage;\n\n const angleInRadian = ((-angleInDegree * 3.6 - 180) * Math.PI) / 180;\n const positionX = PROGRESS_CIRCLE_CENTER_Y + PROGRESS_CIRCLE_RADIUS * Math.sin(angleInRadian);\n const positionY = PROGRESS_CIRCLE_CENTER_X + PROGRESS_CIRCLE_RADIUS * Math.cos(angleInRadian);\n\n return {\n iconLeftVal: positionX,\n iconTopVal: positionY,\n };\n }, [completionPercentage]);\n\n if (!progressStats) return null;\n\n const { mandatory, optional, classwork: classWork } = progressStats;\n const { completed: completedMandatorySheets = 0, total: totalMandatorySheets = 0 } =\n mandatory || {};\n const { completed: completedOptionalSheets = 0, total: totalOptionalSheets = 0 } = optional || {};\n const { completed: completedClassWorkSheets = 0, total: totalClassWorkSheets = 0 } =\n classWork || {};\n const showClassWorkTag =\n totalClassWorkSheets > 0 && completedClassWorkSheets === totalClassWorkSheets;\n\n return (\n <Styled.BannerContainer\n $flexDirection=\"row\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={50}\n $background={`${imageHue}_4`}\n ref={bannerRef}\n >\n <FlexView $height={168} $position=\"relative\">\n <Image\n width=\"100%\"\n height=\"168px\"\n src={ILLUSTRATIONS.CHAPTER_HEADER_BG}\n alt=\"Chapter header background\"\n withLoader\n />\n <Styled.BannerImageWrapper>\n {completionPercentage === 100 ? (\n <Styled.LottieAnimationWrapper>\n <LottieAnimation\n src={LOTTIE.CHAPTER_COMPLETED}\n ref={animationRef}\n settings={sheetCompletedLottieSettings}\n />\n </Styled.LottieAnimationWrapper>\n ) : (\n <>\n <Styled.ChapterProgressSVG width=\"108px\" height=\"108px\">\n <Styled.ChapterProgressSVGCircle\n $progress={0}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={'BLACK'}\n $progress={3.3 * completionPercentage}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n </Styled.ChapterProgressSVG>\n\n {completionPercentage > 0 && (\n <Styled.StyledImportantIcon $progress $top={iconTopVal} $left={iconLeftVal} />\n )}\n </>\n )}\n\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n </Styled.BannerImageWrapper>\n <Styled.BannerTitleWrapper $flexGap={4}>\n <Text $renderAs=\"ah4-bold\">{title}</Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={2.75}>\n {!!totalMandatorySheets && (\n <FlexView $position=\"relative\" $flexDirection=\"row\">\n <Styled.StyledImportantIcon />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <Text $renderAs=\"ab2\">\n Core - {completedMandatorySheets}/{totalMandatorySheets}\n </Text>\n {showClassWorkTag && <Tag Icon={Check2Icon} label=\"CW\" />}\n </FlexView>\n </FlexView>\n )}\n {totalOptionalSheets > 0 && (\n <Text $renderAs=\"ab2\">\n Supplementary - {completedOptionalSheets}/{totalOptionalSheets}\n </Text>\n )}\n </FlexView>\n </Styled.BannerTitleWrapper>\n </FlexView>\n </Styled.BannerContainer>\n );\n});\n\nexport default ChapterBanner;\n"],"names":["PROGRESS_CIRCLE_RADIUS","PROGRESS_CIRCLE_CENTER_X","PROGRESS_CIRCLE_CENTER_Y","sheetCompletedLottieSettings","ChapterBanner","memo","props","animationRef","useRef","progressStats","imageHue","title","imageUrl","bannerRef","completionPercentage","useMemo","getChapterCompletionPercentage","iconTopVal","iconLeftVal","angleInRadian","positionX","positionY","mandatory","optional","classWork","completedMandatorySheets","totalMandatorySheets","completedOptionalSheets","totalOptionalSheets","completedClassWorkSheets","totalClassWorkSheets","showClassWorkTag","jsx","Styled.BannerContainer","jsxs","FlexView","Image","ILLUSTRATIONS","Styled.BannerImageWrapper","Styled.LottieAnimationWrapper","LottieAnimation","LOTTIE","Fragment","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.StyledImportantIcon","Styled.BannerImage","Styled.BannerTitleWrapper","Text","Tag","Check2Icon"],"mappings":";;;;;;;;;;;;AAgBA,MAAMA,IAAyB,IACzBC,IAA2B,IAC3BC,IAA2B,IAE3BC,IAA+B;AAAA,EACnC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,kBAAkB;AAAA,IAChB,KAAK,OAAO,oBAAoB;AAAA;AAAA,IAEhC,qBAAqB;AAAA;AAAA,EACvB;AACF,GAKMC,KAAyCC,EAAK,CAASC,MAAA;AACrD,Q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AC,gBAAAH,EAAAa,GAAA,EAA2B;AAAA,gCAC3BV,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC5D,UAAA;AAAA,gBAAC,gBAAAD,EAAAc,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,kBAAA;AAAA,kBACZvB;AAAA,kBAAyB;AAAA,kBAAEC;AAAA,gBAAA,GACrC;AAAA,gBACCK,KAAqB,gBAAAC,EAAAiB,GAAA,EAAI,MAAMC,GAAY,OAAM,MAAK;AAAA,cAAA,GACzD;AAAA,YAAA,GACF;AAAA,YAEDtB,IAAsB,KACpB,gBAAAM,EAAAc,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,cAAA;AAAA,cACHrB;AAAA,cAAwB;AAAA,cAAEC;AAAA,YAAA,GAC7C;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"chapter-banner.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.tsx"],"sourcesContent":["import { memo, useMemo, useRef, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport Text from '../../../ui/text/text';\nimport Tag from '../../comps/tag/tag';\nimport { getChapterCompletionPercentage } from '../../utils';\nimport * as Styled from './chapter-banner-styled';\nimport type { IChapterBannerProps } from './chapter-banner-types';\n\nconst PROGRESS_CIRCLE_RADIUS = 52;\nconst PROGRESS_CIRCLE_CENTER_X = 54;\nconst PROGRESS_CIRCLE_CENTER_Y = 54;\n\nconst sheetCompletedLottieSettings = {\n renderer: 'canvas',\n autoplay: true,\n loop: false,\n rendererSettings: {\n dpr: window.devicePixelRatio || 1,\n // You might also consider preserveAspectRatio if the Lottie is being scaled\n preserveAspectRatio: 'xMidYMid slice', // Example\n },\n};\n\n// This component renders a banner for a chapter, displaying its title, progress, and associated tags.\n// It includes an image, progress visualization, and details about the chapter's core and supplementary sheets.\n// It calculates the completion percentage and dynamically positions an icon based on progress.\nconst ChapterBanner: FC<IChapterBannerProps> = memo(props => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const { progressStats, imageHue, title, imageUrl, bannerRef } = props;\n\n const completionPercentage = useMemo(() => {\n return getChapterCompletionPercentage(progressStats);\n }, [progressStats]);\n\n const { iconTopVal, iconLeftVal } = useMemo(() => {\n //* Calculate the position of the important icon based on the completion percentage\n //* Convert degrees to radians\n const angleInDegree = completionPercentage === 100 ? 60 : completionPercentage;\n\n const angleInRadian = ((-angleInDegree * 3.6 - 180) * Math.PI) / 180;\n const positionX = PROGRESS_CIRCLE_CENTER_Y + PROGRESS_CIRCLE_RADIUS * Math.sin(angleInRadian);\n const positionY = PROGRESS_CIRCLE_CENTER_X + PROGRESS_CIRCLE_RADIUS * Math.cos(angleInRadian);\n\n return {\n iconLeftVal: positionX,\n iconTopVal: positionY,\n };\n }, [completionPercentage]);\n\n if (!progressStats) return null;\n\n const { mandatory, optional, classwork: classWork } = progressStats;\n const { completed: completedMandatorySheets = 0, total: totalMandatorySheets = 0 } =\n mandatory || {};\n const { completed: completedOptionalSheets = 0, total: totalOptionalSheets = 0 } = optional || {};\n const { completed: completedClassWorkSheets = 0, total: totalClassWorkSheets = 0 } =\n classWork || {};\n const showClassWorkTag =\n totalClassWorkSheets > 0 && completedClassWorkSheets === totalClassWorkSheets;\n\n return (\n <Styled.BannerContainer\n $flexDirection=\"row\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={50}\n $background={`${imageHue}_4`}\n ref={bannerRef}\n >\n <FlexView $height={168} $position=\"relative\">\n <Image\n width=\"100%\"\n height=\"168px\"\n src={ILLUSTRATIONS.CHAPTER_HEADER_BG}\n alt=\"Chapter header background\"\n withLoader\n />\n <Styled.BannerImageWrapper>\n {completionPercentage === 100 ? (\n <Styled.LottieAnimationWrapper>\n <LottieAnimation\n src={LOTTIE.CHAPTER_COMPLETED}\n ref={animationRef}\n settings={sheetCompletedLottieSettings}\n />\n </Styled.LottieAnimationWrapper>\n ) : (\n <>\n <Styled.ChapterProgressSVG width=\"108px\" height=\"108px\">\n <Styled.ChapterProgressSVGCircle\n $progress={0}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={'BLACK'}\n $progress={3.3 * completionPercentage}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n </Styled.ChapterProgressSVG>\n\n {completionPercentage > 0 && (\n <Styled.StyledImportantIcon $progress $top={iconTopVal} $left={iconLeftVal} />\n )}\n </>\n )}\n\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n </Styled.BannerImageWrapper>\n <Styled.BannerTitleWrapper $flexGap={4}>\n <Text $renderAs=\"ah4-bold\">{title}</Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={2.75}>\n {!!totalMandatorySheets && (\n <FlexView $position=\"relative\" $flexDirection=\"row\">\n <Styled.StyledImportantIcon />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <Text $renderAs=\"ab2\">\n Core - {completedMandatorySheets}/{totalMandatorySheets}\n </Text>\n {showClassWorkTag && <Tag Icon={Check2Icon} label=\"CW\" />}\n </FlexView>\n </FlexView>\n )}\n {totalOptionalSheets > 0 && (\n <Text $renderAs=\"ab2\">\n Supplementary - {completedOptionalSheets}/{totalOptionalSheets}\n </Text>\n )}\n </FlexView>\n </Styled.BannerTitleWrapper>\n </FlexView>\n </Styled.BannerContainer>\n );\n});\n\nexport default ChapterBanner;\n"],"names":["PROGRESS_CIRCLE_RADIUS","PROGRESS_CIRCLE_CENTER_X","PROGRESS_CIRCLE_CENTER_Y","sheetCompletedLottieSettings","ChapterBanner","memo","props","animationRef","useRef","progressStats","imageHue","title","imageUrl","bannerRef","completionPercentage","useMemo","getChapterCompletionPercentage","iconTopVal","iconLeftVal","angleInRadian","positionX","positionY","mandatory","optional","classWork","completedMandatorySheets","totalMandatorySheets","completedOptionalSheets","totalOptionalSheets","completedClassWorkSheets","totalClassWorkSheets","showClassWorkTag","jsx","Styled.BannerContainer","jsxs","FlexView","Image","ILLUSTRATIONS","Styled.BannerImageWrapper","Styled.LottieAnimationWrapper","LottieAnimation","LOTTIE","Fragment","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.StyledImportantIcon","Styled.BannerImage","Styled.BannerTitleWrapper","Text","Tag","Check2Icon"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAyB,IACzBC,IAA2B,IAC3BC,IAA2B,IAE3BC,IAA+B;AAAA,EACnC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,MAAM;AAAA,EACN,kBAAkB;AAAA,IAChB,KAAK,OAAO,oBAAoB;AAAA;AAAA,IAEhC,qBAAqB;AAAA;AAAA,EACvB;AACF,GAKMC,KAAyCC,EAAK,CAASC,MAAA;AACrD,QAAAC,IAAeC,EAAmC,IAAI,GAEtD,EAAE,eAAAC,GAAe,UAAAC,GAAU,OAAAC,GAAO,UAAAC,GAAU,WAAAC,EAAc,IAAAP,GAE1DQ,IAAuBC,EAAQ,MAC5BC,EAA+BP,CAAa,GAClD,CAACA,CAAa,CAAC,GAEZ,EAAE,YAAAQ,GAAY,aAAAC,EAAY,IAAIH,EAAQ,MAAM;AAKhD,UAAMI,KAAkB,EAFFL,MAAyB,MAAM,KAAKA,KAEjB,MAAM,OAAO,KAAK,KAAM,KAC3DM,IAAYl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A,GACF;AAAA,YAEDtB,IAAsB,KACpB,gBAAAM,EAAAc,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,cAAA;AAAA,cACHrB;AAAA,cAAwB;AAAA,cAAEC;AAAA,YAAA,GAC7C;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useDownloadBlockJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-block-journey';\nimport { useDownloadNodeJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-node-journey';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport { getHasDownloadBlock, getHasNonDownloadBlockWithPdfNode } from '../utils';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\nimport type { IChapterDetails } from './chapter-details-types';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n } = props;\n\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n const { blockSectionRef: challengeBlockRef, startJourney: startChallengeArenaJourney } =\n useChallengeArenaJourney();\n\n const {\n blockSectionRef: downloadBlockRef,\n downloadCoreBlockRef,\n startJourney: startDownloadNodeJourney,\n } = useDownloadNodeJourney();\n\n const { blockSectionRef: downloadBlockSectionRef, startJourney: startDownloadBlockJourney } =\n useDownloadBlockJourney();\n\n const hasDownloadBlock = useMemo(\n () => chapterDetails && getHasDownloadBlock(chapterDetails.blocks),\n [chapterDetails],\n );\n const hasNonDownloadBlockWithPdfNode = useMemo(\n () => chapterDetails && getHasNonDownloadBlockWithPdfNode(chapterDetails.blocks),\n [chapterDetails],\n );\n\n const activeDownloadBlockRef = useMemo(\n () =>\n canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode\n ? downloadBlockRef\n : canStartDownloadBlockJourney\n ? downloadBlockSectionRef\n : undefined,\n [\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n hasNonDownloadBlockWithPdfNode,\n downloadBlockRef,\n downloadBlockSectionRef,\n ],\n );\n\n useEffect(() => {\n if (chapterDetails && !isJourneyActive) {\n if (canStartJourney && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (!canStartJourney && canStartChallengeArenaJourney) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n\n if (!canStartJourney && canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode) {\n startDownloadNodeJourney({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n });\n }\n\n if (!canStartJourney && canStartDownloadBlockJourney && hasDownloadBlock) {\n startDownloadBlockJourney({\n chapterDetails,\n userType,\n });\n }\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n startDownloadBlockJourney,\n startDownloadNodeJourney,\n studentId,\n userChapterId,\n userType,\n hasNonDownloadBlockWithPdfNode,\n hasDownloadBlock,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n challengeBlockRef={challengeBlockRef}\n downloadCoreBlockRef={downloadCoreBlockRef}\n downloadBlockRef={activeDownloadBlockRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","startChapterPageJourney","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","canStartDownloadNodeJourney","canStartDownloadBlockJourney","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","challengeBlockRef","startChallengeArenaJourney","useChallengeArenaJourney","downloadBlockRef","downloadCoreBlockRef","startDownloadNodeJourney","useDownloadNodeJourney","downloadBlockSectionRef","startDownloadBlockJourney","useDownloadBlockJourney","hasDownloadBlock","useMemo","getHasDownloadBlock","hasNonDownloadBlockWithPdfNode","getHasNonDownloadBlockWithPdfNode","activeDownloadBlockRef","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;;;;;AAqBA,MAAMA,KAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,+BAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,8BAAAC;AAAA,EACE,IAAAvB,GAEE,EAAE,iBAAAwB,MAAoBC,KACtB;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,GAAqB,GAEnBC,IAAsBC,EAAY,MAAM;AAC5C,IAAAP,EAAkBzB,GAAe,QAAW,EAAE,WAAAC,EAAW,CAAA;AAAA,EACxD,GAAA,CAACwB,GAAmBzB,GAAeC,CAAS,CAAC;AAEhD,EAAAgC,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC;AAExB,QAAM,EAAE,iBAAiBG,GAAmB,cAAcC,EAAA,IACxDC,KAEI;AAAA,IACJ,iBAAiBC;AAAA,IACjB,sBAAAC;AAAA,IACA,cAAcC;AAAA,MACZC,EAAuB,GAErB,E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AAAT;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAmC;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,UAAUvC,EAAe;AAAA,cACzB,UAAAxB;AAAA,cACA,QAAQwB,EAAe;AAAA,cACvB,mBAAAvB;AAAA,cACA,eAAAC;AAAA,cACA,wBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAS;AAAA,cACA,mBAAAgB;AAAA,cACA,sBAAAI;AAAA,cACA,kBAAkBW;AAAA,cAClB,gBAAAtC;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,cAAAE;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDmD,KAAerE;"}
1
+ {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useDownloadBlockJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-block-journey';\nimport { useDownloadNodeJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-node-journey';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport { getHasDownloadBlock, getHasNonDownloadBlockWithPdfNode } from '../utils';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\nimport type { IChapterDetails } from './chapter-details-types';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n } = props;\n\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n const { blockSectionRef: challengeBlockRef, startJourney: startChallengeArenaJourney } =\n useChallengeArenaJourney();\n\n const {\n blockSectionRef: downloadBlockRef,\n downloadCoreBlockRef,\n startJourney: startDownloadNodeJourney,\n } = useDownloadNodeJourney();\n\n const { blockSectionRef: downloadBlockSectionRef, startJourney: startDownloadBlockJourney } =\n useDownloadBlockJourney();\n\n const hasDownloadBlock = useMemo(\n () => chapterDetails && getHasDownloadBlock(chapterDetails.blocks),\n [chapterDetails],\n );\n const hasNonDownloadBlockWithPdfNode = useMemo(\n () => chapterDetails && getHasNonDownloadBlockWithPdfNode(chapterDetails.blocks),\n [chapterDetails],\n );\n\n const activeDownloadBlockRef = useMemo(\n () =>\n canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode\n ? downloadBlockRef\n : canStartDownloadBlockJourney\n ? downloadBlockSectionRef\n : undefined,\n [\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n hasNonDownloadBlockWithPdfNode,\n downloadBlockRef,\n downloadBlockSectionRef,\n ],\n );\n\n useEffect(() => {\n if (chapterDetails && !isJourneyActive) {\n if (canStartJourney && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (!canStartJourney && canStartChallengeArenaJourney) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n\n if (!canStartJourney && canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode) {\n startDownloadNodeJourney({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n });\n }\n\n if (!canStartJourney && canStartDownloadBlockJourney && hasDownloadBlock) {\n startDownloadBlockJourney({\n chapterDetails,\n userType,\n });\n }\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n startDownloadBlockJourney,\n startDownloadNodeJourney,\n studentId,\n userChapterId,\n userType,\n hasNonDownloadBlockWithPdfNode,\n hasDownloadBlock,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n challengeBlockRef={challengeBlockRef}\n downloadCoreBlockRef={downloadCoreBlockRef}\n downloadBlockRef={activeDownloadBlockRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","startChapterPageJourney","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","canStartDownloadNodeJourney","canStartDownloadBlockJourney","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","challengeBlockRef","startChallengeArenaJourney","useChallengeArenaJourney","downloadBlockRef","downloadCoreBlockRef","startDownloadNodeJourney","useDownloadNodeJourney","downloadBlockSectionRef","startDownloadBlockJourney","useDownloadBlockJourney","hasDownloadBlock","useMemo","getHasDownloadBlock","hasNonDownloadBlockWithPdfNode","getHasNonDownloadBlockWithPdfNode","activeDownloadBlockRef","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,MAAMA,KAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,+BAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,8BAAAC;AAAA,EACE,IAAAvB,GAEE,EAAE,iBAAAwB,MAAoBC,KACtB;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,GAAqB,GAEnBC,IAAsBC,EAAY,MAAM;AAC5C,IAAAP,EAAkBzB,GAAe,QAAW,EAAE,WAAAC,EAAW,CAAA;AA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Ac,UAAU,KAAI,SAAA,CAAS,EACjD,CAAA;AAAA,QAGDpC,KAEG,gBAAAwB,EAAAa,GAAA,EAAA,UAAA;AAAA,UAAA,gBAAAX;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,OAAOtC,EAAe;AAAA,cACtB,UAAUA,EAAe;AAAA,cACzB,UAAUA,EAAe;AAAA,cACzB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,cAC/B,WAAAT;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAmC;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,UAAUvC,EAAe;AAAA,cACzB,UAAAxB;AAAA,cACA,QAAQwB,EAAe;AAAA,cACvB,mBAAAvB;AAAA,cACA,eAAAC;AAAA,cACA,wBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAS;AAAA,cACA,mBAAAgB;AAAA,cACA,sBAAAI;AAAA,cACA,kBAAkBW;AAAA,cAClB,gBAAAtC;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,cAAAE;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDmD,KAAerE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\nimport type { INodeCardTagsProps } from './node-card-types';\n\nconst dynamicNodeTypes = [\n 'DYNAMIC',\n 'ASSESSMENT',\n 'CHAPTER_ASSESSMENT',\n 'TURING_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_ASSESSMENT',\n];\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType, dueDateTs, isStudent, isMilestone } = props;\n\n const isDynamicNode = dynamicNodeTypes.includes(nodeType);\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const {\n icon: NodeTagIcon,\n top,\n right,\n } = getNodeStateBasedTagInfo(state, !!isStudent, accuracyValue, dueDateTs, isMilestone);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["dynamicNodeTypes","NodeCardTags","memo","props","state","accuracy","nodeType","dueDateTs","isStudent","isMilestone","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAOA,MAAMA,IAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEMC,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,aAAAC,EAAgB,IAAAN,GAGnEO,IADgBV,EAAiB,SAASM,CAAQ,IAClBD,IAAW,QAE3C;AAAA,IACJ,MAAMM;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACEC,EAAyBV,GAAO,CAAC,CAACI,GAAWE,GAAeH,GAAWE,CAAW;AAGpF,SAAA,gBAAAM,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\nimport type { INodeCardTagsProps } from './node-card-types';\n\nconst dynamicNodeTypes = [\n 'DYNAMIC',\n 'ASSESSMENT',\n 'CHAPTER_ASSESSMENT',\n 'TURING_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_ASSESSMENT',\n];\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType, dueDateTs, isStudent, isMilestone } = props;\n\n const isDynamicNode = dynamicNodeTypes.includes(nodeType);\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const {\n icon: NodeTagIcon,\n top,\n right,\n } = getNodeStateBasedTagInfo(state, !!isStudent, accuracyValue, dueDateTs, isMilestone);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["dynamicNodeTypes","NodeCardTags","memo","props","state","accuracy","nodeType","dueDateTs","isStudent","isMilestone","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAMA,MAAMA,IAAmB;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEMC,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,aAAAC,EAAgB,IAAAN,GAGnEO,IADgBV,EAAiB,SAASM,CAAQ,IAClBD,IAAW,QAE3C;AAAA,IACJ,MAAMM;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACEC,EAAyBV,GAAO,CAAC,CAACI,GAAWE,GAAeH,GAAWE,CAAW;AAGpF,SAAA,gBAAAM,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
@@ -1 +1 @@
1
- {"version":3,"file":"node-card.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card.tsx"],"sourcesContent":["import type { FC } from 'react';\nimport { memo } from 'react';\n\nimport type { INodeCardProps } from './node-card-types';\nimport StudentActions from './student-actions/student-actions';\nimport TeacherActions from './teacher-actions/teacher-actions';\n\nconst NodeCard: FC<INodeCardProps> = memo(props => {\n const { userType } = props;\n const isStudent = userType === 'STUDENT';\n\n if (isStudent) {\n return <StudentActions {...props} isStudent />;\n }\n\n return <TeacherActions {...props} />;\n});\n\nexport default NodeCard;\n"],"names":["NodeCard","memo","props","userType","jsx","StudentActions","TeacherActions"],"mappings":";;;;AAOM,MAAAA,IAA+BC,EAAK,CAASC,MAAA;AAC3C,QAAA,EAAE,UAAAC,EAAa,IAAAD;AAGrB,SAFkBC,MAAa,YAGrB,gBAAAC,EAAAC,GAAA,EAAgB,GAAGH,GAAO,WAAS,GAAC,CAAA,IAGvC,gBAAAE,EAACE,GAAgB,EAAA,GAAGJ,EAAO,CAAA;AACpC,CAAC;"}
1
+ {"version":3,"file":"node-card.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport type { INodeCardProps } from './node-card-types';\nimport StudentActions from './student-actions/student-actions';\nimport TeacherActions from './teacher-actions/teacher-actions';\n\nconst NodeCard: FC<INodeCardProps> = memo(props => {\n const { userType } = props;\n const isStudent = userType === 'STUDENT';\n\n if (isStudent) {\n return <StudentActions {...props} isStudent />;\n }\n\n return <TeacherActions {...props} />;\n});\n\nexport default NodeCard;\n"],"names":["NodeCard","memo","props","userType","jsx","StudentActions","TeacherActions"],"mappings":";;;;AAMM,MAAAA,IAA+BC,EAAK,CAASC,MAAA;AAC3C,QAAA,EAAE,UAAAC,EAAa,IAAAD;AAGrB,SAFkBC,MAAa,YAGrB,gBAAAC,EAAAC,GAAA,EAAgB,GAAGH,GAAO,WAAS,GAAC,CAAA,IAGvC,gBAAAE,EAACE,GAAgB,EAAA,GAAGJ,EAAO,CAAA;AACpC,CAAC;"}