@cuemath/leap 2.9.2 → 2.9.4-as2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (269) 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/lib/lib.js +1 -1
  4. package/dist/assets/lib/lib.js.map +1 -1
  5. package/dist/assets/line-icons/icons/alarm.js +41 -0
  6. package/dist/assets/line-icons/icons/alarm.js.map +1 -0
  7. package/dist/assets/line-icons/icons/bin2.js +7 -8
  8. package/dist/assets/line-icons/icons/bin2.js.map +1 -1
  9. package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
  10. package/dist/assets/line-icons/icons/dart.js +23 -0
  11. package/dist/assets/line-icons/icons/dart.js.map +1 -0
  12. package/dist/assets/line-icons/icons/exclamation.js +26 -0
  13. package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
  14. package/dist/assets/line-icons/icons/home2.js +25 -0
  15. package/dist/assets/line-icons/icons/home2.js.map +1 -0
  16. package/dist/assets/line-icons/icons/important.js +23 -0
  17. package/dist/assets/line-icons/icons/important.js.map +1 -0
  18. package/dist/assets/line-icons/icons/puzzle.js +25 -0
  19. package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
  20. package/dist/assets/line-icons/icons/recap.js +32 -0
  21. package/dist/assets/line-icons/icons/recap.js.map +1 -0
  22. package/dist/assets/line-icons/icons/skip-colored.js +43 -0
  23. package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
  24. package/dist/assets/line-icons/icons/status.js +41 -0
  25. package/dist/assets/line-icons/icons/status.js.map +1 -0
  26. package/dist/assets/line-icons/icons/testtube.js +33 -0
  27. package/dist/assets/line-icons/icons/testtube.js.map +1 -0
  28. package/dist/assets/lottie/lottie.js +9 -1
  29. package/dist/assets/lottie/lottie.js.map +1 -1
  30. package/dist/constants/api.js +3 -2
  31. package/dist/constants/api.js.map +1 -1
  32. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
  33. package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
  34. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
  35. package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
  36. package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
  37. package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
  38. package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
  39. package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
  40. package/dist/features/chapters-v2/api/chapter.js +10 -0
  41. package/dist/features/chapters-v2/api/chapter.js.map +1 -0
  42. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
  43. package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
  44. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +26 -0
  45. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
  46. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +73 -0
  47. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
  48. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
  49. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
  50. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +97 -0
  51. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
  52. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +52 -0
  53. package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
  54. package/dist/features/chapters-v2/chapter-details/chapter-details.js +103 -0
  55. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
  56. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +13 -0
  57. package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +1 -0
  58. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +153 -0
  59. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
  60. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
  61. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
  62. package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
  63. package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
  64. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
  65. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
  66. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +31 -0
  67. package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
  68. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +171 -0
  69. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
  70. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +192 -0
  71. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
  72. package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
  73. package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
  74. package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
  75. package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
  76. package/dist/features/chapters-v2/constants/block-constants.js +20 -0
  77. package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
  78. package/dist/features/chapters-v2/constants/node-constants.js +14 -0
  79. package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
  80. package/dist/features/chapters-v2/utils/index.js +41 -0
  81. package/dist/features/chapters-v2/utils/index.js.map +1 -0
  82. package/dist/features/chapters-v2/utils/node-card-utils.js +144 -0
  83. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
  84. package/dist/features/communication/pub-sub/constants.js +5 -2
  85. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  86. package/dist/features/homework/card-menu-options.js +38 -0
  87. package/dist/features/homework/card-menu-options.js.map +1 -0
  88. package/dist/features/homework/card-title.js +15 -0
  89. package/dist/features/homework/card-title.js.map +1 -0
  90. package/dist/features/homework/homework-card-view.js +131 -0
  91. package/dist/features/homework/homework-card-view.js.map +1 -0
  92. package/dist/features/homework/homework-card.js +205 -0
  93. package/dist/features/homework/homework-card.js.map +1 -0
  94. package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
  95. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
  96. package/dist/features/homework/hw-card-list/hw-card-list-styled.js +71 -0
  97. package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
  98. package/dist/features/homework/hw-card-list/hw-card-list.js +199 -0
  99. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
  100. package/dist/features/homework/node-progress.js +29 -0
  101. package/dist/features/homework/node-progress.js.map +1 -0
  102. package/dist/features/homework/styles.js +130 -0
  103. package/dist/features/homework/styles.js.map +1 -0
  104. package/dist/features/journey/comps/coachmark/coachmark-styled.js +12 -5
  105. package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
  106. package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
  107. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  108. package/dist/features/journey/hooks/use-home-page-journey.js +145 -0
  109. package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -0
  110. package/dist/features/journey/journey-id/journey-id-student.js +1 -1
  111. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  112. package/dist/features/journey/use-journey/journey-context-provider.js +36 -28
  113. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  114. package/dist/features/journey/use-journey/journey-styled.js +10 -5
  115. package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
  116. package/dist/features/milestone/create/api/goal-submit.js +1 -1
  117. package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
  118. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
  119. package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
  120. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
  121. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
  122. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
  123. package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
  124. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
  125. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
  126. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
  127. package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
  128. package/dist/features/milestone/create/milestone-create.js +49 -43
  129. package/dist/features/milestone/create/milestone-create.js.map +1 -1
  130. package/dist/features/milestone/create/utils/index.js +33 -38
  131. package/dist/features/milestone/create/utils/index.js.map +1 -1
  132. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
  133. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
  134. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
  135. package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
  136. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
  137. package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
  138. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
  139. package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
  140. package/dist/features/milestone/edit/goal-edit-container.js +64 -62
  141. package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
  142. package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
  143. package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
  144. package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
  145. package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
  146. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
  147. package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
  148. package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
  149. package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
  150. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  151. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  152. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +136 -104
  153. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  154. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
  155. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  156. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +155 -175
  157. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
  158. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
  159. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
  160. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
  161. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  162. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
  163. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
  164. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
  165. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
  166. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
  167. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  168. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
  169. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
  170. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +19 -23
  171. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
  172. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
  173. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
  174. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +96 -100
  175. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  176. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  177. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  178. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +114 -112
  179. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  180. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
  181. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
  182. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
  183. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
  184. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +85 -0
  185. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
  186. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +16 -18
  187. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  188. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +6 -34
  189. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
  190. package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
  191. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
  192. package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
  193. package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
  194. package/dist/features/recent-chapters/recent-chapters.js +85 -0
  195. package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
  196. package/dist/features/sheet-v2/resource-list/resource-list.js +39 -0
  197. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
  198. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  199. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  200. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
  201. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  202. package/dist/features/trial-session/api/trial-pricing.js +1 -1
  203. package/dist/features/trial-session/api/trial-pricing.js.map +1 -1
  204. package/dist/features/trial-session/comps/offering-information/offering-information.js +21 -21
  205. package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
  206. package/dist/features/trial-session/comps/pricing/pricing-cards.js +144 -0
  207. package/dist/features/trial-session/comps/pricing/pricing-cards.js.map +1 -0
  208. package/dist/features/trial-session/comps/pricing/pricing.js +51 -128
  209. package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
  210. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
  211. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  212. package/dist/features/ui/constants/z-index.js +1 -1
  213. package/dist/features/ui/constants/z-index.js.map +1 -1
  214. package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
  215. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  216. package/dist/features/ui/context-menu/context-menu.js +30 -15
  217. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  218. package/dist/features/ui/theme/button.js +22 -107
  219. package/dist/features/ui/theme/button.js.map +1 -1
  220. package/dist/index.d.ts +299 -32
  221. package/dist/index.js +498 -470
  222. package/dist/index.js.map +1 -1
  223. package/dist/node_modules/date-fns/differenceInDays.js +17 -0
  224. package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
  225. package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
  226. package/dist/static/competitive-arena.b9c40801.json +1 -0
  227. package/dist/static/learn.71b13323.json +1 -0
  228. package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
  229. package/dist/static/node-learn-bg.b61f815c.svg +1 -0
  230. package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
  231. package/dist/static/node-project-bg.e6a33e28.svg +1 -0
  232. package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
  233. package/dist/static/node-recap-bg.546154e4.svg +1 -0
  234. package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
  235. package/dist/static/node-video-bg.3df3f73a.svg +1 -0
  236. package/dist/static/practice.158dd488.json +1 -0
  237. package/dist/static/project.eb665827.json +1 -0
  238. package/dist/static/puzzle.b298c7e4.json +1 -0
  239. package/dist/static/recap.0dd2c1e2.json +1 -0
  240. package/dist/static/test.803d6036.json +1 -0
  241. package/dist/static/video.b41451e2.json +1 -0
  242. package/package.json +1 -1
  243. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
  244. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
  245. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
  246. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
  247. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
  248. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
  249. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
  250. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
  251. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
  252. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
  253. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
  254. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
  255. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
  256. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
  257. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
  258. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
  259. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
  260. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
  261. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
  262. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
  263. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
  264. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
  265. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
  266. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
  267. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
  268. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
  269. /package/dist/static/lib/{polypad.js → polypad-4.5.4.js} +0 -0
