@cuemath/leap 2.9.1-j1 → 2.9.1

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 (426) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -3
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lib/lib.js +7 -0
  4. package/dist/assets/lib/lib.js.map +1 -0
  5. package/dist/assets/lottie/lottie.js +1 -11
  6. package/dist/assets/lottie/lottie.js.map +1 -1
  7. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +45 -46
  8. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js.map +1 -1
  9. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js +25 -26
  10. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js.map +1 -1
  11. package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
  12. package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js +59 -60
  13. package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js.map +1 -1
  14. package/dist/features/sheets/resources-list/resource-item/resource-item.js +89 -90
  15. package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
  16. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js +60 -61
  17. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js.map +1 -1
  18. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js +63 -64
  19. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js.map +1 -1
  20. package/dist/features/sheets/utils/is-v3-worksheet.js +4 -14
  21. package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
  22. package/dist/features/ui/context-menu/context-menu.js +18 -20
  23. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  24. package/dist/features/ui/image/image.js +12 -12
  25. package/dist/features/ui/image/image.js.map +1 -1
  26. package/dist/features/ui/lottie-animation/helper.js +5 -6
  27. package/dist/features/ui/lottie-animation/helper.js.map +1 -1
  28. package/dist/features/ui/lottie-animation/lottie-animation.js +28 -37
  29. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  30. package/dist/features/ui/text/text.js +27 -29
  31. package/dist/features/ui/text/text.js.map +1 -1
  32. package/dist/features/worksheet/constants/events.js +3 -0
  33. package/dist/features/worksheet/constants/events.js.map +1 -1
  34. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js +69 -50
  35. package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
  36. package/dist/index.d.ts +11 -186
  37. package/dist/index.js +373 -406
  38. package/dist/index.js.map +1 -1
  39. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  40. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  41. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  42. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  43. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  44. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  45. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
  46. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  47. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  48. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  49. package/dist/static/lib/polypad.js +34463 -0
  50. package/package.json +2 -3
  51. package/dist/assets/line-icons/icons/apple-icon.js +0 -48
  52. package/dist/assets/line-icons/icons/apple-icon.js.map +0 -1
  53. package/dist/assets/line-icons/icons/google-icon.js +0 -42
  54. package/dist/assets/line-icons/icons/google-icon.js.map +0 -1
  55. package/dist/features/auth/account-selector/account-selector-styled.js +0 -26
  56. package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
  57. package/dist/features/auth/account-selector/account-selector.js +0 -75
  58. package/dist/features/auth/account-selector/account-selector.js.map +0 -1
  59. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +0 -12
  60. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +0 -1
  61. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +0 -11
  62. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +0 -1
  63. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +0 -24
  64. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +0 -1
  65. package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +0 -29
  66. package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +0 -1
  67. package/dist/features/auth/comps/overlay-loader/overlay-loader.js +0 -8
  68. package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +0 -1
  69. package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +0 -26
  70. package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +0 -1
  71. package/dist/features/auth/comps/resend-otp/resend-otp.js +0 -41
  72. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +0 -1
  73. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +0 -48
  74. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +0 -1
  75. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +0 -115
  76. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +0 -1
  77. package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +0 -16
  78. package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +0 -1
  79. package/dist/features/auth/signup/claim-user-account/claim-user-account.js +0 -71
  80. package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +0 -1
  81. package/dist/features/auth/signup/custom-input/custom-input-styled.js +0 -38
  82. package/dist/features/auth/signup/custom-input/custom-input-styled.js.map +0 -1
  83. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js +0 -79
  84. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js.map +0 -1
  85. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js +0 -54
  86. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js.map +0 -1
  87. package/dist/features/auth/signup/custom-input/email-input/email-input.js +0 -30
  88. package/dist/features/auth/signup/custom-input/email-input/email-input.js.map +0 -1
  89. package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js +0 -31
  90. package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js.map +0 -1
  91. package/dist/features/auth/signup/custom-input/grade-input/grade-input.js +0 -30
  92. package/dist/features/auth/signup/custom-input/grade-input/grade-input.js.map +0 -1
  93. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js +0 -19
  94. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js.map +0 -1
  95. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js +0 -33
  96. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js.map +0 -1
  97. package/dist/features/auth/signup/custom-input/otp-input/otp-input.js +0 -41
  98. package/dist/features/auth/signup/custom-input/otp-input/otp-input.js.map +0 -1
  99. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js +0 -33
  100. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js.map +0 -1
  101. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js +0 -28
  102. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js.map +0 -1
  103. package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js +0 -29
  104. package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js.map +0 -1
  105. package/dist/features/auth/signup/custom-input/phone-input/phone-input.js +0 -64
  106. package/dist/features/auth/signup/custom-input/phone-input/phone-input.js.map +0 -1
  107. package/dist/features/auth/signup/custom-input/student-password/student-password.js +0 -53
  108. package/dist/features/auth/signup/custom-input/student-password/student-password.js.map +0 -1
  109. package/dist/features/auth/signup/custom-input/student-username/student-username.js +0 -38
  110. package/dist/features/auth/signup/custom-input/student-username/student-username.js.map +0 -1
  111. package/dist/features/auth/signup/signup-constants.js +0 -1022
  112. package/dist/features/auth/signup/signup-constants.js.map +0 -1
  113. package/dist/features/auth/signup/signup-methods/signup-methods.js +0 -58
  114. package/dist/features/auth/signup/signup-methods/signup-methods.js.map +0 -1
  115. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +0 -19
  116. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +0 -1
  117. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +0 -61
  118. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +0 -1
  119. package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +0 -24
  120. package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +0 -1
  121. package/dist/features/auth/signup/user-type-selector/user-type-selector.js +0 -87
  122. package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +0 -1
  123. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -332
  124. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
  125. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -370
  126. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
  127. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -252
  128. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +0 -1
  129. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -24
  130. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +0 -1
  131. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -192
  132. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
  133. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -19
  134. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  135. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -129
  136. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
  137. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
  138. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
  139. package/dist/node_modules/clsx/dist/clsx.js +0 -18
  140. package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
  141. package/dist/node_modules/date-fns/subYears.js +0 -9
  142. package/dist/node_modules/date-fns/subYears.js.map +0 -1
  143. package/dist/node_modules/react-datepicker/dist/index.es.js +0 -2700
  144. package/dist/node_modules/react-datepicker/dist/index.es.js.map +0 -1
  145. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
  146. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
  147. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +0 -8
  148. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
  149. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +0 -518
  150. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
  151. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +0 -60
  152. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
  153. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +0 -53
  154. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
  155. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -19
  156. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
  157. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +0 -12
  158. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
  159. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +0 -21
  160. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
  161. package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +0 -11
  162. package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +0 -1
  163. package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +0 -10
  164. package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +0 -1
  165. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +0 -10
  166. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +0 -1
  167. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +0 -11
  168. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +0 -1
  169. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +0 -21
  170. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +0 -1
  171. package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +0 -9
  172. package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +0 -1
  173. package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +0 -9
  174. package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +0 -1
  175. package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +0 -9
  176. package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +0 -1
  177. package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +0 -9
  178. package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +0 -1
  179. package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +0 -10
  180. package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +0 -1
  181. package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +0 -9
  182. package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +0 -1
  183. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +0 -17
  184. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
  185. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +0 -14
  186. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +0 -1
  187. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +0 -15
  188. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +0 -1
  189. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +0 -14
  190. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +0 -1
  191. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +0 -23
  192. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +0 -1
  193. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +0 -10
  194. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +0 -1
  195. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +0 -10
  196. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +0 -1
  197. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +0 -12
  198. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +0 -1
  199. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +0 -10
  200. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +0 -1
  201. package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +0 -60
  202. package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +0 -1
  203. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +0 -9
  204. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +0 -1
  205. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +0 -9
  206. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +0 -1
  207. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +0 -12
  208. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +0 -1
  209. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +0 -11
  210. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +0 -1
  211. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +0 -9
  212. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +0 -1
  213. package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +0 -9
  214. package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +0 -1
  215. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +0 -10
  216. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +0 -1
  217. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +0 -13
  218. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +0 -1
  219. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +0 -16
  220. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +0 -1
  221. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +0 -9
  222. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +0 -1
  223. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +0 -9
  224. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +0 -1
  225. package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +0 -10
  226. package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +0 -1
  227. package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +0 -9
  228. package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +0 -1
  229. package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +0 -9
  230. package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +0 -1
  231. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +0 -13
  232. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +0 -1
  233. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +0 -18
  234. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +0 -1
  235. package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +0 -9
  236. package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +0 -1
  237. package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +0 -9
  238. package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +0 -1
  239. package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +0 -9
  240. package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +0 -1
  241. package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +0 -8
  242. package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +0 -1
  243. package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +0 -9
  244. package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +0 -1
  245. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +0 -15
  246. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +0 -1
  247. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +0 -14
  248. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +0 -1
  249. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +0 -15
  250. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +0 -1
  251. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +0 -14
  252. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +0 -1
  253. package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +0 -10
  254. package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +0 -1
  255. package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +0 -13
  256. package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +0 -1
  257. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
  258. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
  259. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -19
  260. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
  261. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -32
  262. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
  263. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -16
  264. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
  265. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -71
  266. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
  267. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -34
  268. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
  269. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -12
  270. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
  271. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -156
  272. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
  273. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +0 -111
  274. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
  275. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +0 -22
  276. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +0 -1
  277. package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +0 -15
  278. package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +0 -1
  279. package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +0 -15
  280. package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +0 -1
  281. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +0 -23
  282. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
  283. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +0 -42
  284. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
  285. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +0 -50
  286. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
  287. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
  288. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
  289. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
  290. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
  291. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
  292. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
  293. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
  294. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
  295. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -46
  296. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
  297. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
  298. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
  299. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -31
  300. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
  301. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
  302. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
  303. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
  304. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
  305. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
  306. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
  307. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
  308. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
  309. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
  310. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
  311. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
  312. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
  313. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -100
  314. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
  315. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
  316. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
  317. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
  318. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
  319. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
  320. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
  321. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
  322. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
  323. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -75
  324. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
  325. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
  326. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
  327. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
  328. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
  329. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
  330. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
  331. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -72
  332. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
  333. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -71
  334. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
  335. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
  336. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
  337. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -75
  338. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
  339. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -72
  340. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
  341. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -71
  342. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
  343. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
  344. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
  345. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
  346. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
  347. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
  348. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
  349. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +0 -68
  350. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
  351. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +0 -104
  352. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
  353. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +0 -88
  354. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +0 -1
  355. package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +0 -123
  356. package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +0 -1
  357. package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +0 -13
  358. package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +0 -1
  359. package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +0 -10
  360. package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +0 -1
  361. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +0 -12
  362. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +0 -1
  363. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +0 -11
  364. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +0 -1
  365. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +0 -10
  366. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +0 -1
  367. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +0 -14
  368. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +0 -1
  369. package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +0 -11
  370. package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +0 -1
  371. package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +0 -10
  372. package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +0 -1
  373. package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +0 -11
  374. package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +0 -1
  375. package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +0 -11
  376. package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +0 -1
  377. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +0 -10
  378. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +0 -1
  379. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +0 -9
  380. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +0 -1
  381. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +0 -12
  382. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
  383. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +0 -10
  384. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +0 -1
  385. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +0 -10
  386. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +0 -1
  387. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +0 -12
  388. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +0 -1
  389. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +0 -14
  390. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +0 -1
  391. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +0 -10
  392. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +0 -1
  393. package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +0 -9
  394. package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +0 -1
  395. package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +0 -9
  396. package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +0 -1
  397. package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +0 -9
  398. package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +0 -1
  399. package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +0 -9
  400. package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +0 -1
  401. package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +0 -9
  402. package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +0 -1
  403. package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +0 -9
  404. package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +0 -1
  405. package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +0 -19
  406. package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +0 -1
  407. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  408. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
  409. package/dist/static/avatar-selected.860ee923.json +0 -1
  410. package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +0 -1
  411. package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +0 -1
  412. package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
  413. package/dist/static/dob.9ce3c15b.json +0 -1
  414. package/dist/static/grade.b3730524.json +0 -1
  415. package/dist/static/key.d6846476.json +0 -1
  416. package/dist/static/mail.c30e8708.json +0 -1
  417. package/dist/static/otp.2d08f874.json +0 -1
  418. package/dist/static/otp.a3029760.json +0 -1
  419. package/dist/static/parent-avatar.772d53e0.json +0 -1
  420. package/dist/static/phone-number.0be312ea.json +0 -1
  421. package/dist/static/phone-number.84f55562.json +0 -1
  422. package/dist/static/student-avatar.524226bd.json +0 -1
  423. package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +0 -1
  424. package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +0 -1
  425. package/dist/static/user-type-selector-grid-bg.aad0b059.svg +0 -1
  426. package/dist/static/username.9e034d51.json +0 -1
