@cuemath/leap 2.9.0 → 2.9.1-j1

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 (422) hide show
  1. package/dist/assets/illustrations/illustrations.js +3 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/line-icons/icons/apple-icon.js +48 -0
  4. package/dist/assets/line-icons/icons/apple-icon.js.map +1 -0
  5. package/dist/assets/line-icons/icons/google-icon.js +42 -0
  6. package/dist/assets/line-icons/icons/google-icon.js.map +1 -0
  7. package/dist/assets/lottie/lottie.js +11 -1
  8. package/dist/assets/lottie/lottie.js.map +1 -1
  9. package/dist/features/auth/account-selector/account-selector-styled.js +26 -0
  10. package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
  11. package/dist/features/auth/account-selector/account-selector.js +75 -0
  12. package/dist/features/auth/account-selector/account-selector.js.map +1 -0
  13. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +12 -0
  14. package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -0
  15. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +11 -0
  16. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -0
  17. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +24 -0
  18. package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -0
  19. package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +29 -0
  20. package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +1 -0
  21. package/dist/features/auth/comps/overlay-loader/overlay-loader.js +8 -0
  22. package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +1 -0
  23. package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +26 -0
  24. package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +1 -0
  25. package/dist/features/auth/comps/resend-otp/resend-otp.js +41 -0
  26. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -0
  27. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +48 -0
  28. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -0
  29. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +115 -0
  30. package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -0
  31. package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +16 -0
  32. package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +1 -0
  33. package/dist/features/auth/signup/claim-user-account/claim-user-account.js +71 -0
  34. package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -0
  35. package/dist/features/auth/signup/custom-input/custom-input-styled.js +38 -0
  36. package/dist/features/auth/signup/custom-input/custom-input-styled.js.map +1 -0
  37. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js +79 -0
  38. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js.map +1 -0
  39. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js +54 -0
  40. package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js.map +1 -0
  41. package/dist/features/auth/signup/custom-input/email-input/email-input.js +30 -0
  42. package/dist/features/auth/signup/custom-input/email-input/email-input.js.map +1 -0
  43. package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js +31 -0
  44. package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js.map +1 -0
  45. package/dist/features/auth/signup/custom-input/grade-input/grade-input.js +30 -0
  46. package/dist/features/auth/signup/custom-input/grade-input/grade-input.js.map +1 -0
  47. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js +19 -0
  48. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js.map +1 -0
  49. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js +33 -0
  50. package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js.map +1 -0
  51. package/dist/features/auth/signup/custom-input/otp-input/otp-input.js +41 -0
  52. package/dist/features/auth/signup/custom-input/otp-input/otp-input.js.map +1 -0
  53. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js +33 -0
  54. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js.map +1 -0
  55. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js +28 -0
  56. package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js.map +1 -0
  57. package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js +29 -0
  58. package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js.map +1 -0
  59. package/dist/features/auth/signup/custom-input/phone-input/phone-input.js +64 -0
  60. package/dist/features/auth/signup/custom-input/phone-input/phone-input.js.map +1 -0
  61. package/dist/features/auth/signup/custom-input/student-password/student-password.js +53 -0
  62. package/dist/features/auth/signup/custom-input/student-password/student-password.js.map +1 -0
  63. package/dist/features/auth/signup/custom-input/student-username/student-username.js +38 -0
  64. package/dist/features/auth/signup/custom-input/student-username/student-username.js.map +1 -0
  65. package/dist/features/auth/signup/signup-constants.js +1022 -0
  66. package/dist/features/auth/signup/signup-constants.js.map +1 -0
  67. package/dist/features/auth/signup/signup-methods/signup-methods.js +58 -0
  68. package/dist/features/auth/signup/signup-methods/signup-methods.js.map +1 -0
  69. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +19 -0
  70. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +1 -0
  71. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +61 -0
  72. package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +1 -0
  73. package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +24 -0
  74. package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +1 -0
  75. package/dist/features/auth/signup/user-type-selector/user-type-selector.js +87 -0
  76. package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +1 -0
  77. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +46 -45
  78. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js.map +1 -1
  79. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js +26 -25
  80. package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js.map +1 -1
  81. package/dist/features/cue-canvas/cue-canvas-provider.js +8 -9
  82. package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
  83. package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js +60 -59
  84. package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js.map +1 -1
  85. package/dist/features/sheets/resources-list/resource-item/resource-item.js +90 -89
  86. package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
  87. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js +61 -60
  88. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js.map +1 -1
  89. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js +64 -63
  90. package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js.map +1 -1
  91. package/dist/features/sheets/utils/is-v3-worksheet.js +14 -4
  92. package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
  93. package/dist/features/ui/context-menu/context-menu.js +20 -18
  94. package/dist/features/ui/context-menu/context-menu.js.map +1 -1
  95. package/dist/features/ui/image/image.js +12 -12
  96. package/dist/features/ui/image/image.js.map +1 -1
  97. package/dist/features/ui/lottie-animation/helper.js +6 -5
  98. package/dist/features/ui/lottie-animation/helper.js.map +1 -1
  99. package/dist/features/ui/lottie-animation/lottie-animation.js +37 -28
  100. package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
  101. package/dist/features/ui/text/text.js +29 -27
  102. package/dist/features/ui/text/text.js.map +1 -1
  103. package/dist/index.d.ts +186 -11
  104. package/dist/index.js +406 -373
  105. package/dist/index.js.map +1 -1
  106. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +332 -0
  107. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
  108. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +370 -0
  109. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
  110. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +252 -0
  111. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +1 -0
  112. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +24 -0
  113. package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +1 -0
  114. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +192 -0
  115. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
  116. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +19 -0
  117. package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
  118. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +129 -0
  119. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
  120. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
  121. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
  122. package/dist/node_modules/clsx/dist/clsx.js +18 -0
  123. package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
  124. package/dist/node_modules/date-fns/subYears.js +9 -0
  125. package/dist/node_modules/date-fns/subYears.js.map +1 -0
  126. package/dist/node_modules/react-datepicker/dist/index.es.js +2700 -0
  127. package/dist/node_modules/react-datepicker/dist/index.es.js.map +1 -0
  128. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +8 -0
  129. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -0
  130. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +8 -0
  131. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +1 -0
  132. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +518 -0
  133. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +1 -0
  134. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +60 -0
  135. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -0
  136. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +53 -0
  137. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -0
  138. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +19 -0
  139. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -0
  140. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +12 -0
  141. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +1 -0
  142. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +21 -0
  143. package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +1 -0
  144. package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +11 -0
  145. package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +1 -0
  146. package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +10 -0
  147. package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +1 -0
  148. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +10 -0
  149. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +1 -0
  150. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +11 -0
  151. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +1 -0
  152. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +21 -0
  153. package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +1 -0
  154. package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +9 -0
  155. package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +1 -0
  156. package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +9 -0
  157. package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +1 -0
  158. package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +9 -0
  159. package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +1 -0
  160. package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +9 -0
  161. package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +1 -0
  162. package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +10 -0
  163. package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +1 -0
  164. package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +9 -0
  165. package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +1 -0
  166. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +17 -0
  167. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +1 -0
  168. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +14 -0
  169. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +1 -0
  170. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +15 -0
  171. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +1 -0
  172. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +14 -0
  173. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +1 -0
  174. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +23 -0
  175. package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +1 -0
  176. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +10 -0
  177. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +1 -0
  178. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +10 -0
  179. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +1 -0
  180. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +12 -0
  181. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +1 -0
  182. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +10 -0
  183. package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +1 -0
  184. package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +60 -0
  185. package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +1 -0
  186. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +9 -0
  187. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +1 -0
  188. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +9 -0
  189. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +1 -0
  190. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +12 -0
  191. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +1 -0
  192. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +11 -0
  193. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +1 -0
  194. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +9 -0
  195. package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +1 -0
  196. package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +9 -0
  197. package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +1 -0
  198. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +10 -0
  199. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +1 -0
  200. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +13 -0
  201. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +1 -0
  202. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +16 -0
  203. package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +1 -0
  204. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +9 -0
  205. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +1 -0
  206. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +9 -0
  207. package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +1 -0
  208. package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +10 -0
  209. package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +1 -0
  210. package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +9 -0
  211. package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +1 -0
  212. package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +9 -0
  213. package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +1 -0
  214. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +13 -0
  215. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +1 -0
  216. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +18 -0
  217. package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +1 -0
  218. package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +9 -0
  219. package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +1 -0
  220. package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +9 -0
  221. package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +1 -0
  222. package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +9 -0
  223. package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +1 -0
  224. package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +8 -0
  225. package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +1 -0
  226. package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +9 -0
  227. package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +1 -0
  228. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +15 -0
  229. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +1 -0
  230. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +14 -0
  231. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +1 -0
  232. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +15 -0
  233. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +1 -0
  234. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +14 -0
  235. package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +1 -0
  236. package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +10 -0
  237. package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +1 -0
  238. package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +13 -0
  239. package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +1 -0
  240. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
  241. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
  242. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +19 -0
  243. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
  244. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +32 -0
  245. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
  246. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +16 -0
  247. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
  248. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +71 -0
  249. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
  250. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +34 -0
  251. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
  252. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +12 -0
  253. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
  254. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +156 -0
  255. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
  256. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +111 -0
  257. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
  258. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +22 -0
  259. package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +1 -0
  260. package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +15 -0
  261. package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +1 -0
  262. package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +15 -0
  263. package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +1 -0
  264. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +23 -0
  265. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +1 -0
  266. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +42 -0
  267. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +1 -0
  268. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +50 -0
  269. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +1 -0
  270. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +50 -0
  271. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +1 -0
  272. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +50 -0
  273. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +1 -0
  274. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +62 -0
  275. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +1 -0
  276. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +52 -0
  277. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +1 -0
  278. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +46 -0
  279. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +1 -0
  280. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +50 -0
  281. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +1 -0
  282. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +31 -0
  283. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +1 -0
  284. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +22 -0
  285. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +1 -0
  286. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +23 -0
  287. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +1 -0
  288. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +33 -0
  289. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +1 -0
  290. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +33 -0
  291. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +1 -0
  292. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +34 -0
  293. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +1 -0
  294. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +34 -0
  295. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +1 -0
  296. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +100 -0
  297. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +1 -0
  298. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +49 -0
  299. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +1 -0
  300. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +49 -0
  301. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +1 -0
  302. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +50 -0
  303. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +1 -0
  304. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +41 -0
  305. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +1 -0
  306. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +75 -0
  307. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +1 -0
  308. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +49 -0
  309. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +1 -0
  310. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +70 -0
  311. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +1 -0
  312. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +33 -0
  313. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +1 -0
  314. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +72 -0
  315. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +1 -0
  316. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
  317. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +1 -0
  318. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +33 -0
  319. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +1 -0
  320. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +75 -0
  321. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +1 -0
  322. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +72 -0
  323. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +1 -0
  324. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
  325. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +1 -0
  326. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +23 -0
  327. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +1 -0
  328. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +23 -0
  329. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +1 -0
  330. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +50 -0
  331. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +1 -0
  332. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +68 -0
  333. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +1 -0
  334. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +104 -0
  335. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +1 -0
  336. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +88 -0
  337. package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +1 -0
  338. package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +123 -0
  339. package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +1 -0
  340. package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +13 -0
  341. package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +1 -0
  342. package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +10 -0
  343. package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +1 -0
  344. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +12 -0
  345. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +1 -0
  346. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +11 -0
  347. package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +1 -0
  348. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +10 -0
  349. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +1 -0
  350. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +14 -0
  351. package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +1 -0
  352. package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +11 -0
  353. package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +1 -0
  354. package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +10 -0
  355. package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +1 -0
  356. package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +11 -0
  357. package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +1 -0
  358. package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +11 -0
  359. package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +1 -0
  360. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +10 -0
  361. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +1 -0
  362. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +9 -0
  363. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +1 -0
  364. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +12 -0
  365. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +1 -0
  366. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +10 -0
  367. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +1 -0
  368. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +10 -0
  369. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +1 -0
  370. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +12 -0
  371. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +1 -0
  372. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +14 -0
  373. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +1 -0
  374. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +10 -0
  375. package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +1 -0
  376. package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +9 -0
  377. package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +1 -0
  378. package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +9 -0
  379. package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +1 -0
  380. package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +9 -0
  381. package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +1 -0
  382. package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +9 -0
  383. package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +1 -0
  384. package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +9 -0
  385. package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +1 -0
  386. package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +9 -0
  387. package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +1 -0
  388. package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +19 -0
  389. package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +1 -0
  390. package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
  391. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
  392. package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
  393. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  394. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
  395. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  396. package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
  397. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  398. package/dist/static/avatar-selected.860ee923.json +1 -0
  399. package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +1 -0
  400. package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +1 -0
  401. package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
  402. package/dist/static/dob.9ce3c15b.json +1 -0
  403. package/dist/static/grade.b3730524.json +1 -0
  404. package/dist/static/key.d6846476.json +1 -0
  405. package/dist/static/mail.c30e8708.json +1 -0
  406. package/dist/static/otp.2d08f874.json +1 -0
  407. package/dist/static/otp.a3029760.json +1 -0
  408. package/dist/static/parent-avatar.772d53e0.json +1 -0
  409. package/dist/static/phone-number.0be312ea.json +1 -0
  410. package/dist/static/phone-number.84f55562.json +1 -0
  411. package/dist/static/student-avatar.524226bd.json +1 -0
  412. package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +1 -0
  413. package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +1 -0
  414. package/dist/static/user-type-selector-grid-bg.aad0b059.svg +1 -0
  415. package/dist/static/username.9e034d51.json +1 -0
  416. package/package.json +4 -5
  417. package/dist/library/polypad.js +0 -24965
  418. package/dist/library/polypad.js.map +0 -1
  419. package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
  420. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
  421. package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
  422. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
