@cuemath/leap 2.9.7 → 2.9.8-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 (284) hide show
  1. package/dist/assets/illustrations/illustrations.js +9 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/alarm.js +41 -0
  4. package/dist/assets/line-icons/icons/alarm.js.map +1 -0
  5. package/dist/assets/line-icons/icons/bin2.js +7 -8
  6. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  7. package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
  8. package/dist/assets/line-icons/icons/dart.js +23 -0
  9. package/dist/assets/line-icons/icons/dart.js.map +1 -0
  10. package/dist/assets/line-icons/icons/exclamation.js +26 -0
  11. package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
  12. package/dist/assets/line-icons/icons/home2.js +25 -0
  13. package/dist/assets/line-icons/icons/home2.js.map +1 -0
  14. package/dist/assets/line-icons/icons/important.js +23 -0
  15. package/dist/assets/line-icons/icons/important.js.map +1 -0
  16. package/dist/assets/line-icons/icons/puzzle.js +25 -0
  17. package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
  18. package/dist/assets/line-icons/icons/recap.js +32 -0
  19. package/dist/assets/line-icons/icons/recap.js.map +1 -0
  20. package/dist/assets/line-icons/icons/skip-colored.js +43 -0
  21. package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
  22. package/dist/assets/line-icons/icons/status.js +41 -0
  23. package/dist/assets/line-icons/icons/status.js.map +1 -0
  24. package/dist/assets/line-icons/icons/testtube.js +33 -0
  25. package/dist/assets/line-icons/icons/testtube.js.map +1 -0
  26. package/dist/assets/lottie/lottie.js +9 -1
  27. package/dist/assets/lottie/lottie.js.map +1 -1
  28. package/dist/constants/api.js +3 -2
  29. package/dist/constants/api.js.map +1 -1
  30. package/dist/features/analytics-events/platform-events-student.js +3 -3
  31. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  32. package/dist/features/analytics-events/whitelist-events.js +13 -11
  33. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  34. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
  35. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  36. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
  37. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  38. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  39. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  40. package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
  41. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  42. package/dist/features/chapters-v2/api/chapter.js +10 -0
  43. package/dist/features/chapters-v2/api/chapter.js.map +1 -0
  44. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
  45. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
  46. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +35 -0
  47. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
  48. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +83 -0
  49. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
  50. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
  51. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
  52. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +98 -0
  53. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
  54. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +51 -0
  55. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
  56. package/dist/features/chapters-v2/chapter-details/chapter-details.js +129 -0
  57. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
  58. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
  59. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
  60. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +159 -0
  61. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
  62. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
  63. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
  64. package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
  65. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
  66. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +30 -0
  67. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +1 -0
  68. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
  69. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
  70. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +9 -0
  71. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
  72. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +189 -0
  73. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
  74. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +194 -0
  75. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
  76. package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
  77. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
  78. package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
  79. package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
  80. package/dist/features/chapters-v2/constants/block-constants.js +20 -0
  81. package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
  82. package/dist/features/chapters-v2/constants/node-constants.js +14 -0
  83. package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
  84. package/dist/features/chapters-v2/utils/index.js +38 -0
  85. package/dist/features/chapters-v2/utils/index.js.map +1 -0
  86. package/dist/features/chapters-v2/utils/node-card-utils.js +177 -0
  87. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
  88. package/dist/features/communication/pub-sub/constants.js +12 -6
  89. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  90. package/dist/features/homework/card-menu-option.js +28 -0
  91. package/dist/features/homework/card-menu-option.js.map +1 -0
  92. package/dist/features/homework/card-menu-options.js +22 -0
  93. package/dist/features/homework/card-menu-options.js.map +1 -0
  94. package/dist/features/homework/card-title.js +16 -0
  95. package/dist/features/homework/card-title.js.map +1 -0
  96. package/dist/features/homework/homework-analytics-events.js +10 -0
  97. package/dist/features/homework/homework-analytics-events.js.map +1 -0
  98. package/dist/features/homework/homework-card-view.js +143 -0
  99. package/dist/features/homework/homework-card-view.js.map +1 -0
  100. package/dist/features/homework/homework-card.js +245 -0
  101. package/dist/features/homework/homework-card.js.map +1 -0
  102. package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
  103. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
  104. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +63 -0
  105. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
  106. package/dist/features/homework/hw-card-list/hw-card-list.js +191 -0
  107. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
  108. package/dist/features/homework/node-progress.js +29 -0
  109. package/dist/features/homework/node-progress.js.map +1 -0
  110. package/dist/features/homework/styles.js +130 -0
  111. package/dist/features/homework/styles.js.map +1 -0
  112. package/dist/features/homework/utils.js +48 -0
  113. package/dist/features/homework/utils.js.map +1 -0
  114. package/dist/features/journey/comps/coachmark/coachmark-styled.js +12 -5
  115. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  116. package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
  117. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  118. package/dist/features/journey/hooks/use-chapter-journey.js +194 -0
  119. package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -0
  120. package/dist/features/journey/hooks/use-home-page-journey.js +189 -0
  121. package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -0
  122. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  123. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  124. package/dist/features/journey/journey-id/journey-id-teacher.js +5 -0
  125. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -0
  126. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +587 -0
  127. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -0
  128. package/dist/features/journey/use-journey/journey-context-provider.js +36 -28
  129. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  130. package/dist/features/journey/use-journey/journey-styled.js +10 -5
  131. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  132. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  133. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  134. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
  135. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  136. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
  137. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  138. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
  139. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  140. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
  141. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  142. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
  143. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  144. package/dist/features/milestone/create/milestone-create.js +49 -43
  145. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  146. package/dist/features/milestone/create/utils/index.js +33 -38
  147. package/dist/features/milestone/create/utils/index.js.map +1 -1
  148. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  149. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  150. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  151. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  152. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
  153. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  154. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
  155. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  156. package/dist/features/milestone/edit/goal-edit-container.js +64 -62
  157. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  158. package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
  159. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  160. package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
  161. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  162. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  163. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  164. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
  165. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  166. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  167. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  168. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +138 -105
  169. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  170. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
  171. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  172. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +157 -176
  173. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  174. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
  175. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  176. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
  177. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  178. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
  179. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  180. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
  181. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  182. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
  183. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  184. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
  185. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  186. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +17 -25
  187. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  188. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
  189. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  190. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +110 -113
  191. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  192. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
  193. package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
  194. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  195. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  196. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  197. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  198. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +116 -113
  199. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  200. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
  201. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
  202. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
  203. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
  204. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +87 -0
  205. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
  206. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
  207. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
  208. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +46 -50
  209. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  210. package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
  211. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
  212. package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
  213. package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
  214. package/dist/features/recent-chapters/recent-chapters.js +39 -0
  215. package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
  216. package/dist/features/sheet-v2/resource-list/resource-list.js +45 -0
  217. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
  218. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  219. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  220. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
  221. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  222. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
  223. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  224. package/dist/features/ui/constants/z-index.js +1 -1
  225. package/dist/features/ui/constants/z-index.js.map +1 -1
  226. package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
  227. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  228. package/dist/features/ui/context-menu/context-menu.js +30 -15
  229. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  230. package/dist/features/ui/lottie-animation/lottie-animation.js +19 -13
  231. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  232. package/dist/features/ui/theme/button.js +22 -107
  233. package/dist/features/ui/theme/button.js.map +1 -1
  234. package/dist/index.d.ts +356 -34
  235. package/dist/index.js +503 -471
  236. package/dist/index.js.map +1 -1
  237. package/dist/node_modules/date-fns/differenceInDays.js +17 -0
  238. package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
  239. package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
  240. package/dist/static/competitive-arena.b9c40801.json +1 -0
  241. package/dist/static/learn.71b13323.json +1 -0
  242. package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
  243. package/dist/static/node-learn-bg.b61f815c.svg +1 -0
  244. package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
  245. package/dist/static/node-project-bg.e6a33e28.svg +1 -0
  246. package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
  247. package/dist/static/node-recap-bg.546154e4.svg +1 -0
  248. package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
  249. package/dist/static/node-video-bg.3df3f73a.svg +1 -0
  250. package/dist/static/practice.158dd488.json +1 -0
  251. package/dist/static/project.eb665827.json +1 -0
  252. package/dist/static/puzzle.b298c7e4.json +1 -0
  253. package/dist/static/recap.0dd2c1e2.json +1 -0
  254. package/dist/static/test.803d6036.json +1 -0
  255. package/dist/static/video.b41451e2.json +1 -0
  256. package/package.json +1 -1
  257. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
  258. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
  259. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
  260. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
  261. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
  262. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
  263. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
  264. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
  265. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
  266. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
  267. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
  268. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
  269. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
  270. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
  271. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
  272. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
  273. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
  274. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
  275. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
  276. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
  277. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
  278. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
  279. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
  280. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
  281. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
  282. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
  283. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
  284. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
