@cuemath/leap 2.9.2 → 2.9.4-as10

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 (273) 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 +12 -6
  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 +205 -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 +188 -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 +3 -2
  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 +65 -57
  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 +137 -105
  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 +107 -110
  175. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  176. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  177. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  178. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
  179. package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
  180. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +114 -112
  181. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  182. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
  183. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
  184. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
  185. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
  186. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +85 -0
  187. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
  188. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
  189. package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
  190. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +46 -51
  191. package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
  192. package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
  193. package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
  194. package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
  195. package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
  196. package/dist/features/recent-chapters/recent-chapters.js +39 -0
  197. package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
  198. package/dist/features/sheet-v2/resource-list/resource-list.js +39 -0
  199. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
  200. package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
  201. package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
  202. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
  203. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
  204. package/dist/features/trial-session/api/trial-pricing.js +1 -1
  205. package/dist/features/trial-session/api/trial-pricing.js.map +1 -1
  206. package/dist/features/trial-session/comps/offering-information/offering-information.js +21 -21
  207. package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
  208. package/dist/features/trial-session/comps/pricing/pricing-cards.js +144 -0
  209. package/dist/features/trial-session/comps/pricing/pricing-cards.js.map +1 -0
  210. package/dist/features/trial-session/comps/pricing/pricing.js +51 -128
  211. package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
  212. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
  213. package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
  214. package/dist/features/ui/constants/z-index.js +1 -1
  215. package/dist/features/ui/constants/z-index.js.map +1 -1
  216. package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
  217. package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
  218. package/dist/features/ui/context-menu/context-menu.js +30 -15
  219. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  220. package/dist/features/ui/theme/button.js +22 -107
  221. package/dist/features/ui/theme/button.js.map +1 -1
  222. package/dist/index.d.ts +332 -35
  223. package/dist/index.js +499 -470
  224. package/dist/index.js.map +1 -1
  225. package/dist/node_modules/date-fns/differenceInDays.js +17 -0
  226. package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
  227. package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
  228. package/dist/static/competitive-arena.b9c40801.json +1 -0
  229. package/dist/static/learn.71b13323.json +1 -0
  230. package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
  231. package/dist/static/node-learn-bg.b61f815c.svg +1 -0
  232. package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
  233. package/dist/static/node-project-bg.e6a33e28.svg +1 -0
  234. package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
  235. package/dist/static/node-recap-bg.546154e4.svg +1 -0
  236. package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
  237. package/dist/static/node-video-bg.3df3f73a.svg +1 -0
  238. package/dist/static/practice.158dd488.json +1 -0
  239. package/dist/static/project.eb665827.json +1 -0
  240. package/dist/static/puzzle.b298c7e4.json +1 -0
  241. package/dist/static/recap.0dd2c1e2.json +1 -0
  242. package/dist/static/test.803d6036.json +1 -0
  243. package/dist/static/video.b41451e2.json +1 -0
  244. package/package.json +1 -1
  245. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
  246. package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
  247. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
  248. package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
  249. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
  250. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
  251. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
  252. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
  253. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
  254. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
  255. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
  256. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
  257. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
  258. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
  259. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
  260. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
  261. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
  262. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
  263. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
  264. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
  265. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
  266. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
  267. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
  268. package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
  269. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
  270. package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
  271. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
  272. package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
  273. /package/dist/static/lib/{polypad.js → polypad-4.5.4.js} +0 -0
