@cuemath/leap 2.9.1-j2 → 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 -185
  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,20 +1,19 @@
1
- import { jsx as p } from "react/jsx-runtime";
2
- import { memo as O, useMemo as $, useCallback as M, Fragment as V } from "react";
1
+ import { jsx as m } from "react/jsx-runtime";
2
+ import { memo as G, useMemo as O, useCallback as $, Fragment as M } from "react";
3
3
  import B from "../../../../assets/line-icons/icons/bulb2.js";
4
4
  import F from "../../../../assets/line-icons/icons/practice.js";
5
- import { IS_CHAPTER_COMPLETED_STATES as b } from "../../../milestone/create/milestone-create-constants.js";
5
+ import { IS_CHAPTER_COMPLETED_STATES as A } from "../../../milestone/create/milestone-create-constants.js";
6
6
  import H from "../../../ui/arrow-tooltip/arrow-tooltip.js";
7
- import j from "../../../ui/layout/flex-view.js";
8
- import K from "../../comps/sheet-button/index.js";
9
- import { NODE_TYPE as U, SHEET_STATE as W } from "../../constants/sheet.js";
10
- import { isV3Worksheet as i } from "../../utils/is-v3-worksheet.js";
11
- const { TARGET_PRACTICE: v, PRACTICE: y, LEARNING: X } = U, { COMPLETED: P, IN_PROGRESS: Y } = W, q = (n, o, a) => {
12
- if (n === P || b.some((d) => d === n))
7
+ import V from "../../../ui/layout/flex-view.js";
8
+ import j from "../../comps/sheet-button/index.js";
9
+ import { NODE_TYPE as K, SHEET_STATE as U } from "../../constants/sheet.js";
10
+ const { TARGET_PRACTICE: I, PRACTICE: b, LEARNING: X } = K, { COMPLETED: y, IN_PROGRESS: Y } = U, q = (n, o, i) => {
11
+ if (n === y || A.some((f) => f === n))
13
12
  return {
14
13
  state: "completed",
15
14
  renderAs: "secondary_black"
16
15
  };
17
- if ((o === y || o === v) && a === "PENDING_TARGET_PRACTICE")
16
+ if ((o === b || o === I) && i === "PENDING_TARGET_PRACTICE")
18
17
  return {
19
18
  state: "overdue",
20
19
  renderAs: "tertiary"
@@ -24,85 +23,85 @@ const { TARGET_PRACTICE: v, PRACTICE: y, LEARNING: X } = U, { COMPLETED: P, IN_P
24
23
  state: "in_progress",
25
24
  renderAs: "primary"
26
25
  };
27
- }, me = O(
28
- ({ sheetsListData: n, userType: o, isLessonDisabled: a, ...h }) => {
29
- const { lessonTagType: d, onStart: u, onResume: f, onReattempt: l, onReview: _, onPreview: w } = h, s = $(() => o === "STUDENT", [o]), I = M(
30
- (e) => {
31
- const { permissions: E, node_id: r, user_node_id: t } = e, {
32
- can_start: c,
33
- can_resume: m,
34
- can_reattempt: C,
35
- can_review: R,
36
- can_teacher_review: T
37
- } = E, S = s ? R : T;
38
- if (s) {
39
- if (c || m) {
40
- if (c && typeof u == "function") {
41
- u(r, i(e), t);
26
+ }, ae = G(
27
+ ({ sheetsListData: n, userType: o, isLessonDisabled: i, ...T }) => {
28
+ const { lessonTagType: f, onStart: d, onResume: p, onReattempt: u, onReview: l, onPreview: _ } = T, r = O(() => o === "STUDENT", [o]), v = $(
29
+ (s) => {
30
+ const { permissions: E, node_id: t, user_node_id: e } = s, {
31
+ can_start: a,
32
+ can_resume: c,
33
+ can_reattempt: w,
34
+ can_review: C,
35
+ can_teacher_review: h
36
+ } = E, R = r ? C : h;
37
+ if (r) {
38
+ if (a || c) {
39
+ if (a && typeof d == "function") {
40
+ d(t, e);
42
41
  return;
43
42
  }
44
- if (m && typeof f == "function") {
45
- f(r, i(e), t);
43
+ if (c && typeof p == "function") {
44
+ p(t, e);
46
45
  return;
47
46
  }
48
47
  throw new Error("No callback is available");
49
- } else if (C) {
50
- if (typeof l != "function")
48
+ } else if (w) {
49
+ if (typeof u != "function")
51
50
  throw new Error("canReattempt must be a function");
52
- l(r, i(e), t);
51
+ u(t, e);
53
52
  return;
54
53
  }
55
54
  }
56
- if (S) {
57
- if (typeof _ != "function")
55
+ if (R) {
56
+ if (typeof l != "function")
58
57
  throw new Error("onReview must be a function");
59
- if (!t)
58
+ if (!e)
60
59
  throw new Error("user node id must be present to review the sheet");
61
- _(t, i(e, "review"));
60
+ l(e);
62
61
  return;
63
62
  }
64
- if (typeof w != "function")
63
+ if (typeof _ != "function")
65
64
  throw new Error("onPreview must be a function");
66
- w(e, i(e));
65
+ _(s);
67
66
  },
68
- [s, _, u, w, l, f]
67
+ [r, l, d, _, u, p]
69
68
  );
70
- return /* @__PURE__ */ p(j, { $flexDirection: "row", $flexGapX: 1, $alignItems: "center", children: n.map((e, E) => {
69
+ return /* @__PURE__ */ m(V, { $flexDirection: "row", $flexGapX: 1, $alignItems: "center", children: n.map((s, E) => {
71
70
  const {
72
- node_type: r,
73
- state: t,
74
- permissions: c,
75
- sheet_statement: m
76
- } = e, {
77
- can_start: C,
78
- can_resume: R,
79
- can_reattempt: T,
80
- can_review: S
81
- } = c, A = r === v ? y : r, N = r === X, D = t === "LOCKED", g = q(t, r, d), { state: k, renderAs: L } = g || {}, x = !(t === P || b.some((G) => G === t)) && !(C || R || S || T);
82
- return /* @__PURE__ */ p(V, { children: /* @__PURE__ */ p(
71
+ node_type: t,
72
+ state: e,
73
+ permissions: a,
74
+ sheet_statement: c
75
+ } = s, {
76
+ can_start: w,
77
+ can_resume: C,
78
+ can_reattempt: h,
79
+ can_review: R
80
+ } = a, S = t === I ? b : t, P = t === X, N = e === "LOCKED", D = q(e, t, f), { state: g, renderAs: L } = D || {}, k = !(e === y || A.some((x) => x === e)) && !(w || C || R || h);
81
+ return /* @__PURE__ */ m(M, { children: /* @__PURE__ */ m(
83
82
  H,
84
83
  {
85
84
  renderAs: "secondary",
86
85
  position: "bottom",
87
- tooltipItem: m,
86
+ tooltipItem: c,
88
87
  textVariant: "ab3",
89
- children: /* @__PURE__ */ p(
90
- K,
88
+ children: /* @__PURE__ */ m(
89
+ j,
91
90
  {
92
- renderAs: L ?? (a || !s && D ? "secondary_grey" : "primary"),
93
- label: A,
94
- Icon: N ? B : F,
95
- onClick: () => I(e),
96
- disabled: s && (a || x),
97
- state: k
91
+ renderAs: L ?? (i || !r && N ? "secondary_grey" : "primary"),
92
+ label: S,
93
+ Icon: P ? B : F,
94
+ onClick: () => v(s),
95
+ disabled: r && (i || k),
96
+ state: g
98
97
  }
99
98
  )
100
99
  }
101
- ) }, `${A}__lesson_button__${E}`);
100
+ ) }, `${S}__lesson_button__${E}`);
102
101
  }) });
103
102
  }
104
103
  );
105
104
  export {
106
- me as default
105
+ ae as default
107
106
  };
108
107
  //# sourceMappingURL=lesson-item-cta-info.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"lesson-item-cta-info.js","sources":["../../../../../src/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.tsx"],"sourcesContent":["import type { TSheetButtonVariant } from '../../comps/sheet-button/types';\nimport type { ISheetDataProps } from '../../sheets-list/sheet-item/sheet-item-types';\nimport type { IGetLessonCtaInfo, ILessonItemCtaInfoProps } from './lesson-item-types';\nimport type { FC } from 'react';\n\nimport { Fragment, memo, useCallback, useMemo } from 'react';\n\nimport Bulb2Icon from '../../../../assets/line-icons/icons/bulb2';\nimport PracticeIcon from '../../../../assets/line-icons/icons/practice';\nimport { IS_CHAPTER_COMPLETED_STATES } from '../../../milestone/create/milestone-create-constants';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport SheetButton from '../../comps/sheet-button';\nimport { NODE_TYPE, SHEET_STATE } from '../../constants/sheet';\nimport { isV3Worksheet } from '../../utils/is-v3-worksheet';\n\nconst { TARGET_PRACTICE, PRACTICE, LEARNING } = NODE_TYPE;\nconst { COMPLETED, IN_PROGRESS } = SHEET_STATE;\n\nconst getLessonCtaInfo: IGetLessonCtaInfo = (state, nodeType, lessonTagType) => {\n const isSheetCompleted =\n state === COMPLETED || IS_CHAPTER_COMPLETED_STATES.some(sheetState => sheetState === state);\n\n if (isSheetCompleted) {\n return {\n state: 'completed',\n renderAs: 'secondary_black',\n };\n }\n\n if (\n (nodeType === PRACTICE || nodeType === TARGET_PRACTICE) &&\n lessonTagType === 'PENDING_TARGET_PRACTICE'\n ) {\n return {\n state: 'overdue',\n renderAs: 'tertiary',\n };\n }\n\n if (state === IN_PROGRESS) {\n return {\n state: 'in_progress',\n renderAs: 'primary',\n };\n }\n\n return undefined;\n};\n\nconst LessonItemCtaInfo: FC<ILessonItemCtaInfoProps> = memo(\n ({ sheetsListData, userType, isLessonDisabled, ...restLessonItemCtaInfoProps }) => {\n const { lessonTagType, onStart, onResume, onReattempt, onReview, onPreview } =\n restLessonItemCtaInfoProps;\n\n const isStudent = useMemo(() => userType === 'STUDENT', [userType]);\n\n const handleOnClick = useCallback(\n (sheetInfo: ISheetDataProps) => {\n const { permissions, node_id: nodeId, user_node_id: userNodeId } = sheetInfo;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_reattempt: canReattempt,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n } = permissions;\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n if (isStudent) {\n //* Student actions\n\n if (canStart || canResume) {\n if (canStart && typeof onStart === 'function') {\n onStart(nodeId, isV3Worksheet(sheetInfo), userNodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(nodeId, isV3Worksheet(sheetInfo), userNodeId);\n\n return;\n }\n\n throw new Error('No callback is available');\n } else if (canReattempt) {\n if (typeof onReattempt !== 'function') {\n throw new Error('canReattempt must be a function');\n }\n\n onReattempt(nodeId, isV3Worksheet(sheetInfo), userNodeId);\n\n return;\n }\n }\n\n if (canReviewSheet) {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n\n onReview(userNodeId, isV3Worksheet(sheetInfo, 'review'));\n\n return;\n }\n\n if (typeof onPreview !== 'function') {\n throw new Error('onPreview must be a function');\n }\n\n onPreview(sheetInfo, isV3Worksheet(sheetInfo));\n\n return;\n },\n [isStudent, onReview, onStart, onPreview, onReattempt, onResume],\n );\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1} $alignItems=\"center\">\n {sheetsListData.map((sheet, idx) => {\n const {\n node_type: nodeType,\n state,\n permissions,\n sheet_statement: sheetStatement,\n } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_reattempt: canReattempt,\n can_review: canReview,\n } = permissions;\n const sheetType = nodeType === TARGET_PRACTICE ? PRACTICE : nodeType;\n const isLearningNodeType = nodeType === LEARNING;\n const isSheetLocked = state === 'LOCKED';\n\n const lessonCtaInfo = getLessonCtaInfo(state, nodeType, lessonTagType);\n const { state: lessonCtaState, renderAs } = lessonCtaInfo || {};\n\n const isSheetCompleted =\n state === COMPLETED ||\n IS_CHAPTER_COMPLETED_STATES.some(sheetState => sheetState === state);\n const sheetPermissionDisability =\n !isSheetCompleted && !(canStart || canResume || canReview || canReattempt);\n const disableCta = isStudent && (isLessonDisabled || sheetPermissionDisability);\n const sheetCtaDefaultRenderAs: TSheetButtonVariant =\n isLessonDisabled || (!isStudent && isSheetLocked) ? 'secondary_grey' : 'primary';\n\n return (\n <Fragment key={`${sheetType}__lesson_button__${idx}`}>\n <ArrowTooltip\n renderAs=\"secondary\"\n position=\"bottom\"\n tooltipItem={sheetStatement}\n textVariant=\"ab3\"\n >\n <SheetButton\n renderAs={renderAs ?? sheetCtaDefaultRenderAs}\n label={sheetType}\n Icon={isLearningNodeType ? Bulb2Icon : PracticeIcon}\n onClick={() => handleOnClick(sheet)}\n disabled={disableCta}\n state={lessonCtaState}\n />\n </ArrowTooltip>\n </Fragment>\n );\n })}\n </FlexView>\n );\n },\n);\n\nexport default LessonItemCtaInfo;\n"],"names":["TARGET_PRACTICE","PRACTICE","LEARNING","NODE_TYPE","COMPLETED","IN_PROGRESS","SHEET_STATE","getLessonCtaInfo","state","nodeType","lessonTagType","IS_CHAPTER_COMPLETED_STATES","sheetState","LessonItemCtaInfo","memo","sheetsListData","userType","isLessonDisabled","restLessonItemCtaInfoProps","onStart","onResume","onReattempt","onReview","onPreview","isStudent","useMemo","handleOnClick","useCallback","sheetInfo","permissions","nodeId","userNodeId","canStart","canResume","canReattempt","canReview","canTeacherReview","canReviewSheet","isV3Worksheet","jsx","FlexView","sheet","idx","sheetStatement","sheetType","isLearningNodeType","isSheetLocked","lessonCtaInfo","lessonCtaState","renderAs","sheetPermissionDisability","Fragment","ArrowTooltip","SheetButton","Bulb2Icon","PracticeIcon"],"mappings":";;;;;;;;;;AAgBA,MAAM,EAAE,iBAAAA,GAAiB,UAAAC,GAAU,UAAAC,EAAA,IAAaC,GAC1C,EAAE,WAAAC,GAAW,aAAAC,EAAgB,IAAAC,GAE7BC,IAAsC,CAACC,GAAOC,GAAUC,MAAkB;AAI9E,MAFEF,MAAUJ,KAAaO,EAA4B,KAAK,CAAAC,MAAcA,MAAeJ,CAAK;AAGnF,WAAA;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,IAAA;AAId,OACGC,MAAaR,KAAYQ,MAAaT,MACvCU,MAAkB;AAEX,WAAA;AAAA,MACL,OAAO;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,MAAM7B,EAAce,CAAK;AAAA,cAClC,UAjBWjB,MAAcP,KAAoBiC;AAAA,cAkB7C,OAAOF;AAAA,YAAA;AAAA,UACT;AAAA,QAAA;AAAA,MAAA,EAdW,GAAA,GAAGJ,CAAS,oBAAoBF,CAAG,EAgBlD;AAAA,IAEH,CAAA,EACH,CAAA;AAAA,EAEJ;AACF;"}
1
+ {"version":3,"file":"lesson-item-cta-info.js","sources":["../../../../../src/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.tsx"],"sourcesContent":["import type { TSheetButtonVariant } from '../../comps/sheet-button/types';\nimport type { ISheetDataProps } from '../../sheets-list/sheet-item/sheet-item-types';\nimport type { IGetLessonCtaInfo, ILessonItemCtaInfoProps } from './lesson-item-types';\nimport type { FC } from 'react';\n\nimport { Fragment, memo, useCallback, useMemo } from 'react';\n\nimport Bulb2Icon from '../../../../assets/line-icons/icons/bulb2';\nimport PracticeIcon from '../../../../assets/line-icons/icons/practice';\nimport { IS_CHAPTER_COMPLETED_STATES } from '../../../milestone/create/milestone-create-constants';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport SheetButton from '../../comps/sheet-button';\nimport { NODE_TYPE, SHEET_STATE } from '../../constants/sheet';\n\nconst { TARGET_PRACTICE, PRACTICE, LEARNING } = NODE_TYPE;\nconst { COMPLETED, IN_PROGRESS } = SHEET_STATE;\n\nconst getLessonCtaInfo: IGetLessonCtaInfo = (state, nodeType, lessonTagType) => {\n const isSheetCompleted =\n state === COMPLETED || IS_CHAPTER_COMPLETED_STATES.some(sheetState => sheetState === state);\n\n if (isSheetCompleted) {\n return {\n state: 'completed',\n renderAs: 'secondary_black',\n };\n }\n\n if (\n (nodeType === PRACTICE || nodeType === TARGET_PRACTICE) &&\n lessonTagType === 'PENDING_TARGET_PRACTICE'\n ) {\n return {\n state: 'overdue',\n renderAs: 'tertiary',\n };\n }\n\n if (state === IN_PROGRESS) {\n return {\n state: 'in_progress',\n renderAs: 'primary',\n };\n }\n\n return undefined;\n};\n\nconst LessonItemCtaInfo: FC<ILessonItemCtaInfoProps> = memo(\n ({ sheetsListData, userType, isLessonDisabled, ...restLessonItemCtaInfoProps }) => {\n const { lessonTagType, onStart, onResume, onReattempt, onReview, onPreview } =\n restLessonItemCtaInfoProps;\n\n const isStudent = useMemo(() => userType === 'STUDENT', [userType]);\n\n const handleOnClick = useCallback(\n (sheetInfo: ISheetDataProps) => {\n const { permissions, node_id: nodeId, user_node_id: userNodeId } = sheetInfo;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_reattempt: canReattempt,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n } = permissions;\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n if (isStudent) {\n //* Student actions\n\n if (canStart || canResume) {\n if (canStart && typeof onStart === 'function') {\n onStart(nodeId, userNodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(nodeId, userNodeId);\n\n return;\n }\n\n throw new Error('No callback is available');\n } else if (canReattempt) {\n if (typeof onReattempt !== 'function') {\n throw new Error('canReattempt must be a function');\n }\n\n onReattempt(nodeId, userNodeId);\n\n return;\n }\n }\n\n if (canReviewSheet) {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview !== 'function') {\n throw new Error('onPreview must be a function');\n }\n\n onPreview(sheetInfo);\n\n return;\n },\n [isStudent, onReview, onStart, onPreview, onReattempt, onResume],\n );\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1} $alignItems=\"center\">\n {sheetsListData.map((sheet, idx) => {\n const {\n node_type: nodeType,\n state,\n permissions,\n sheet_statement: sheetStatement,\n } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_reattempt: canReattempt,\n can_review: canReview,\n } = permissions;\n const sheetType = nodeType === TARGET_PRACTICE ? PRACTICE : nodeType;\n const isLearningNodeType = nodeType === LEARNING;\n const isSheetLocked = state === 'LOCKED';\n\n const lessonCtaInfo = getLessonCtaInfo(state, nodeType, lessonTagType);\n const { state: lessonCtaState, renderAs } = lessonCtaInfo || {};\n\n const isSheetCompleted =\n state === COMPLETED ||\n IS_CHAPTER_COMPLETED_STATES.some(sheetState => sheetState === state);\n const sheetPermissionDisability =\n !isSheetCompleted && !(canStart || canResume || canReview || canReattempt);\n const disableCta = isStudent && (isLessonDisabled || sheetPermissionDisability);\n const sheetCtaDefaultRenderAs: TSheetButtonVariant =\n isLessonDisabled || (!isStudent && isSheetLocked) ? 'secondary_grey' : 'primary';\n\n return (\n <Fragment key={`${sheetType}__lesson_button__${idx}`}>\n <ArrowTooltip\n renderAs=\"secondary\"\n position=\"bottom\"\n tooltipItem={sheetStatement}\n textVariant=\"ab3\"\n >\n <SheetButton\n renderAs={renderAs ?? sheetCtaDefaultRenderAs}\n label={sheetType}\n Icon={isLearningNodeType ? Bulb2Icon : PracticeIcon}\n onClick={() => handleOnClick(sheet)}\n disabled={disableCta}\n state={lessonCtaState}\n />\n </ArrowTooltip>\n </Fragment>\n );\n })}\n </FlexView>\n );\n },\n);\n\nexport default LessonItemCtaInfo;\n"],"names":["TARGET_PRACTICE","PRACTICE","LEARNING","NODE_TYPE","COMPLETED","IN_PROGRESS","SHEET_STATE","getLessonCtaInfo","state","nodeType","lessonTagType","IS_CHAPTER_COMPLETED_STATES","sheetState","LessonItemCtaInfo","memo","sheetsListData","userType","isLessonDisabled","restLessonItemCtaInfoProps","onStart","onResume","onReattempt","onReview","onPreview","isStudent","useMemo","handleOnClick","useCallback","sheetInfo","permissions","nodeId","userNodeId","canStart","canResume","canReattempt","canReview","canTeacherReview","canReviewSheet","jsx","FlexView","sheet","idx","sheetStatement","sheetType","isLearningNodeType","isSheetLocked","lessonCtaInfo","lessonCtaState","renderAs","sheetPermissionDisability","Fragment","ArrowTooltip","SheetButton","Bulb2Icon","PracticeIcon"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ACa;AAAA,QAAA;AAAA,UACC,UAAS;AAAA,UACT,UAAS;AAAA,UACT,aAAaT;AAAA,UACb,aAAY;AAAA,UAEZ,UAAA,gBAAAJ;AAAA,YAACc;AAAA,YAAA;AAAA,cACC,UAAUJ,MAXhB/B,KAAqB,CAACO,KAAaqB,IAAiB,mBAAmB;AAAA,cAYjE,OAAOF;AAAA,cACP,MAAMC,IAAqBS,IAAYC;AAAA,cACvC,SAAS,MAAM5B,EAAcc,CAAK;AAAA,cAClC,UAjBWhB,MAAcP,KAAoBgC;AAAA,cAkB7C,OAAOF;AAAA,YAAA;AAAA,UACT;AAAA,QAAA;AAAA,MAAA,EAdW,GAAA,GAAGJ,CAAS,oBAAoBF,CAAG,EAgBlD;AAAA,IAEH,CAAA,EACH,CAAA;AAAA,EAEJ;AACF;"}
@@ -1,85 +1,84 @@
1
- import { jsxs as v, jsx as e } from "react/jsx-runtime";
2
- import { memo as J, useRef as Q, useState as Z, useMemo as ee, useCallback as d, useLayoutEffect as te } from "react";
3
- import oe from "../../../../assets/line-icons/icons/minus2.js";
4
- import re from "../../../../assets/line-icons/icons/plus2.js";
5
- import ne from "../../../../assets/line-icons/icons/redo.js";
1
+ import { jsxs as $, jsx as e } from "react/jsx-runtime";
2
+ import { memo as z, useRef as J, useState as Q, useMemo as Z, useCallback as d, useLayoutEffect as ee } from "react";
3
+ import te from "../../../../assets/line-icons/icons/minus2.js";
4
+ import oe from "../../../../assets/line-icons/icons/plus2.js";
5
+ import re from "../../../../assets/line-icons/icons/redo.js";
6
6
  import A from "../../../ui/arrow-tooltip/arrow-tooltip.js";
7
- import ie from "../../../ui/context-menu/context-menu.js";
8
- import { useUIContext as ce } from "../../../ui/context/context.js";
9
- import se from "../../../ui/layout/flex-view.js";
10
- import ae from "../../comps/sheet-button/index.js";
11
- import ue from "../../lessons-list/lesson-item/context-menu-helper/target-element.js";
12
- import { SHEETS_ANALYTICS_EVENTS as k } from "../../sheets-analytics-events.js";
13
- import { TEACHER_MENU_OPTIONS as me } from "../../sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js";
14
- import { isV3Worksheet as h } from "../../utils/is-v3-worksheet.js";
7
+ import ne from "../../../ui/context-menu/context-menu.js";
8
+ import { useUIContext as ie } from "../../../ui/context/context.js";
9
+ import ce from "../../../ui/layout/flex-view.js";
10
+ import se from "../../comps/sheet-button/index.js";
11
+ import ae from "../../lessons-list/lesson-item/context-menu-helper/target-element.js";
12
+ import { SHEETS_ANALYTICS_EVENTS as v } from "../../sheets-analytics-events.js";
13
+ import { TEACHER_MENU_OPTIONS as ue } from "../../sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js";
15
14
  import le from "./context-menu-helper/menu-element.js";
16
- import { ResourceItemCard as pe, ResourceItemTitle as fe, IconButtonWrapper as de } from "./styled.js";
17
- import { getResourceItemCtaState as he, getResourceItemCtaInfo as we, getResourceItemBackgroundColor as _e } from "./utils.js";
18
- const { UNASSIGN: x, REDO: N } = me, Me = J(
15
+ import { ResourceItemCard as me, ResourceItemTitle as pe, IconButtonWrapper as fe } from "./styled.js";
16
+ import { getResourceItemCtaState as de, getResourceItemCtaInfo as he, getResourceItemBackgroundColor as _e } from "./utils.js";
17
+ const { UNASSIGN: x, REDO: N } = ue, Oe = z(
19
18
  ({
20
19
  sheet: t,
21
- userType: O,
22
- isMilestoneWidget: w,
20
+ userType: k,
21
+ isMilestoneWidget: h,
23
22
  userMilestoneId: _,
24
23
  onUnlock: i,
25
24
  onUnAssignSheet: u,
26
- onReset: m,
27
- onPreview: l,
25
+ onReset: l,
26
+ onPreview: m,
28
27
  onReview: p,
29
28
  onStart: f
30
29
  }) => {
31
- const { onClick: c } = ce(), r = Q(null), [D, M] = Z(!1), {
32
- accuracy: b,
33
- permissions: X,
34
- title: C,
35
- sheet_statement: j,
36
- state: E,
30
+ const { onClick: c } = ie(), r = J(null), [O, D] = Q(!1), {
31
+ accuracy: w,
32
+ permissions: M,
33
+ title: b,
34
+ sheet_statement: X,
35
+ state: C,
37
36
  node_id: o,
38
37
  user_node_id: s,
39
- node_sub_group: G,
40
- node_type: y
38
+ node_sub_group: j,
39
+ node_type: E
41
40
  } = t, {
42
- can_start: I,
43
- can_resume: S,
44
- can_unlock: g,
45
- can_review: H,
46
- can_teacher_review: L,
47
- can_unassign: B,
48
- can_reset: U
49
- } = X, V = typeof b == "number" ? `${b}%` : void 0, n = O === "STUDENT", R = n ? H : L, P = he(E), { label: W, Icon: F } = we(G) || {}, a = ee(
41
+ can_start: y,
42
+ can_resume: I,
43
+ can_unlock: S,
44
+ can_review: G,
45
+ can_teacher_review: H,
46
+ can_unassign: L,
47
+ can_reset: B
48
+ } = M, U = typeof w == "number" ? `${w}%` : void 0, n = k === "STUDENT", g = n ? G : H, P = de(C), { label: V, Icon: F } = he(j) || {}, a = Z(
50
49
  () => ({
51
50
  node_id: o,
52
- node_type: y
51
+ node_type: E
53
52
  }),
54
- [o, y]
53
+ [o, E]
55
54
  ), K = d(() => {
56
55
  c({
57
- analyticsLabel: k.RESOURCE_ASSIGNED,
56
+ analyticsLabel: v.RESOURCE_ASSIGNED,
58
57
  props: a
59
58
  }), i == null || i(o);
60
- }, [i, o, c, a]), Y = d(() => {
61
- if (n && (I || S)) {
59
+ }, [i, o, c, a]), W = d(() => {
60
+ if (n && (y || I)) {
62
61
  if (typeof f == "function") {
63
- f(o, h(t), s);
62
+ f(o, s);
64
63
  return;
65
64
  }
66
65
  throw new Error("No callback is available");
67
66
  }
68
- if (R) {
67
+ if (g) {
69
68
  if (typeof p != "function")
70
69
  throw new Error("onReview must be a function");
71
70
  if (!s)
72
71
  throw new Error("user node id must be present to review the sheet");
73
- p(s, h(t, "review"), _);
72
+ p(s, _);
74
73
  return;
75
74
  }
76
- if (typeof l != "function")
75
+ if (typeof m != "function")
77
76
  throw new Error("onPreview must be a function");
78
- l(t, h(t));
77
+ m(t);
79
78
  }, [
80
- S,
81
- R,
82
79
  I,
80
+ g,
81
+ y,
83
82
  n,
84
83
  o,
85
84
  t,
@@ -87,104 +86,104 @@ const { UNASSIGN: x, REDO: N } = me, Me = J(
87
86
  s,
88
87
  f,
89
88
  p,
90
- l
91
- ]), T = d(
92
- (z) => {
93
- switch (z) {
89
+ m
90
+ ]), R = d(
91
+ (q) => {
92
+ switch (q) {
94
93
  case x:
95
94
  if (typeof u != "function")
96
95
  throw new Error("onUnassignSheet must be a function");
97
96
  c({
98
- analyticsLabel: k.RESOURCE_UNASSIGNED,
97
+ analyticsLabel: v.RESOURCE_UNASSIGNED,
99
98
  props: a
100
99
  }), u(t);
101
100
  return;
102
101
  case N:
103
- if (typeof m != "function")
102
+ if (typeof l != "function")
104
103
  throw new Error("onReset must be a function");
105
- m(t);
104
+ l(t);
106
105
  return;
107
106
  }
108
107
  },
109
- [t, u, m, a, c]
108
+ [t, u, l, a, c]
110
109
  );
111
- te(() => {
112
- r.current && r.current.scrollHeight > r.current.clientHeight && M(!0);
110
+ ee(() => {
111
+ r.current && r.current.scrollHeight > r.current.clientHeight && D(!0);
113
112
  }, [r]);
114
- const q = [
113
+ const Y = [
115
114
  {
116
115
  id: "supplementary_resources_unassign",
117
116
  label: "Unassign",
118
- icon: /* @__PURE__ */ e(oe, { width: 20, height: 20 }),
117
+ icon: /* @__PURE__ */ e(te, { width: 20, height: 20 }),
119
118
  option: x,
120
- visible: B,
121
- onClick: T
119
+ visible: L,
120
+ onClick: R
122
121
  },
123
122
  {
124
123
  id: "supplementary_resources_redo",
125
124
  label: "Redo",
126
- icon: /* @__PURE__ */ e(ne, {}),
125
+ icon: /* @__PURE__ */ e(re, {}),
127
126
  option: N,
128
- visible: U,
129
- onClick: T
127
+ visible: B,
128
+ onClick: R
130
129
  }
131
- ], $ = _e(
132
- E,
130
+ ], T = _e(
131
+ C,
133
132
  n,
134
- g,
135
- !!w
133
+ S,
134
+ !!h
136
135
  );
137
- return /* @__PURE__ */ v(
138
- pe,
136
+ return /* @__PURE__ */ $(
137
+ me,
139
138
  {
140
139
  $gapX: 1,
141
140
  $gutterX: 1,
142
141
  $flexGapX: 1.25,
143
- $background: $,
142
+ $background: T,
144
143
  $justifyContent: "space-between",
145
144
  $heightX: 8,
146
- $isMilestoneWidget: w,
145
+ $isMilestoneWidget: h,
147
146
  children: [
148
147
  /* @__PURE__ */ e(
149
148
  A,
150
149
  {
151
150
  renderAs: "primary",
152
151
  position: "bottom",
153
- tooltipItem: C,
154
- hidden: !D,
152
+ tooltipItem: b,
153
+ hidden: !O,
155
154
  widthX: 21.75,
156
- children: /* @__PURE__ */ e(fe, { ref: r, $renderAs: "ab2", $color: "BLACK_T_87", children: C })
155
+ children: /* @__PURE__ */ e(pe, { ref: r, $renderAs: "ab2", $color: "BLACK_T_87", children: b })
157
156
  }
158
157
  ),
159
- /* @__PURE__ */ v(se, { $flexDirection: "row", $justifyContent: "space-between", $alignItems: "center", children: [
160
- /* @__PURE__ */ e(A, { position: "bottom", tooltipItem: j, renderAs: "secondary", children: /* @__PURE__ */ e(
161
- ae,
158
+ /* @__PURE__ */ $(ce, { $flexDirection: "row", $justifyContent: "space-between", $alignItems: "center", children: [
159
+ /* @__PURE__ */ e(A, { position: "bottom", tooltipItem: X, renderAs: "secondary", children: /* @__PURE__ */ e(
160
+ se,
162
161
  {
163
162
  renderAs: "primary",
164
- label: W ?? "",
163
+ label: V ?? "",
165
164
  Icon: F,
166
- backgroundColor: $,
165
+ backgroundColor: T,
167
166
  state: P,
168
167
  hoverActive: !1,
169
- onClick: Y,
170
- accuracy: V,
168
+ onClick: W,
169
+ accuracy: U,
171
170
  widthX: 8.5
172
171
  }
173
172
  ) }),
174
- !n && (g ? /* @__PURE__ */ e(
175
- de,
173
+ !n && (S ? /* @__PURE__ */ e(
174
+ fe,
176
175
  {
177
176
  $flexDirection: "row",
178
177
  $alignItems: "center",
179
178
  $justifyContent: "center",
180
179
  onClick: K,
181
- children: /* @__PURE__ */ e(re, {})
180
+ children: /* @__PURE__ */ e(oe, {})
182
181
  }
183
182
  ) : /* @__PURE__ */ e(
184
- ie,
183
+ ne,
185
184
  {
186
- targetElement: /* @__PURE__ */ e(ue, { invertHover: !0 }),
187
- menuElement: /* @__PURE__ */ e(le, { menuOptions: q })
185
+ targetElement: /* @__PURE__ */ e(ae, { invertHover: !0 }),
186
+ menuElement: /* @__PURE__ */ e(le, { menuOptions: Y })
188
187
  }
189
188
  ))
190
189
  ] })
@@ -194,6 +193,6 @@ const { UNASSIGN: x, REDO: N } = me, Me = J(
194
193
  }
195
194
  );
196
195
  export {
197
- Me as default
196
+ Oe as default
198
197
  };
199
198
  //# sourceMappingURL=resource-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resource-item.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/resource-item.tsx"],"sourcesContent":["import type { IMenuOptionsProps } from './context-menu-helper/menu-element-types';\nimport type { IResourceItemProps } from './types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, memo, useState, useMemo } from 'react';\n\nimport Minus2Icon from '../../../../assets/line-icons/icons/minus2';\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport RedoIcon from '../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport SheetButton from '../../comps/sheet-button';\nimport ContextMenuTargetElement from '../../lessons-list/lesson-item/context-menu-helper/target-element';\nimport { SHEETS_ANALYTICS_EVENTS } from '../../sheets-analytics-events';\nimport { TEACHER_MENU_OPTIONS } from '../../sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant';\nimport { isV3Worksheet } from '../../utils/is-v3-worksheet';\nimport ContextMenuElement from './context-menu-helper/menu-element';\nimport * as Styled from './styled';\nimport {\n getResourceItemBackgroundColor,\n getResourceItemCtaInfo,\n getResourceItemCtaState,\n} from './utils';\n\nconst { UNASSIGN, REDO } = TEACHER_MENU_OPTIONS;\n\nconst ResourceItem: FC<IResourceItemProps> = memo(\n ({\n sheet,\n userType,\n isMilestoneWidget,\n userMilestoneId,\n onUnlock,\n onUnAssignSheet,\n onReset,\n onPreview,\n onReview,\n onStart,\n }) => {\n const { onClick: trackClick } = useUIContext();\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const {\n accuracy,\n permissions,\n title,\n sheet_statement: sheetStatement,\n state: sheetState,\n node_id: nodeId,\n user_node_id: userNodeId,\n node_sub_group: nodeSubGroup,\n node_type: nodeType,\n } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_unlock: canUnlock,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n can_unassign: canUnassign,\n can_reset: canReset,\n } = permissions;\n\n const sheetAccuracy = typeof accuracy === 'number' ? `${accuracy}%` : undefined;\n const isStudent = userType === 'STUDENT';\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n const ctaState = getResourceItemCtaState(sheetState);\n const { label, Icon } = getResourceItemCtaInfo(nodeSubGroup) || {};\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n node_type: nodeType,\n }),\n [nodeId, nodeType],\n );\n\n const handleAssignSheet = useCallback(() => {\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_ASSIGNED,\n props: analyticsProps,\n });\n\n onUnlock?.(nodeId);\n }, [onUnlock, nodeId, trackClick, analyticsProps]);\n\n const handleOnClick = useCallback(() => {\n if (isStudent && (canStart || canResume)) {\n if (typeof onStart === 'function') {\n onStart(nodeId, isV3Worksheet(sheet), userNodeId);\n\n return;\n }\n\n throw new Error('No callback is available');\n }\n\n if (canReviewSheet) {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n\n onReview(userNodeId, isV3Worksheet(sheet, 'review'), userMilestoneId);\n\n return;\n }\n\n if (typeof onPreview !== 'function') {\n throw new Error('onPreview must be a function');\n }\n\n onPreview(sheet, isV3Worksheet(sheet));\n }, [\n canResume,\n canReviewSheet,\n canStart,\n isStudent,\n nodeId,\n sheet,\n userMilestoneId,\n userNodeId,\n onStart,\n onReview,\n onPreview,\n ]);\n\n const handleMenuOptionClick = useCallback(\n (selectedOption: string) => {\n switch (selectedOption) {\n case UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnassignSheet must be a function');\n }\n\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_UNASSIGNED,\n props: analyticsProps,\n });\n\n onUnAssignSheet(sheet);\n\n return;\n\n case REDO:\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 [sheet, onUnAssignSheet, onReset, analyticsProps, trackClick],\n );\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n const menuOptions: IMenuOptionsProps[] = [\n {\n id: 'supplementary_resources_unassign',\n label: 'Unassign',\n icon: <Minus2Icon width={20} height={20} />,\n option: UNASSIGN,\n visible: canUnassign,\n onClick: handleMenuOptionClick,\n },\n {\n id: 'supplementary_resources_redo',\n label: 'Redo',\n icon: <RedoIcon />,\n option: REDO,\n visible: canReset,\n onClick: handleMenuOptionClick,\n },\n ];\n\n const backgroundColor = getResourceItemBackgroundColor(\n sheetState,\n isStudent,\n canUnlock,\n !!isMilestoneWidget,\n );\n\n return (\n <Styled.ResourceItemCard\n $gapX={1}\n $gutterX={1}\n $flexGapX={1.25}\n $background={backgroundColor}\n $justifyContent=\"space-between\"\n $heightX={8}\n $isMilestoneWidget={isMilestoneWidget}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={title}\n hidden={!showTitleTooltip}\n widthX={21.75}\n >\n <Styled.ResourceItemTitle ref={titleTextRef} $renderAs=\"ab2\" $color=\"BLACK_T_87\">\n {title}\n </Styled.ResourceItemTitle>\n </ArrowTooltip>\n\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $alignItems=\"center\">\n <ArrowTooltip position=\"bottom\" tooltipItem={sheetStatement} renderAs=\"secondary\">\n <SheetButton\n renderAs=\"primary\"\n label={label ?? ''}\n Icon={Icon}\n backgroundColor={backgroundColor}\n state={ctaState}\n hoverActive={false}\n onClick={handleOnClick}\n accuracy={sheetAccuracy}\n widthX={8.5}\n />\n </ArrowTooltip>\n\n {!isStudent &&\n (canUnlock ? (\n <Styled.IconButtonWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n onClick={handleAssignSheet}\n >\n <Plus2Icon />\n </Styled.IconButtonWrapper>\n ) : (\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover />}\n menuElement={<ContextMenuElement menuOptions={menuOptions} />}\n />\n ))}\n </FlexView>\n </Styled.ResourceItemCard>\n );\n },\n);\n\nexport default ResourceItem;\n"],"names":["UNASSIGN","REDO","TEACHER_MENU_OPTIONS","ResourceItem","memo","sheet","userType","isMilestoneWidget","userMilestoneId","onUnlock","onUnAssignSheet","onReset","onPreview","onReview","onStart","trackClick","useUIContext","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","accuracy","permissions","title","sheetStatement","sheetState","nodeId","userNodeId","nodeSubGroup","nodeType","canStart","canResume","canUnlock","canReview","canTeacherReview","canUnassign","canReset","sheetAccuracy","isStudent","canReviewSheet","ctaState","getResourceItemCtaState","label","Icon","getResourceItemCtaInfo","analyticsProps","useMemo","handleAssignSheet","useCallback","SHEETS_ANALYTICS_EVENTS","handleOnClick","isV3Worksheet","handleMenuOptionClick","selectedOption","useLayoutEffect","menuOptions","jsx","Minus2Icon","RedoIcon","backgroundColor","getResourceItemBackgroundColor","jsxs","Styled.ResourceItemCard","ArrowTooltip","Styled.ResourceItemTitle","FlexView","SheetButton","Styled.IconButt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A;AAAA,YAAA,gBAAAT,EAACO,KAAa,UAAS,UAAS,aAAavC,GAAgB,UAAS,aACpE,UAAA,gBAAAgC;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,OAAOxB,KAAS;AAAA,gBAChB,MAAAC;AAAA,gBACA,iBAAAgB;AAAA,gBACA,OAAOnB;AAAA,gBACP,aAAa;AAAA,gBACb,SAASU;AAAA,gBACT,UAAUb;AAAA,gBACV,QAAQ;AAAA,cAAA;AAAA,YAAA,GAEZ;AAAA,YAEC,CAACC,MACCN,IACC,gBAAAwB;AAAA,cAACW;AAAAA,cAAA;AAAA,gBACC,gBAAe;AAAA,gBACf,aAAY;AAAA,gBACZ,iBAAgB;AAAA,gBAChB,SAASpB;AAAA,gBAET,4BAACqB,IAAU,EAAA;AAAA,cAAA;AAAA,YAAA,IAGb,gBAAAZ;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,eAAe,gBAAAb,EAACc,IAAyB,EAAA,aAAW,GAAC,CAAA;AAAA,gBACrD,aAAc,gBAAAd,EAAAe,IAAA,EAAmB,aAAAhB,EAA0B,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAC7D,GAEN;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
1
+ {"version":3,"file":"resource-item.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/resource-item.tsx"],"sourcesContent":["import type { IMenuOptionsProps } from './context-menu-helper/menu-element-types';\nimport type { IResourceItemProps } from './types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, memo, useState, useMemo } from 'react';\n\nimport Minus2Icon from '../../../../assets/line-icons/icons/minus2';\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport RedoIcon from '../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport SheetButton from '../../comps/sheet-button';\nimport ContextMenuTargetElement from '../../lessons-list/lesson-item/context-menu-helper/target-element';\nimport { SHEETS_ANALYTICS_EVENTS } from '../../sheets-analytics-events';\nimport { TEACHER_MENU_OPTIONS } from '../../sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant';\nimport ContextMenuElement from './context-menu-helper/menu-element';\nimport * as Styled from './styled';\nimport {\n getResourceItemBackgroundColor,\n getResourceItemCtaInfo,\n getResourceItemCtaState,\n} from './utils';\n\nconst { UNASSIGN, REDO } = TEACHER_MENU_OPTIONS;\n\nconst ResourceItem: FC<IResourceItemProps> = memo(\n ({\n sheet,\n userType,\n isMilestoneWidget,\n userMilestoneId,\n onUnlock,\n onUnAssignSheet,\n onReset,\n onPreview,\n onReview,\n onStart,\n }) => {\n const { onClick: trackClick } = useUIContext();\n const titleTextRef = useRef<HTMLDivElement>(null);\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n\n const {\n accuracy,\n permissions,\n title,\n sheet_statement: sheetStatement,\n state: sheetState,\n node_id: nodeId,\n user_node_id: userNodeId,\n node_sub_group: nodeSubGroup,\n node_type: nodeType,\n } = sheet;\n const {\n can_start: canStart,\n can_resume: canResume,\n can_unlock: canUnlock,\n can_review: canReview,\n can_teacher_review: canTeacherReview,\n can_unassign: canUnassign,\n can_reset: canReset,\n } = permissions;\n\n const sheetAccuracy = typeof accuracy === 'number' ? `${accuracy}%` : undefined;\n const isStudent = userType === 'STUDENT';\n const canReviewSheet = isStudent ? canReview : canTeacherReview;\n\n const ctaState = getResourceItemCtaState(sheetState);\n const { label, Icon } = getResourceItemCtaInfo(nodeSubGroup) || {};\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n node_type: nodeType,\n }),\n [nodeId, nodeType],\n );\n\n const handleAssignSheet = useCallback(() => {\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_ASSIGNED,\n props: analyticsProps,\n });\n\n onUnlock?.(nodeId);\n }, [onUnlock, nodeId, trackClick, analyticsProps]);\n\n const handleOnClick = useCallback(() => {\n if (isStudent && (canStart || canResume)) {\n if (typeof onStart === 'function') {\n onStart(nodeId, userNodeId);\n\n return;\n }\n\n throw new Error('No callback is available');\n }\n\n if (canReviewSheet) {\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n\n onReview(userNodeId, userMilestoneId);\n\n return;\n }\n\n if (typeof onPreview !== 'function') {\n throw new Error('onPreview must be a function');\n }\n\n onPreview(sheet);\n }, [\n canResume,\n canReviewSheet,\n canStart,\n isStudent,\n nodeId,\n sheet,\n userMilestoneId,\n userNodeId,\n onStart,\n onReview,\n onPreview,\n ]);\n\n const handleMenuOptionClick = useCallback(\n (selectedOption: string) => {\n switch (selectedOption) {\n case UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnassignSheet must be a function');\n }\n\n trackClick({\n analyticsLabel: SHEETS_ANALYTICS_EVENTS.RESOURCE_UNASSIGNED,\n props: analyticsProps,\n });\n\n onUnAssignSheet(sheet);\n\n return;\n\n case REDO:\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 [sheet, onUnAssignSheet, onReset, analyticsProps, trackClick],\n );\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n const menuOptions: IMenuOptionsProps[] = [\n {\n id: 'supplementary_resources_unassign',\n label: 'Unassign',\n icon: <Minus2Icon width={20} height={20} />,\n option: UNASSIGN,\n visible: canUnassign,\n onClick: handleMenuOptionClick,\n },\n {\n id: 'supplementary_resources_redo',\n label: 'Redo',\n icon: <RedoIcon />,\n option: REDO,\n visible: canReset,\n onClick: handleMenuOptionClick,\n },\n ];\n\n const backgroundColor = getResourceItemBackgroundColor(\n sheetState,\n isStudent,\n canUnlock,\n !!isMilestoneWidget,\n );\n\n return (\n <Styled.ResourceItemCard\n $gapX={1}\n $gutterX={1}\n $flexGapX={1.25}\n $background={backgroundColor}\n $justifyContent=\"space-between\"\n $heightX={8}\n $isMilestoneWidget={isMilestoneWidget}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={title}\n hidden={!showTitleTooltip}\n widthX={21.75}\n >\n <Styled.ResourceItemTitle ref={titleTextRef} $renderAs=\"ab2\" $color=\"BLACK_T_87\">\n {title}\n </Styled.ResourceItemTitle>\n </ArrowTooltip>\n\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $alignItems=\"center\">\n <ArrowTooltip position=\"bottom\" tooltipItem={sheetStatement} renderAs=\"secondary\">\n <SheetButton\n renderAs=\"primary\"\n label={label ?? ''}\n Icon={Icon}\n backgroundColor={backgroundColor}\n state={ctaState}\n hoverActive={false}\n onClick={handleOnClick}\n accuracy={sheetAccuracy}\n widthX={8.5}\n />\n </ArrowTooltip>\n\n {!isStudent &&\n (canUnlock ? (\n <Styled.IconButtonWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n onClick={handleAssignSheet}\n >\n <Plus2Icon />\n </Styled.IconButtonWrapper>\n ) : (\n <ContextMenu\n targetElement={<ContextMenuTargetElement invertHover />}\n menuElement={<ContextMenuElement menuOptions={menuOptions} />}\n />\n ))}\n </FlexView>\n </Styled.ResourceItemCard>\n );\n },\n);\n\nexport default ResourceItem;\n"],"names":["UNASSIGN","REDO","TEACHER_MENU_OPTIONS","ResourceItem","memo","sheet","userType","isMilestoneWidget","userMilestoneId","onUnlock","onUnAssignSheet","onReset","onPreview","onReview","onStart","trackClick","useUIContext","titleTextRef","useRef","showTitleTooltip","setShowTitleTooltip","useState","accuracy","permissions","title","sheetStatement","sheetState","nodeId","userNodeId","nodeSubGroup","nodeType","canStart","canResume","canUnlock","canReview","canTeacherReview","canUnassign","canReset","sheetAccuracy","isStudent","canReviewSheet","ctaState","getResourceItemCtaState","label","Icon","getResourceItemCtaInfo","analyticsProps","useMemo","handleAssignSheet","useCallback","SHEETS_ANALYTICS_EVENTS","handleOnClick","handleMenuOptionClick","selectedOption","useLayoutEffect","menuOptions","jsx","Minus2Icon","RedoIcon","backgroundColor","getResourceItemBackgroundColor","jsxs","Styled.ResourceItemCard","ArrowTooltip","Styled.ResourceItemTitle","FlexView","SheetButton","Styled.IconButtonWrapper","Plus2Icon","ContextMenu","ContextMenuTargetElement","ContextMenuElement"],"mappings":";;;;;;;;;;;;;;;;AAyBA,MAAM,EAAE,UAAAA,GAAU,MAAAC,EAAS,IAAAC,IAErBC,KAAuCC;AAAA,EAC3C,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,SAASC,EAAW,IAAIC,GAAa,GACvCC,IAAeC,EAAuB,IAAI,GAC1C,CAACC,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GAExD;AAAA,MACJ,UAAAC;AAAA,MACA,aAAAC;AAAA,MACA,OAAAC;AAAA,MACA,iBAAiBC;AAAA,MACjB,OAAOC;AAAA,MACP,SAASC;AAAA,MACT,cAAcC;AAAA,MACd,gBAAgBC;AAAA,MAChB,WAAWC;AAAA,IACT,IAAAzB,GACE;AAAA,MACJ,WAAW0B;AAAA,MACX,YAAYC;AAAA,MACZ,YAAYC;AAAA,MACZ,YAAYC;AAAA,MACZ,oBAAoBC;AAAA,MACpB,cAAcC;AAAA,MACd,WAAWC;AAAA,IACT,IAAAd,GAEEe,IAAgB,OAAOhB,KAAa,WAAW,GAAGA,CAAQ,MAAM,QAChEiB,IA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