@@ -1,156 +1,157 @@
1
- import { jsxs as P, Fragment as G, jsx as r } from "react/jsx-runtime";
1
+ import { jsxs as G, Fragment as H, jsx as r } from "react/jsx-runtime";
2
2
  import { useMemo as S, useCallback as C } from "react";
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";
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";
8
9
  import z from "../context-menu-helper/menu-element/menu-element.js";
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,
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,
13
14
  isDefocused: c,
14
- isLastSheet: N,
15
- ...R
15
+ isLastSheet: R,
16
+ ...g
16
17
  }) => {
17
18
  const {
18
19
  teacherId: w,
19
20
  milestoneId: s,
20
21
  section: l,
21
- onReview: u,
22
- onPreview: m,
22
+ onReview: m,
23
+ onPreview: u,
23
24
  onReset: _,
24
25
  onChangeLocation: A,
25
26
  onMarkAsFamiliar: E,
26
27
  onUnlock: I,
27
28
  onUnAssignSheet: k
28
- } = R, { permissions: g, user_node_id: t, node_id: a } = o, {
29
+ } = g, { permissions: M, user_node_id: t, node_id: i } = n, {
29
30
  can_teacher_review: y,
30
31
  can_reset: f,
31
32
  can_change_attempt_location: d,
32
33
  can_mark_familiar: p,
33
- can_unlock: M,
34
+ can_unlock: v,
34
35
  can_unassign: h
35
- } = g, { onEvent: b } = K(), i = S(() => {
36
- const n = {
36
+ } = M, { onEvent: b } = V(), a = S(() => {
37
+ const e = {
37
38
  teacher_id: w,
38
- node_id: a,
39
+ node_id: i,
39
40
  user_node_id: t
40
41
  };
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
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
47
48
  };
48
- b("clicked", F);
49
+ b("clicked", P);
49
50
  },
50
- [b, i]
51
- ), O = C(() => {
52
- if (y && typeof u == "function") {
51
+ [b, a]
52
+ ), U = C(() => {
53
+ if (y && typeof m == "function") {
53
54
  if (!t)
54
55
  throw new Error("No required id is present to open the sheet.");
55
- u(t);
56
+ m(t, N(n, "review"));
56
57
  return;
57
58
  }
58
- if (typeof m == "function") {
59
- m(o);
59
+ if (typeof u == "function") {
60
+ u(n, N(n));
60
61
  return;
61
62
  }
62
63
  throw new Error("No callback provided. If provided it must be a function");
63
- }, [y, m, u, o, t]), U = (n) => {
64
- switch (v(n), n) {
65
- case e.CHANGE_LOCATION:
64
+ }, [y, u, m, n, t]), T = (e) => {
65
+ switch (O(e), e) {
66
+ case o.CHANGE_LOCATION:
66
67
  if (typeof A != "function")
67
68
  throw new Error("onChangeLocation must be a function");
68
- A(o);
69
+ A(n);
69
70
  return;
70
- case e.UNASSIGN:
71
+ case o.UNASSIGN:
71
72
  if (typeof k != "function")
72
73
  throw new Error("onUnAssignSheet must be a function");
73
74
  if (!t)
74
75
  throw new Error("No user node id is present to unassign the sheet.");
75
- k(o);
76
+ k(n);
76
77
  return;
77
- case e.MARK_AS_FAMILIAR:
78
+ case o.MARK_AS_FAMILIAR:
78
79
  if (typeof E != "function")
79
80
  throw new Error("onMarkAsFamiliar must be a function");
80
- E(a);
81
+ E(i);
81
82
  return;
82
83
  default:
83
84
  if (typeof _ != "function")
84
85
  throw new Error("onReset must be a function");
85
- _(o);
86
+ _(n);
86
87
  return;
87
88
  }
88
- }, T = () => {
89
+ }, L = () => {
89
90
  if (typeof I != "function")
90
91
  throw new Error("onUnlock must be a function");
91
- I(a);
92
- }, L = f || !c && d || p || h, x = S(
92
+ I(i);
93
+ }, x = f || !c && d || p || h, F = S(
93
94
  () => [
94
95
  {
95
96
  show: !c && d,
96
- label: e.CHANGE_LOCATION
97
+ label: o.CHANGE_LOCATION
97
98
  },
98
99
  {
99
100
  show: f,
100
- label: e.RESET_PROGRESS
101
+ label: o.RESET_PROGRESS
101
102
  },
102
103
  {
103
104
  show: p,
104
- label: e.MARK_AS_FAMILIAR
105
+ label: o.MARK_AS_FAMILIAR
105
106
  },
106
107
  {
107
108
  show: h,
108
- label: e.UNASSIGN
109
+ label: o.UNASSIGN
109
110
  }
110
111
  ],
111
112
  [c, d, f, p, h]
112
113
  );
113
- return /* @__PURE__ */ P(G, { children: [
114
- M && /* @__PURE__ */ r(
115
- j,
114
+ return /* @__PURE__ */ G(H, { children: [
115
+ v && /* @__PURE__ */ r(
116
+ q,
116
117
  {
117
118
  renderAs: "primary",
118
119
  label: "Assign",
119
120
  size: "xsmall",
120
121
  widthX: 7,
121
- onClick: T,
122
- analyticsProps: i,
122
+ onClick: L,
123
+ analyticsProps: a,
123
124
  shape: "square"
124
125
  }
125
126
  ),
126
127
  /* @__PURE__ */ r(
127
- q,
128
+ B,
128
129
  {
129
- Icon: H,
130
+ Icon: j,
130
131
  renderAs: "secondary",
131
132
  analyticsLabel: "Review",
132
- onClick: O
133
+ onClick: U
133
134
  }
134
135
  ),
135
- L && /* @__PURE__ */ r(
136
- B,
136
+ x && /* @__PURE__ */ r(
137
+ K,
137
138
  {
138
- targetElement: /* @__PURE__ */ r(V, { analyticsLabel: "Sheet menu", analyticsProps: i }),
139
+ targetElement: /* @__PURE__ */ r(W, { analyticsLabel: "Sheet menu", analyticsProps: a }),
139
140
  menuElement: /* @__PURE__ */ r(
140
141
  z,
141
142
  {
142
- options: x,
143
- handleOnMenuOptionSelection: U
143
+ options: F,
144
+ handleOnMenuOptionSelection: T
144
145
  }
145
146
  ),
146
147
  menuOffset: 10,
147
148
  menuZIndex: 1,
148
- placeTop: N
149
+ placeTop: R
149
150
  }
150
151
  )
151
152
  ] });
152
153
  };
153
154
  export {
154
- on as default
155
+ rn as default
155
156
  };
156
157
  //# 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 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":"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"}
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":"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"}
@@ -1,12 +1,12 @@
1
1
  import { NODE_TYPE as E } from "../constants/sheet.js";
2
- const S = [
2
+ const A = [
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
- ...S,
9
+ ...A,
10
10
  E.REMEDIAL,
11
11
  E.LEGACY,
12
12
  E.RECAP,
@@ -31,8 +31,18 @@ const S = [
31
31
  E.DIAGNOSTIC,
32
32
  E.SUBJECTIVE,
33
33
  E.TURING_SUBJECTIVE
34
- ];
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
+ };
35
44
  export {
36
- T as WORKSHEET_V3_NODE_TYPES
45
+ I as isV3Worksheet,
46
+ N as isV3WorksheetAttempt
37
47
  };
38
48
  //# 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 { 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
+ {"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,27 +1,29 @@
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
- $,
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,
12
14
  {
13
- $menuOffset: i,
14
- $visible: s,
15
- $startLeft: l,
15
+ $menuOffset: l,
16
+ $visible: o,
17
+ $startLeft: s,
16
18
  $menuZIndex: m,
17
- $placeTop: e,
18
- children: /* @__PURE__ */ t(d, { $placeTop: e, children: o })
19
+ $placeTop: n,
20
+ children: /* @__PURE__ */ r(h, { $placeTop: n, children: i })
19
21
  }
20
22
  )
21
23
  ] });
22
24
  }
23
- ), b = C;
25
+ ), j = k;
24
26
  export {
25
- b as default
27
+ j as default
26
28
  };
27
29
  //# 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 { 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;"}
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,30 +1,30 @@
1
1
  import { jsxs as h, jsx as e } from "react/jsx-runtime";
2
2
  import { memo as g, useState as f } from "react";
3
3
  import t from "styled-components";
4
- import { skeletonLoadingAnimation as p } from "../constants/style.js";
4
+ import { skeletonLoadingAnimation as c } from "../constants/style.js";
5
5
  import i from "../layout/flex-view.js";
6
- const L = t(i)`
7
- animation: ${p} 2s linear infinite;
6
+ const p = t(i)`
7
+ animation: ${c} 2s linear infinite;
8
8
  position: absolute;
9
9
  left: 0;
10
10
  right: 0;
11
11
  top: 0;
12
12
  bottom: 0;
13
- `, c = t(i)`
13
+ `, L = t(i)`
14
14
  overflow: hidden;
15
15
  position: relative;
16
- `, v = g(
17
- ({ borderRadius: r = 0, borderColor: n, withLoader: a, ...o }) => {
16
+ `, u = g(
17
+ ({ borderRadius: n = 0, borderColor: r, withLoader: a, ...o }) => {
18
18
  const { width: s, height: d } = o, [m, l] = f(!0);
19
19
  return /* @__PURE__ */ h(
20
- c,
20
+ L,
21
21
  {
22
22
  $width: s,
23
23
  $height: d,
24
- $borderColor: n,
25
- $borderRadius: r,
24
+ $borderColor: r,
25
+ $borderRadius: n,
26
26
  children: [
27
- m && a && /* @__PURE__ */ e(L, { $inherit: !0 }),
27
+ m && a && /* @__PURE__ */ e(p, { $inherit: !0 }),
28
28
  /* @__PURE__ */ e("img", { onLoad: () => {
29
29
  l(!1);
30
30
  }, ...o })
@@ -32,8 +32,8 @@ const L = t(i)`
32
32
  }
33
33
  );
34
34
  }
35
- );
35
+ ), F = u;
36
36
  export {
37
- v as default
37
+ F as default
38
38
  };
39
39
  //# sourceMappingURL=image.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF;"}
1
+ {"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF,GAEAQ,IAAeb;"}
@@ -1,13 +1,14 @@
1
- const c = async (o) => {
1
+ const o = /* @__PURE__ */ new Map(), h = async (t) => {
2
+ if (o.has(t)) return o.get(t);
2
3
  let e = null;
3
4
  try {
4
- e = await fetch(o).then((t) => t.json()).catch(() => null);
5
- } catch (t) {
6
- console.log("Error while fetching the lottie: ", t);
5
+ e = await fetch(t).then((n) => n.json()).catch(() => null), e && o.set(t, e);
6
+ } catch (n) {
7
+ console.log("Error while fetching the lottie: ", n);
7
8
  }
8
9
  return e;
9
10
  };
10
11
  export {
11
- c as fetchLottie
12
+ h as fetchLottie
12
13
  };
13
14
  //# sourceMappingURL=helper.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"AAEa,MAAAA,IAAc,OAAOC,MAAqD;AACrF,MAAIC,IAAmC;AAEnC,MAAA;AACF,IAAAA,IAAa,MAAM,MAAMD,CAAS,EAC/B,KAAK,CAAAE,MAAOA,EAAI,KAAA,CAAM,EACtB,MAAM,MAAM,IAAI;AAAA,WACZC,GAAO;AAEN,YAAA,IAAI,qCAAqCA,CAAK;AAAA,EACxD;AAEO,SAAAF;AACT;"}
1
+ {"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst lottieCache = new Map<string, any>();\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n if (lottieCache.has(lottieSrc)) return lottieCache.get(lottieSrc);\n\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n if (lottieJson) {\n lottieCache.set(lottieSrc, lottieJson);\n }\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["lottieCache","fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"AAGA,MAAMA,wBAAkB,OAEXC,IAAc,OAAOC,MAAqD;AACrF,MAAIF,EAAY,IAAIE,CAAS,EAAU,QAAAF,EAAY,IAAIE,CAAS;AAEhE,MAAIC,IAAmC;AAEnC,MAAA;AACF,IAAAA,IAAa,MAAM,MAAMD,CAAS,EAC/B,KAAK,CAAAE,MAAOA,EAAI,KAAA,CAAM,EACtB,MAAM,MAAM,IAAI,GACfD,KACUH,EAAA,IAAIE,GAAWC,CAAU;AAAA,WAEhCE,GAAO;AAEN,YAAA,IAAI,qCAAqCA,CAAK;AAAA,EACxD;AAEO,SAAAF;AACT;"}
@@ -1,51 +1,60 @@
1
- import { jsx as L } from "react/jsx-runtime";
2
- import w from "lottie-web";
3
- import { memo as y, forwardRef as b, useRef as c, useImperativeHandle as A, useEffect as E } from "react";
1
+ import { jsx as E } from "react/jsx-runtime";
2
+ import g from "lottie-web";
3
+ import { memo as w, forwardRef as y, useRef as u, useImperativeHandle as b, useEffect as A } from "react";
4
4
  import I from "../layout/flex-view.js";
5
5
  import { fetchLottie as $ } from "./helper.js";
6
- const x = b((p, h) => {
6
+ const x = y((v, p) => {
7
7
  const {
8
- src: s,
9
- width: v = "100%",
10
- height: g = "100%",
11
- settings: u,
12
- eventListener: r,
13
- onRender: i,
14
- animateOnIntersect: o
15
- } = p, n = c(null), t = c(null), a = c(null);
16
- return A(
17
- h,
8
+ src: m,
9
+ width: L = "100%",
10
+ height: h = "100%",
11
+ settings: l,
12
+ eventListener: n,
13
+ onRender: a,
14
+ animateOnIntersect: c
15
+ } = v, o = u(null), r = u(null), s = u(null);
16
+ return b(
17
+ p,
18
18
  () => ({
19
- playSegments: (m, e) => {
20
- t.current && t.current.playSegments(m, e);
19
+ playSegments: (i, e) => {
20
+ var t;
21
+ return (t = r.current) == null ? void 0 : t.playSegments(i, e);
22
+ },
23
+ addEventListener: (i, e) => {
24
+ var t;
25
+ return (t = r.current) == null ? void 0 : t.addEventListener(i, e);
26
+ },
27
+ removeEventListener: (i, e) => {
28
+ var t;
29
+ return (t = r.current) == null ? void 0 : t.removeEventListener(i, e);
21
30
  }
22
31
  }),
23
32
  []
24
- ), E(() => ((async () => {
33
+ ), A(() => ((async () => {
25
34
  try {
26
- const e = await $(s);
27
- n.current && (t.current = w.loadAnimation({
28
- container: n.current,
35
+ const e = await $(m);
36
+ o.current && (r.current = g.loadAnimation({
37
+ container: o.current,
29
38
  animationData: e,
30
39
  renderer: "svg",
31
40
  loop: !0,
32
41
  autoplay: !0,
33
- ...u
34
- }), o && (a.current = new IntersectionObserver(
35
- ([l]) => {
42
+ ...l
43
+ }), c && (s.current = new IntersectionObserver(
44
+ ([t]) => {
36
45
  var f, d;
37
- l && l.isIntersecting ? (f = t.current) == null || f.play() : (d = t.current) == null || d.pause();
46
+ t && t.isIntersecting ? (f = r.current) == null || f.play() : (d = r.current) == null || d.pause();
38
47
  },
39
48
  { threshold: 0 }
40
- ), n.current && a.current.observe(n.current)), i == null || i(), r && t.current.addEventListener(r.name, r.callback));
49
+ ), o.current && s.current.observe(o.current)), a == null || a(), n && r.current.addEventListener(n.name, n.callback));
41
50
  } catch (e) {
42
51
  throw Error(`Error loading Lottie animation: ${e}`);
43
52
  }
44
53
  })(), () => {
45
54
  var e;
46
- t.current && (r && t.current.removeEventListener(r.name, r.callback), o && ((e = a.current) == null || e.disconnect()), t.current.destroy());
47
- }), [s, r, i, o, u]), /* @__PURE__ */ L(I, { ref: n, $width: v, $height: g });
48
- }), F = y(x);
55
+ r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((e = s.current) == null || e.disconnect()), r.current.destroy());
56
+ }), [m, n, a, c, l]), /* @__PURE__ */ E(I, { ref: o, $width: L, $height: h });
57
+ }), F = w(x);
49
58
  export {
50
59
  F as default
51
60
  };
@@ -1 +1 @@
1
- {"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationItem, AnimationSegment } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: AnimationSegment, forceFlag?: boolean) => {\n if (animationInstance.current) {\n animationInstance.current.playSegments(segments, forceFlag);\n }\n },\n }),\n [],\n );\n\n useEffect(() => {\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n if (container.current) {\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n if (container.current) {\n intersectionObserver.current.observe(container.current);\n }\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n }\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","useEffect","animationData","fetchLottie","lottie","entry","_a","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MAAwB;AACjE,QAAIJ,EAAkB,WACFA,EAAA,QAAQ,aAAaG,GAAUC,CAAS;AAAA,MAE9D;AAAA,IAAA;AAAA,IAEF,CAAC;AAAA,EAAA,GAGHC,EAAU,QACc,YAAY;AAC5B,QAAA;AACI,YAAAC,IAAgB,MAAMC,EAAYhB,CAAG;AAE3C,MAAIO,EAAU,YACME,EAAA,UAAUQ,EAAO,cAAc;AAAA,QAC/C,WAAWV,EAAU;AAAA,QACrB,eAAAQ;AAAA,QACA,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,GAAGZ;AAAA,MAAA,CACJ,GAEGG,MACFI,EAAqB,UAAU,IAAI;AAAA,QACjC,CAAC,CAACQ,CAAK,MAAM;;AACP,UAAAA,KAASA,EAAM,kBACjBC,IAAAV,EAAkB,YAAlB,QAAAU,EAA2B,UAE3BC,IAAAX,EAAkB,YAAlB,QAAAW,EAA2B;AAAA,QAE/B;AAAA,QACA,EAAE,WAAW,EAAE;AAAA,MAAA,GAGbb,EAAU,WACSG,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAI/CF,KAAA,QAAAA,KACPD,KACFK,EAAkB,QAAQ,iBAAiBL,EAAc,MAAMA,EAAc,QAAQ;AAAA,aAGlFiB,GAAO;AACR,YAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,IACxD;AAAA,EAAA,MAKK,MAAM;;AACX,IAAIZ,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFa,IAAAT,EAAqB,YAArB,QAAAS,EAA8B,eAEhCV,EAAkB,QAAQ;EAC5B,IAED,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDmB,GAAS,EAAA,KAAKf,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcqB,IAAAC,EAAK5B,CAAe;"}
1
+ {"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: [number, number], forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n }),\n [],\n );\n\n useEffect(() => {\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n if (container.current) {\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n if (container.current) {\n intersectionObserver.current.observe(container.current);\n }\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n }\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","useEffect","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MACzC;;AAAA,gBAAAC,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,aAAaF,GAAUC;AAAA;AAAA,MACpD,kBAAkB,CAACE,GAAmBC,MACpC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,iBAAiBC,GAAiCC;AAAA;AAAA,MAC/E,qBAAqB,CAACD,GAAmBC,MACvC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,oBAAoBC,GAAiCC;AAAA;AAAA,IAAQ;AAAA,IAE5F,CAAC;AAAA,EAAA,GAGHC,EAAU,QACc,YAAY;AAC5B,QAAA;AACI,YAAAC,IAAgB,MAAMC,EAAYnB,CAAG;AAE3C,MAAIO,EAAU,YACME,EAAA,UAAUW,EAAO,cAAc;AAAA,QAC/C,WAAWb,EAAU;AAAA,QACrB,eAAAW;AAAA,QACA,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,GAAGf;AAAA,MAAA,CACJ,GAEGG,MACFI,EAAqB,UAAU,IAAI;AAAA,QACjC,CAAC,CAACW,CAAK,MAAM;;AACP,UAAAA,KAASA,EAAM,kBACjBP,IAAAL,EAAkB,YAAlB,QAAAK,EAA2B,UAE3BQ,IAAAb,EAAkB,YAAlB,QAAAa,EAA2B;AAAA,QAE/B;AAAA,QACA,EAAE,WAAW,EAAE;AAAA,MAAA,GAGbf,EAAU,WACSG,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAI/CF,KAAA,QAAAA,KACPD,KACFK,EAAkB,QAAQ,iBAAiBL,EAAc,MAAMA,EAAc,QAAQ;AAAA,aAGlFmB,GAAO;AACR,YAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,IACxD;AAAA,EAAA,MAKK,MAAM;;AACX,IAAId,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;EAC5B,IAED,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDqB,GAAS,EAAA,KAAKjB,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcuB,IAAAC,EAAK9B,CAAe;"}