@@ -0,0 +1,98 @@
1
+ import { jsx as e, jsxs as r } from "react/jsx-runtime";
2
+ import { memo as D, useMemo as d } from "react";
3
+ import { ILLUSTRATIONS as b } from "../../../../assets/illustrations/illustrations.js";
4
+ import g from "../../../../assets/line-icons/icons/check2.js";
5
+ import V from "../../../ui/image/image.js";
6
+ import n from "../../../ui/layout/flex-view.js";
7
+ import i from "../../../ui/text/text.js";
8
+ import C from "../../comps/tag/tag.js";
9
+ import { getChapterCompletionPercentage as W } from "../../utils/index.js";
10
+ import { BannerContainer as M, BannerImageWrapper as O, BannerImage as X, ChapterProgressSVG as j, ChapterProgressSVGCircle as $, StyledImportantIcon as f, StyledCheckIcon as H, BannerTitleWrapper as N } from "./chapter-banner-styled.js";
11
+ const a = 52, l = 54, c = 54, re = D((I) => {
12
+ const { progressStats: o, imageHue: S, title: x, imageUrl: R, bannerRef: u } = I, t = d(() => W(o), [o]), { iconTopVal: E, iconLeftVal: w } = d(() => {
13
+ const h = (-(t === 100 ? 60 : t) * 3.6 - 180) * Math.PI / 180, A = c + a * Math.sin(h), B = l + a * Math.cos(h);
14
+ return {
15
+ iconLeftVal: A,
16
+ iconTopVal: B
17
+ };
18
+ }, [t]);
19
+ if (!o) return null;
20
+ const { mandatory: T, optional: _, classwork: k } = o, { completed: y = 0, total: s = 0 } = T || {}, { completed: G = 0, total: p = 0 } = _ || {}, { completed: L = 0, total: m = 0 } = k || {}, P = m > 0 && L === m;
21
+ return /* @__PURE__ */ e(
22
+ M,
23
+ {
24
+ $flexDirection: "row",
25
+ $justifyContent: "center",
26
+ $alignItems: "center",
27
+ $widthX: 50,
28
+ $background: `${S}_4`,
29
+ ref: u,
30
+ children: /* @__PURE__ */ r(n, { $height: 168, $position: "relative", children: [
31
+ /* @__PURE__ */ e(
32
+ V,
33
+ {
34
+ width: "100%",
35
+ height: "168px",
36
+ src: b.CHAPTER_HEADER_BG,
37
+ alt: "Chapter header background",
38
+ withLoader: !0
39
+ }
40
+ ),
41
+ /* @__PURE__ */ r(O, { children: [
42
+ /* @__PURE__ */ e(X, { src: R, alt: "Chapter image" }),
43
+ /* @__PURE__ */ r(j, { width: "108px", height: "108px", children: [
44
+ /* @__PURE__ */ e(
45
+ $,
46
+ {
47
+ $progress: 0,
48
+ r: a,
49
+ cx: l,
50
+ cy: c
51
+ }
52
+ ),
53
+ /* @__PURE__ */ e(
54
+ $,
55
+ {
56
+ $progressCircle: !0,
57
+ $progressBackground: "BLACK",
58
+ $progress: 3.3 * t,
59
+ r: a,
60
+ cx: l,
61
+ cy: c
62
+ }
63
+ )
64
+ ] }),
65
+ t > 0 && /* @__PURE__ */ e(f, { $progress: !0, $top: E, $left: w }),
66
+ t === 100 && /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(C, { Icon: g }) })
67
+ ] }),
68
+ /* @__PURE__ */ r(N, { $flexGap: 4, children: [
69
+ /* @__PURE__ */ e(i, { $renderAs: "ah4-bold", children: x }),
70
+ /* @__PURE__ */ r(n, { $flexDirection: "row", $alignItems: "center", $flexGapX: 2.75, children: [
71
+ !!s && /* @__PURE__ */ r(n, { $position: "relative", $flexDirection: "row", children: [
72
+ /* @__PURE__ */ e(f, {}),
73
+ /* @__PURE__ */ r(n, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
74
+ /* @__PURE__ */ r(i, { $renderAs: "ab2", children: [
75
+ "Core - ",
76
+ y,
77
+ "/",
78
+ s
79
+ ] }),
80
+ P && /* @__PURE__ */ e(C, { Icon: g, label: "CW" })
81
+ ] })
82
+ ] }),
83
+ p > 0 && /* @__PURE__ */ r(i, { $renderAs: "ab2", children: [
84
+ "Supplementary - ",
85
+ G,
86
+ "/",
87
+ p
88
+ ] })
89
+ ] })
90
+ ] })
91
+ ] })
92
+ }
93
+ );
94
+ });
95
+ export {
96
+ re as default
97
+ };
98
+ //# sourceMappingURL=chapter-banner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chapter-banner.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.tsx"],"sourcesContent":["import type { IChapterBannerProps } from './chapter-banner-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport Tag from '../../comps/tag/tag';\nimport { getChapterCompletionPercentage } from '../../utils';\nimport * as Styled from './chapter-banner-styled';\n\nconst PROGRESS_CIRCLE_RADIUS = 52;\nconst PROGRESS_CIRCLE_CENTER_X = 54;\nconst PROGRESS_CIRCLE_CENTER_Y = 54;\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 { 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 <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\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 {completionPercentage === 100 && (\n <Styled.StyledCheckIcon>\n <Tag Icon={Check2Icon} />\n </Styled.StyledCheckIcon>\n )}\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","ChapterBanner","memo","props","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.BannerImage","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.StyledImportantIcon","Styled.StyledCheckIcon","Tag","Check2Icon","Styled.BannerTitleWrapper","Text"],"mappings":"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"}
@@ -0,0 +1,51 @@
1
+ import o from "styled-components";
2
+ import r from "../../ui/layout/flex-view.js";
3
+ const a = o.div(({ theme: t }) => `
4
+ height: 100%;
5
+ position: absolute;
6
+ left: 0;
7
+ right: 0;
8
+ top: 0;
9
+ bottom: 0;
10
+ background: rgba(204, 204, 204, 0.25);
11
+ z-index: 2;
12
+
13
+ & * {
14
+ pointer-events: none;
15
+ }
16
+
17
+ & img {
18
+ top: 50%;
19
+ position: absolute;
20
+ left: 50%;
21
+ transform: translate(-50%, -50%);
22
+ width: ${t.layout.gutter * 5}px;
23
+ height: ${t.layout.gutter * 5}px;
24
+ filter: brightness(0);
25
+ }
26
+ `), p = o(r)(
27
+ ({ $disablePointerEvents: t, theme: e }) => `
28
+ position: relative;
29
+ margin: 0 auto;
30
+ pointer-events: ${t ? "none" : "auto"};
31
+ border: 1px solid ${e.colors.WHITE_5};
32
+ border-top: none;
33
+ `
34
+ ), s = o(r)`
35
+ position: absolute;
36
+ top: 0;
37
+ left: 0;
38
+ z-index: 6;
39
+ `, l = o(r)(({ theme: t }) => `
40
+ position: sticky;
41
+ top: ${t.layout.gutter}px;
42
+ transform: translateX(${t.layout.gutter}px);
43
+ z-index: 6;
44
+ `);
45
+ export {
46
+ s as BackButtonContainer,
47
+ l as BackButtonWrapper,
48
+ p as ContentWrapper,
49
+ a as LoaderWrapper
50
+ };
51
+ //# sourceMappingURL=chapter-details-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chapter-details-styled.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nconst LoaderWrapper = styled.div(({ theme }) => {\n return `\n height: 100%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(204, 204, 204, 0.25);\n z-index: 2;\n\n & * {\n pointer-events: none;\n }\n\n & img {\n top: 50%;\n position: absolute;\n left: 50%;\n transform: translate(-50%, -50%);\n width: ${theme.layout.gutter * 5}px;\n height: ${theme.layout.gutter * 5}px;\n filter: brightness(0);\n }\n `;\n});\n\nconst ContentWrapper = styled(FlexView)<{ $disablePointerEvents: boolean }>(\n ({ $disablePointerEvents, theme }) => `\n position: relative;\n margin: 0 auto;\n pointer-events: ${$disablePointerEvents ? 'none' : 'auto'};\n border: 1px solid ${theme.colors.WHITE_5};\n border-top: none;\n `,\n);\n\nconst BackButtonContainer = styled(FlexView)`\n position: absolute;\n top: 0;\n left: 0;\n z-index: 6;\n`;\n\nconst BackButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: ${theme.layout.gutter}px;\n transform: translateX(${theme.layout.gutter}px);\n z-index: 6;\n `;\n});\n\nexport { ContentWrapper, LoaderWrapper, BackButtonContainer, BackButtonWrapper };\n"],"names":["LoaderWrapper","styled","theme","ContentWrapper","FlexView","$disablePointerEvents","BackButtonContainer","BackButtonWrapper"],"mappings":";;AAIA,MAAMA,IAAgBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAC3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAmBMA,EAAM,OAAO,SAAS,CAAC;AAAA,gBACtBA,EAAM,OAAO,SAAS,CAAC;AAAA;AAAA;AAAA,GAItC,GAEKC,IAAiBF,EAAOG,CAAQ;AAAA,EACpC,CAAC,EAAE,uBAAAC,GAAuB,OAAAH,EAAA,MAAY;AAAA;AAAA;AAAA,wBAGhBG,IAAwB,SAAS,MAAM;AAAA,0BACrCH,EAAM,OAAO,OAAO;AAAA;AAAA;AAG9C,GAEMI,IAAsBL,EAAOG,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOrCG,IAAoBN,EAAOG,CAAQ,EAAE,CAAC,EAAE,OAAAF,QACrC;AAAA;AAAA,WAEEA,EAAM,OAAO,MAAM;AAAA,4BACFA,EAAM,OAAO,MAAM;AAAA;AAAA,GAG9C;"}
@@ -0,0 +1,129 @@
1
+ import { jsxs as m, jsx as t, Fragment as b } from "react/jsx-runtime";
2
+ import { memo as w, useCallback as L, useEffect as p } from "react";
3
+ import { ILLUSTRATIONS as N } from "../../../assets/illustrations/illustrations.js";
4
+ import _ from "../../../assets/line-icons/icons/back2.js";
5
+ import { useJourney as v } from "../../journey/use-journey/use-journey.js";
6
+ import D from "../../ui/buttons/button/button.js";
7
+ import E from "../../ui/buttons/icon-button/icon-button.js";
8
+ import P from "../../ui/layout/flex-view.js";
9
+ import T from "../../ui/loader/app-loader/app-loader.js";
10
+ import j from "../../ui/text/text.js";
11
+ import { useGetChapterDetails as J } from "../api/chapter.js";
12
+ import F from "./block-sections/block-sections.js";
13
+ import H from "./chapter-banner/chapter-banner.js";
14
+ import { ContentWrapper as O, BackButtonContainer as U, BackButtonWrapper as W, LoaderWrapper as X } from "./chapter-details-styled.js";
15
+ const z = w((f) => {
16
+ const {
17
+ userChapterId: n,
18
+ studentId: i,
19
+ userType: a,
20
+ onBlockSkipUnskip: g,
21
+ onNodeAttempt: u,
22
+ onNodeAttemptLocationChange: C,
23
+ onNodeMarkAsDone: k,
24
+ onNodeReattempt: y,
25
+ onNodeReview: A,
26
+ onNodeView: B,
27
+ onExit: $,
28
+ startChapterPageJourney: s,
29
+ chapterPageRef: x,
30
+ bannerRef: I,
31
+ coreBlocksRef: R,
32
+ canStartJourney: c
33
+ } = f, { isJourneyActive: l } = v(), {
34
+ get: h,
35
+ data: e,
36
+ isProcessing: r,
37
+ isProcessingFailed: S,
38
+ isStale: d
39
+ } = J(), o = L(() => {
40
+ h(n, void 0, { studentId: i });
41
+ }, [h, n, i]);
42
+ return p(() => {
43
+ o();
44
+ }, [o]), p(() => {
45
+ e && c && !l && s && s({
46
+ chapterDetails: e,
47
+ userChapterId: n,
48
+ studentId: i,
49
+ userType: a
50
+ });
51
+ }, [
52
+ c,
53
+ e,
54
+ l,
55
+ s,
56
+ i,
57
+ n,
58
+ a
59
+ ]), p(() => {
60
+ !r && d && o();
61
+ }, [o, r, d]), S ? /* @__PURE__ */ m(P, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
62
+ /* @__PURE__ */ t(j, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
63
+ /* @__PURE__ */ t(
64
+ D,
65
+ {
66
+ widthX: 14,
67
+ size: "small",
68
+ shape: "square",
69
+ renderAs: "primary",
70
+ label: "Try again",
71
+ onClick: o
72
+ }
73
+ )
74
+ ] }) : !e && r ? /* @__PURE__ */ t(T, { height: "80vh" }) : /* @__PURE__ */ m(
75
+ O,
76
+ {
77
+ ref: x,
78
+ $widthX: 50,
79
+ $disablePointerEvents: r,
80
+ $justifyContent: "center",
81
+ $alignItems: "center",
82
+ children: [
83
+ a === "TEACHER" && /* @__PURE__ */ t(U, { $height: "100%", children: /* @__PURE__ */ t(W, { children: /* @__PURE__ */ t(
84
+ E,
85
+ {
86
+ Icon: _,
87
+ renderAs: "secondary-gray",
88
+ analyticsLabel: "chapter_page_exit",
89
+ size: "xsmall",
90
+ onClick: $
91
+ }
92
+ ) }) }),
93
+ r && /* @__PURE__ */ t(X, { children: /* @__PURE__ */ t("img", { src: N.LOADER_1, alt: "loader" }) }),
94
+ e && /* @__PURE__ */ m(b, { children: [
95
+ /* @__PURE__ */ t(
96
+ H,
97
+ {
98
+ title: e.name,
99
+ imageHue: e.image_hue,
100
+ imageUrl: e.image_url,
101
+ progressStats: e == null ? void 0 : e.progress_stat,
102
+ bannerRef: I
103
+ }
104
+ ),
105
+ /* @__PURE__ */ t(
106
+ F,
107
+ {
108
+ imageHue: e.image_hue,
109
+ userType: a,
110
+ blocks: e.blocks,
111
+ onBlockSkipUnskip: g,
112
+ onNodeAttempt: u,
113
+ onNodeAttemptLocationChange: C,
114
+ onNodeMarkAsDone: k,
115
+ onNodeReattempt: y,
116
+ onNodeReview: A,
117
+ onNodeView: B,
118
+ coreBlocksRef: R
119
+ }
120
+ )
121
+ ] })
122
+ ]
123
+ }
124
+ );
125
+ }), ae = z;
126
+ export {
127
+ ae as default
128
+ };
129
+ //# sourceMappingURL=chapter-details.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\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 BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n startChapterPageJourney,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n } = props;\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 useEffect(() => {\n if (chapterDetails && canStartJourney && !isJourneyActive && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n }, [\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChapterPageJourney,\n studentId,\n userChapterId,\n userType,\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=\"80vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\">\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 onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","startChapterPageJourney","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,EACE,IAAAhB,GACE,EAAE,iBAAAiB,MAAoBC,KACtB;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAsBC,EAAY,MAAM;AAC5C,IAAAP,EAAkBlB,GAAe,QAAW,EAAE,WAAAC,EAAW,CAAA;AAAA,EACxD,GAAA,CAACiB,GAAmBlB,GAAeC,CAAS,CAAC;AA+BhD,SA7BAyB,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAExBE,EAAU,MAAM;AACd,IAAIP,KAAkBJ,KAAmB,CAACC,KAAmBL,KACnCA,EAAA;AAAA,MACtB,gBAAAQ;AAAA,MACA,eAAAnB;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,IAAA,CACD;AAAA,EACH,GACC;AAAA,IACDa;AAAA,IACAI;AAAA,IACAH;AAAA,IACAL;AAAA,IACAV;AAAA,IACAD;AAAA,IACAE;AAAA,EAAA,CACD,GAEDwB,EAAU,MAAM;AACV,IAAA,CAACN,KAAgBE,KACCE;EAErB,GAAA,CAACA,GAAqBJ,GAAcE,CAAO,CAAC,GAE3CD,IAEA,gBAAAM,EAACC,KAAS,WAAW,KAAK,SAAQ,SAAQ,iBAAgB,UAAS,aAAY,UAC7E,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,MAAK,UAAmD,uDAAA;AAAA,IACxE,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASP;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA,IAIA,CAACL,KAAkBC,IACd,gBAAAS,EAACG,GAAU,EAAA,QAAO,OAAO,CAAA,IAIhC,gBAAAL;AAAA,IAACM;AAAAA,IAAA;AAAA,MACC,KAAKrB;AAAA,MACL,SAAS;AAAA,MACT,uBAAuBQ;AAAA,MACvB,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEX,UAAA;AAAA,QAAalB,MAAA,aACX,gBAAA2B,EAAAK,GAAA,EAA2B,SAAQ,QAClC,UAAA,gBAAAL,EAACM,GAAA,EACC,UAAA,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,UAAS;AAAA,YACT,gBAAe;AAAA,YACf,MAAK;AAAA,YACL,SAAS3B;AAAA,UAAA;AAAA,WAEb,EACF,CAAA;AAAA,QAGDU,KACC,gBAAAS,EAACS,GAAA,EACC,UAAA,gBAAAT,EAAC,OAAI,EAAA,KAAKU,EAAc,UAAU,KAAI,SAAA,CAAS,EACjD,CAAA;AAAA,QAGDpB,KAEG,gBAAAQ,EAAAa,GAAA,EAAA,UAAA;AAAA,UAAA,gBAAAX;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,OAAOtB,EAAe;AAAA,cACtB,UAAUA,EAAe;AAAA,cACzB,UAAUA,EAAe;AAAA,cACzB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,cAC/B,WAAAN;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAgB;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,UAAUvB,EAAe;AAAA,cACzB,UAAAjB;AAAA,cACA,QAAQiB,EAAe;AAAA,cACvB,mBAAAhB;AAAA,cACA,eAAAC;AAAA,cACA,6BAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAK;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAED6B,KAAe9C;"}
@@ -0,0 +1,13 @@
1
+ import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
+ const o = () => /* @__PURE__ */ r("svg", { className: "node-card-border", viewBox: "0 0 170 56", preserveAspectRatio: "none", children: [
3
+ /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ r("linearGradient", { id: "gradient", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
4
+ /* @__PURE__ */ e("stop", { offset: "0%", stopColor: "black" }),
5
+ /* @__PURE__ */ e("stop", { offset: "100%", stopColor: "gray" })
6
+ ] }) }),
7
+ /* @__PURE__ */ e("rect", { className: "border-path", x: "0", y: "0", width: "100%", height: "100%" }),
8
+ /* @__PURE__ */ e("rect", { className: "border-path-animation", x: "0", y: "0", width: "100%", height: "100%" })
9
+ ] });
10
+ export {
11
+ o as default
12
+ };
13
+ //# sourceMappingURL=border-path-animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"border-path-animation.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/border-path-animation.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nconst BorderPathAnimation: FC = () => {\n return (\n <svg className=\"node-card-border\" viewBox=\"0 0 170 56\" preserveAspectRatio=\"none\">\n <defs>\n <linearGradient id=\"gradient\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor=\"black\" />\n <stop offset=\"100%\" stopColor=\"gray\" />\n </linearGradient>\n </defs>\n <rect className=\"border-path\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" />\n <rect className=\"border-path-animation\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" />\n </svg>\n );\n};\n\nexport default BorderPathAnimation;\n"],"names":["BorderPathAnimation","jsx","jsxs"],"mappings":";AAEA,MAAMA,IAA0B,wBAE3B,OAAI,EAAA,WAAU,oBAAmB,SAAQ,cAAa,qBAAoB,QACzE,UAAA;AAAA,EAAA,gBAAAC,EAAC,QACC,EAAA,UAAA,gBAAAC,EAAC,kBAAe,EAAA,IAAG,YAAW,IAAG,MAAK,IAAG,MAAK,IAAG,QAAO,IAAG,MACzD,UAAA;AAAA,IAAA,gBAAAD,EAAC,QAAK,EAAA,QAAO,MAAK,WAAU,SAAQ;AAAA,IACnC,gBAAAA,EAAA,QAAA,EAAK,QAAO,QAAO,WAAU,QAAO;AAAA,EAAA,EAAA,CACvC,EACF,CAAA;AAAA,EACA,gBAAAA,EAAC,QAAK,EAAA,WAAU,eAAc,GAAE,KAAI,GAAE,KAAI,OAAM,QAAO,QAAO,OAAO,CAAA;AAAA,EACrE,gBAAAA,EAAC,QAAK,EAAA,WAAU,yBAAwB,GAAE,KAAI,GAAE,KAAI,OAAM,QAAO,QAAO,OAAO,CAAA;AACjF,EAAA,CAAA;"}
@@ -0,0 +1,159 @@
1
+ import t from "styled-components";
2
+ import d from "../../../../assets/line-icons/icons/important.js";
3
+ import l from "../../../../assets/line-icons/icons/lock2.js";
4
+ import e from "../../../ui/layout/flex-view.js";
5
+ import c from "../../../ui/text/text.js";
6
+ const m = t(e)(({
7
+ $showOutline: o,
8
+ theme: r,
9
+ $disabled: n,
10
+ $isSheetLocked: a
11
+ }) => {
12
+ const { BLACK_1: p, BLACK: s, BLACK_T_15: i } = r.colors;
13
+ return `
14
+ cursor: ${n ? "not-allowed" : "pointer"};
15
+ position: relative;
16
+ border-image: linear-gradient(to right, ${i} 0%, ${i} 100%);
17
+ ${o && `outline: 1px solid ${i};`};
18
+
19
+ .node-card-border {
20
+ position: absolute;
21
+ top: 0;
22
+ left: 0;
23
+ z-index: 2;
24
+ width: 100%;
25
+ height: 100%;
26
+ pointer-events: none;
27
+ background: transparent;
28
+ }
29
+
30
+ .node-card-border > .border-path {
31
+ fill: none;
32
+ stroke: ${i};
33
+ stroke-width: 1.5;
34
+ }
35
+
36
+ .node-card-border > .border-path-animation {
37
+ fill: none;
38
+ stroke: ${s};
39
+ stroke-width: 1.5;
40
+ //* view box size 170 + 56 + 170 + 56 = 452
41
+ //* 452 / 2 = 226
42
+ stroke-dasharray: 226 226;
43
+ stroke-dashoffset: 0;
44
+
45
+ animation: dashmove 6s linear infinite;
46
+ }
47
+
48
+ @keyframes dashmove {
49
+ to {
50
+ stroke-dashoffset: -900;
51
+ }
52
+ }
53
+
54
+ &:hover {
55
+ ${!n && `
56
+ .node-card-border > .border-path-animation {
57
+ stroke: ${p};
58
+ stroke-dasharray: 452;
59
+ animation: none;
60
+ }
61
+ `}
62
+
63
+ ${o && !a && `outline: 1px solid ${s};`};
64
+ }
65
+ `;
66
+ }), g = t(d)(({ theme: o }) => {
67
+ const { layout: r } = o;
68
+ return `
69
+ width: ${r.gutter * 0.75}px;
70
+ height: ${r.gutter * 0.75}px;
71
+ position: absolute;
72
+ top: -2.5px;
73
+ right: -2.5px;
74
+ `;
75
+ }), $ = t(e)(({ $bgImage: o }) => `
76
+ background-image: url(${o});
77
+
78
+ & .context-menu {
79
+ justify-self: flex-end;
80
+ margin-left: auto;
81
+ }
82
+ `), k = t(e)`
83
+ border-radius: 50%;
84
+ `, w = t(e)(() => `
85
+ position: relative;
86
+ padding: 12px 8px 12px 12px;
87
+ `), I = t(e)(({ $top: o, $right: r }) => `
88
+ position: absolute;
89
+ top: ${o ?? 0}px;
90
+ right: ${r ?? 0}px;
91
+ z-index: 3;
92
+ `);
93
+ t(l)(({}) => `
94
+ width: 28px;
95
+ height: 28px;
96
+ `);
97
+ const v = t(e)(({
98
+ theme: o,
99
+ $paddingRight: r,
100
+ $paddingLeft: n
101
+ }) => {
102
+ const { BLACK_1: a, WHITE_1: p } = o.colors;
103
+ return `
104
+ position: absolute;
105
+ top: -10px;
106
+ right: -10px;
107
+ padding: 0px;
108
+ padding-left: ${n}px;
109
+ padding-right: ${r}px;
110
+ background: ${a};
111
+
112
+ path {
113
+ fill: ${p};
114
+ }
115
+ `;
116
+ }), y = t(c)(() => `
117
+ display: -webkit-box;
118
+ -webkit-box-orient: vertical;
119
+ -webkit-line-clamp: 2;
120
+ text-overflow: ellipsis;
121
+ overflow: hidden;
122
+ `), C = t(e)(({ theme: o }) => `
123
+ cursor: pointer;
124
+
125
+ &:hover {
126
+ border-radius: 50%;
127
+ background: ${o.colors.WHITE_5};
128
+ }
129
+ `), W = t(e)(({ theme: o, $visible: r }) => `
130
+ cursor: pointer;
131
+
132
+ position: absolute;
133
+ z-index: 6;
134
+ top: calc(100% + 4px);
135
+ left: 0;
136
+
137
+ transform-origin: top;
138
+ transform: scaleY(${r ? 1 : 0});
139
+ opacity: ${r ? 1 : 0};
140
+ transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
141
+
142
+ &:hover {
143
+ border-radius: 50%;
144
+ background: ${o.colors.WHITE_5};
145
+ }
146
+ `);
147
+ export {
148
+ k as IconWrapper,
149
+ v as InProgressIconWrapper,
150
+ m as NodeCardContainer,
151
+ w as NodeCardContentWrapper,
152
+ $ as NodeCardInfoWrapper,
153
+ y as NodeCardTitle,
154
+ C as NodeKebabMenuWrapper,
155
+ W as NodeMenuOptionsWrapper,
156
+ I as SheetTagWrapper,
157
+ g as StyledImportantIcon
158
+ };
159
+ //# sourceMappingURL=node-card-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-card-styled.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ImportantIcon from '../../../../assets/line-icons/icons/important';\nimport Lock2Icon from '../../../../assets/line-icons/icons/lock2';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface INodeCardContainer {\n $showOutline?: boolean;\n $disabled: boolean;\n $isSheetLocked?: boolean;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({\n $showOutline,\n theme,\n $disabled,\n $isSheetLocked,\n}) => {\n const { BLACK_1, BLACK, BLACK_T_15 } = theme.colors;\n\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n position: relative;\n border-image: linear-gradient(to right, ${BLACK_T_15} 0%, ${BLACK_T_15} 100%);\n ${$showOutline && `outline: 1px solid ${BLACK_T_15};`};\n\n .node-card-border {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n pointer-events: none;\n background: transparent;\n }\n\n .node-card-border > .border-path {\n fill: none;\n stroke: ${BLACK_T_15};\n stroke-width: 1.5;\n }\n\n .node-card-border > .border-path-animation {\n fill: none;\n stroke: ${BLACK};\n stroke-width: 1.5;\n //* view box size 170 + 56 + 170 + 56 = 452\n //* 452 / 2 = 226\n stroke-dasharray: 226 226;\n stroke-dashoffset: 0;\n\n animation: dashmove 6s linear infinite;\n }\n \n @keyframes dashmove {\n to {\n stroke-dashoffset: -900;\n }\n }\n \n &:hover {\n ${\n !$disabled &&\n `\n .node-card-border > .border-path-animation {\n stroke: ${BLACK_1};\n stroke-dasharray: 452;\n animation: none;\n }\n `\n }\n\n ${$showOutline && !$isSheetLocked && `outline: 1px solid ${BLACK};`};\n }\n `;\n});\n\nconst StyledImportantIcon = styled(ImportantIcon)(({ theme }) => {\n const { layout } = theme;\n\n return `\n width: ${layout.gutter * 0.75}px;\n height: ${layout.gutter * 0.75}px;\n position: absolute;\n top: -2.5px;\n right: -2.5px;\n `;\n});\n\ninterface INodeCardInfoWrapper {\n $bgImage: string;\n}\n\nconst NodeCardInfoWrapper = styled(FlexView)<INodeCardInfoWrapper>(({ $bgImage }) => {\n return `\n background-image: url(${$bgImage});\n\n & .context-menu {\n justify-self: flex-end;\n margin-left: auto;\n }\n `;\n});\n\nconst IconWrapper = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst NodeCardContentWrapper = styled(FlexView)(() => {\n return `\n position: relative;\n padding: 12px 8px 12px 12px;\n `;\n});\n\ninterface ISheetTagWrapper {\n $top?: number;\n $right?: number;\n}\n\nconst SheetTagWrapper = styled(FlexView)<ISheetTagWrapper>(({ $top, $right }) => {\n return `\n position: absolute;\n top: ${$top ?? 0}px;\n right: ${$right ?? 0}px;\n z-index: 3;\n`;\n});\n\nconst StyledLockIcon = styled(Lock2Icon)(({}) => {\n return `\n width: 28px;\n height: 28px;\n `;\n});\n\nconst InProgressIconWrapper = styled(FlexView)<{ $paddingRight: number; $paddingLeft: number }>(({\n theme,\n $paddingRight,\n $paddingLeft,\n}) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n right: -10px;\n padding: 0px;\n padding-left: ${$paddingLeft}px;\n padding-right: ${$paddingRight}px;\n background: ${BLACK_1};\n\n path {\n fill: ${WHITE_1};\n }\n `;\n});\n\nconst NodeCardTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst NodeKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\ninterface INodeOptionsMenuWrapper {\n $visible: boolean;\n}\n\nconst NodeMenuOptionsWrapper = styled(FlexView)<INodeOptionsMenuWrapper>(({ theme, $visible }) => {\n return `\n cursor: pointer;\n\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n left: 0;\n\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport {\n NodeCardContainer,\n StyledImportantIcon,\n NodeCardInfoWrapper,\n IconWrapper,\n NodeCardContentWrapper,\n SheetTagWrapper,\n StyledLockIcon,\n InProgressIconWrapper,\n NodeCardTitle,\n NodeKebabMenuWrapper,\n NodeMenuOptionsWrapper,\n};\n"],"names":["NodeCardContainer","styled","FlexView","$showOutline","theme","$disabled","$isSheetLocked","BLACK_1","BLACK","BLACK_T_15","StyledImportantIcon","ImportantIcon","layout","NodeCardInfoWrapper","$bgImage","IconWrapper","NodeCardContentWrapper","SheetTagWrapper","$top","$right","Lock2Icon","InProgressIconWrapper","$paddingRight","$paddingLeft","WHITE_1","NodeCardTitle","Text","NodeKebabMenuWrapper","NodeMenuOptionsWrapper","$visible"],"mappings":";;;;;AAaA,MAAMA,IAAoBC,EAAOC,CAAQ,EAAsB,CAAC;AAAA,EAC9D,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,SAAAC,GAAS,OAAAC,GAAO,YAAAC,EAAA,IAAeL,EAAM;AAEtC,SAAA;AAAA,cACKC,IAAY,gBAAgB,SAAS;AAAA;AAAA,8CAELI,CAAU,QAAQA,CAAU;AAAA,MACpEN,KAAgB,sBAAsBM,CAAU,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAezCA,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMVD,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAkBb,CAACH,KACD;AAAA;AAAA,sBAEcE,CAAO;AAAA;AAAA;AAAA;AAAA,SAKvB;AAAA;AAAA,QAEEJ,KAAgB,CAACG,KAAkB,sBAAsBE,CAAK,GAAG;AAAA;AAAA;AAGzE,CAAC,GAEKE,IAAsBT,EAAOU,CAAa,EAAE,CAAC,EAAE,OAAAP,QAAY;AACzD,QAAA,EAAE,QAAAQ,EAAW,IAAAR;AAEZ,SAAA;AAAA,aACIQ,EAAO,SAAS,IAAI;AAAA,cACnBA,EAAO,SAAS,IAAI;AAAA;AAAA;AAAA;AAAA;AAKlC,CAAC,GAMKC,IAAsBZ,EAAOC,CAAQ,EAAwB,CAAC,EAAE,UAAAY,QAC7D;AAAA,4BACmBA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOnC,GAEKC,IAAcd,EAAOC,CAAQ;AAAA;AAAA,GAI7Bc,IAAyBf,EAAOC,CAAQ,EAAE,MACvC;AAAA;AAAA;AAAA,GAIR,GAOKe,IAAkBhB,EAAOC,CAAQ,EAAoB,CAAC,EAAE,MAAAgB,GAAM,QAAAC,QAC3D;AAAA;AAAA,SAEAD,KAAQ,CAAC;AAAA,WACPC,KAAU,CAAC;AAAA;AAAA,CAGrB;AAEsBlB,EAAOmB,CAAS,EAAE,CAAC,OACjC;AAAA;AAAA;AAAA,GAIR;AAED,MAAMC,IAAwBpB,EAAOC,CAAQ,EAAmD,CAAC;AAAA,EAC/F,OAAAE;AAAA,EACA,eAAAkB;AAAA,EACA,cAAAC;AACF,MAAM;AACJ,QAAM,EAAE,SAAAhB,GAAS,SAAAiB,MAAYpB,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWmB,CAAY;AAAA,qBACXD,CAAa;AAAA,kBAChBf,CAAO;AAAA;AAAA;AAAA,cAGXiB,CAAO;AAAA;AAAA;AAGrB,CAAC,GAEKC,IAAgBxB,EAAOyB,CAAI,EAAE,MAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOR,GAEKC,IAAuB1B,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QACxC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAMKwB,IAAyB3B,EAAOC,CAAQ,EAA2B,CAAC,EAAE,OAAAE,GAAO,UAAAyB,QAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASeA,IAAW,IAAI,CAAC;AAAA,eACzBA,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKXzB,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC;"}
@@ -0,0 +1,16 @@
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { memo as p } from "react";
3
+ import { getNodeStateBasedTagInfo as S } from "../../utils/node-card-utils.js";
4
+ import { SheetTagWrapper as T } from "./node-card-styled.js";
5
+ const h = p((o) => {
6
+ const { state: e, accuracy: t, nodeType: a, dueDateTs: c, isStudent: r } = o, d = ["DYNAMIC", "ASSESSMENT", "CHAPTER_ASSESSMENT"].includes(a) ? t : void 0, {
7
+ icon: n,
8
+ top: s,
9
+ right: i
10
+ } = S(e, !!r, d, c);
11
+ return /* @__PURE__ */ m(T, { $top: s, $right: i, children: n });
12
+ });
13
+ export {
14
+ h as default
15
+ };
16
+ //# sourceMappingURL=node-card-tags.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType, dueDateTs, isStudent } = props;\n const dynamicNodeTypes = ['DYNAMIC', 'ASSESSMENT', 'CHAPTER_ASSESSMENT'];\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);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["NodeCardTags","memo","props","state","accuracy","nodeType","dueDateTs","isStudent","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAQM,MAAAA,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,WAAAC,EAAc,IAAAL,GAGtDM,IAFmB,CAAC,WAAW,cAAc,oBAAoB,EAChC,SAASH,CAAQ,IAClBD,IAAW,QAE3C;AAAA,IACJ,MAAMK;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACEC,EAAyBT,GAAO,CAAC,CAACI,GAAWC,GAAeF,CAAS;AAGvE,SAAA,gBAAAO,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
@@ -0,0 +1,12 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { memo as o } from "react";
3
+ import n from "./student-actions/student-actions.js";
4
+ import i from "./teacher-actions/teacher-actions.js";
5
+ const f = o((t) => {
6
+ const { userType: r } = t;
7
+ return r === "STUDENT" ? /* @__PURE__ */ e(n, { ...t, isStudent: !0 }) : /* @__PURE__ */ e(i, { ...t });
8
+ });
9
+ export {
10
+ f as default
11
+ };
12
+ //# sourceMappingURL=node-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-card.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card.tsx"],"sourcesContent":["import type { INodeCardProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\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":";;;;AAQM,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;"}
@@ -0,0 +1,30 @@
1
+ import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
+ import { memo as p, useCallback as a } from "react";
3
+ import s from "../../../../ui/text/text.js";
4
+ import { NodeOptionWrapper as m } from "./node-menu-options-styled.js";
5
+ const $ = ({ option: n }) => {
6
+ const { icon: r, label: l, id: e, disabled: o, onClick: i } = n, c = a(() => {
7
+ o || i(e);
8
+ }, [o, e, i]);
9
+ return /* @__PURE__ */ d(
10
+ m,
11
+ {
12
+ $flexDirection: "row",
13
+ $alignItems: "center",
14
+ $flexGap: 8,
15
+ $gapX: 0.5,
16
+ $gutterX: 1,
17
+ $opacity: o ? 0.5 : 1,
18
+ $disabled: o,
19
+ onClick: c,
20
+ children: [
21
+ /* @__PURE__ */ t(r, { width: 20, height: 20 }),
22
+ /* @__PURE__ */ t(s, { $renderAs: "ub3", $color: "WHITE", children: l })
23
+ ]
24
+ }
25
+ );
26
+ }, b = p($);
27
+ export {
28
+ b as default
29
+ };
30
+ //# sourceMappingURL=node-menu-option.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-menu-option.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.tsx"],"sourcesContent":["import type { INodeMenuOption } from './node-menu-options-types';\n\nimport { memo, useCallback } from 'react';\n\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './node-menu-options-styled';\n\nconst NodeMenuOption = ({ option }: { option: INodeMenuOption }) => {\n const { icon: OptionIcon, label, id, disabled, onClick } = option;\n\n const handleNodeOptionClick = useCallback(() => {\n if (!disabled) {\n onClick(id);\n }\n }, [disabled, id, onClick]);\n\n return (\n <Styled.NodeOptionWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGap={8}\n $gapX={0.5}\n $gutterX={1}\n $opacity={disabled ? 0.5 : 1}\n $disabled={disabled}\n onClick={handleNodeOptionClick}\n >\n <OptionIcon width={20} height={20} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {label}\n </Text>\n </Styled.NodeOptionWrapper>\n );\n};\n\nexport default memo(NodeMenuOption);\n"],"names":["NodeMenuOption","option","OptionIcon","label","id","disabled","onClick","handleNodeOptionClick","useCallback","jsxs","Styled.NodeOptionWrapper","jsx","Text","NodeMenuOption$1","memo"],"mappings":";;;;AAOA,MAAMA,IAAiB,CAAC,EAAE,QAAAC,QAA0C;AAClE,QAAM,EAAE,MAAMC,GAAY,OAAAC,GAAO,IAAAC,GAAI,UAAAC,GAAU,SAAAC,EAAY,IAAAL,GAErDM,IAAwBC,EAAY,MAAM;AAC9C,IAAKH,KACHC,EAAQF,CAAE;AAAA,EAEX,GAAA,CAACC,GAAUD,GAAIE,CAAO,CAAC;AAGxB,SAAA,gBAAAG;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAUL,IAAW,MAAM;AAAA,MAC3B,WAAWA;AAAA,MACX,SAASE;AAAA,MAET,UAAA;AAAA,QAAA,gBAAAI,EAACT,GAAW,EAAA,OAAO,IAAI,QAAQ,IAAI;AAAA,0BAClCU,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHT,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeU,IAAAC,EAAKd,CAAc;"}
@@ -0,0 +1,32 @@
1
+ import o from "styled-components";
2
+ import t from "../../../../ui/layout/flex-view.js";
3
+ import i from "../../../../ui/text/text.js";
4
+ const s = o(t)(({}) => `
5
+ box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.40);
6
+ width: 180px;
7
+ position: relative;
8
+ left: 0;
9
+ top: 0;
10
+ `), x = o(t)(({ theme: r, $disabled: e }) => `
11
+ cursor: ${e ? "not-allowed" : "pointer"};
12
+
13
+ &:hover {
14
+ background: ${r.colors.BLACK};
15
+ };
16
+
17
+ path {
18
+ fill: ${r.colors.WHITE_1};
19
+ }
20
+ `);
21
+ o(i)(() => `
22
+ display: -webkit-box;
23
+ -webkit-box-orient: vertical;
24
+ -webkit-line-clamp: 2;
25
+ text-overflow: ellipsis;
26
+ overflow: hidden;
27
+ `);
28
+ export {
29
+ x as NodeOptionWrapper,
30
+ s as NodeOptions
31
+ };
32
+ //# sourceMappingURL=node-menu-options-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-menu-options-styled.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nconst NodeOptions = styled(FlexView)(({}) => {\n return `\n box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.40);\n width: 180px;\n position: relative;\n left: 0;\n top: 0;\n `;\n});\n\ninterface INodeOptionWrapper {\n $disabled?: boolean;\n}\n\nconst NodeOptionWrapper = styled(FlexView)<INodeOptionWrapper>(({ theme, $disabled }) => {\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n\n &:hover {\n background: ${theme.colors.BLACK};\n };\n\n path {\n fill: ${theme.colors.WHITE_1};\n }\n `;\n});\n\nconst NodeOptionText = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nexport { NodeOptions, NodeOptionWrapper, NodeOptionText };\n"],"names":["NodeOptions","styled","FlexView","NodeOptionWrapper","theme","$disabled","Text"],"mappings":";;;AAKA,MAAMA,IAAcC,EAAOC,CAAQ,EAAE,CAAC,CAAA,MAC7B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAMKC,IAAoBF,EAAOC,CAAQ,EAAsB,CAAC,EAAE,OAAAE,GAAO,WAAAC,QAChE;AAAA,kBACSA,IAAY,gBAAgB,SAAS;AAAA;AAAA;AAAA,0BAG7BD,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA,oBAIxBA,EAAM,OAAO,OAAO;AAAA;AAAA,KAGvC;AAEsBH,EAAOK,CAAI,EAAE,MAC3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR;"}