@@ -0,0 +1,97 @@
1
+ import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
+ import { memo as B, useMemo as d } from "react";
3
+ import { ILLUSTRATIONS as D } 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 b, BannerImageWrapper as M, BannerImage as O, ChapterProgressSVG as X, ChapterProgressSVGCircle as $, StyledImportantIcon as f, StyledCheckIcon as j, BannerTitleWrapper as H } from "./chapter-banner-styled.js";
11
+ const a = 52, l = 54, c = 54, ee = B((I) => {
12
+ const { progressStats: o, imageHue: S, title: x, imageUrl: u } = I, r = d(() => W(o), [o]), { iconTopVal: R, iconLeftVal: E } = d(() => {
13
+ const h = (-(r === 100 ? 60 : r) * 3.6 - 180) * Math.PI / 180, P = c + a * Math.sin(h), A = l + a * Math.cos(h);
14
+ return {
15
+ iconLeftVal: P,
16
+ iconTopVal: A
17
+ };
18
+ }, [r]);
19
+ if (!o) return null;
20
+ const { mandatory: _, optional: w, class_work: T } = o, { completed: k = 0, total: s = 0 } = _ || {}, { completed: y = 0, total: p = 0 } = w || {}, { completed: G = 0, total: m = 0 } = T || {}, L = m > 0 && G === m;
21
+ return /* @__PURE__ */ e(
22
+ b,
23
+ {
24
+ $flexDirection: "row",
25
+ $justifyContent: "center",
26
+ $alignItems: "center",
27
+ $widthX: 50,
28
+ $background: `${S}_4`,
29
+ children: /* @__PURE__ */ t(n, { $height: 168, $position: "relative", children: [
30
+ /* @__PURE__ */ e(
31
+ V,
32
+ {
33
+ width: "100%",
34
+ height: "168px",
35
+ src: D.CHAPTER_HEADER_BG,
36
+ alt: "Chapter header background",
37
+ withLoader: !0
38
+ }
39
+ ),
40
+ /* @__PURE__ */ t(M, { children: [
41
+ /* @__PURE__ */ e(O, { src: u, alt: "Chapter image" }),
42
+ /* @__PURE__ */ t(X, { width: "108px", height: "108px", children: [
43
+ /* @__PURE__ */ e(
44
+ $,
45
+ {
46
+ $progress: 0,
47
+ r: a,
48
+ cx: l,
49
+ cy: c
50
+ }
51
+ ),
52
+ /* @__PURE__ */ e(
53
+ $,
54
+ {
55
+ $progressCircle: !0,
56
+ $progressBackground: "BLACK",
57
+ $progress: 3.3 * r,
58
+ r: a,
59
+ cx: l,
60
+ cy: c
61
+ }
62
+ )
63
+ ] }),
64
+ r > 0 && /* @__PURE__ */ e(f, { $progress: !0, $top: R, $left: E }),
65
+ r === 100 && /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(C, { Icon: g }) })
66
+ ] }),
67
+ /* @__PURE__ */ t(H, { $flexGap: 4, children: [
68
+ /* @__PURE__ */ e(i, { $renderAs: "ah4-bold", children: x }),
69
+ /* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGapX: 2.75, children: [
70
+ !!s && /* @__PURE__ */ t(n, { $position: "relative", $flexDirection: "row", children: [
71
+ /* @__PURE__ */ e(f, {}),
72
+ /* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGap: 4, children: [
73
+ /* @__PURE__ */ t(i, { $renderAs: "ab2", children: [
74
+ "Core - ",
75
+ k,
76
+ "/",
77
+ s
78
+ ] }),
79
+ L && /* @__PURE__ */ e(C, { Icon: g, label: "CW" })
80
+ ] })
81
+ ] }),
82
+ p > 0 && /* @__PURE__ */ t(i, { $renderAs: "ab2", children: [
83
+ "Supplementary - ",
84
+ y,
85
+ "/",
86
+ p
87
+ ] })
88
+ ] })
89
+ ] })
90
+ ] })
91
+ }
92
+ );
93
+ });
94
+ export {
95
+ ee as default
96
+ };
97
+ //# 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 } = 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, class_work: 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 >\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={4}>\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","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":";;;;;;;;;;AAcA,MAAMA,IAAyB,IACzBC,IAA2B,IAC3BC,IAA2B,IAK3BC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,eAAAC,GAAe,UAAAC,GAAU,OAAAC,GAAO,UAAAC,MAAaJ,GAE/CK,IAAuBC,EAAQ,MAC5BC,EAA+BN,CAAa,GAClD,CAACA,CAAa,CAAC,GAEZ,EAAE,YAAAO,GAAY,aAAAC,EAAY,IAAIH,EAAQ,MAAM;AAKhD,UAAMI,KAAkB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AAA;AAAA,cACHpB;AAAA,cAAwB;AAAA,cAAEC;AAAA,YAAA,GAC7C;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -0,0 +1,52 @@
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
+ padding-bottom: ${e.layout.gutter * 4}px;
34
+ `
35
+ ), s = o(r)`
36
+ position: absolute;
37
+ top: 0;
38
+ left: 0;
39
+ z-index: 6;
40
+ `, u = o(r)(({ theme: t }) => `
41
+ position: sticky;
42
+ top: ${t.layout.gutter}px;
43
+ transform: translateX(${t.layout.gutter}px);
44
+ z-index: 6;
45
+ `);
46
+ export {
47
+ s as BackButtonContainer,
48
+ u as BackButtonWrapper,
49
+ p as ContentWrapper,
50
+ a as LoaderWrapper
51
+ };
52
+ //# 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 padding-bottom: ${theme.layout.gutter * 4}px;\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,wBAEtBA,EAAM,OAAO,SAAS,CAAC;AAAA;AAE/C,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,103 @@
1
+ import { jsxs as p, jsx as t } from "react/jsx-runtime";
2
+ import { memo as B, useCallback as x, useEffect as l } from "react";
3
+ import { ILLUSTRATIONS as y } from "../../../assets/illustrations/illustrations.js";
4
+ import I from "../../../assets/line-icons/icons/back2.js";
5
+ import w from "../../ui/buttons/button/button.js";
6
+ import L from "../../ui/buttons/icon-button/icon-button.js";
7
+ import N from "../../ui/layout/flex-view.js";
8
+ import S from "../../ui/loader/app-loader/app-loader.js";
9
+ import _ from "../../ui/text/text.js";
10
+ import { useGetChapterDetails as b } from "../api/chapter.js";
11
+ import D from "./block-sections/block-sections.js";
12
+ import E from "./chapter-banner/chapter-banner.js";
13
+ import { ContentWrapper as T, BackButtonContainer as v, BackButtonWrapper as R, LoaderWrapper as j } from "./chapter-details-styled.js";
14
+ const P = B((c) => {
15
+ const {
16
+ userChapterId: i,
17
+ studentId: n,
18
+ userType: a,
19
+ onBlockSkipUnskip: h,
20
+ onNodeAttempt: d,
21
+ onNodeAttemptLocationChange: g,
22
+ onNodeMarkAsDone: f,
23
+ onNodeReattempt: u,
24
+ onNodeReview: C,
25
+ onNodeView: k,
26
+ onExit: $
27
+ } = c, {
28
+ get: s,
29
+ data: e,
30
+ isProcessing: r,
31
+ isProcessingFailed: A,
32
+ isStale: m
33
+ } = b(), o = x(() => {
34
+ s(i, void 0, { studentId: n });
35
+ }, [s, i, n]);
36
+ return l(() => {
37
+ o();
38
+ }, [o]), l(() => {
39
+ !r && m && o();
40
+ }, [o, r, m]), A ? /* @__PURE__ */ p(N, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
41
+ /* @__PURE__ */ t(_, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
42
+ /* @__PURE__ */ t(
43
+ w,
44
+ {
45
+ widthX: 14,
46
+ size: "small",
47
+ shape: "square",
48
+ renderAs: "primary",
49
+ label: "Try again",
50
+ onClick: o
51
+ }
52
+ )
53
+ ] }) : !e && r ? /* @__PURE__ */ t(S, { height: "80vh" }) : /* @__PURE__ */ p(
54
+ T,
55
+ {
56
+ $widthX: 50,
57
+ $disablePointerEvents: r,
58
+ $justifyContent: "center",
59
+ $alignItems: "center",
60
+ children: [
61
+ a === "TEACHER" && /* @__PURE__ */ t(v, { $height: "100%", children: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
62
+ L,
63
+ {
64
+ Icon: I,
65
+ renderAs: "secondary-gray",
66
+ analyticsLabel: "chapter_page_exit",
67
+ size: "xsmall",
68
+ onClick: $
69
+ }
70
+ ) }) }),
71
+ r && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t("img", { src: y.LOADER_1, alt: "loader" }) }),
72
+ e && /* @__PURE__ */ t(
73
+ E,
74
+ {
75
+ title: e.name,
76
+ imageHue: e.image_hue,
77
+ imageUrl: e.image_url,
78
+ progressStats: e == null ? void 0 : e.progress_stat
79
+ }
80
+ ),
81
+ e && /* @__PURE__ */ t(
82
+ D,
83
+ {
84
+ imageHue: e.image_hue,
85
+ userType: a,
86
+ blocks: e.blocks,
87
+ onBlockSkipUnskip: h,
88
+ onNodeAttempt: d,
89
+ onNodeAttemptLocationChange: g,
90
+ onNodeMarkAsDone: f,
91
+ onNodeReattempt: u,
92
+ onNodeReview: C,
93
+ onNodeView: k
94
+ }
95
+ )
96
+ ]
97
+ }
98
+ );
99
+ }), Q = P;
100
+ export {
101
+ Q as default
102
+ };
103
+ //# 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 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 } = props;\n\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 (!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 $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 <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n />\n )}\n\n {chapterDetails && (\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 />\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","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","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;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AAA,MAChB,aAAY;AAAA,MAEX,UAAA;AAAA,QAAaX,MAAA,aACX,gBAAAoB,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,SAASpB;AAAA,UAAA;AAAA,WAEb,EACF,CAAA;AAAA,QAGDG,KACC,gBAAAS,EAACS,GAAA,EACC,UAAA,gBAAAT,EAAC,OAAI,EAAA,KAAKU,EAAc,UAAU,KAAI,SAAA,CAAS,EACjD,CAAA;AAAA,QAGDpB,KACC,gBAAAU;AAAA,UAACW;AAAA,UAAA;AAAA,YACC,OAAOrB,EAAe;AAAA,YACtB,UAAUA,EAAe;AAAA,YACzB,UAAUA,EAAe;AAAA,YACzB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,UAAA;AAAA,QACjC;AAAA,QAGDA,KACC,gBAAAU;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,UAAUtB,EAAe;AAAA,YACzB,UAAAV;AAAA,YACA,QAAQU,EAAe;AAAA,YACvB,mBAAAT;AAAA,YACA,eAAAC;AAAA,YACA,6BAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAED0B,IAAetC;"}
@@ -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,153 @@
1
+ import t from "styled-components";
2
+ import d from "../../../../assets/line-icons/icons/important.js";
3
+ import c from "../../../../assets/line-icons/icons/lock2.js";
4
+ import e from "../../../ui/layout/flex-view.js";
5
+ import l from "../../../ui/text/text.js";
6
+ const f = t(e)(({
7
+ $showOutline: o,
8
+ theme: r,
9
+ $disabled: n,
10
+ $isSheetLocked: s
11
+ }) => {
12
+ const { BLACK_1: p, BLACK: a, BLACK_T_15: i } = r.colors;
13
+ return `
14
+ cursor: ${n ? "not-allowed" : "pointer"};
15
+ ${n ? "pointer-events: none;" : "pointer-events: auto;"};
16
+ position: relative;
17
+ border-image: linear-gradient(to right, ${i} 0%, ${i} 100%);
18
+ ${o && `outline: 1px solid ${i};`};
19
+
20
+ .node-card-border {
21
+ position: absolute;
22
+ top: 0;
23
+ left: 0;
24
+ z-index: 2;
25
+ width: 100%;
26
+ height: 100%;
27
+ pointer-events: none;
28
+ background: transparent;
29
+ }
30
+
31
+ .node-card-border > .border-path {
32
+ fill: none;
33
+ stroke: ${i};
34
+ stroke-width: 1.5;
35
+ }
36
+
37
+ .node-card-border > .border-path-animation {
38
+ fill: none;
39
+ stroke: ${a};
40
+ stroke-width: 1.5;
41
+ //* view box size 170 + 56 + 170 + 56 = 452
42
+ //* 452 / 2 = 226
43
+ stroke-dasharray: 226 226;
44
+ stroke-dashoffset: 0;
45
+
46
+ animation: dashmove 6s linear infinite;
47
+ }
48
+
49
+ @keyframes dashmove {
50
+ to {
51
+ stroke-dashoffset: -900;
52
+ }
53
+ }
54
+
55
+ &:hover {
56
+ ${!n && `
57
+ .node-card-border > .border-path-animation {
58
+ stroke: ${p};
59
+ stroke-dasharray: 452;
60
+ animation: none;
61
+ }
62
+ `}
63
+
64
+ ${o && !s && `outline: 1px solid ${a};`};
65
+ }
66
+ `;
67
+ }), g = t(d)(({ theme: o }) => {
68
+ const { layout: r } = o;
69
+ return `
70
+ width: ${r.gutter * 0.75}px;
71
+ height: ${r.gutter * 0.75}px;
72
+ position: absolute;
73
+ top: -2.5px;
74
+ right: -2.5px;
75
+ `;
76
+ }), k = t(e)(({ $bgImage: o }) => `
77
+ background-image: url(${o});
78
+
79
+ & .context-menu {
80
+ justify-self: flex-end;
81
+ margin-left: auto;
82
+ }
83
+ `), $ = t(e)`
84
+ border-radius: 50%;
85
+ `, v = t(e)(() => `
86
+ position: relative;
87
+ padding: 12px 8px 12px 12px;
88
+ `), w = t(e)(({ $top: o, $right: r }) => `
89
+ position: absolute;
90
+ top: ${o ?? 0}px;
91
+ right: ${r ?? 0}px;
92
+ z-index: 3;
93
+ `);
94
+ t(c)(({}) => `
95
+ width: 28px;
96
+ height: 28px;
97
+ `);
98
+ const I = t(e)(({ theme: o }) => {
99
+ const { BLACK_1: r, WHITE_1: n } = o.colors;
100
+ return `
101
+ position: absolute;
102
+ top: -10px;
103
+ right: -10px;
104
+ background: ${r};
105
+
106
+ path {
107
+ fill: ${n};
108
+ }
109
+ `;
110
+ }), y = t(l)(() => `
111
+ display: -webkit-box;
112
+ -webkit-box-orient: vertical;
113
+ -webkit-line-clamp: 2;
114
+ text-overflow: ellipsis;
115
+ overflow: hidden;
116
+ `), C = t(e)(({ theme: o }) => `
117
+ cursor: pointer;
118
+
119
+ &:hover {
120
+ border-radius: 50%;
121
+ background: ${o.colors.WHITE_5};
122
+ }
123
+ `), W = t(e)(({ theme: o, $visible: r }) => `
124
+ cursor: pointer;
125
+
126
+ position: absolute;
127
+ z-index: 6;
128
+ top: calc(100% + 4px);
129
+ left: 0;
130
+
131
+ transform-origin: top;
132
+ transform: scaleY(${r ? 1 : 0});
133
+ opacity: ${r ? 1 : 0};
134
+ transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
135
+
136
+ &:hover {
137
+ border-radius: 50%;
138
+ background: ${o.colors.WHITE_5};
139
+ }
140
+ `);
141
+ export {
142
+ $ as IconWrapper,
143
+ I as InProgressIconWrapper,
144
+ f as NodeCardContainer,
145
+ v as NodeCardContentWrapper,
146
+ k as NodeCardInfoWrapper,
147
+ y as NodeCardTitle,
148
+ C as NodeKebabMenuWrapper,
149
+ W as NodeMenuOptionsWrapper,
150
+ w as SheetTagWrapper,
151
+ g as StyledImportantIcon
152
+ };
153
+ //# 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 ${$disabled ? 'pointer-events: none;' : 'pointer-events: auto;'};\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)(({ theme }) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n right: -10px;\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","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,MA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C,CAAQ,EAAE,CAAC,EAAE,OAAAE,QAAY;AAC5D,QAAM,EAAE,SAAAG,GAAS,SAAAe,MAAYlB,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA,kBAISG,CAAO;AAAA;AAAA;AAAA,cAGXe,CAAO;AAAA;AAAA;AAGrB,CAAC,GAEKC,IAAgBtB,EAAOuB,CAAI,EAAE,MAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOR,GAEKC,IAAuBxB,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QACxC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAMKsB,IAAyBzB,EAAOC,CAAQ,EAA2B,CAAC,EAAE,OAAAE,GAAO,UAAAuB,QAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASeA,IAAW,IAAI,CAAC;AAAA,eACzBA,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKXvB,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC;"}
@@ -0,0 +1,16 @@
1
+ import { jsx as d } from "react/jsx-runtime";
2
+ import { memo as m } from "react";
3
+ import { getNodeStateBasedTagInfo as p } from "../../utils/node-card-utils.js";
4
+ import { SheetTagWrapper as S } from "./node-card-styled.js";
5
+ const y = m((t) => {
6
+ const { state: e, accuracy: a, nodeType: o, dueDateTs: r } = t, c = o === "DYNAMIC" || o === "ASSESSMENT" || o === "CHAPTER_ASSESSMENT" ? a : void 0, {
7
+ icon: i,
8
+ top: n,
9
+ right: s
10
+ } = p(e, c, r);
11
+ return /* @__PURE__ */ d(S, { $top: n, $right: s, children: i });
12
+ });
13
+ export {
14
+ y 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 } = props;\n\n const isDynamicNode =\n nodeType === 'DYNAMIC' || nodeType === 'ASSESSMENT' || nodeType === 'CHAPTER_ASSESSMENT';\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const {\n icon: NodeTagIcon,\n top,\n right,\n } = getNodeStateBasedTagInfo(state, 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","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,MAAcJ,GAI3CK,IADJF,MAAa,aAAaA,MAAa,gBAAgBA,MAAa,uBAChCD,IAAW,QAE3C;AAAA,IACJ,MAAMI;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EACE,IAAAC,EAAyBR,GAAOI,GAAeD,CAAS;AAG1D,SAAA,gBAAAM,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
@@ -0,0 +1,12 @@
1
+ import { jsx as o } from "react/jsx-runtime";
2
+ import { memo as e } from "react";
3
+ import m from "./student-actions/student-actions.js";
4
+ import n from "./teacher-actions/teacher-actions.js";
5
+ const f = e((t) => {
6
+ const { userType: r } = t;
7
+ return r === "STUDENT" ? /* @__PURE__ */ o(m, { ...t }) : /* @__PURE__ */ o(n, { ...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} />;\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,YAGtB,gBAAAC,EAACC,GAAgB,EAAA,GAAGH,EAAO,CAAA,IAG7B,gBAAAE,EAACE,GAAgB,EAAA,GAAGJ,EAAO,CAAA;AACpC,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;"}
@@ -0,0 +1,31 @@
1
+ import { jsx as e, jsxs as p } from "react/jsx-runtime";
2
+ import { memo as c } from "react";
3
+ import a from "../../../../ui/text/text.js";
4
+ import { NodeOptions as m, NodeOptionWrapper as $ } from "./node-menu-options-styled.js";
5
+ const h = c(({ options: o }) => o.length === 0 ? null : /* @__PURE__ */ e(m, { $background: "BLACK_2", $borderColor: "WHITE_T_38", $gapX: 0.5, children: o.map((t) => {
6
+ const { icon: n, label: l, id: i, disabled: r, onClick: d } = t;
7
+ return /* @__PURE__ */ p(
8
+ $,
9
+ {
10
+ $flexDirection: "row",
11
+ $alignItems: "center",
12
+ $flexGap: 8,
13
+ $gapX: 0.5,
14
+ $gutterX: 1,
15
+ $opacity: r ? 0.5 : 1,
16
+ $disabled: r,
17
+ onClick: () => {
18
+ r || d(i);
19
+ },
20
+ children: [
21
+ /* @__PURE__ */ e(n, { width: 20, height: 20 }),
22
+ /* @__PURE__ */ e(a, { $renderAs: "ub3", $color: "WHITE", children: l })
23
+ ]
24
+ },
25
+ i
26
+ );
27
+ }) }));
28
+ export {
29
+ h as default
30
+ };
31
+ //# sourceMappingURL=node-menu-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"node-menu-options.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.tsx"],"sourcesContent":["import type { INodeMenuOptions } from './node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport Text from '../../../../ui/text/text';\nimport * as Styled from './node-menu-options-styled';\n\nconst NodeMenuOptions: FC<INodeMenuOptions> = memo(({ options }) => {\n if (options.length === 0) return null;\n\n return (\n <Styled.NodeOptions $background=\"BLACK_2\" $borderColor=\"WHITE_T_38\" $gapX={0.5}>\n {options.map(optionInfo => {\n const { icon: OptionIcon, label, id, disabled, onClick } = optionInfo;\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 key={id}\n onClick={() => {\n if (!disabled) {\n onClick(id);\n }\n }}\n >\n <OptionIcon width={20} height={20} />\n\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {label}\n </Text>\n </Styled.NodeOptionWrapper>\n );\n })}\n </Styled.NodeOptions>\n );\n});\n\nexport default NodeMenuOptions;\n"],"names":["NodeMenuOptions","memo","options","jsx","Styled.NodeOptions","optionInfo","OptionIcon","label","id","disabled","onClick","jsxs","Styled.NodeOptionWrapper","Text"],"mappings":";;;;AAQA,MAAMA,IAAwCC,EAAK,CAAC,EAAE,SAAAC,QAChDA,EAAQ,WAAW,IAAU,OAG9B,gBAAAC,EAAAC,GAAA,EAAmB,aAAY,WAAU,cAAa,cAAa,OAAO,KACxE,UAAQF,EAAA,IAAI,CAAcG,MAAA;AACzB,QAAM,EAAE,MAAMC,GAAY,OAAAC,GAAO,IAAAC,GAAI,UAAAC,GAAU,SAAAC,EAAY,IAAAL;AAGzD,SAAA,gBAAAM;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,UAAU;AAAA,MACV,OAAO;AAAA,MACP,UAAU;AAAA,MACV,UAAUH,IAAW,MAAM;AAAA,MAC3B,WAAWA;AAAA,MAEX,SAAS,MAAM;AACb,QAAKA,KACHC,EAAQF,CAAE;AAAA,MAEd;AAAA,MAEA,UAAA;AAAA,QAAA,gBAAAL,EAACG,GAAW,EAAA,OAAO,IAAI,QAAQ,IAAI;AAAA,0BAElCO,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHN,GAAA;AAAA,MAAA;AAAA,IAAA;AAAA,IAXKC;AAAA,EAAA;AAcV,CAAA,EACH,CAAA,CAEH;"}