@@ -1,9 +1,9 @@
1
- import { createPostAPI as t } from "@cuemath/rest-api";
2
- import { BASE_URL_V3 as o } from "../../../../../constants/api.js";
3
- const { usePost: u } = t({
4
- getURL: (r, { studentId: s, userMilestoneId: e }) => `${o}/users/${s}/user-milestone/${e}/tests`
1
+ import { createPostAPI as e } from "@cuemath/rest-api";
2
+ import { BASE_URL_V3_1 as s } from "../../../../../constants/api.js";
3
+ const { usePost: i } = e({
4
+ getURL: (o, { userMilestoneId: t }) => `${s}/user-milestone/${t}/tests`
5
5
  });
6
6
  export {
7
- u as usePostTestSheetAssign
7
+ i as usePostTestSheetAssign
8
8
  };
9
9
  //# sourceMappingURL=test-sheet-assign.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"test-sheet-assign.js","sources":["../../../../../../src/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.ts"],"sourcesContent":["import type { TTestDifficultyLevel } from '../tests-creation-types';\nimport type { ITestHelpPreviewResponse } from './preview-test-sheet';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../../constants/api';\n\ninterface ITestSheetAssignPayload {\n title: string;\n items: ITestHelpPreviewResponse[];\n node_params: {\n is_timed: boolean;\n sheet_time: number;\n difficulty_level: TTestDifficultyLevel;\n };\n}\n\nconst { usePost: usePostTestSheetAssign } = createPostAPI<\n never,\n ITestSheetAssignPayload,\n { studentId: string; userMilestoneId: string }\n>({\n getURL: (_, { studentId, userMilestoneId }) =>\n `${BASE_URL_V3}/users/${studentId}/user-milestone/${userMilestoneId}/tests`,\n});\n\nexport { usePostTestSheetAssign };\n"],"names":["usePostTestSheetAssign","createPostAPI","_","studentId","userMilestoneId","BASE_URL_V3"],"mappings":";;AAiBA,MAAM,EAAE,SAASA,EAAuB,IAAIC,EAI1C;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,GAAW,iBAAAC,EAAA,MACvB,GAAGC,CAAW,UAAUF,CAAS,mBAAmBC,CAAe;AACvE,CAAC;"}
1
+ {"version":3,"file":"test-sheet-assign.js","sources":["../../../../../../src/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.ts"],"sourcesContent":["import type { TTestDifficultyLevel } from '../tests-creation-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../../constants/api';\n\ninterface ITestSheetAssignPayload {\n node_params: {\n is_timed: boolean;\n sheet_time: number;\n difficulty_level: TTestDifficultyLevel;\n };\n}\n\nconst { usePost: usePostTestSheetAssign } = createPostAPI<\n never,\n ITestSheetAssignPayload,\n { userMilestoneId: string }\n>({\n getURL: (_, { userMilestoneId }) => `${BASE_URL_V3_1}/user-milestone/${userMilestoneId}/tests`,\n});\n\nexport { usePostTestSheetAssign };\n"],"names":["usePostTestSheetAssign","createPostAPI","_","userMilestoneId","BASE_URL_V3_1"],"mappings":";;AAcA,MAAM,EAAE,SAASA,EAAuB,IAAIC,EAI1C;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,iBAAAC,EAAsB,MAAA,GAAGC,CAAa,mBAAmBD,CAAe;AACxF,CAAC;"}
@@ -1,5 +1,5 @@
1
1
  import { jsx as l, jsxs as W } from "react/jsx-runtime";
2
- import { memo as G, useState as _, useCallback as i, useEffect as O } from "react";
2
+ import { memo as G, useState as P, useCallback as i, useEffect as w } from "react";
3
3
  import U from "../../../ui/buttons/button/button.js";
4
4
  import X from "../../../ui/layout/flex-view.js";
5
5
  import q from "../../../ui/loader/app-loader/app-loader.js";
@@ -16,16 +16,16 @@ const ee = {
16
16
  title: null,
17
17
  duration: null,
18
18
  chapters: null
19
- }, te = G((D) => {
20
- const { milestoneId: s, studentId: h, testNumber: f, onTestAssign: v, onExit: L, onError: c } = D, [w, x] = _("CHAPTER_SELECTION"), [o, p] = _(ee), [d, I] = _([]), m = i((e) => {
21
- x(e);
22
- }, []), $ = i(
19
+ }, te = G((E) => {
20
+ const { milestoneId: s, studentId: y, testNumber: O, onTestAssign: T, onExit: D, onError: c } = E, [C, L] = P("CHAPTER_SELECTION"), [o, f] = P(ee), [x, _] = P([]), m = i((e) => {
21
+ L(e);
22
+ }, []), F = i(
23
23
  (e, t) => {
24
- (e || !(t != null && t.length)) && (m("CHAPTER_SELECTION"), p((n) => {
25
- const { chapters: r, selectedChapters: u } = n, V = r == null ? void 0 : r.map((C) => u != null && u.includes(C.id) ? {
26
- ...C,
24
+ (e || !(t != null && t.length)) && (m("CHAPTER_SELECTION"), f((n) => {
25
+ const { chapters: r, selectedChapters: u } = n, V = r == null ? void 0 : r.map((g) => u != null && u.includes(g.id) ? {
26
+ ...g,
27
27
  item_bank_enabled: !1
28
- } : C);
28
+ } : g);
29
29
  return {
30
30
  ...n,
31
31
  chapters: V ?? null,
@@ -35,43 +35,39 @@ const ee = {
35
35
  };
36
36
  }), c(
37
37
  "We're experiencing a temporary limitation with the chapters you've selected. Please select alternative chapters and proceed."
38
- )), e ? c(e) : t && I(t);
38
+ )), e ? c(e) : t && _(t);
39
39
  },
40
- [c, I, m]
41
- ), F = i(
40
+ [c, _, m]
41
+ ), H = i(
42
42
  (e) => {
43
- e ? c(e) : v();
43
+ e ? c(e) : T();
44
44
  },
45
- [c, v]
45
+ [c, T]
46
46
  ), {
47
- get: A,
48
- data: H,
49
- isProcessing: N,
47
+ get: v,
48
+ data: N,
49
+ isProcessing: $,
50
50
  isProcessingFailed: b,
51
- error: g
51
+ error: h
52
52
  } = B(s, {
53
- with_plan: !0,
54
53
  with_sheets: !0
55
- }), { post: S, isProcessing: M } = Y({
56
- onComplete: $
57
- }), { post: E, isProcessing: R } = J({
54
+ }), { post: I, isProcessing: M } = Y({
58
55
  onComplete: F
59
- }), { user_milestone_plan: j } = H || {}, { user_chapters: a } = j || {}, y = i(
56
+ }), { post: A, isProcessing: R } = J({
57
+ onComplete: H
58
+ }), { user_milestone_plan: j } = N || {}, { user_chapters: a } = j || {}, S = i(
60
59
  (e) => {
61
- S(e);
60
+ I(e);
62
61
  },
63
- [S]
64
- ), T = i(() => {
65
- A(s, {
66
- with_plan: !0,
62
+ [I]
63
+ ), p = i(() => {
64
+ v(s, {
67
65
  with_sheets: !0
68
66
  });
69
- }, [A, s]), k = i(() => {
67
+ }, [v, s]), k = i(() => {
70
68
  const { duration: e, difficultyLevel: t, selectedChapters: n } = o;
71
- e && t && n && E(
69
+ e && t && n && A(
72
70
  {
73
- items: d,
74
- title: `Test ${f}`,
75
71
  node_params: {
76
72
  is_timed: !0,
77
73
  sheet_time: e * 60,
@@ -79,29 +75,28 @@ const ee = {
79
75
  }
80
76
  },
81
77
  {
82
- studentId: h,
83
78
  userMilestoneId: s
84
79
  }
85
80
  );
86
- }, [E, o, h, s, d, f]), P = i(
81
+ }, [A, o, s]), d = i(
87
82
  (e, t) => {
88
83
  if (m(e), t) {
89
84
  const { difficultyLevel: n, duration: r } = t;
90
- p((u) => ({ ...u, ...t })), e === "PREVIEW" && n && r && y({
85
+ f((u) => ({ ...u, ...t })), e === "PREVIEW" && n && r && S({
91
86
  difficulty_level: n,
92
87
  duration: r,
93
88
  user_chapter_ids: o.selectedChapters || []
94
89
  });
95
90
  }
96
91
  },
97
- [m, y, o]
92
+ [m, S, o]
98
93
  );
99
- return O(() => {
100
- s && T();
101
- }, [s, T]), O(() => {
102
- a && a.length > 0 && p((e) => ({ ...e, chapters: a }));
103
- }, [a]), N || M ? /* @__PURE__ */ l(q, { height: "100vh" }) : b ? /* @__PURE__ */ W(X, { $height: "100vh", $flexGapX: 1.5, $alignItems: "center", $justifyContent: "center", children: [
104
- /* @__PURE__ */ l(z, { $renderAs: "h6", children: (g == null ? void 0 : g.message) || "Oops! Something went wrong." }),
94
+ return w(() => {
95
+ s && p();
96
+ }, [s, p]), w(() => {
97
+ a && a.length > 0 && f((e) => ({ ...e, chapters: a }));
98
+ }, [a]), $ || M ? /* @__PURE__ */ l(q, { height: "100vh" }) : b ? /* @__PURE__ */ W(X, { $height: "100vh", $flexGapX: 1.5, $alignItems: "center", $justifyContent: "center", children: [
99
+ /* @__PURE__ */ l(z, { $renderAs: "h6", children: (h == null ? void 0 : h.message) || "Oops! Something went wrong." }),
105
100
  /* @__PURE__ */ l(
106
101
  U,
107
102
  {
@@ -110,26 +105,26 @@ const ee = {
110
105
  shape: "square",
111
106
  renderAs: "primary",
112
107
  label: "Try again",
113
- onClick: T
108
+ onClick: p
114
109
  }
115
110
  )
116
- ] }) : a ? w === "PREVIEW" ? /* @__PURE__ */ l(
111
+ ] }) : a ? C === "PREVIEW" ? /* @__PURE__ */ l(
117
112
  Z,
118
113
  {
119
- studentId: h,
120
- items: d,
121
- testNumber: f,
114
+ studentId: y,
115
+ items: x,
116
+ testNumber: O,
122
117
  isAssignInProgress: R,
123
- onTestStageChange: P,
118
+ onTestStageChange: d,
124
119
  onTestSheetAssign: k
125
120
  }
126
- ) : w === "DIFFICULTY_AND_DURATION_SELECTION" ? /* @__PURE__ */ l(
121
+ ) : C === "DIFFICULTY_AND_DURATION_SELECTION" ? /* @__PURE__ */ l(
127
122
  Q,
128
123
  {
129
124
  testFormData: o,
130
- onTestStageChange: P
125
+ onTestStageChange: d
131
126
  }
132
- ) : /* @__PURE__ */ l(K, { testFormData: o, onProceed: P, onExit: L }) : null;
127
+ ) : /* @__PURE__ */ l(K, { testFormData: o, onProceed: d, onExit: D }) : null;
133
128
  }), pe = te;
134
129
  export {
135
130
  pe as default
@@ -1 +1 @@
1
- {"version":3,"file":"tests-creation.js","sources":["../../../../../src/features/milestone/milestone-tests/tests-creation/tests-creation.tsx"],"sourcesContent":["import type { ITestHelpPreviewPayload, ITestHelpPreviewResponse } from './api/preview-test-sheet';\nimport type { ITestFromData, ITestsCreationProps, TTestsStage } from './tests-creation-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useState } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useMilestoneGet } from '../../edit/comps/edit-milestone-modal/api/get-milestone';\nimport { usePostTestHelpPreview } from './api/preview-test-sheet';\nimport { usePostTestSheetAssign } from './api/test-sheet-assign';\nimport ChapterSelection from './test-stages/chapter-selection/chapter-selection';\nimport DifficultyAndDurationSelection from './test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection';\nimport TestPreview from './test-stages/test-preview/test-preview';\n\nconst initFormData: ITestFromData = {\n selectedChapters: null,\n difficultyLevel: null,\n title: null,\n duration: null,\n chapters: null,\n};\n\nconst TestsCreation: FC<ITestsCreationProps> = memo(props => {\n const { milestoneId, studentId, testNumber, onTestAssign, onExit, onError } = props;\n\n const [testStage, setTestStage] = useState<TTestsStage>('CHAPTER_SELECTION');\n const [testFormData, setTestFromData] = useState<ITestFromData>(initFormData);\n const [testPreviewItems, setTestPreviewItems] = useState<ITestHelpPreviewResponse[]>([]);\n\n const handleOnTestStageChange = useCallback((nextStage: TTestsStage) => {\n setTestStage(nextStage);\n }, []);\n\n const handleOnTestHelpPreviewComplete = useCallback(\n (errorMessage: string | null, data?: ITestHelpPreviewResponse[]) => {\n if (errorMessage || !data?.length) {\n handleOnTestStageChange('CHAPTER_SELECTION');\n\n setTestFromData(prev => {\n const { chapters, selectedChapters } = prev;\n\n const updatedChapters = chapters?.map(chapter => {\n if (selectedChapters?.includes(chapter.id)) {\n return {\n ...chapter,\n item_bank_enabled: false,\n };\n }\n\n return chapter;\n });\n\n return {\n ...prev,\n chapters: updatedChapters ?? null,\n selectedChapters: null,\n difficultyLevel: null,\n duration: null,\n };\n });\n\n onError(\n `We're experiencing a temporary limitation with the chapters you've selected. Please select alternative chapters and proceed.`,\n );\n }\n\n if (errorMessage) {\n onError(errorMessage);\n } else if (data) {\n setTestPreviewItems(data);\n }\n },\n [onError, setTestPreviewItems, handleOnTestStageChange],\n );\n\n const handleOnTestSheetAssignComplete = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n onError(errorMessage);\n } else {\n onTestAssign();\n }\n },\n [onError, onTestAssign],\n );\n\n const {\n get: getMilestone,\n data: currentMilestoneData,\n isProcessing: isMilestoneProcessing,\n isProcessingFailed: isMilestoneProcessingFailed,\n error: milestoneGetError,\n } = useMilestoneGet(milestoneId, {\n with_plan: true,\n with_sheets: true,\n });\n\n const { post: postTestHelpPreview, isProcessing: testPreviewIsProcessing } =\n usePostTestHelpPreview({\n onComplete: handleOnTestHelpPreviewComplete,\n });\n\n const { post: postTestSheetAssign, isProcessing: testAssignIsProcessing } =\n usePostTestSheetAssign({\n onComplete: handleOnTestSheetAssignComplete,\n });\n\n const { user_milestone_plan: userMilestonePlan } = currentMilestoneData || {};\n const { user_chapters: userChapters } = userMilestonePlan || {};\n\n const handleOnPostTestHelpPreview = useCallback(\n (data: ITestHelpPreviewPayload) => {\n postTestHelpPreview(data);\n },\n [postTestHelpPreview],\n );\n\n const handleOnGetMilestone = useCallback(() => {\n getMilestone(milestoneId, {\n with_plan: true,\n with_sheets: true,\n });\n }, [getMilestone, milestoneId]);\n\n const handleOnTestSheetAssign = useCallback(() => {\n const { duration, difficultyLevel, selectedChapters } = testFormData;\n\n if (duration && difficultyLevel && selectedChapters) {\n postTestSheetAssign(\n {\n items: testPreviewItems,\n title: `Test ${testNumber}`,\n node_params: {\n is_timed: true,\n sheet_time: duration * 60,\n difficulty_level: difficultyLevel,\n },\n },\n {\n studentId,\n userMilestoneId: milestoneId,\n },\n );\n }\n }, [postTestSheetAssign, testFormData, studentId, milestoneId, testPreviewItems, testNumber]);\n\n const handleOnProceed = useCallback(\n (nextStage: TTestsStage, updatedForm?: ITestFromData) => {\n handleOnTestStageChange(nextStage);\n\n if (updatedForm) {\n const { difficultyLevel, duration } = updatedForm;\n\n setTestFromData(prev => ({ ...prev, ...updatedForm }));\n\n if (nextStage === 'PREVIEW' && difficultyLevel && duration) {\n handleOnPostTestHelpPreview({\n difficulty_level: difficultyLevel,\n duration: duration,\n user_chapter_ids: testFormData.selectedChapters || [],\n });\n }\n }\n },\n [handleOnTestStageChange, handleOnPostTestHelpPreview, testFormData],\n );\n\n useEffect(() => {\n if (milestoneId) {\n handleOnGetMilestone();\n }\n }, [milestoneId, handleOnGetMilestone]);\n\n useEffect(() => {\n if (userChapters && userChapters.length > 0) {\n setTestFromData(prev => ({ ...prev, chapters: userChapters }));\n }\n }, [userChapters]);\n\n if (isMilestoneProcessing || testPreviewIsProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isMilestoneProcessingFailed) {\n return (\n <FlexView $height=\"100vh\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{milestoneGetError?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnGetMilestone}\n />\n </FlexView>\n );\n }\n\n if (!userChapters) return null;\n\n if (testStage === 'PREVIEW') {\n return (\n <TestPreview\n studentId={studentId}\n items={testPreviewItems}\n testNumber={testNumber}\n isAssignInProgress={testAssignIsProcessing}\n onTestStageChange={handleOnProceed}\n onTestSheetAssign={handleOnTestSheetAssign}\n />\n );\n }\n\n if (testStage === 'DIFFICULTY_AND_DURATION_SELECTION') {\n return (\n <DifficultyAndDurationSelection\n testFormData={testFormData}\n onTestStageChange={handleOnProceed}\n />\n );\n }\n\n return (\n <ChapterSelection testFormData={testFormData} onProceed={handleOnProceed} onExit={onExit} />\n );\n});\n\nexport default TestsCreation;\n"],"names":["initFormData","TestsCreation","memo","props","milestoneId","studentId","testNumber","onTestAssign","onExit","onError","testStage","setTestStage","useState","testFormData","setTestFromData","testPreviewItems","setTestPreviewItems","handleOnTestStageChange","useCallback","nextStage","handleOnTestHelpPreviewComplete","errorMessage","data","prev","chapters","selectedChapters","updatedChapters","chapter","handleOnTestSheetAssignComplete","getMilestone","currentMilestoneData","isMilestoneProcessing","isMilestoneProcessingFailed","milestoneGetError","useMilestoneGet","postTestHelpPreview","testPreviewIsProcessing","usePostTestHelpPreview","postTestSheetAssign","testAssignIsProcessing","usePostTestSheetAssign","userMilestonePlan","userChapters","handleOnPostTestHelpPreview","handleOnGetMilestone","handleOnTestSheetAssign","duration","difficultyLevel","handleOnProceed","updatedForm","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","TestPreview","DifficultyAndDurationSelection","ChapterSelection","TestsCreation$1"],"mappings":";;;;;;;;;;;;AAiBA,MAAMA,KAA8B;AAAA,EAClC,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AACZ,GAEMC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,aAAAC,GAAa,WAAAC,GAAW,YAAAC,GAAY,cAAAC,GAAc,QAAAC,GAAQ,SAAAC,EAAY,IAAAN,GAExE,CAACO,GAAWC,CAAY,IAAIC,EAAsB,mBAAmB,GACrE,CAACC,GAAcC,CAAe,IAAIF,EAAwBZ,EAAY,GACtE,CAACe,GAAkBC,CAAmB,IAAIJ,EAAqC,CAAE,CAAA,GAEjFK,IAA0BC,EAAY,CAACC,MAA2B;AACtE,IAAAR,EAAaQ,CAAS;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAkCF;AAAA,IACtC,CAACG,GAA6BC,MAAsC;AAC9D,OAAAD,KAAgB,EAACC,KAAA,QAAAA,EAAM,aACzBL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KACxC5B,EAAgB,QAAS,EAAE,GAAGS,GAAM,UAAUmB,EAAe,EAAA;AAAA,EAC/D,GACC,CAACA,CAAY,CAAC,GAEbX,KAAyBK,IACpB,gBAAAe,EAACC,GAAU,EAAA,QAAO,QAAQ,CAAA,IAG/BpB,IAEA,gBAAAqB,EAACC,KAAS,SAAQ,SAAQ,WAAW,KAAK,aAAY,UAAS,iBAAgB,UAC7E,UAAA;AAAA,IAAA,gBAAAH,EAACI,GAAK,EAAA,WAAU,MAAM,WAAAtB,KAAA,gBAAAA,EAAmB,YAAW,+BAA8B;AAAA,IAClF,gBAAAkB;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASZ;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA,IAICF,IAEDhC,MAAc,YAEd,gBAAAyC;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,WAAApD;AAAA,MACA,OAAOU;AAAA,MACP,YAAAT;AAAA,MACA,oBAAoBiC;AAAA,MACpB,mBAAmBS;AAAA,MACnB,mBAAmBH;AAAA,IAAA;AAAA,EAAA,IAKrBnC,MAAc,sCAEd,gBAAAyC;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,cAAA7C;AAAA,MACA,mBAAmBmC;AAAA,IAAA;AAAA,EAAA,IAMtB,gBAAAG,EAAAQ,GAAA,EAAiB,cAAA9C,GAA4B,WAAWmC,GAAiB,QAAAxC,EAAgB,CAAA,IAzBlE;AA2B5B,CAAC,GAEDoD,KAAe3D;"}
1
+ {"version":3,"file":"tests-creation.js","sources":["../../../../../src/features/milestone/milestone-tests/tests-creation/tests-creation.tsx"],"sourcesContent":["import type { ITestHelpPreviewPayload, ITestHelpPreviewResponse } from './api/preview-test-sheet';\nimport type { ITestFromData, ITestsCreationProps, TTestsStage } from './tests-creation-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useState } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useMilestoneGet } from '../../edit/comps/edit-milestone-modal/api/get-milestone';\nimport { usePostTestHelpPreview } from './api/preview-test-sheet';\nimport { usePostTestSheetAssign } from './api/test-sheet-assign';\nimport ChapterSelection from './test-stages/chapter-selection/chapter-selection';\nimport DifficultyAndDurationSelection from './test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection';\nimport TestPreview from './test-stages/test-preview/test-preview';\n\nconst initFormData: ITestFromData = {\n selectedChapters: null,\n difficultyLevel: null,\n title: null,\n duration: null,\n chapters: null,\n};\n\nconst TestsCreation: FC<ITestsCreationProps> = memo(props => {\n const { milestoneId, studentId, testNumber, onTestAssign, onExit, onError } = props;\n\n const [testStage, setTestStage] = useState<TTestsStage>('CHAPTER_SELECTION');\n const [testFormData, setTestFromData] = useState<ITestFromData>(initFormData);\n const [testPreviewItems, setTestPreviewItems] = useState<ITestHelpPreviewResponse[]>([]);\n\n const handleOnTestStageChange = useCallback((nextStage: TTestsStage) => {\n setTestStage(nextStage);\n }, []);\n\n const handleOnTestHelpPreviewComplete = useCallback(\n (errorMessage: string | null, data?: ITestHelpPreviewResponse[]) => {\n if (errorMessage || !data?.length) {\n handleOnTestStageChange('CHAPTER_SELECTION');\n\n setTestFromData(prev => {\n const { chapters, selectedChapters } = prev;\n\n const updatedChapters = chapters?.map(chapter => {\n if (selectedChapters?.includes(chapter.id)) {\n return {\n ...chapter,\n item_bank_enabled: false,\n };\n }\n\n return chapter;\n });\n\n return {\n ...prev,\n chapters: updatedChapters ?? null,\n selectedChapters: null,\n difficultyLevel: null,\n duration: null,\n };\n });\n\n onError(\n `We're experiencing a temporary limitation with the chapters you've selected. Please select alternative chapters and proceed.`,\n );\n }\n\n if (errorMessage) {\n onError(errorMessage);\n } else if (data) {\n setTestPreviewItems(data);\n }\n },\n [onError, setTestPreviewItems, handleOnTestStageChange],\n );\n\n const handleOnTestSheetAssignComplete = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n onError(errorMessage);\n } else {\n onTestAssign();\n }\n },\n [onError, onTestAssign],\n );\n\n const {\n get: getMilestone,\n data: currentMilestoneData,\n isProcessing: isMilestoneProcessing,\n isProcessingFailed: isMilestoneProcessingFailed,\n error: milestoneGetError,\n } = useMilestoneGet(milestoneId, {\n with_sheets: true,\n });\n\n const { post: postTestHelpPreview, isProcessing: testPreviewIsProcessing } =\n usePostTestHelpPreview({\n onComplete: handleOnTestHelpPreviewComplete,\n });\n\n const { post: postTestSheetAssign, isProcessing: testAssignIsProcessing } =\n usePostTestSheetAssign({\n onComplete: handleOnTestSheetAssignComplete,\n });\n\n const { user_milestone_plan: userMilestonePlan } = currentMilestoneData || {};\n const { user_chapters: userChapters } = userMilestonePlan || {};\n\n const handleOnPostTestHelpPreview = useCallback(\n (data: ITestHelpPreviewPayload) => {\n postTestHelpPreview(data);\n },\n [postTestHelpPreview],\n );\n\n const handleOnGetMilestone = useCallback(() => {\n getMilestone(milestoneId, {\n with_sheets: true,\n });\n }, [getMilestone, milestoneId]);\n\n const handleOnTestSheetAssign = useCallback(() => {\n const { duration, difficultyLevel, selectedChapters } = testFormData;\n\n if (duration && difficultyLevel && selectedChapters) {\n postTestSheetAssign(\n {\n node_params: {\n is_timed: true,\n sheet_time: duration * 60,\n difficulty_level: difficultyLevel,\n },\n },\n {\n userMilestoneId: milestoneId,\n },\n );\n }\n }, [postTestSheetAssign, testFormData, milestoneId]);\n\n const handleOnProceed = useCallback(\n (nextStage: TTestsStage, updatedForm?: ITestFromData) => {\n handleOnTestStageChange(nextStage);\n\n if (updatedForm) {\n const { difficultyLevel, duration } = updatedForm;\n\n setTestFromData(prev => ({ ...prev, ...updatedForm }));\n\n if (nextStage === 'PREVIEW' && difficultyLevel && duration) {\n handleOnPostTestHelpPreview({\n difficulty_level: difficultyLevel,\n duration: duration,\n user_chapter_ids: testFormData.selectedChapters || [],\n });\n }\n }\n },\n [handleOnTestStageChange, handleOnPostTestHelpPreview, testFormData],\n );\n\n useEffect(() => {\n if (milestoneId) {\n handleOnGetMilestone();\n }\n }, [milestoneId, handleOnGetMilestone]);\n\n useEffect(() => {\n if (userChapters && userChapters.length > 0) {\n setTestFromData(prev => ({ ...prev, chapters: userChapters }));\n }\n }, [userChapters]);\n\n if (isMilestoneProcessing || testPreviewIsProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isMilestoneProcessingFailed) {\n return (\n <FlexView $height=\"100vh\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{milestoneGetError?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnGetMilestone}\n />\n </FlexView>\n );\n }\n\n if (!userChapters) return null;\n\n if (testStage === 'PREVIEW') {\n return (\n <TestPreview\n studentId={studentId}\n items={testPreviewItems}\n testNumber={testNumber}\n isAssignInProgress={testAssignIsProcessing}\n onTestStageChange={handleOnProceed}\n onTestSheetAssign={handleOnTestSheetAssign}\n />\n );\n }\n\n if (testStage === 'DIFFICULTY_AND_DURATION_SELECTION') {\n return (\n <DifficultyAndDurationSelection\n testFormData={testFormData}\n onTestStageChange={handleOnProceed}\n />\n );\n }\n\n return (\n <ChapterSelection testFormData={testFormData} onProceed={handleOnProceed} onExit={onExit} />\n );\n});\n\nexport default TestsCreation;\n"],"names":["initFormData","TestsCreation","memo","props","milestoneId","studentId","testNumber","onTestAssign","onExit","onError","testStage","setTestStage","useState","testFormData","setTestFromData","testPreviewItems","setTestPreviewItems","handleOnTestStageChange","useCallback","nextStage","handleOnTestHelpPreviewComplete","errorMessage","data","prev","chapters","selectedChapters","updatedChapters","chapter","handleOnTestSheetAssignComplete","getMilestone","currentMilestoneData","isMilestoneProcessing","isMilestoneProcessingFailed","milestoneGetError","useMilestoneGet","postTestHelpPreview","testPreviewIsProcessing","usePostTestHelpPreview","postTestSheetAssign","testAssignIsProcessing","usePostTestSheetAssign","userMilestonePlan","userChapters","handleOnPostTestHelpPreview","handleOnGetMilestone","handleOnTestSheetAssign","duration","difficultyLevel","handleOnProceed","updatedForm","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","TestPreview","DifficultyAndDurationSelection","ChapterSelection","TestsCreation$1"],"mappings":";;;;;;;;;;;;AAiBA,MAAMA,KAA8B;AAAA,EAClC,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AACZ,GAEMC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,aAAAC,GAAa,WAAAC,GAAW,YAAAC,GAAY,cAAAC,GAAc,QAAAC,GAAQ,SAAAC,EAAY,IAAAN,GAExE,CAACO,GAAWC,CAAY,IAAIC,EAAsB,mBAAmB,GACrE,CAACC,GAAcC,CAAe,IAAIF,EAAwBZ,EAAY,GACtE,CAACe,GAAkBC,CAAmB,IAAIJ,EAAqC,CAAE,CAAA,GAEjFK,IAA0BC,EAAY,CAACC,MAA2B;AACtE,IAAAR,EAAaQ,CAAS;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAkCF;AAAA,IACtC,CAACG,GAA6BC,MAAsC;AAC9D,OAAAD,KAAgB,EAACC,KAAA,QAAAA,EAAM,aACzBL,EAAwB,mBAAmB,GAE3CH,EAAgB,CAAQS,MAAA;AAChB,cAAA,EAAE,UAAAC,GAAU,kBAAAC,EAAqB,IAAAF,GAEjCG,IAAkBF,KAAA,gBAAAA,EAAU,IAAI,CAAWG,MAC3CF,KAAA,QAAAA,EAAkB,SAASE,EAAQ,MAC9B;AAAA,UACL,GAAGA;AAAA,UACH,mBAAmB;AAAA,QAAA,IAIhBA;AAGF,eAAA;AAAA,UACL,GAAGJ;AAAA,UACH,UAAUG,KAAmB;AAAA,UAC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OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASZ;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA,IAICF,IAEDhC,MAAc,YAEd,gBAAAyC;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,WAAApD;AAAA,MACA,OAAOU;AAAA,MACP,YAAAT;AAAA,MACA,oBAAoBiC;AAAA,MACpB,mBAAmBS;AAAA,MACnB,mBAAmBH;AAAA,IAAA;AAAA,EAAA,IAKrBnC,MAAc,sCAEd,gBAAAyC;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,cAAA7C;AAAA,MACA,mBAAmBmC;AAAA,IAAA;AAAA,EAAA,IAMtB,gBAAAG,EAAAQ,GAAA,EAAiB,cAAA9C,GAA4B,WAAWmC,GAAiB,QAAAxC,EAAgB,CAAA,IAzBlE;AA2B5B,CAAC,GAEDoD,KAAe3D;"}
@@ -0,0 +1,9 @@
1
+ import { createGetAPI as r } from "@cuemath/rest-api";
2
+ import { BASE_URL_V3 as s } from "../../../constants/api.js";
3
+ const { useGet: p } = r({
4
+ getURL: (e, o, { courseStream: t }) => `${s}/users/${e}/course-streams/${t}/recent-chapters`
5
+ });
6
+ export {
7
+ p as useGetRecentChapters
8
+ };
9
+ //# sourceMappingURL=get-recent-chapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-recent-chapters.js","sources":["../../../../src/features/recent-chapters/api/get-recent-chapters.ts"],"sourcesContent":["import type { IChapterDataProps } from '../../chapters/chapter/chapter-types';\nimport type { TCourseStream } from '../../milestone/create/milestone-create-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../constants/api';\n\nconst { useGet: useGetRecentChapters } = createGetAPI<\n IChapterDataProps[],\n void,\n { courseStream: TCourseStream }\n>({\n getURL: (studentId: string, _, { courseStream }) =>\n `${BASE_URL_V3}/users/${studentId}/course-streams/${courseStream}/recent-chapters`,\n});\n\nexport { useGetRecentChapters };\n"],"names":["useGetRecentChapters","createGetAPI","studentId","_","courseStream","BASE_URL_V3"],"mappings":";;AAOA,MAAM,EAAE,QAAQA,EAAqB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAmBC,GAAG,EAAE,cAAAC,EAAA,MAC/B,GAAGC,CAAW,UAAUH,CAAS,mBAAmBE,CAAY;AACpE,CAAC;"}
@@ -0,0 +1,16 @@
1
+ import e from "styled-components";
2
+ const p = e.div(({ theme: t }) => {
3
+ const { WHITE_5: r, WHITE_2: a } = t.colors;
4
+ return `
5
+ display: grid;
6
+ grid-template-columns: repeat(4, 1fr);
7
+ align-content: start;
8
+ background: ${a};
9
+ background-image: linear-gradient(${r} 0.5px, transparent 0.5px), linear-gradient(90deg, ${r} 0.5px, transparent 0.5px);
10
+ background-size: 45px 45px;
11
+ `;
12
+ });
13
+ export {
14
+ p as ChaptersWrapper
15
+ };
16
+ //# sourceMappingURL=recent-chapters-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recent-chapters-styled.js","sources":["../../../src/features/recent-chapters/recent-chapters-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nconst ChaptersWrapper = styled.div(({ theme }) => {\n const { WHITE_5, WHITE_2 } = theme.colors;\n\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n align-content: start;\n background: ${WHITE_2};\n background-image: linear-gradient(${WHITE_5} 0.5px, transparent 0.5px), linear-gradient(90deg, ${WHITE_5} 0.5px, transparent 0.5px);\n background-size: 45px 45px;\n `;\n});\n\nexport { ChaptersWrapper };\n"],"names":["ChaptersWrapper","styled","theme","WHITE_5","WHITE_2"],"mappings":";AAEA,MAAMA,IAAkBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAAY;AAChD,QAAM,EAAE,SAAAC,GAAS,SAAAC,MAAYF,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA,kBAISE,CAAO;AAAA,wCACeD,CAAO,sDAAsDA,CAAO;AAAA;AAAA;AAG5G,CAAC;"}
@@ -0,0 +1,39 @@
1
+ import { jsxs as s, jsx as l } from "react/jsx-runtime";
2
+ import { useCallback as f, useEffect as h } from "react";
3
+ import C from "../chapters/chapters-list/chapter-item/chapter-item.js";
4
+ import d from "../ui/layout/flex-view.js";
5
+ import u from "../ui/text/text.js";
6
+ import { useGetRecentChapters as x } from "./api/get-recent-chapters.js";
7
+ import { ChaptersWrapper as g } from "./recent-chapters-styled.js";
8
+ const R = ({
9
+ studentId: r,
10
+ courseStream: t,
11
+ onChapterClick: p,
12
+ recentChaptersRef: a
13
+ }) => {
14
+ const { get: o, data: e, isProcessingFailed: m } = x(), i = f(() => {
15
+ o(r, void 0, { courseStream: t });
16
+ }, [t, o, r]);
17
+ return h(() => {
18
+ i();
19
+ }, [i]), m ? null : e && e.length > 0 ? /* @__PURE__ */ s(d, { $flexRowGapX: 1, ref: a, children: [
20
+ /* @__PURE__ */ s(u, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
21
+ "Recent Chapters (",
22
+ e == null ? void 0 : e.length,
23
+ ")"
24
+ ] }),
25
+ /* @__PURE__ */ l(g, { children: e.map((n, c) => /* @__PURE__ */ l(
26
+ C,
27
+ {
28
+ chapter: n,
29
+ onChapterClick: p,
30
+ itemIndex: c
31
+ },
32
+ n.id
33
+ )) })
34
+ ] }) : null;
35
+ }, G = R;
36
+ export {
37
+ G as default
38
+ };
39
+ //# sourceMappingURL=recent-chapters.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recent-chapters.js","sources":["../../../src/features/recent-chapters/recent-chapters.tsx"],"sourcesContent":["import type { IChaptersListProps } from '../chapters/chapters-list/chapters-list-types';\nimport type { TCourseStream } from '../milestone/create/milestone-create-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect } from 'react';\n\nimport ChapterItem from '../chapters/chapters-list/chapter-item/chapter-item';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\nimport { useGetRecentChapters } from './api/get-recent-chapters';\nimport * as Styled from './recent-chapters-styled';\n\ninterface RecentChaptersProps {\n studentId: string;\n courseStream: TCourseStream;\n userType: TUserTypes;\n onChapterClick: IChaptersListProps['onChapterClick'];\n recentChaptersRef?: React.RefObject<HTMLDivElement>;\n}\n\nconst RecentChapters: FC<RecentChaptersProps> = ({\n studentId,\n courseStream,\n onChapterClick,\n recentChaptersRef,\n}) => {\n const { get: getChapters, data: chapterData, isProcessingFailed } = useGetRecentChapters();\n\n const fetchChapterDetails = useCallback(() => {\n getChapters(studentId, undefined, { courseStream });\n }, [courseStream, getChapters, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n if (chapterData && chapterData.length > 0) {\n return (\n <FlexView $flexRowGapX={1} ref={recentChaptersRef}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({chapterData?.length})\n </Text>\n <Styled.ChaptersWrapper>\n {chapterData.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n ))}\n </Styled.ChaptersWrapper>\n </FlexView>\n );\n }\n\n return null;\n};\n\nexport default RecentChapters;\n"],"names":["RecentChapters","studentId","courseStream","onChapterClick","recentChaptersRef","getChapters","chapterData","isProcessingFailed","useGetRecentChapters","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","Text","jsx","Styled.ChaptersWrapper","chapter","idx","ChapterItem","RecentChapters$1"],"mappings":";;;;;;;AAqBA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,KAAKC,GAAa,MAAMC,GAAa,oBAAAC,EAAA,IAAuBC,KAE9DC,IAAsBC,EAAY,MAAM;AAC5C,IAAAL,EAAYJ,GAAW,QAAW,EAAE,cAAAC,EAAc,CAAA;AAAA,EACjD,GAAA,CAACA,GAAcG,GAAaJ,CAAS,CAAC;AAMzC,SAJAU,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAEpBF,IACK,OAGLD,KAAeA,EAAY,SAAS,IAEnC,gBAAAM,EAAAC,GAAA,EAAS,cAAc,GAAG,KAAKT,GAC9B,UAAA;AAAA,IAAA,gBAAAQ,EAACE,GAAK,EAAA,WAAU,aAAY,QAAO,cAAa,UAAA;AAAA,MAAA;AAAA,MAC5BR,KAAA,gBAAAA,EAAa;AAAA,MAAO;AAAA,IAAA,GACxC;AAAA,IACA,gBAAAS,EAACC,GAAA,EACE,YAAY,IAAI,CAACC,GAASC,MACzB,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QAEC,SAAAF;AAAA,QACA,gBAAAd;AAAA,QACA,WAAWe;AAAA,MAAA;AAAA,MAHND,EAAQ;AAAA,IAKhB,CAAA,GACH;AAAA,EACF,EAAA,CAAA,IAIG;AACT,GAEAG,IAAepB;"}
@@ -0,0 +1,39 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { h as f } from "../../../node_modules/humanize-plus/dist/humanize.js";
3
+ import { memo as $ } from "react";
4
+ import x from "styled-components";
5
+ import _ from "../../homework/homework-card.js";
6
+ import g from "../../ui/layout/flex-view.js";
7
+ const w = x.div`
8
+ display: grid;
9
+ grid-template-columns: repeat(3, 200px);
10
+ grid-gap: 32px;
11
+ justify-content: center;
12
+ padding: 32px 0;
13
+ `, R = ({ sheets: r, userType: n, ...m }) => /* @__PURE__ */ t(g, { children: /* @__PURE__ */ t(w, { children: r.map((o, s) => {
14
+ const {
15
+ title: d,
16
+ node_id: a,
17
+ worksheet_id: p,
18
+ is_timed: l,
19
+ sheet_time: c,
20
+ total_questions: e
21
+ } = o, u = Math.ceil((c || 0) / 60), i = e ? `${e} ${f.pluralize(e, "Question")}` : "", h = l ? `${i} ${u} Mins` : i;
22
+ return /* @__PURE__ */ t(
23
+ _,
24
+ {
25
+ header: d,
26
+ subHeader: h,
27
+ userType: n,
28
+ nodeData: o,
29
+ renderAs: "milestone",
30
+ shouldOpenOnRight: (s + 1) % 3 === 0,
31
+ ...m
32
+ },
33
+ `${p}_${a}_${s}`
34
+ );
35
+ }) }) }), j = $(R);
36
+ export {
37
+ j as default
38
+ };
39
+ //# sourceMappingURL=resource-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({ sheets, userType, ...sheetCallBacks }) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText} ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","userType","sheetCallBacks","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC,EAAE,QAAAC,GAAQ,UAAAC,GAAU,GAAGC,EAAe,MACnF,gBAAAC,EAAAC,GAAA,EACC,4BAACP,GACE,EAAA,UAAAG,EAAO,IAAI,CAACK,GAAOC,MAAQ;AACpB,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,cAAcC;AAAA,IACd,UAAUC;AAAA,IACV,YAAYC;AAAA,IACZ,iBAAiBC;AAAA,EACf,IAAAP,GACEQ,IAAiB,KAAK,MAAMF,KAAa,KAAK,EAAE,GAChDG,IAAqBF,IACvB,GAAGA,CAAc,IAAIG,EAAU,UAAAH,GAAgB,UAAU,CAAC,KAC1D,IACEI,IAAYN,IACd,GAAGI,CAAkB,IAAID,CAAc,UACvCC;AAGF,SAAA,gBAAAX;AAAA,IAACc;AAAA,IAAA;AAAA,MAEC,QAAQV;AAAA,MACR,WAAAS;AAAA,MACA,UAAAf;AAAA,MACA,UAAUI;AAAA,MACV,UAAS;AAAA,MACT,oBAAoBC,IAAM,KAAK,MAAM;AAAA,MACpC,GAAGJ;AAAA,IAAA;AAAA,IAPC,GAAGO,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAU1C,CAAC,GACH,EACF,CAAA,GAGaY,IAAAC,EAAKpB,CAAa;"}
@@ -8,7 +8,7 @@ const c = e(i)(({ theme: r, $isMilestoneWidget: o }) => {
8
8
  ${o && `
9
9
  border-top-width: 0;
10
10
  border-left-width: 0;
11
-
11
+
12
12
  &:nth-child(even) {
13
13
  border-right-width: 0;
14
14
  }
@@ -1 +1 @@
1
- {"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n\n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = 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 IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
1
+ {"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n \n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = 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 IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
@@ -1,4 +1,4 @@
1
- const E = {
1
+ const A = {
2
2
  CHANGE_LOCATION: "Change location",
3
3
  RESET_PROGRESS: "Reset progress",
4
4
  MARK_AS_FAMILIAR: "Mark as learned",
@@ -11,9 +11,10 @@ const E = {
11
11
  MARK_AS_DONE: "Mark as Done",
12
12
  SKIP: "Skip",
13
13
  REVERT_SKIP: "Revert Skip",
14
- REDO: "Redo"
14
+ REDO: "Redo",
15
+ ASSIGN_AS_HW: "Assign as HW"
15
16
  };
16
17
  export {
17
- E as TEACHER_MENU_OPTIONS
18
+ A as TEACHER_MENU_OPTIONS
18
19
  };
19
20
  //# sourceMappingURL=teacher-actions-constant.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"teacher-actions-constant.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.ts"],"sourcesContent":["export const TEACHER_MENU_OPTIONS = {\n CHANGE_LOCATION: 'Change location',\n RESET_PROGRESS: 'Reset progress',\n MARK_AS_FAMILIAR: 'Mark as learned',\n MARK_BACK_AS_RELEVANT: 'Mark back as relevant',\n MARK_AS_NOT_NEEDED: 'Mark as not needed',\n UNASSIGN: 'Unassign',\n //* New options\n ENABLE_AS_HW: 'Enable as HW',\n REVERT_TO_CW: 'Revert to CW',\n MARK_AS_DONE: 'Mark as Done',\n SKIP: 'Skip',\n REVERT_SKIP: 'Revert Skip',\n REDO: 'Redo',\n} as const;\n"],"names":["TEACHER_MENU_OPTIONS"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AACR;"}
1
+ {"version":3,"file":"teacher-actions-constant.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.ts"],"sourcesContent":["export const TEACHER_MENU_OPTIONS = {\n CHANGE_LOCATION: 'Change location',\n RESET_PROGRESS: 'Reset progress',\n MARK_AS_FAMILIAR: 'Mark as learned',\n MARK_BACK_AS_RELEVANT: 'Mark back as relevant',\n MARK_AS_NOT_NEEDED: 'Mark as not needed',\n UNASSIGN: 'Unassign',\n //* New options\n ENABLE_AS_HW: 'Enable as HW',\n REVERT_TO_CW: 'Revert to CW',\n MARK_AS_DONE: 'Mark as Done',\n SKIP: 'Skip',\n REVERT_SKIP: 'Revert Skip',\n REDO: 'Redo',\n ASSIGN_AS_HW: 'Assign as HW',\n} as const;\n"],"names":["TEACHER_MENU_OPTIONS"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,cAAc;AAChB;"}
@@ -2,7 +2,7 @@ import { createGetAPI as t } from "@cuemath/rest-api";
2
2
  import { BASE_URL_V1 as i } from "../../../constants/api.js";
3
3
  import { stringify as e } from "../../../helpers/query-string.js";
4
4
  const { useGet: f } = t({
5
- getURL: (o, r) => `${i}/trial/pricing/?${e(r)}`
5
+ getURL: (o, r) => `${i}/trial/pricing/v2/?${e(r)}`
6
6
  });
7
7
  export {
8
8
  f as useGetTrialPricing
@@ -1 +1 @@
1
- {"version":3,"file":"trial-pricing.js","sources":["../../../../src/features/trial-session/api/trial-pricing.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport { stringify } from '../../../helpers/query-string';\n\ninterface IGetPricingQuery {\n student_id: string;\n}\n\ntype TDiscountDetails = {\n discount_duration: number;\n original_plan_details: { duration: number };\n};\n\ntype TPricingDetails = {\n amount: number;\n amount_after_coupon: number;\n classes_per_week: number;\n currency_symbol: string;\n discount_details: TDiscountDetails;\n fee_per_class_after_discount: number;\n meta_text: string;\n no_of_classes: number;\n duration: number;\n}[];\n\nconst { useGet: useGetTrialPricing } = createGetAPI<TPricingDetails, IGetPricingQuery>({\n getURL: (_, query) => `${BASE_URL_V1}/trial/pricing/?${stringify(query)}`,\n});\n\nexport { useGetTrialPricing };\n"],"names":["useGetTrialPricing","createGetAPI","_","query","BASE_URL_V1","stringify"],"mappings":";;;AA0BA,MAAM,EAAE,QAAQA,EAAmB,IAAIC,EAAgD;AAAA,EACrF,QAAQ,CAACC,GAAGC,MAAU,GAAGC,CAAW,mBAAmBC,EAAUF,CAAK,CAAC;AACzE,CAAC;"}
1
+ {"version":3,"file":"trial-pricing.js","sources":["../../../../src/features/trial-session/api/trial-pricing.ts"],"sourcesContent":["import type { ITrialPricingPlan } from '../comps/pricing/pricing-typed';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport { stringify } from '../../../helpers/query-string';\n\ninterface IGetPricingQuery {\n student_id: string;\n}\n\nconst { useGet: useGetTrialPricing } = createGetAPI<ITrialPricingPlan, IGetPricingQuery>({\n getURL: (_, query) => `${BASE_URL_V1}/trial/pricing/v2/?${stringify(query)}`,\n});\n\nexport { useGetTrialPricing };\n"],"names":["useGetTrialPricing","createGetAPI","_","query","BASE_URL_V1","stringify"],"mappings":";;;AAWA,MAAM,EAAE,QAAQA,EAAmB,IAAIC,EAAkD;AAAA,EACvF,QAAQ,CAACC,GAAGC,MAAU,GAAGC,CAAW,sBAAsBC,EAAUF,CAAK,CAAC;AAC5E,CAAC;"}
@@ -1,7 +1,7 @@
1
1
  import { jsxs as e, jsx as r, Fragment as _ } from "react/jsx-runtime";
2
2
  import { memo as P, useMemo as b } from "react";
3
3
  import { ILLUSTRATIONS as w } from "../../../../assets/illustrations/illustrations.js";
4
- import m from "../../../ui/image/image.js";
4
+ import c from "../../../ui/image/image.js";
5
5
  import D from "../../../ui/layout/flex-view.js";
6
6
  import n from "../../../ui/separator/separator.js";
7
7
  import x from "../../../ui/text/text.js";
@@ -9,9 +9,9 @@ import { useTrialSessionContext as O } from "../../context/use-trial-session-con
9
9
  import { TrialPageId as t } from "../../trial-session-constants.js";
10
10
  import N from "../slide-header/index.js";
11
11
  import { goalDetails as R, parentAppDetails as S, circleDetails as k } from "./offering-information-constants.js";
12
- import { Container as W, Wrapper as c, AnimationWrapper as B, DetailsWrapper as j, TextElement as d, RefundImageWrapper as F } from "./offering-information-styled.js";
12
+ import { Container as W, Wrapper as d, AnimationWrapper as B, DetailsWrapper as j, TextElement as p, RefundImageWrapper as F } from "./offering-information-styled.js";
13
13
  const J = P(() => {
14
- const { slideConfig: p } = O(), { id: i } = p, a = b(() => {
14
+ const { slideConfig: h } = O(), { id: i } = h, a = b(() => {
15
15
  switch (i) {
16
16
  case t.CIRCLE_INFORMATION:
17
17
  return k;
@@ -26,16 +26,16 @@ const J = P(() => {
26
26
  return /* @__PURE__ */ e(W, { children: [
27
27
  /* @__PURE__ */ r(n, { height: 60 }),
28
28
  /* @__PURE__ */ r(N, {}),
29
- /* @__PURE__ */ r(c, { $width: 750, $flexDirection: "row", $justifyContent: "center", children: a.length > 0 ? a.map((h, l, g) => {
29
+ /* @__PURE__ */ r(d, { $width: 750, $flexDirection: "row", $justifyContent: "center", children: a.length > 0 ? a.map((g, l, f) => {
30
30
  const {
31
- title: f,
31
+ title: u,
32
32
  description: o,
33
- animationBackground: u,
34
- infoBackground: $,
35
- animationSource: A,
36
- animationPadding: L,
37
- dimension: C
38
- } = h || {}, [I, E] = C || [], s = l === g.length - 1;
33
+ animationBackground: $,
34
+ infoBackground: A,
35
+ animationSource: L,
36
+ animationPadding: C,
37
+ dimension: I
38
+ } = g || {}, [E, T] = I || [], m = l === f.length - 1;
39
39
  return /* @__PURE__ */ e(D, { $flex: 1, children: [
40
40
  /* @__PURE__ */ r(
41
41
  B,
@@ -43,25 +43,25 @@ const J = P(() => {
43
43
  $justifyContent: "center",
44
44
  $alignItems: "center",
45
45
  $borderColor: "BLACK_1",
46
- $background: u,
47
- $gap: L,
48
- $isLastElement: s,
49
- children: /* @__PURE__ */ r(m, { src: A, width: I, height: E, withLoader: !0 })
46
+ $background: $,
47
+ $gap: C,
48
+ $isLastElement: m,
49
+ children: /* @__PURE__ */ r(c, { src: L, width: E, height: T, withLoader: !0 })
50
50
  }
51
51
  ),
52
52
  /* @__PURE__ */ e(
53
53
  j,
54
54
  {
55
- $background: $,
55
+ $background: A,
56
56
  $gapX: 1.375,
57
57
  $gutterX: 2,
58
58
  $borderColor: "BLACK_1",
59
- $isLastElement: s,
59
+ $isLastElement: m,
60
60
  $inherit: !0,
61
61
  children: [
62
- /* @__PURE__ */ r(d, { $renderAs: "ac2-black", children: f }),
62
+ /* @__PURE__ */ r(p, { $renderAs: "ac2-black", children: u }),
63
63
  /* @__PURE__ */ r(n, { heightX: 1 }),
64
- /* @__PURE__ */ r(d, { $renderAs: "ab3", children: typeof o == "string" ? o : o.map((T) => /* @__PURE__ */ r("li", { children: T })) })
64
+ /* @__PURE__ */ r(p, { $renderAs: "ab3", children: typeof o == "string" ? o : o.map((s) => /* @__PURE__ */ r("li", { children: s }, s)) })
65
65
  ]
66
66
  }
67
67
  )
@@ -70,7 +70,7 @@ const J = P(() => {
70
70
  i === t.PARENT_APP && /* @__PURE__ */ e(_, { children: [
71
71
  /* @__PURE__ */ r(n, { height: 50 }),
72
72
  /* @__PURE__ */ e(
73
- c,
73
+ d,
74
74
  {
75
75
  $width: 450,
76
76
  $gap: 14,
@@ -81,7 +81,7 @@ const J = P(() => {
81
81
  children: [
82
82
  /* @__PURE__ */ r(x, { $renderAs: "ab2", children: "Get 24/7 customer support through this app." }),
83
83
  /* @__PURE__ */ r(F, { children: /* @__PURE__ */ r(
84
- m,
84
+ c,
85
85
  {
86
86
  src: w.REFUND_POLICY_WITH_HEADPHONE,
87
87
  width: 135,
@@ -1 +1 @@
1
- {"version":3,"file":"offering-information.js","sources":["../../../../../src/features/trial-session/comps/offering-information/offering-information.tsx"],"sourcesContent":["import { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { TrialPageId } from '../../trial-session-constants';\nimport SlideHeader from '../slide-header';\nimport { circleDetails, goalDetails, parentAppDetails } from './offering-information-constants';\nimport * as Styled from './offering-information-styled';\n\nconst OfferingInformation = memo(() => {\n const { slideConfig } = useTrialSessionContext();\n const { id } = slideConfig;\n\n const offeringDetails = useMemo(() => {\n switch (id) {\n case TrialPageId.CIRCLE_INFORMATION:\n return circleDetails;\n case TrialPageId.PARENT_APP:\n return parentAppDetails;\n case TrialPageId.GOAL_DETAILS:\n return goalDetails;\n default:\n return [];\n }\n }, [id]);\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.Wrapper $width={750} $flexDirection=\"row\" $justifyContent=\"center\">\n {offeringDetails.length > 0\n ? offeringDetails.map((details, index, detailsArray) => {\n const {\n title,\n description,\n animationBackground,\n infoBackground,\n animationSource,\n animationPadding,\n dimension,\n } = details || {};\n const [width, height] = dimension || [];\n const lastElement = index === detailsArray.length - 1;\n\n return (\n <FlexView key={`offering-${index}`} $flex={1}>\n <Styled.AnimationWrapper\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $borderColor=\"BLACK_1\"\n $background={animationBackground}\n $gap={animationPadding}\n $isLastElement={lastElement}\n >\n <Image src={animationSource} width={width} height={height} withLoader />\n </Styled.AnimationWrapper>\n <Styled.DetailsWrapper\n $background={infoBackground}\n $gapX={1.375}\n $gutterX={2}\n $borderColor=\"BLACK_1\"\n $isLastElement={lastElement}\n $inherit\n >\n <Styled.TextElement $renderAs=\"ac2-black\">{title}</Styled.TextElement>\n <Separator heightX={1} />\n <Styled.TextElement $renderAs=\"ab3\">\n {typeof description === 'string'\n ? description\n : description.map(desc => <li>{desc}</li>)}\n </Styled.TextElement>\n </Styled.DetailsWrapper>\n </FlexView>\n );\n })\n : null}\n </Styled.Wrapper>\n {id === TrialPageId.PARENT_APP && (\n <>\n <Separator height={50} />\n <Styled.Wrapper\n $width={450}\n $gap={14}\n $gutter={30}\n $background=\"YELLOW_1\"\n $borderColor=\"BLACK_T_15\"\n $position=\"relative\"\n >\n <Text $renderAs=\"ab2\">Get 24/7 customer support through this app.</Text>\n <Styled.RefundImageWrapper>\n <Image\n src={ILLUSTRATIONS.REFUND_POLICY_WITH_HEADPHONE}\n width={135}\n height={80}\n withLoader\n />\n </Styled.RefundImageWrapper>\n </Styled.Wrapper>\n </>\n )}\n </Styled.Container>\n );\n});\n\nexport default OfferingInformation;\n"],"names":["OfferingInformation","memo","slideConfig","useTrialSessionContext","id","offeringDetails","useMemo","TrialPageId","circleDetails","parentAppDetails","goalDetails","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.Wrapper","details","index","detailsArray","title","description","animationBackground","infoBackground","animationSource","animationPadding","dimension","width","height","lastElement","FlexView","Styled.AnimationWrapper","Image","Styled.DetailsWrapper","Styled.TextElement","desc","Fragment","Text","Styled.RefundImageWrapper","ILLUSTRATIONS"],"mappings":";;;;;;;;;;;;AAaM,MAAAA,IAAsBC,EAAK,MAAM;AAC/B,QAAA,EAAE,aAAAC,MAAgBC,KAClB,EAAE,IAAAC,EAAO,IAAAF,GAETG,IAAkBC,EAAQ,MAAM;AACpC,YAAQF,GAAI;AAAA,MACV,KAAKG,EAAY;AACR,eAAAC;AAAA,MACT,KAAKD,EAAY;AACR,eAAAE;AAAA,MACT,KAAKF,EAAY;AACR,eAAAG;AAAA,MACT;AACE,eAAO;IACX;AAAA,EAAA,GACC,CAACN,CAAE,CAAC;AAGL,SAAA,gBAAAO,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,sBACZC,GAAA,EAAe,QAAQ,KAAK,gBAAe,OAAM,iBAAgB,UAC/D,UAAAX,EAAgB,SAAS,IACtBA,EAAgB,IAAI,CAACY,GAASC,GAAOC,MAAiB;AAC9C,YAAA;AAAA,QACJ,OAAAC;AAAA,QACA,aAAAC;AAAA,QACA,qBAAAC;AAAA,QACA,gBAAAC;AAAA,QACA,iBAAAC;AAAA,QACA,kBAAAC;AAAA,QACA,WAAAC;AAAA,MAAA,IACET,KAAW,CAAA,GACT,CAACU,GAAOC,CAAM,IAAIF,KAAa,CAAA,GAC/BG,IAAcX,MAAUC,EAAa,SAAS;AAGlD,aAAA,gBAAAR,EAACmB,GAAmC,EAAA,OAAO,GACzC,UAAA;AAAA,QAAA,gBAAAjB;AAAA,UAACkB;AAAAA,UAAA;AAAA,YACC,iBAAgB;AAAA,YAChB,aAAY;AAAA,YACZ,cAAa;AAAA,YACb,aAAaT;AAAA,YACb,MAAMG;AAAA,YACN,gBAAgBI;AAAA,YAEhB,4BAACG,GAAM,EAAA,KAAKR,GAAiB,OAA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,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"offering-information.js","sources":["../../../../../src/features/trial-session/comps/offering-information/offering-information.tsx"],"sourcesContent":["import { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { TrialPageId } from '../../trial-session-constants';\nimport SlideHeader from '../slide-header';\nimport { circleDetails, goalDetails, parentAppDetails } from './offering-information-constants';\nimport * as Styled from './offering-information-styled';\n\nconst OfferingInformation = memo(() => {\n const { slideConfig } = useTrialSessionContext();\n const { id } = slideConfig;\n\n const offeringDetails = useMemo(() => {\n switch (id) {\n case TrialPageId.CIRCLE_INFORMATION:\n return circleDetails;\n case TrialPageId.PARENT_APP:\n return parentAppDetails;\n case TrialPageId.GOAL_DETAILS:\n return goalDetails;\n default:\n return [];\n }\n }, [id]);\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.Wrapper $width={750} $flexDirection=\"row\" $justifyContent=\"center\">\n {offeringDetails.length > 0\n ? offeringDetails.map((details, index, detailsArray) => {\n const {\n title,\n description,\n animationBackground,\n infoBackground,\n animationSource,\n animationPadding,\n dimension,\n } = details || {};\n const [width, height] = dimension || [];\n const lastElement = index === detailsArray.length - 1;\n\n return (\n <FlexView key={`offering-${index}`} $flex={1}>\n <Styled.AnimationWrapper\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $borderColor=\"BLACK_1\"\n $background={animationBackground}\n $gap={animationPadding}\n $isLastElement={lastElement}\n >\n <Image src={animationSource} width={width} height={height} withLoader />\n </Styled.AnimationWrapper>\n <Styled.DetailsWrapper\n $background={infoBackground}\n $gapX={1.375}\n $gutterX={2}\n $borderColor=\"BLACK_1\"\n $isLastElement={lastElement}\n $inherit\n >\n <Styled.TextElement $renderAs=\"ac2-black\">{title}</Styled.TextElement>\n <Separator heightX={1} />\n <Styled.TextElement $renderAs=\"ab3\">\n {typeof description === 'string'\n ? description\n : description.map(desc => <li key={desc}>{desc}</li>)}\n </Styled.TextElement>\n </Styled.DetailsWrapper>\n </FlexView>\n );\n })\n : null}\n </Styled.Wrapper>\n {id === TrialPageId.PARENT_APP && (\n <>\n <Separator height={50} />\n <Styled.Wrapper\n $width={450}\n $gap={14}\n $gutter={30}\n $background=\"YELLOW_1\"\n $borderColor=\"BLACK_T_15\"\n $position=\"relative\"\n >\n <Text $renderAs=\"ab2\">Get 24/7 customer support through this app.</Text>\n <Styled.RefundImageWrapper>\n <Image\n src={ILLUSTRATIONS.REFUND_POLICY_WITH_HEADPHONE}\n width={135}\n height={80}\n withLoader\n />\n </Styled.RefundImageWrapper>\n </Styled.Wrapper>\n </>\n )}\n </Styled.Container>\n );\n});\n\nexport default OfferingInformation;\n"],"names":["OfferingInformation","memo","slideConfig","useTrialSessionContext","id","offeringDetails","useMemo","TrialPageId","circleDetails","parentAppDetails","goalDetails","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.Wrapper","details","index","detailsArray","title","description","animationBackground","infoBackground","animationSource","animationPadding","dimension","width","height","lastElement","FlexView","Styled.AnimationWrapper","Image","Styled.DetailsWrapper","Styled.TextElement","desc","Fragment","Text","Styled.RefundImageWrapper","ILLUSTRATIONS"],"mappings":";;;;;;;;;;;;AAaM,MAAAA,IAAsBC,EAAK,MAAM;AAC/B,QAAA,EAAE,aAAAC,MAAgBC,KAClB,EAAE,IAAAC,EAAO,IAAAF,GAETG,IAAkBC,EAAQ,MAAM;AACpC,YAAQF,GAAI;AAAA,MACV,KAAKG,EAAY;AACR,eAAAC;AAAA,MACT,KAAKD,EAAY;AACR,eAAAE;AAAA,MACT,KAAKF,EAAY;AACR,eAAAG;AAAA,MACT;AACE,eAAO;IACX;AAAA,EAAA,GACC,CAACN,CAAE,CAAC;AAGL,SAAA,gBAAAO,EA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