@@ -1,111 +1,110 @@
1
- import { jsxs as A, Fragment as g, jsx as s } from "react/jsx-runtime";
2
- import { useMemo as I, useCallback as C } from "react";
3
- import V from "../../../../../ui/buttons/button/button.js";
4
- import W from "../../../../../ui/context-menu/context-menu.js";
5
- import { useUIContext as j } from "../../../../../ui/context/context.js";
6
- import { NODE_TYPE as U } from "../../../../constants/sheet.js";
7
- import { isV3Worksheet as m } from "../../../../utils/is-v3-worksheet.js";
8
- import Y from "../context-menu-helper/menu-element/menu-element.js";
9
- import z from "../context-menu-helper/target-element/target-element.js";
10
- import { MENU_OPTIONS as R } from "./student-actions-constant.js";
11
- const $ = ({
12
- sheet: t,
1
+ import { jsxs as q, Fragment as A, jsx as s } from "react/jsx-runtime";
2
+ import { useMemo as y, useCallback as I } from "react";
3
+ import g from "../../../../../ui/buttons/button/button.js";
4
+ import j from "../../../../../ui/context-menu/context-menu.js";
5
+ import { useUIContext as U } from "../../../../../ui/context/context.js";
6
+ import { NODE_TYPE as V } from "../../../../constants/sheet.js";
7
+ import W from "../context-menu-helper/menu-element/menu-element.js";
8
+ import Y from "../context-menu-helper/target-element/target-element.js";
9
+ import { MENU_OPTIONS as E } from "./student-actions-constant.js";
10
+ const K = ({
11
+ sheet: v,
13
12
  isDefocused: o,
14
- isLastSheet: N,
15
- ...x
13
+ isLastSheet: C,
14
+ ...N
16
15
  }) => {
17
- const { teacherId: b, milestoneId: d, section: c, onStart: u, onResume: p, onReattempt: l, onReview: f } = x, { permissions: M, node_id: w, user_node_id: e, node_type: T } = t, {
18
- can_start: i,
19
- can_resume: E,
16
+ const { teacherId: _, milestoneId: a, section: m, onStart: d, onResume: c, onReattempt: u, onReview: p } = N, { permissions: x, node_id: l, user_node_id: e, node_type: M } = v, {
17
+ can_start: r,
18
+ can_resume: f,
20
19
  can_review: h,
21
- can_reattempt: _,
22
- is_review_disabled: y
23
- } = M, n = T === U.DYNAMIC ? e : w, { onEvent: v } = j(), a = I(() => {
24
- const r = {
25
- teacher_id: b,
26
- node_id: w,
20
+ can_reattempt: w,
21
+ is_review_disabled: R
22
+ } = x, t = M === V.DYNAMIC ? e : l, { onEvent: b } = U(), i = y(() => {
23
+ const n = {
24
+ teacher_id: _,
25
+ node_id: l,
27
26
  user_node_id: e
28
27
  };
29
- return d && (r.milestone_id = d), c && (r.section = c), r;
30
- }, [d, w, c, b, e]), k = C(() => {
31
- if (!n)
28
+ return a && (n.milestone_id = a), m && (n.section = m), n;
29
+ }, [a, l, m, _, e]), T = I(() => {
30
+ if (!t)
32
31
  throw new Error("No required id is present to open the sheet.");
33
- if (i && typeof u == "function") {
34
- u(n, m(t), e);
32
+ if (r && typeof d == "function") {
33
+ d(t, e);
35
34
  return;
36
35
  }
37
- if (E && typeof p == "function") {
38
- p(n, m(t), e);
36
+ if (f && typeof c == "function") {
37
+ c(t, e);
39
38
  return;
40
39
  }
41
40
  throw new Error("No callback provided. If provided it must be a function");
42
- }, [E, i, n, p, u, t, e]), S = C(
43
- (r) => {
44
- if (v("clicked", {
45
- ...a,
46
- cta: r
47
- }), r === R.REVIEW) {
41
+ }, [f, r, t, c, d, e]), S = I(
42
+ (n) => {
43
+ if (b("clicked", {
44
+ ...i,
45
+ cta: n
46
+ }), n === E.REVIEW) {
48
47
  if (!e)
49
48
  throw new Error("No required id is present to open the sheet.");
50
- if (typeof f != "function")
49
+ if (typeof p != "function")
51
50
  throw new Error("onReview must be a function");
52
- f(e, m(t, "review"));
51
+ p(e);
53
52
  return;
54
53
  }
55
- if (!n)
54
+ if (!t)
56
55
  throw new Error("No required id is present to open the sheet.");
57
- if (typeof l != "function")
56
+ if (typeof u != "function")
58
57
  throw new Error("onReattempt must be a function");
59
- l(n, m(t), e);
58
+ u(t, e);
60
59
  },
61
- [a, n, l, f, t, v, e]
62
- ), O = i || E, P = !o && _ || h, q = I(
60
+ [i, t, u, p, b, e]
61
+ ), k = r || f, O = !o && w || h, P = y(
63
62
  () => [
64
63
  {
65
64
  show: h,
66
- label: R.REVIEW,
67
- disable: y
65
+ label: E.REVIEW,
66
+ disable: R
68
67
  },
69
68
  {
70
- show: !o && _,
71
- label: R.REATTEMPT
69
+ show: !o && w,
70
+ label: E.REATTEMPT
72
71
  }
73
72
  ],
74
- [_, h, o, y]
73
+ [w, h, o, R]
75
74
  );
76
- return /* @__PURE__ */ A(g, { children: [
77
- O && /* @__PURE__ */ s(
78
- V,
75
+ return /* @__PURE__ */ q(A, { children: [
76
+ k && /* @__PURE__ */ s(
77
+ g,
79
78
  {
80
- label: i ? "Start" : "Resume",
79
+ label: r ? "Start" : "Resume",
81
80
  widthX: 7,
82
81
  renderAs: "primary",
83
82
  size: "xsmall",
84
- onClick: k,
83
+ onClick: T,
85
84
  disabled: o,
86
- analyticsProps: a,
85
+ analyticsProps: i,
87
86
  shape: "square"
88
87
  }
89
88
  ),
90
- P && /* @__PURE__ */ s(
91
- W,
89
+ O && /* @__PURE__ */ s(
90
+ j,
92
91
  {
93
- targetElement: /* @__PURE__ */ s(z, { analyticsLabel: "Sheet menu", analyticsProps: a }),
92
+ targetElement: /* @__PURE__ */ s(Y, { analyticsLabel: "Sheet menu", analyticsProps: i }),
94
93
  menuElement: /* @__PURE__ */ s(
95
- Y,
94
+ W,
96
95
  {
97
- options: q,
96
+ options: P,
98
97
  handleOnMenuOptionSelection: S
99
98
  }
100
99
  ),
101
100
  menuOffset: 10,
102
101
  menuZIndex: 1,
103
- placeTop: N
102
+ placeTop: C
104
103
  }
105
104
  )
106
105
  ] });
107
106
  };
108
107
  export {
109
- $ as default
108
+ K as default
110
109
  };
111
110
  //# sourceMappingURL=student-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { NODE_TYPE } from '../../../../constants/sheet';\nimport { isV3Worksheet } from '../../../../utils/is-v3-worksheet';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { MENU_OPTIONS } from './student-actions-constant';\n\nconst StudentActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restStudentActionProps\n}) => {\n const { teacherId, milestoneId, section, onStart, onResume, onReattempt, onReview } =\n restStudentActionProps;\n const { permissions, node_id: nodeId, user_node_id: userNodeId, node_type: nodeType } = sheet;\n\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_reattempt: canReattempt,\n is_review_disabled: isReviewHidden,\n } = permissions;\n\n const id = nodeType === NODE_TYPE.DYNAMIC ? userNodeId : nodeId;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const analyticsProps = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n if (section) {\n payload.section = section;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleOnPrimaryCtaClick = useCallback(() => {\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (canStart && typeof onStart === 'function') {\n onStart(id, isV3Worksheet(sheet), userNodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(id, isV3Worksheet(sheet), userNodeId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canResume, canStart, id, onResume, onStart, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = useCallback(\n (selectedOption: string) => {\n trackEvent('clicked', {\n ...analyticsProps,\n cta: selectedOption,\n });\n if (selectedOption === MENU_OPTIONS.REVIEW) {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n onReview(userNodeId, isV3Worksheet(sheet, 'review'));\n\n return;\n }\n\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReattempt !== 'function') {\n throw new Error('onReattempt must be a function');\n }\n\n onReattempt(id, isV3Worksheet(sheet), userNodeId);\n\n return;\n },\n [analyticsProps, id, onReattempt, onReview, sheet, trackEvent, userNodeId],\n );\n\n const renderPrimaryCta = canStart || canResume;\n const renderContextMenu = (!isDefocused && canReattempt) || canReview;\n\n const options = useMemo(\n () => [\n {\n show: canReview,\n label: MENU_OPTIONS.REVIEW,\n disable: isReviewHidden,\n },\n {\n show: !isDefocused && canReattempt,\n label: MENU_OPTIONS.REATTEMPT,\n },\n ],\n [canReattempt, canReview, isDefocused, isReviewHidden],\n );\n\n return (\n <>\n {renderPrimaryCta && (\n <Button\n label={canStart ? 'Start' : 'Resume'}\n widthX={7}\n renderAs=\"primary\"\n size=\"xsmall\"\n onClick={handleOnPrimaryCtaClick}\n disabled={isDefocused}\n analyticsProps={analyticsProps}\n shape=\"square\"\n />\n )}\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={analyticsProps} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default StudentActions;\n"],"names":["StudentActions","sheet","isDefocused","isLastSheet","restStudentActionProps","teacherId","milestoneId","section","onStart","onResume","onReattempt","onReview","permissions","nodeId","userNodeId","nodeType","canStart","canResume","canReview","canReattempt","isReviewHidden","id","NODE_TYPE","trackEvent","useUIContext","analyticsProps","useMemo","payload","handleOnPrimaryCtaClick","useCallback","isV3Worksheet","handleOnMenuOptionSelection","selectedOption","MENU_OPTIONS","renderPrimaryCta","renderContextMenu","options","jsxs","Fragment","jsx","Button","ContextMenu","TargetElement","MenuElement"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAA2C,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA,EAAE,WAAAC,GAAW,aAAAC,GAAa,SAAAC,GAAS,SAAAC,GAAS,UAAAC,GAAU,aAAAC,GAAa,UAAAC,EACvE,IAAAP,GACI,EAAE,aAAAQ,GAAa,SAASC,GAAQ,cAAcC,GAAY,WAAWC,EAAa,IAAAd,GAElF;AAAA,IACJ,WAAWe;AAAA,IACX,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,eAAeC;AAAA,IACf,o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AGlD,MAAAA,EAAYW,GAAIS,EAAc7B,CAAK,GAAGa,CAAU;AAAA,IAGlD;AAAA,IACA,CAACW,GAAgBJ,GAAIX,GAAaC,GAAUV,GAAOsB,GAAYT,CAAU;AAAA,EAAA,GAGrEoB,IAAmBlB,KAAYC,GAC/BkB,IAAqB,CAACjC,KAAeiB,KAAiBD,GAEtDkB,IAAUV;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,MAAMR;AAAA,QACN,OAAOe,EAAa;AAAA,QACpB,SAASb;AAAA,MACX;AAAA,MACA;AAAA,QACE,MAAM,CAAClB,KAAeiB;AAAA,QACtB,OAAOc,EAAa;AAAA,MACtB;AAAA,IACF;AAAA,IACA,CAACd,GAAcD,GAAWhB,GAAakB,CAAc;AAAA,EAAA;AAGvD,SAEK,gBAAAiB,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCJ,KAAA,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOxB,IAAW,UAAU;AAAA,QAC5B,QAAQ;AAAA,QACR,UAAS;AAAA,QACT,MAAK;AAAA,QACL,SAASY;AAAA,QACT,UAAU1B;AAAA,QACV,gBAAAuB;AAAA,QACA,OAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAGDU,KACC,gBAAAI;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,eACE,gBAAAF,EAACG,GAAc,EAAA,gBAAe,cAAa,gBAAAjB,GAAgC;AAAA,QAE7E,aACE,gBAAAc;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAAAP;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU5B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { NODE_TYPE } from '../../../../constants/sheet';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { MENU_OPTIONS } from './student-actions-constant';\n\nconst StudentActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restStudentActionProps\n}) => {\n const { teacherId, milestoneId, section, onStart, onResume, onReattempt, onReview } =\n restStudentActionProps;\n const { permissions, node_id: nodeId, user_node_id: userNodeId, node_type: nodeType } = sheet;\n\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_reattempt: canReattempt,\n is_review_disabled: isReviewHidden,\n } = permissions;\n\n const id = nodeType === NODE_TYPE.DYNAMIC ? userNodeId : nodeId;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const analyticsProps = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n if (section) {\n payload.section = section;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleOnPrimaryCtaClick = useCallback(() => {\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (canStart && typeof onStart === 'function') {\n onStart(id, userNodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(id, userNodeId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canResume, canStart, id, onResume, onStart, userNodeId]);\n\n const handleOnMenuOptionSelection = useCallback(\n (selectedOption: string) => {\n trackEvent('clicked', {\n ...analyticsProps,\n cta: selectedOption,\n });\n if (selectedOption === MENU_OPTIONS.REVIEW) {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReattempt !== 'function') {\n throw new Error('onReattempt must be a function');\n }\n\n onReattempt(id, userNodeId);\n\n return;\n },\n [analyticsProps, id, onReattempt, onReview, trackEvent, userNodeId],\n );\n\n const renderPrimaryCta = canStart || canResume;\n const renderContextMenu = (!isDefocused && canReattempt) || canReview;\n\n const options = useMemo(\n () => [\n {\n show: canReview,\n label: MENU_OPTIONS.REVIEW,\n disable: isReviewHidden,\n },\n {\n show: !isDefocused && canReattempt,\n label: MENU_OPTIONS.REATTEMPT,\n },\n ],\n [canReattempt, canReview, isDefocused, isReviewHidden],\n );\n\n return (\n <>\n {renderPrimaryCta && (\n <Button\n label={canStart ? 'Start' : 'Resume'}\n widthX={7}\n renderAs=\"primary\"\n size=\"xsmall\"\n onClick={handleOnPrimaryCtaClick}\n disabled={isDefocused}\n analyticsProps={analyticsProps}\n shape=\"square\"\n />\n )}\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={analyticsProps} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default StudentActions;\n"],"names":["StudentActions","sheet","isDefocused","isLastSheet","restStudentActionProps","teacherId","milestoneId","section","onStart","onResume","onReattempt","onReview","permissions","nodeId","userNodeId","nodeType","canStart","canResume","canReview","canReattempt","isReviewHidden","id","NODE_TYPE","trackEvent","useUIContext","analyticsProps","useMemo","payload","handleOnPrimaryCtaClick","useCallback","handleOnMenuOptionSelection","selectedOption","MENU_OPTIONS","renderPrimaryCta","renderContextMenu","options","js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A,QAE7E,aACE,gBAAAa;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,SAAAP;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU3B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
@@ -1,157 +1,156 @@
1
- import { jsxs as G, Fragment as H, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as P, Fragment as G, jsx as r } from "react/jsx-runtime";
2
2
  import { useMemo as S, useCallback as C } from "react";
3
- import j from "../../../../../../assets/line-icons/icons/eye2.js";
4
- import q from "../../../../../ui/buttons/button/button.js";
5
- import B from "../../../../../ui/buttons/icon-button/icon-button.js";
6
- import K from "../../../../../ui/context-menu/context-menu.js";
7
- import { useUIContext as V } from "../../../../../ui/context/context.js";
8
- import { isV3Worksheet as N } from "../../../../utils/is-v3-worksheet.js";
3
+ import H from "../../../../../../assets/line-icons/icons/eye2.js";
4
+ import j from "../../../../../ui/buttons/button/button.js";
5
+ import q from "../../../../../ui/buttons/icon-button/icon-button.js";
6
+ import B from "../../../../../ui/context-menu/context-menu.js";
7
+ import { useUIContext as K } from "../../../../../ui/context/context.js";
9
8
  import z from "../context-menu-helper/menu-element/menu-element.js";
10
- import W from "../context-menu-helper/target-element/target-element.js";
11
- import { TEACHER_MENU_OPTIONS as o } from "./teacher-actions-constant.js";
12
- const rn = ({
13
- sheet: n,
9
+ import V from "../context-menu-helper/target-element/target-element.js";
10
+ import { TEACHER_MENU_OPTIONS as e } from "./teacher-actions-constant.js";
11
+ const on = ({
12
+ sheet: o,
14
13
  isDefocused: c,
15
- isLastSheet: R,
16
- ...g
14
+ isLastSheet: N,
15
+ ...R
17
16
  }) => {
18
17
  const {
19
18
  teacherId: w,
20
19
  milestoneId: s,
21
20
  section: l,
22
- onReview: m,
23
- onPreview: u,
21
+ onReview: u,
22
+ onPreview: m,
24
23
  onReset: _,
25
24
  onChangeLocation: A,
26
25
  onMarkAsFamiliar: E,
27
26
  onUnlock: I,
28
27
  onUnAssignSheet: k
29
- } = g, { permissions: M, user_node_id: t, node_id: i } = n, {
28
+ } = R, { permissions: g, user_node_id: t, node_id: a } = o, {
30
29
  can_teacher_review: y,
31
30
  can_reset: f,
32
31
  can_change_attempt_location: d,
33
32
  can_mark_familiar: p,
34
- can_unlock: v,
33
+ can_unlock: M,
35
34
  can_unassign: h
36
- } = M, { onEvent: b } = V(), a = S(() => {
37
- const e = {
35
+ } = g, { onEvent: b } = K(), i = S(() => {
36
+ const n = {
38
37
  teacher_id: w,
39
- node_id: i,
38
+ node_id: a,
40
39
  user_node_id: t
41
40
  };
42
- return l && (e.section = l), s && (e.milestone_id = s), e;
43
- }, [s, i, l, w, t]), O = C(
44
- (e) => {
45
- const P = {
46
- ...a,
47
- cta: e
41
+ return l && (n.section = l), s && (n.milestone_id = s), n;
42
+ }, [s, a, l, w, t]), v = C(
43
+ (n) => {
44
+ const F = {
45
+ ...i,
46
+ cta: n
48
47
  };
49
- b("clicked", P);
48
+ b("clicked", F);
50
49
  },
51
- [b, a]
52
- ), U = C(() => {
53
- if (y && typeof m == "function") {
50
+ [b, i]
51
+ ), O = C(() => {
52
+ if (y && typeof u == "function") {
54
53
  if (!t)
55
54
  throw new Error("No required id is present to open the sheet.");
56
- m(t, N(n, "review"));
55
+ u(t);
57
56
  return;
58
57
  }
59
- if (typeof u == "function") {
60
- u(n, N(n));
58
+ if (typeof m == "function") {
59
+ m(o);
61
60
  return;
62
61
  }
63
62
  throw new Error("No callback provided. If provided it must be a function");
64
- }, [y, u, m, n, t]), T = (e) => {
65
- switch (O(e), e) {
66
- case o.CHANGE_LOCATION:
63
+ }, [y, m, u, o, t]), U = (n) => {
64
+ switch (v(n), n) {
65
+ case e.CHANGE_LOCATION:
67
66
  if (typeof A != "function")
68
67
  throw new Error("onChangeLocation must be a function");
69
- A(n);
68
+ A(o);
70
69
  return;
71
- case o.UNASSIGN:
70
+ case e.UNASSIGN:
72
71
  if (typeof k != "function")
73
72
  throw new Error("onUnAssignSheet must be a function");
74
73
  if (!t)
75
74
  throw new Error("No user node id is present to unassign the sheet.");
76
- k(n);
75
+ k(o);
77
76
  return;
78
- case o.MARK_AS_FAMILIAR:
77
+ case e.MARK_AS_FAMILIAR:
79
78
  if (typeof E != "function")
80
79
  throw new Error("onMarkAsFamiliar must be a function");
81
- E(i);
80
+ E(a);
82
81
  return;
83
82
  default:
84
83
  if (typeof _ != "function")
85
84
  throw new Error("onReset must be a function");
86
- _(n);
85
+ _(o);
87
86
  return;
88
87
  }
89
- }, L = () => {
88
+ }, T = () => {
90
89
  if (typeof I != "function")
91
90
  throw new Error("onUnlock must be a function");
92
- I(i);
93
- }, x = f || !c && d || p || h, F = S(
91
+ I(a);
92
+ }, L = f || !c && d || p || h, x = S(
94
93
  () => [
95
94
  {
96
95
  show: !c && d,
97
- label: o.CHANGE_LOCATION
96
+ label: e.CHANGE_LOCATION
98
97
  },
99
98
  {
100
99
  show: f,
101
- label: o.RESET_PROGRESS
100
+ label: e.RESET_PROGRESS
102
101
  },
103
102
  {
104
103
  show: p,
105
- label: o.MARK_AS_FAMILIAR
104
+ label: e.MARK_AS_FAMILIAR
106
105
  },
107
106
  {
108
107
  show: h,
109
- label: o.UNASSIGN
108
+ label: e.UNASSIGN
110
109
  }
111
110
  ],
112
111
  [c, d, f, p, h]
113
112
  );
114
- return /* @__PURE__ */ G(H, { children: [
115
- v && /* @__PURE__ */ r(
116
- q,
113
+ return /* @__PURE__ */ P(G, { children: [
114
+ M && /* @__PURE__ */ r(
115
+ j,
117
116
  {
118
117
  renderAs: "primary",
119
118
  label: "Assign",
120
119
  size: "xsmall",
121
120
  widthX: 7,
122
- onClick: L,
123
- analyticsProps: a,
121
+ onClick: T,
122
+ analyticsProps: i,
124
123
  shape: "square"
125
124
  }
126
125
  ),
127
126
  /* @__PURE__ */ r(
128
- B,
127
+ q,
129
128
  {
130
- Icon: j,
129
+ Icon: H,
131
130
  renderAs: "secondary",
132
131
  analyticsLabel: "Review",
133
- onClick: U
132
+ onClick: O
134
133
  }
135
134
  ),
136
- x && /* @__PURE__ */ r(
137
- K,
135
+ L && /* @__PURE__ */ r(
136
+ B,
138
137
  {
139
- targetElement: /* @__PURE__ */ r(W, { analyticsLabel: "Sheet menu", analyticsProps: a }),
138
+ targetElement: /* @__PURE__ */ r(V, { analyticsLabel: "Sheet menu", analyticsProps: i }),
140
139
  menuElement: /* @__PURE__ */ r(
141
140
  z,
142
141
  {
143
- options: F,
144
- handleOnMenuOptionSelection: T
142
+ options: x,
143
+ handleOnMenuOptionSelection: U
145
144
  }
146
145
  ),
147
146
  menuOffset: 10,
148
147
  menuZIndex: 1,
149
- placeTop: R
148
+ placeTop: N
150
149
  }
151
150
  )
152
151
  ] });
153
152
  };
154
153
  export {
155
- rn as default
154
+ on as default
156
155
  };
157
156
  //# sourceMappingURL=teacher-actions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { isV3Worksheet } from '../../../../utils/is-v3-worksheet';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { TEACHER_MENU_OPTIONS } from './teacher-actions-constant';\n\nconst TeacherActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restTeacherActions\n}) => {\n const {\n teacherId,\n milestoneId,\n section,\n onReview,\n onPreview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onUnAssignSheet,\n } = restTeacherActions;\n const { permissions, user_node_id: userNodeId, node_id: nodeId } = sheet;\n const {\n can_teacher_review: canTeacherReview,\n can_reset: canReset,\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_unlock: canUnlock,\n can_unassign: canUnAssign,\n } = permissions;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const trackEventPayload = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (section) {\n payload.section = section;\n }\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleTrackEvent = useCallback(\n (cta: string) => {\n const payload: TTrackEventPayloadProps = {\n ...trackEventPayload,\n cta,\n };\n\n trackEvent('clicked', payload);\n },\n [trackEvent, trackEventPayload],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n onReview(userNodeId, isV3Worksheet(sheet, 'review'));\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheet, isV3Worksheet(sheet));\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = (selectedOption: string) => {\n handleTrackEvent(selectedOption);\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnAssignSheet must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('No user node id is present to unassign the sheet.');\n }\n onUnAssignSheet(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheet);\n\n return;\n }\n };\n\n const handleOnUnlock = () => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(nodeId);\n };\n\n const renderContextMenu =\n canReset || (!isDefocused && canChangeAttemptLocation) || canMarkFamiliar || canUnAssign;\n\n const options = useMemo(\n () => [\n {\n show: !isDefocused && canChangeAttemptLocation,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n },\n {\n show: canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: canMarkFamiliar,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n },\n {\n show: canUnAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [isDefocused, canChangeAttemptLocation, canReset, canMarkFamiliar, canUnAssign],\n );\n\n return (\n <>\n {canUnlock && (\n <Button\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"xsmall\"\n widthX={7}\n onClick={handleOnUnlock}\n analyticsProps={trackEventPayload}\n shape=\"square\"\n />\n )}\n\n <IconButton\n Icon={Eye2Icon}\n renderAs=\"secondary\"\n analyticsLabel={'Review'}\n onClick={handleOnSheetView}\n />\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={trackEventPayload} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","sheet","isDefocused","isLastSheet","restTeacherActions","teacherId","milestoneId","section","onReview","onPreview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onUnAssignSheet","permissions","userNodeId","nodeId","canTeacherReview","canReset","canChangeAttemptLocation","canMarkFamiliar","canUnlock","canUnAssign","trackEvent","useUIContext","trackEventPayload","useMemo","payload","handleTrackEvent","useCallback","cta","handleOnSheetView","isV3Worksheet","handleOnMenuOptionSelection","selectedOption","TEACHER_MENU_OPTIONS","handleOnUnlock","renderContextMenu","options","jsxs","Fragment","jsx","Button","IconButton","Eye2Icon","ContextMenu","TargetElement","MenuElement"],"mappings":";;;;;;;;;;;AAeA,MAAMA,KAA2C,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACE,IAAAV,GACE,EAAE,aAAAW,GAAa,cAAcC,GAAY,SAASC,EAAW,IAAAhB,GAC7D;AAAA,IACJ,oBAAoBiB;AAAA,IACpB,WAAWC;AAAA,IACX,6BAA6BC;AAAA,IAC7B,mBAAmBC;AAAA,IACnB,YAAYC;AAAA,IACZ,cAAcC;AAAA,EACZ,IAAAR,GAEE,EAAE,SAASS,EAAW,IAAIC,EAAa,GAEvCC,IAAoBC,EAAQ,MAAM;AACtC,UAAMC,IAAmC;AAAA,MACvC,YAAYvB;AAAA,MACZ,SAASY;AAAA,MACT,cAAcD;AAAA,IAAA;AAGhB,WAAIT,MACFqB,EAAQ,UAAUrB,IAGhBD,MACFsB,EAAQ,eAAetB,IAGlBsB;AAAA,EAAA,GACN,CAACtB,GAAaW,GAAQV,GAASF,GAAWW,CAAU,CAA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UAAU/B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { TEACHER_MENU_OPTIONS } from './teacher-actions-constant';\n\nconst TeacherActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restTeacherActions\n}) => {\n const {\n teacherId,\n milestoneId,\n section,\n onReview,\n onPreview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onUnAssignSheet,\n } = restTeacherActions;\n const { permissions, user_node_id: userNodeId, node_id: nodeId } = sheet;\n const {\n can_teacher_review: canTeacherReview,\n can_reset: canReset,\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_unlock: canUnlock,\n can_unassign: canUnAssign,\n } = permissions;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const trackEventPayload = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (section) {\n payload.section = section;\n }\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleTrackEvent = useCallback(\n (cta: string) => {\n const payload: TTrackEventPayloadProps = {\n ...trackEventPayload,\n cta,\n };\n\n trackEvent('clicked', payload);\n },\n [trackEvent, trackEventPayload],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheet);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = (selectedOption: string) => {\n handleTrackEvent(selectedOption);\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnAssignSheet must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('No user node id is present to unassign the sheet.');\n }\n onUnAssignSheet(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheet);\n\n return;\n }\n };\n\n const handleOnUnlock = () => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(nodeId);\n };\n\n const renderContextMenu =\n canReset || (!isDefocused && canChangeAttemptLocation) || canMarkFamiliar || canUnAssign;\n\n const options = useMemo(\n () => [\n {\n show: !isDefocused && canChangeAttemptLocation,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n },\n {\n show: canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: canMarkFamiliar,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n },\n {\n show: canUnAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [isDefocused, canChangeAttemptLocation, canReset, canMarkFamiliar, canUnAssign],\n );\n\n return (\n <>\n {canUnlock && (\n <Button\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"xsmall\"\n widthX={7}\n onClick={handleOnUnlock}\n analyticsProps={trackEventPayload}\n shape=\"square\"\n />\n )}\n\n <IconButton\n Icon={Eye2Icon}\n renderAs=\"secondary\"\n analyticsLabel={'Review'}\n onClick={handleOnSheetView}\n />\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={trackEventPayload} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","sheet","isDefocused","isLastSheet","restTeacherActions","teacherId","milestoneId","section","onReview","onPreview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onUnAssignSheet","permissions","userNodeId","nodeId","canTeacherReview","canReset","canChangeAttemptLocation","canMarkFamiliar","canUnlock","canUnAssign","trackEvent","useUIContext","trackEventPayload","useMemo","payload","handleTrackEvent","useCallback","cta","handleOnSheetView","handleOnMenuOptionSelection","selectedOption","TEACHER_MENU_OPTIONS","handleOnUnlock","renderContextMenu","options","jsxs","Fragment","jsx","Button","IconButton","Eye2Icon","ContextMenu","TargetElement","MenuElement"],"mappings":";;;;;;;;;;AAcA,MAAMA,KAA2C,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,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ACC,UAAS;AAAA,QACT,OAAM;AAAA,QACN,MAAK;AAAA,QACL,QAAQ;AAAA,QACR,SAASN;AAAA,QACT,gBAAgBV;AAAA,QAChB,OAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAGF,gBAAAe;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMC;AAAA,QACN,UAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,SAASZ;AAAA,MAAA;AAAA,IACX;AAAA,IAECK,KACC,gBAAAI;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,eACG,gBAAAJ,EAAAK,GAAA,EAAc,gBAAe,cAAa,gBAAgBpB,GAAmB;AAAA,QAEhF,aACE,gBAAAe;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAAAT;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU9B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
@@ -1,12 +1,12 @@
1
1
  import { NODE_TYPE as E } from "../constants/sheet.js";
2
- const A = [
2
+ const S = [
3
3
  "SAT_MATH_ASSESSMENT",
4
4
  "SAT_ENGLISH_ASSESSMENT",
5
5
  "SAT_MATH_RECAP",
6
6
  "SAT_MATH_LEARNING",
7
7
  "SAT_ENGLISH_LEARNING"
8
8
  ], T = [
9
- ...A,
9
+ ...S,
10
10
  E.REMEDIAL,
11
11
  E.LEGACY,
12
12
  E.RECAP,
@@ -31,18 +31,8 @@ const A = [
31
31
  E.DIAGNOSTIC,
32
32
  E.SUBJECTIVE,
33
33
  E.TURING_SUBJECTIVE
34
- ], I = (_, t) => {
35
- const { node_type: n, is_worksheet_v3: S, is_lesson_v3_enabled: e } = _;
36
- if (t === "review")
37
- return T.includes(n);
38
- const r = "can_start" in _ ? _.can_start : _.permissions.can_start, s = "can_reattempt" in _ ? _.can_reattempt : _.permissions.can_reattempt, o = "can_redo" in _ ? _.can_redo : !1;
39
- return S || e ? !0 : r || s || o ? T.includes(n) : !!A.includes(n);
40
- }, N = (_) => {
41
- const { node_type: t, is_worksheet_v3: n, is_lesson_v3_enabled: S } = _;
42
- return n || S || A.includes(t);
43
- };
34
+ ];
44
35
  export {
45
- I as isV3Worksheet,
46
- N as isV3WorksheetAttempt
36
+ T as WORKSHEET_V3_NODE_TYPES
47
37
  };
48
38
  //# sourceMappingURL=is-v3-worksheet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type { IWorksheetAttemptModel } from '../../../types/models/worksheet';\nimport type { TLPARSheetData } from '../../chapters/lpar-chapter/block-section/sheet-item/sheet-item-type';\nimport type { ISheetDataProps, TNodeTypeProps } from '../sheets-list/sheet-item/sheet-item-types';\n\nimport { NODE_TYPE } from '../constants/sheet';\n\nconst SAT_V3_NODE_TYPES: TNodeTypeProps[] = [\n 'SAT_MATH_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_RECAP',\n 'SAT_MATH_LEARNING',\n 'SAT_ENGLISH_LEARNING',\n];\nconst WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[] = [\n ...SAT_V3_NODE_TYPES,\n NODE_TYPE.REMEDIAL,\n NODE_TYPE.LEGACY,\n NODE_TYPE.RECAP,\n NODE_TYPE.GENERAL,\n NODE_TYPE.LEVEL3,\n NODE_TYPE.LEVEL2,\n NODE_TYPE.REVISION,\n NODE_TYPE.TARGET_PRACTICE,\n NODE_TYPE.EXTRA_PRACTICE,\n NODE_TYPE.PRACTICE,\n NODE_TYPE.LEARNING,\n NODE_TYPE.PUZZLE_EASY,\n NODE_TYPE.PUZZLE_MEDIUM,\n NODE_TYPE.PUZZLE_HARD,\n NODE_TYPE.CHAPTER_ASSESSMENT,\n NODE_TYPE.ASSESSMENT,\n NODE_TYPE.MASTERY,\n NODE_TYPE.TRIAL_DIAGNOSTIC,\n NODE_TYPE.DYNAMIC,\n NODE_TYPE.TURING_ASSESSMENT,\n NODE_TYPE.TURING_PRACTICE,\n NODE_TYPE.DIAGNOSTIC,\n NODE_TYPE.SUBJECTIVE,\n NODE_TYPE.TURING_SUBJECTIVE,\n];\n\nconst isV3Worksheet = (\n sheet: ISheetDataProps | TLPARSheetData,\n mode?: 'resume' | 'review',\n): boolean => {\n const { node_type, is_worksheet_v3, is_lesson_v3_enabled } = sheet;\n\n if (mode === 'review') {\n return WORKSHEET_V3_NODE_TYPES.includes(node_type);\n }\n\n const canStart = 'can_start' in sheet ? sheet.can_start : sheet.permissions.can_start;\n const canReattempt =\n 'can_reattempt' in sheet ? sheet.can_reattempt : sheet.permissions.can_reattempt;\n const canRedo = 'can_redo' in sheet ? sheet.can_redo : false;\n\n if (is_worksheet_v3 || is_lesson_v3_enabled) {\n return true;\n }\n\n // For new and reattemptable worksheets start the worksheet in v3 mode\n if (canStart || canReattempt || canRedo) {\n return WORKSHEET_V3_NODE_TYPES.includes(node_type);\n }\n\n // For SAT assessments start the worksheet in v3 mode\n if (SAT_V3_NODE_TYPES.includes(node_type)) {\n return true;\n }\n\n return false;\n};\n\nconst isV3WorksheetAttempt = (attempt: IWorksheetAttemptModel): boolean => {\n const { node_type, is_worksheet_v3, is_lesson_v3_enabled } = attempt;\n\n return (\n is_worksheet_v3 ||\n is_lesson_v3_enabled ||\n SAT_V3_NODE_TYPES.includes(node_type as TNodeTypeProps)\n );\n};\n\nexport { isV3Worksheet, isV3WorksheetAttempt };\n"],"names":["SAT_V3_NODE_TYPES","WORKSHEET_V3_NODE_TYPES","NODE_TYPE","isV3Worksheet","sheet","mode","node_type","is_worksheet_v3","is_lesson_v3_enabled","canStart","canReattempt","canRedo","isV3WorksheetAttempt","attempt"],"mappings":";AAMA,MAAMA,IAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACMC,IAA4C;AAAA,EAChD,GAAGD;AAAA,EACHE,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ,GAEMC,IAAgB,CACpBC,GACAC,MACY;AACZ,QAAM,EAAE,WAAAC,GAAW,iBAAAC,GAAiB,sBAAAC,EAAA,IAAyBJ;AAE7D,MAAIC,MAAS;AACJ,WAAAJ,EAAwB,SAASK,CAAS;AAGnD,QAAMG,IAAW,eAAeL,IAAQA,EAAM,YAAYA,EAAM,YAAY,WACtEM,IACJ,mBAAmBN,IAAQA,EAAM,gBAAgBA,EAAM,YAAY,eAC/DO,IAAU,cAAcP,IAAQA,EAAM,WAAW;AAEvD,SAAIG,KAAmBC,IACd,KAILC,KAAYC,KAAgBC,IACvBV,EAAwB,SAASK,CAAS,IAI/C,EAAAN,EAAkB,SAASM,CAAS;AAK1C,GAEMM,IAAuB,CAACC,MAA6C;AACzE,QAAM,EAAE,WAAAP,GAAW,iBAAAC,GAAiB,sBAAAC,EAAA,IAAyBK;AAE7D,SACEN,KACAC,KACAR,EAAkB,SAASM,CAA2B;AAE1D;"}
1
+ {"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type { TNodeTypeProps } from '../sheets-list/sheet-item/sheet-item-types';\n\nimport { NODE_TYPE } from '../constants/sheet';\n\nconst SAT_V3_NODE_TYPES: TNodeTypeProps[] = [\n 'SAT_MATH_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_RECAP',\n 'SAT_MATH_LEARNING',\n 'SAT_ENGLISH_LEARNING',\n];\nconst WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[] = [\n ...SAT_V3_NODE_TYPES,\n NODE_TYPE.REMEDIAL,\n NODE_TYPE.LEGACY,\n NODE_TYPE.RECAP,\n NODE_TYPE.GENERAL,\n NODE_TYPE.LEVEL3,\n NODE_TYPE.LEVEL2,\n NODE_TYPE.REVISION,\n NODE_TYPE.TARGET_PRACTICE,\n NODE_TYPE.EXTRA_PRACTICE,\n NODE_TYPE.PRACTICE,\n NODE_TYPE.LEARNING,\n NODE_TYPE.PUZZLE_EASY,\n NODE_TYPE.PUZZLE_MEDIUM,\n NODE_TYPE.PUZZLE_HARD,\n NODE_TYPE.CHAPTER_ASSESSMENT,\n NODE_TYPE.ASSESSMENT,\n NODE_TYPE.MASTERY,\n NODE_TYPE.TRIAL_DIAGNOSTIC,\n NODE_TYPE.DYNAMIC,\n NODE_TYPE.TURING_ASSESSMENT,\n NODE_TYPE.TURING_PRACTICE,\n NODE_TYPE.DIAGNOSTIC,\n NODE_TYPE.SUBJECTIVE,\n NODE_TYPE.TURING_SUBJECTIVE,\n];\n\nexport { WORKSHEET_V3_NODE_TYPES };\n"],"names":["SAT_V3_NODE_TYPES","WORKSHEET_V3_NODE_TYPES","NODE_TYPE"],"mappings":";AAIA,MAAMA,IAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACMC,IAA4C;AAAA,EAChD,GAAGD;AAAA,EACHE,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ;"}
@@ -1,29 +1,27 @@
1
- import { jsxs as u, jsx as r } from "react/jsx-runtime";
2
- import { memo as a, useRef as f, isValidElement as d, cloneElement as x } from "react";
3
- import $ from "../hooks/use-context-menu-click-handler.js";
4
- import { TargetElementWrapper as C, OptionsMenuWrapper as M, MenuElementWrapper as h } from "./context-menu-styled.js";
5
- const k = a(
6
- ({ targetElement: e, menuElement: i, menuOffset: l, startLeft: s, menuZIndex: m, placeTop: n }) => {
7
- const t = f(null), { menuVisible: o, onMenuClick: c } = $(t), p = d(e) ? x(e, {
8
- menuVisible: o
9
- }) : e;
10
- return /* @__PURE__ */ u(C, { ref: t, onClick: c, children: [
11
- p,
12
- /* @__PURE__ */ r(
13
- M,
1
+ import { jsxs as u, jsx as t } from "react/jsx-runtime";
2
+ import { memo as c, useRef as f } from "react";
3
+ import a from "../hooks/use-context-menu-click-handler.js";
4
+ import { TargetElementWrapper as x, OptionsMenuWrapper as $, MenuElementWrapper as d } from "./context-menu-styled.js";
5
+ const C = c(
6
+ ({ targetElement: r, menuElement: o, menuOffset: i, startLeft: l, menuZIndex: m, placeTop: e }) => {
7
+ const n = f(null), { menuVisible: s, onMenuClick: p } = a(n);
8
+ return /* @__PURE__ */ u(x, { ref: n, onClick: p, children: [
9
+ r,
10
+ /* @__PURE__ */ t(
11
+ $,
14
12
  {
15
- $menuOffset: l,
16
- $visible: o,
17
- $startLeft: s,
13
+ $menuOffset: i,
14
+ $visible: s,
15
+ $startLeft: l,
18
16
  $menuZIndex: m,
19
- $placeTop: n,
20
- children: /* @__PURE__ */ r(h, { $placeTop: n, children: i })
17
+ $placeTop: e,
18
+ children: /* @__PURE__ */ t(d, { $placeTop: e, children: o })
21
19
  }
22
20
  )
23
21
  ] });
24
22
  }
25
- ), j = k;
23
+ ), b = C;
26
24
  export {
27
- j as default
25
+ b as default
28
26
  };
29
27
  //# sourceMappingURL=context-menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { cloneElement, isValidElement, memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({ targetElement, menuElement, menuOffset, startLeft, menuZIndex, placeTop }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const enhancedTargetElement = isValidElement(targetElement)\n ? cloneElement(targetElement as React.ReactElement<{ menuVisible?: boolean }>, {\n menuVisible,\n })\n : targetElement;\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {enhancedTargetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","enhancedTargetElement","isValidElement","cloneElement","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,eAAAC,GAAe,aAAAC,GAAa,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,UAAAC,QAAe;AACzE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY,GAEtEK,IAAwBC,EAAeZ,CAAa,IACtDa,EAAab,GAAgE;AAAA,MAC3E,aAAAQ;AAAA,IACD,CAAA,IACDR;AAEJ,6BACGc,GAAA,EAA4B,KAAKR,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAE;AAAA,MAED,gBAAAI;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAad;AAAA,UACb,UAAUM;AAAA,UACV,YAAYL;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACY,GAAA,EAA0B,WAAWZ,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAiB,IAAepB;"}
1
+ {"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({ targetElement, menuElement, menuOffset, startLeft, menuZIndex, placeTop }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {targetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,eAAAC,GAAe,aAAAC,GAAa,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,UAAAC,QAAe;AACzE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY;AAE5E,6BACGK,GAAA,EAA4B,KAAKL,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAT;AAAA,MAED,gBAAAY;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAaX;AAAA,UACb,UAAUM;AAAA,UACV,YAAYL;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACS,GAAA,EAA0B,WAAWT,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAc,IAAejB;"}