@cuemath/leap 3.0.11-j1 → 3.0.12-as1
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.
- package/dist/assets/illustrations/illustrations.js +0 -3
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +0 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +2 -2
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +30 -30
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +35 -35
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +44 -44
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/homework/homework-card.js +145 -131
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +28 -28
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +40 -38
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +53 -50
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +64 -62
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +44 -42
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +39 -37
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +38 -31
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
- package/dist/index.d.ts +2 -280
- package/dist/index.js +505 -551
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/dist/assets/illustrations/loader-1.svg.js +0 -6
- package/dist/assets/illustrations/loader-1.svg.js.map +0 -1
- package/dist/assets/line-icons/icons/apple-icon.js +0 -48
- package/dist/assets/line-icons/icons/apple-icon.js.map +0 -1
- package/dist/assets/line-icons/icons/google-icon.js +0 -42
- package/dist/assets/line-icons/icons/google-icon.js.map +0 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +0 -37
- package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
- package/dist/features/auth/account-selector/account-selector.js +0 -90
- package/dist/features/auth/account-selector/account-selector.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +0 -12
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +0 -11
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +0 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +0 -17
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +0 -1
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +0 -20
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +0 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +0 -29
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +0 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js +0 -8
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +0 -25
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +0 -47
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +0 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +0 -23
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +0 -1
- package/dist/features/auth/comps/tabs/tabs.js +0 -23
- package/dist/features/auth/comps/tabs/tabs.js.map +0 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +0 -12
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +0 -1
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +0 -67
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +0 -1
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +0 -89
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +0 -1
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +0 -60
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +0 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +0 -12
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +0 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +0 -88
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +0 -1
- package/dist/features/auth/login/login-constants.js +0 -12
- package/dist/features/auth/login/login-constants.js.map +0 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +0 -31
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +0 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +0 -46
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +0 -1
- package/dist/features/auth/login/username-password-form/username-password-form.js +0 -87
- package/dist/features/auth/login/username-password-form/username-password-form.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +0 -56
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +0 -131
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +0 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +0 -27
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +0 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +0 -79
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js +0 -33
- package/dist/features/auth/signup/custom-input-field/country-selector/country-code-button.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js +0 -98
- package/dist/features/auth/signup/custom-input-field/country-selector/country-list-menu.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js +0 -57
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js +0 -26
- package/dist/features/auth/signup/custom-input-field/country-selector/country-selector.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js +0 -30
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +0 -93
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js +0 -88
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js +0 -58
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js +0 -31
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js +0 -30
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js +0 -11
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +0 -33
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js +0 -9
- package/dist/features/auth/signup/custom-input-field/password-toggle/password-toggle.js.map +0 -1
- package/dist/features/auth/signup/signup-constants.js +0 -1031
- package/dist/features/auth/signup/signup-constants.js.map +0 -1
- package/dist/features/auth/signup/signup-methods/signup-methods.js +0 -68
- package/dist/features/auth/signup/signup-methods/signup-methods.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +0 -19
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +0 -62
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +0 -24
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js +0 -87
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -332
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -370
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -252
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -24
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -192
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -19
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -129
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -18
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/date-fns/subYears.js +0 -9
- package/dist/node_modules/date-fns/subYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/dist/index.es.js +0 -2700
- package/dist/node_modules/react-datepicker/dist/index.es.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +0 -518
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +0 -60
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +0 -53
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +0 -21
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +0 -21
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +0 -17
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +0 -60
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +0 -16
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +0 -18
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -32
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -16
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -156
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +0 -111
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +0 -22
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +0 -42
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -46
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -31
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -100
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -75
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -72
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -75
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -72
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +0 -68
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +0 -104
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +0 -88
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +0 -123
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +0 -1
- package/dist/static/avatar-selected.860ee923.json +0 -1
- package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +0 -1
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +0 -1
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/dob.9ce3c15b.json +0 -1
- package/dist/static/error.cbe1ddde.json +0 -1
- package/dist/static/grade.b3730524.json +0 -1
- package/dist/static/key.d6846476.json +0 -1
- package/dist/static/mail.c30e8708.json +0 -1
- package/dist/static/otp.2d08f874.json +0 -1
- package/dist/static/otp.a3029760.json +0 -1
- package/dist/static/parent-avatar.772d53e0.json +0 -1
- package/dist/static/phone-number.0be312ea.json +0 -1
- package/dist/static/phone-number.84f55562.json +0 -1
- package/dist/static/student-avatar.524226bd.json +0 -1
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.aad0b059.svg +0 -1
- package/dist/static/username.9e034d51.json +0 -1
@@ -1,253 +1,267 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
1
|
+
import { jsxs as x, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { memo as D, useRef as M, useCallback as b, useMemo as N } from "react";
|
3
|
+
import X from "../../assets/line-icons/icons/eye2.js";
|
4
|
+
import ee from "../../assets/line-icons/icons/home2.js";
|
5
|
+
import re from "../../assets/line-icons/icons/more-vertical.js";
|
5
6
|
import H from "../../assets/line-icons/icons/redo.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import { CardContainer as
|
13
|
-
import { getCardAnalyticProps as
|
14
|
-
const
|
7
|
+
import I from "../ui/arrow-tooltip/arrow-tooltip.js";
|
8
|
+
import te from "../ui/buttons/clickable/clickable.js";
|
9
|
+
import j from "../ui/hooks/use-context-menu-click-handler.js";
|
10
|
+
import ie from "../ui/layout/flex-view.js";
|
11
|
+
import F from "./card-menu-options.js";
|
12
|
+
import ne from "./homework-card-view.js";
|
13
|
+
import { CardContainer as ce, MenuWrapper as oe, CardKebabMenuWrapper as ae, BlurContainer as se, BlurFlexView as le, StyledMinus2Icon as ue } from "./styles.js";
|
14
|
+
import { getCardAnalyticProps as he } from "./utils.js";
|
15
|
+
const de = ({
|
15
16
|
// callbacks
|
16
17
|
nodeData: e,
|
17
|
-
onNodeAttempt:
|
18
|
-
onNodeReattempt:
|
18
|
+
onNodeAttempt: C,
|
19
|
+
onNodeReattempt: h,
|
19
20
|
onNodeReview: n,
|
20
|
-
onNodeUnassign:
|
21
|
-
onNodeView:
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
onNodeUnassign: d,
|
22
|
+
onNodeView: k,
|
23
|
+
onNodeAssignAsHomework: m,
|
24
|
+
header: L,
|
25
|
+
isInQueue: v,
|
26
|
+
renderAs: P,
|
27
|
+
shouldOpenOnRight: B,
|
28
|
+
studentId: g,
|
29
|
+
subHeader: z,
|
28
30
|
userMilestoneId: t,
|
29
|
-
userType:
|
31
|
+
userType: R
|
30
32
|
}) => {
|
31
|
-
const i =
|
32
|
-
node_type:
|
33
|
-
state:
|
34
|
-
permissions:
|
35
|
-
user_node_id:
|
36
|
-
user_milestone_id:
|
37
|
-
homework_id:
|
38
|
-
} = e, y =
|
39
|
-
can_start:
|
40
|
-
can_resume:
|
41
|
-
can_review:
|
42
|
-
can_unassign:
|
43
|
-
can_reset:
|
44
|
-
|
45
|
-
|
33
|
+
const i = P === "homework", {
|
34
|
+
node_type: _,
|
35
|
+
state: K,
|
36
|
+
permissions: Y,
|
37
|
+
user_node_id: c,
|
38
|
+
user_milestone_id: l,
|
39
|
+
homework_id: o
|
40
|
+
} = e, y = M(null), $ = M(null), { menuVisible: V, onMenuClick: q } = j(y), { menuVisible: G, onMenuClick: S } = j($), {
|
41
|
+
can_start: f,
|
42
|
+
can_resume: p,
|
43
|
+
can_review: a,
|
44
|
+
can_unassign: J,
|
45
|
+
can_reset: O,
|
46
|
+
can_assign_as_homework: Z
|
47
|
+
} = Y, u = R === "STUDENT", w = b(() => {
|
48
|
+
if (a) {
|
46
49
|
if (typeof n != "function")
|
47
50
|
throw new Error("onReview must be a function");
|
48
|
-
if (!
|
51
|
+
if (!c)
|
49
52
|
throw new Error("user node id must be present to review the sheet");
|
50
53
|
n(e, t);
|
51
54
|
return;
|
52
55
|
}
|
53
|
-
}, [
|
54
|
-
if (
|
55
|
-
if (typeof
|
56
|
+
}, [a, n, c, e, t]), Q = b(() => {
|
57
|
+
if (f || p) {
|
58
|
+
if (typeof C != "function")
|
56
59
|
throw new Error("onNodeAttempt must be a function");
|
57
|
-
|
60
|
+
C(e, o);
|
58
61
|
return;
|
59
62
|
}
|
60
63
|
if (!i) {
|
61
|
-
|
64
|
+
S();
|
62
65
|
return;
|
63
66
|
}
|
64
|
-
|
67
|
+
w();
|
65
68
|
}, [
|
66
|
-
h,
|
67
69
|
f,
|
68
|
-
i,
|
69
70
|
p,
|
70
|
-
|
71
|
+
i,
|
72
|
+
w,
|
73
|
+
C,
|
71
74
|
e,
|
72
|
-
|
73
|
-
|
74
|
-
]),
|
75
|
-
if (
|
75
|
+
o,
|
76
|
+
S
|
77
|
+
]), E = b(() => {
|
78
|
+
if (a) {
|
76
79
|
if (typeof n != "function")
|
77
80
|
throw new Error("onNodeReview must be a function");
|
78
|
-
if (!
|
81
|
+
if (!c)
|
79
82
|
throw new Error("user node id must be present to review the sheet");
|
80
|
-
n(e, t ||
|
83
|
+
n(e, t || l, o);
|
81
84
|
return;
|
82
85
|
}
|
83
|
-
if (typeof
|
86
|
+
if (typeof k != "function")
|
84
87
|
throw new Error("onNodeView must be a function");
|
85
|
-
|
88
|
+
k(e, t || l);
|
86
89
|
}, [
|
87
|
-
|
88
|
-
|
90
|
+
a,
|
91
|
+
k,
|
89
92
|
e,
|
90
93
|
t,
|
91
|
-
|
94
|
+
l,
|
92
95
|
n,
|
93
|
-
|
94
|
-
|
95
|
-
]),
|
96
|
-
(
|
97
|
-
switch (
|
96
|
+
c,
|
97
|
+
o
|
98
|
+
]), s = b(
|
99
|
+
(W) => {
|
100
|
+
switch (W) {
|
98
101
|
case "teacher-card-view":
|
99
|
-
|
102
|
+
E();
|
100
103
|
return;
|
101
104
|
case "student-card-view":
|
102
|
-
|
105
|
+
w();
|
103
106
|
return;
|
104
107
|
case "teacher-card-unassign":
|
105
|
-
|
108
|
+
d == null || d(e, t);
|
106
109
|
return;
|
107
110
|
case "student-card-reattempt":
|
108
111
|
case "teacher-card-redo":
|
109
|
-
|
112
|
+
h == null || h(e, t);
|
113
|
+
return;
|
114
|
+
case "teacher-card-assign-as-hw":
|
115
|
+
m == null || m(e, t);
|
110
116
|
return;
|
111
117
|
default:
|
112
|
-
throw new Error(`No callback function for ${
|
118
|
+
throw new Error(`No callback function for ${W}`);
|
113
119
|
}
|
114
120
|
},
|
115
121
|
[
|
116
122
|
e,
|
117
|
-
d,
|
118
123
|
m,
|
119
|
-
|
120
|
-
|
124
|
+
h,
|
125
|
+
d,
|
126
|
+
w,
|
127
|
+
E,
|
121
128
|
t
|
122
129
|
]
|
123
|
-
),
|
130
|
+
), A = [
|
124
131
|
{
|
125
132
|
id: "teacher-card-view",
|
126
|
-
label:
|
127
|
-
icon:
|
133
|
+
label: a ? "Review" : "View",
|
134
|
+
icon: X,
|
128
135
|
disabled: !1,
|
129
|
-
onClick:
|
136
|
+
onClick: s
|
130
137
|
},
|
131
138
|
{
|
132
139
|
id: "teacher-card-unassign",
|
133
140
|
label: "Unassign",
|
134
|
-
icon:
|
135
|
-
disabled: i ?
|
136
|
-
onClick:
|
141
|
+
icon: ue,
|
142
|
+
disabled: i ? _ === "MASTERY" : !J,
|
143
|
+
onClick: s
|
137
144
|
},
|
138
145
|
{
|
139
146
|
id: "teacher-card-redo",
|
140
147
|
label: "Redo",
|
141
148
|
icon: H,
|
142
|
-
disabled: !
|
143
|
-
onClick:
|
149
|
+
disabled: !O,
|
150
|
+
onClick: s
|
151
|
+
},
|
152
|
+
{
|
153
|
+
id: "teacher-card-assign-as-hw",
|
154
|
+
label: "Assign as HW",
|
155
|
+
icon: ee,
|
156
|
+
disabled: !Z,
|
157
|
+
onClick: s
|
144
158
|
}
|
145
|
-
],
|
159
|
+
], U = [
|
146
160
|
{
|
147
161
|
id: "student-card-view",
|
148
162
|
label: "Review",
|
149
|
-
icon:
|
150
|
-
disabled: !
|
151
|
-
onClick:
|
163
|
+
icon: X,
|
164
|
+
disabled: !a,
|
165
|
+
onClick: s
|
152
166
|
},
|
153
167
|
{
|
154
168
|
id: "student-card-reattempt",
|
155
169
|
label: "Reattempt",
|
156
170
|
icon: H,
|
157
|
-
disabled: !
|
158
|
-
onClick:
|
171
|
+
disabled: !O,
|
172
|
+
onClick: s
|
159
173
|
}
|
160
|
-
],
|
161
|
-
() =>
|
162
|
-
canResume:
|
163
|
-
canStart:
|
164
|
-
homeworkId:
|
174
|
+
], T = N(
|
175
|
+
() => he({
|
176
|
+
canResume: p,
|
177
|
+
canStart: f,
|
178
|
+
homeworkId: o,
|
165
179
|
isHomeWork: i,
|
166
|
-
isStudent:
|
167
|
-
milestoneId:
|
168
|
-
nodeType:
|
169
|
-
studentId:
|
170
|
-
userNodeId:
|
180
|
+
isStudent: u,
|
181
|
+
milestoneId: l,
|
182
|
+
nodeType: _,
|
183
|
+
studentId: g,
|
184
|
+
userNodeId: c
|
171
185
|
}),
|
172
186
|
[
|
173
|
-
|
187
|
+
u,
|
174
188
|
i,
|
175
|
-
|
176
|
-
|
177
|
-
h,
|
189
|
+
g,
|
190
|
+
_,
|
178
191
|
f,
|
179
|
-
|
192
|
+
p,
|
180
193
|
o,
|
181
|
-
|
194
|
+
c,
|
195
|
+
l
|
182
196
|
]
|
183
197
|
);
|
184
|
-
return /* @__PURE__ */
|
198
|
+
return /* @__PURE__ */ x(ce, { $position: "relative", $width: "fit-content", children: [
|
185
199
|
/* @__PURE__ */ r(
|
186
|
-
|
200
|
+
te,
|
187
201
|
{
|
188
|
-
onClick:
|
202
|
+
onClick: u ? Q : E,
|
189
203
|
label: "homework-card",
|
190
|
-
analyticsLabel:
|
191
|
-
analyticsProps:
|
204
|
+
analyticsLabel: T.analyticsLabel,
|
205
|
+
analyticsProps: T.analyticsProps,
|
192
206
|
children: /* @__PURE__ */ r(
|
193
|
-
|
207
|
+
ne,
|
194
208
|
{
|
195
|
-
header:
|
196
|
-
isInQueue:
|
209
|
+
header: L,
|
210
|
+
isInQueue: v,
|
197
211
|
nodeData: e,
|
198
212
|
studentContainerRef: $,
|
199
|
-
subHeader:
|
200
|
-
userType:
|
213
|
+
subHeader: z,
|
214
|
+
userType: R
|
201
215
|
}
|
202
216
|
)
|
203
217
|
}
|
204
218
|
),
|
205
|
-
|
206
|
-
|
219
|
+
u && !i && /* @__PURE__ */ r(
|
220
|
+
F,
|
207
221
|
{
|
208
222
|
$width: 200,
|
209
|
-
options:
|
223
|
+
options: U,
|
210
224
|
triggerRef: $,
|
211
|
-
visible:
|
225
|
+
visible: G,
|
212
226
|
shouldOpenOnRight: !1
|
213
227
|
}
|
214
228
|
),
|
215
|
-
!
|
229
|
+
!u && /* @__PURE__ */ x(oe, { $position: "absolute", $width: "fit-content", $borderRadiusX: 2, children: [
|
216
230
|
/* @__PURE__ */ r(
|
217
|
-
|
231
|
+
I,
|
218
232
|
{
|
219
233
|
renderAs: "primary",
|
220
234
|
tooltipItem: "Review",
|
221
235
|
position: "bottom",
|
222
236
|
zIndex: 6,
|
223
237
|
parentWidth: "100%",
|
224
|
-
hidden:
|
238
|
+
hidden: V || K !== "WAIT_FOR_REVIEW" && i,
|
225
239
|
children: /* @__PURE__ */ r(
|
226
|
-
|
240
|
+
ae,
|
227
241
|
{
|
228
242
|
$alignItems: "center",
|
229
243
|
$justifyContent: "center",
|
230
244
|
ref: y,
|
231
|
-
onClick:
|
232
|
-
children: /* @__PURE__ */ r(
|
245
|
+
onClick: q,
|
246
|
+
children: /* @__PURE__ */ r(re, { width: 16, height: 16 })
|
233
247
|
}
|
234
248
|
)
|
235
249
|
}
|
236
250
|
),
|
237
251
|
/* @__PURE__ */ r(
|
238
|
-
|
252
|
+
F,
|
239
253
|
{
|
240
|
-
options:
|
254
|
+
options: A,
|
241
255
|
triggerRef: y,
|
242
|
-
visible:
|
243
|
-
shouldOpenOnRight:
|
256
|
+
visible: V,
|
257
|
+
shouldOpenOnRight: B
|
244
258
|
}
|
245
259
|
)
|
246
260
|
] }),
|
247
|
-
|
261
|
+
v && /* @__PURE__ */ r(se, { $background: "WHITE_5", children: /* @__PURE__ */ r(le, { $heightX: 1, $widthX: 6, children: /* @__PURE__ */ r(I, { renderAs: "primary", tooltipItem: "Not visible to student", position: "bottom", children: /* @__PURE__ */ r(ie, { $heightX: 1, $widthX: 6 }) }) }) })
|
248
262
|
] });
|
249
|
-
},
|
263
|
+
}, Ve = D(de);
|
250
264
|
export {
|
251
|
-
|
265
|
+
Ve as default
|
252
266
|
};
|
253
267
|
//# sourceMappingURL=homework-card.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"homework-card.js","sources":["../../../src/features/homework/homework-card.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../chapters-v2/comps/node-card/node-card-types';\nimport type { TUserTypes } from '../ui/types';\n\nimport { memo, useCallback, useMemo, useRef } from 'react';\n\nimport Eye2Icon from '../../assets/line-icons/icons/eye2';\nimport MoreVerticalIcon from '../../assets/line-icons/icons/more-vertical';\nimport RedoIcon from '../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../ui/arrow-tooltip/arrow-tooltip';\nimport Clickable from '../ui/buttons/clickable/clickable';\nimport useContextMenuClickHandler from '../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../ui/layout/flex-view';\nimport CardMenuOptions from './card-menu-options';\nimport HomeworkView from './homework-card-view';\nimport * as Styled from './styles';\nimport { getCardAnalyticProps } from './utils';\n\ninterface IHomeworkCardProps extends INodeCardCallbacks {\n header: string;\n nodeData: INodeDataProps;\n subHeader: string;\n userType: TUserTypes;\n studentId: string;\n userMilestoneId?: string;\n renderAs: 'homework' | 'milestone';\n shouldOpenOnRight: boolean;\n isInQueue?: boolean;\n}\n\nconst HomeworkCard = ({\n // callbacks\n nodeData,\n onNodeAttempt,\n onNodeReattempt,\n onNodeReview,\n onNodeUnassign,\n onNodeView,\n\n header,\n isInQueue,\n renderAs,\n shouldOpenOnRight,\n studentId,\n subHeader,\n userMilestoneId,\n userType,\n}: IHomeworkCardProps) => {\n const isHomeWork = renderAs === 'homework';\n const {\n node_type: nodeType,\n state,\n permissions,\n user_node_id: userNodeId,\n user_milestone_id: milestoneId,\n homework_id: homeworkId,\n } = nodeData;\n\n const teacherContainerRef = useRef<HTMLDivElement>(null);\n const studentContainerRef = useRef<HTMLDivElement>(null);\n const { menuVisible: teacherMenuVisible, onMenuClick: onTeacherMenuClick } =\n useContextMenuClickHandler(teacherContainerRef);\n const { menuVisible: studentMenuVisible, onMenuClick: onStudentMenuClick } =\n useContextMenuClickHandler(studentContainerRef);\n\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_unassign: canUnassign,\n can_reset: canReset,\n } = permissions;\n const isStudent = userType === 'STUDENT';\n\n const onStudentViewSheet = useCallback(() => {\n if (canReview) {\n if (typeof onNodeReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n onNodeReview(nodeData, userMilestoneId);\n\n return;\n }\n }, [canReview, onNodeReview, userNodeId, nodeData, userMilestoneId]);\n\n const onStudentCardClick = useCallback(() => {\n if (canStart || canResume) {\n if (typeof onNodeAttempt !== 'function') {\n throw new Error('onNodeAttempt must be a function');\n }\n\n onNodeAttempt(nodeData, homeworkId);\n\n return;\n }\n\n if (!isHomeWork) {\n onStudentMenuClick();\n\n return;\n }\n onStudentViewSheet();\n }, [\n canStart,\n canResume,\n isHomeWork,\n onStudentViewSheet,\n onNodeAttempt,\n nodeData,\n homeworkId,\n onStudentMenuClick,\n ]);\n\n const onTeacherCardClick = useCallback(() => {\n if (canReview) {\n if (typeof onNodeReview !== 'function') {\n throw new Error('onNodeReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n onNodeReview(nodeData, userMilestoneId || milestoneId, homeworkId);\n\n return;\n }\n\n if (typeof onNodeView !== 'function') {\n throw new Error('onNodeView must be a function');\n }\n\n onNodeView(nodeData, userMilestoneId || milestoneId);\n }, [\n canReview,\n onNodeView,\n nodeData,\n userMilestoneId,\n milestoneId,\n onNodeReview,\n userNodeId,\n homeworkId,\n ]);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'teacher-card-view':\n onTeacherCardClick();\n\n return;\n case 'student-card-view':\n onStudentViewSheet();\n\n return;\n case 'teacher-card-unassign':\n onNodeUnassign?.(nodeData, userMilestoneId);\n\n return;\n case 'student-card-reattempt':\n case 'teacher-card-redo':\n onNodeReattempt?.(nodeData, userMilestoneId);\n\n return;\n\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n nodeData,\n onNodeReattempt,\n onNodeUnassign,\n onStudentViewSheet,\n onTeacherCardClick,\n userMilestoneId,\n ],\n );\n\n const teacherOptions = [\n {\n id: 'teacher-card-view',\n label: canReview ? 'Review' : 'View',\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'teacher-card-unassign',\n label: 'Unassign',\n icon: Styled.StyledMinus2Icon,\n disabled: isHomeWork ? nodeType === 'MASTERY' : !canUnassign,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'teacher-card-redo',\n label: 'Redo',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n const studentOptions = [\n {\n id: 'student-card-view',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'student-card-reattempt',\n label: 'Reattempt',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n const analyticsLabel = useMemo(\n () =>\n getCardAnalyticProps({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n }),\n [\n isStudent,\n isHomeWork,\n studentId,\n nodeType,\n canStart,\n canResume,\n homeworkId,\n userNodeId,\n milestoneId,\n ],\n );\n\n return (\n <Styled.CardContainer $position=\"relative\" $width=\"fit-content\">\n <Clickable\n onClick={isStudent ? onStudentCardClick : onTeacherCardClick}\n label=\"homework-card\"\n analyticsLabel={analyticsLabel.analyticsLabel}\n analyticsProps={analyticsLabel.analyticsProps}\n >\n <HomeworkView\n header={header}\n isInQueue={isInQueue}\n nodeData={nodeData}\n studentContainerRef={studentContainerRef}\n subHeader={subHeader}\n userType={userType}\n />\n </Clickable>\n {isStudent && !isHomeWork && (\n <CardMenuOptions\n $width={200}\n options={studentOptions}\n triggerRef={studentContainerRef}\n visible={studentMenuVisible}\n shouldOpenOnRight={false}\n />\n )}\n {!isStudent && (\n <Styled.MenuWrapper $position=\"absolute\" $width=\"fit-content\" $borderRadiusX={2}>\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Review\"\n position=\"bottom\"\n zIndex={6}\n parentWidth=\"100%\"\n hidden={teacherMenuVisible || (state !== 'WAIT_FOR_REVIEW' && isHomeWork)}\n >\n <Styled.CardKebabMenuWrapper\n $alignItems=\"center\"\n $justifyContent=\"center\"\n ref={teacherContainerRef}\n onClick={onTeacherMenuClick}\n >\n <MoreVerticalIcon width={16} height={16} />\n </Styled.CardKebabMenuWrapper>\n </ArrowTooltip>\n <CardMenuOptions\n options={teacherOptions}\n triggerRef={teacherContainerRef}\n visible={teacherMenuVisible}\n shouldOpenOnRight={shouldOpenOnRight}\n />\n </Styled.MenuWrapper>\n )}\n {isInQueue && (\n <Styled.BlurContainer $background=\"WHITE_5\">\n <Styled.BlurFlexView $heightX={1} $widthX={6}>\n <ArrowTooltip renderAs=\"primary\" tooltipItem=\"Not visible to student\" position=\"bottom\">\n <FlexView $heightX={1} $widthX={6} />\n </ArrowTooltip>\n </Styled.BlurFlexView>\n </Styled.BlurContainer>\n )}\n </Styled.CardContainer>\n );\n};\n\nexport default memo(HomeworkCard);\n"],"names":["HomeworkCard","nodeData","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeUnassign","onNodeView","header","isInQueue","renderAs","shouldOpenOnRight","studentId","subHeader","userMilestoneId","userType","isHomeWork","nodeType","state","permissions","userNodeId","milestoneId","homeworkId","teacherContainerRef","useRef","studentContainerRef","teacherMenuVisible","onTeacherMenuClick","useContextMenuClickHandler","studentMenuVisible","onStudentMenuClick","canStart","canResume","canReview","canUnassign","canReset","isStudent","onStudentViewSheet","useCallback","onStudentCardClick","onTeacherCardClick","handleOnMenuOptionClick","optionId","teacherOptions","Eye2Icon","Styled.StyledMinus2Icon","RedoIcon","studentOptions","analyticsLabel","useMemo","getCardAnalyticProps","Styled.CardContainer","jsx","Clickable","HomeworkView","CardMenuOptions","jsxs","Styled.MenuWrapper","ArrowTooltip","Styled.CardKebabMenuWrapper","MoreVerticalIcon","Styled.BlurContainer","Styled.BlurFlexView","FlexView","HomeworkCard$1","memo"],"mappings":";;;;;;;;;;;;;AAgCA,MAAMA,KAAe,CAAC;AAAA;AAAA,EAEpB,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EAEA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AACF,MAA0B;AACxB,QAAMC,IAAaN,MAAa,YAC1B;AAAA,IACJ,WAAWO;AAAA,IACX,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAcC;AAAA,IACd,mBAAmBC;AAAA,IACnB,aAAaC;AAAA,EACX,IAAApB,GAEEqB,IAAsBC,EAAuB,IAAI,GACjDC,IAAsBD,EAAuB,IAAI,GACjD,EAAE,aAAaE,GAAoB,aAAaC,MACpDC,EAA2BL,CAAmB,GAC1C,EAAE,aAAaM,GAAoB,aAAaC,MACpDF,EAA2BH,CAAmB,GAE1C;AAAA,IACJ,WAAWM;AAAA,IACX,YAAYC;AAAA,IACZ,YAAYC;AAAA,IACZ,cAAcC;AAAA,IACd,WAAWC;AAAA,EACT,IAAAhB,GACEiB,IAAYrB,MAAa,WAEzBsB,IAAqBC,EAAY,MAAM;AAC3C,QAAIL,GAAW;AACT,UAAA,OAAO5B,KAAiB;AACpB,cAAA,IAAI,MAAM,6BAA6B;AAG/C,UAAI,CAACe;AACG,cAAA,IAAI,MAAM,kDAAkD;AAEpE,MAAAf,EAAaH,GA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AAA,MACF;AAAA,IAAA,GACF;AAAA,IAEDF,KACC,gBAAA2C,EAACS,IAAA,EAAqB,aAAY,WAChC,UAAA,gBAAAT,EAACU,IAAA,EAAoB,UAAU,GAAG,SAAS,GACzC,UAAC,gBAAAV,EAAAM,GAAA,EAAa,UAAS,WAAU,aAAY,0BAAyB,UAAS,UAC7E,UAAA,gBAAAN,EAACW,IAAS,EAAA,UAAU,GAAG,SAAS,EAAG,CAAA,EACrC,CAAA,EACF,CAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEeC,KAAAC,EAAKhE,EAAY;"}
|
1
|
+
{"version":3,"file":"homework-card.js","sources":["../../../src/features/homework/homework-card.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../chapters-v2/comps/node-card/node-card-types';\nimport type { TUserTypes } from '../ui/types';\n\nimport { memo, useCallback, useMemo, useRef } from 'react';\n\nimport Eye2Icon from '../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../assets/line-icons/icons/home2';\nimport MoreVerticalIcon from '../../assets/line-icons/icons/more-vertical';\nimport RedoIcon from '../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../ui/arrow-tooltip/arrow-tooltip';\nimport Clickable from '../ui/buttons/clickable/clickable';\nimport useContextMenuClickHandler from '../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../ui/layout/flex-view';\nimport CardMenuOptions from './card-menu-options';\nimport HomeworkView from './homework-card-view';\nimport * as Styled from './styles';\nimport { getCardAnalyticProps } from './utils';\n\ninterface IHomeworkCardProps extends INodeCardCallbacks {\n header: string;\n nodeData: INodeDataProps;\n subHeader: string;\n userType: TUserTypes;\n studentId: string;\n userMilestoneId?: string;\n renderAs: 'homework' | 'milestone';\n shouldOpenOnRight: boolean;\n isInQueue?: boolean;\n}\n\nconst HomeworkCard = ({\n // callbacks\n nodeData,\n onNodeAttempt,\n onNodeReattempt,\n onNodeReview,\n onNodeUnassign,\n onNodeView,\n onNodeAssignAsHomework,\n\n header,\n isInQueue,\n renderAs,\n shouldOpenOnRight,\n studentId,\n subHeader,\n userMilestoneId,\n userType,\n}: IHomeworkCardProps) => {\n const isHomeWork = renderAs === 'homework';\n const {\n node_type: nodeType,\n state,\n permissions,\n user_node_id: userNodeId,\n user_milestone_id: milestoneId,\n homework_id: homeworkId,\n } = nodeData;\n\n const teacherContainerRef = useRef<HTMLDivElement>(null);\n const studentContainerRef = useRef<HTMLDivElement>(null);\n const { menuVisible: teacherMenuVisible, onMenuClick: onTeacherMenuClick } =\n useContextMenuClickHandler(teacherContainerRef);\n const { menuVisible: studentMenuVisible, onMenuClick: onStudentMenuClick } =\n useContextMenuClickHandler(studentContainerRef);\n\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_unassign: canUnassign,\n can_reset: canReset,\n can_assign_as_homework: canAssignAsHw,\n } = permissions;\n const isStudent = userType === 'STUDENT';\n\n const onStudentViewSheet = useCallback(() => {\n if (canReview) {\n if (typeof onNodeReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n onNodeReview(nodeData, userMilestoneId);\n\n return;\n }\n }, [canReview, onNodeReview, userNodeId, nodeData, userMilestoneId]);\n\n const onStudentCardClick = useCallback(() => {\n if (canStart || canResume) {\n if (typeof onNodeAttempt !== 'function') {\n throw new Error('onNodeAttempt must be a function');\n }\n\n onNodeAttempt(nodeData, homeworkId);\n\n return;\n }\n\n if (!isHomeWork) {\n onStudentMenuClick();\n\n return;\n }\n onStudentViewSheet();\n }, [\n canStart,\n canResume,\n isHomeWork,\n onStudentViewSheet,\n onNodeAttempt,\n nodeData,\n homeworkId,\n onStudentMenuClick,\n ]);\n\n const onTeacherCardClick = useCallback(() => {\n if (canReview) {\n if (typeof onNodeReview !== 'function') {\n throw new Error('onNodeReview must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('user node id must be present to review the sheet');\n }\n onNodeReview(nodeData, userMilestoneId || milestoneId, homeworkId);\n\n return;\n }\n\n if (typeof onNodeView !== 'function') {\n throw new Error('onNodeView must be a function');\n }\n\n onNodeView(nodeData, userMilestoneId || milestoneId);\n }, [\n canReview,\n onNodeView,\n nodeData,\n userMilestoneId,\n milestoneId,\n onNodeReview,\n userNodeId,\n homeworkId,\n ]);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'teacher-card-view':\n onTeacherCardClick();\n\n return;\n case 'student-card-view':\n onStudentViewSheet();\n\n return;\n case 'teacher-card-unassign':\n onNodeUnassign?.(nodeData, userMilestoneId);\n\n return;\n case 'student-card-reattempt':\n case 'teacher-card-redo':\n onNodeReattempt?.(nodeData, userMilestoneId);\n\n return;\n\n case 'teacher-card-assign-as-hw':\n onNodeAssignAsHomework?.(nodeData, userMilestoneId);\n\n return;\n\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n nodeData,\n onNodeAssignAsHomework,\n onNodeReattempt,\n onNodeUnassign,\n onStudentViewSheet,\n onTeacherCardClick,\n userMilestoneId,\n ],\n );\n\n const teacherOptions = [\n {\n id: 'teacher-card-view',\n label: canReview ? 'Review' : 'View',\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'teacher-card-unassign',\n label: 'Unassign',\n icon: Styled.StyledMinus2Icon,\n disabled: isHomeWork ? nodeType === 'MASTERY' : !canUnassign,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'teacher-card-redo',\n label: 'Redo',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'teacher-card-assign-as-hw',\n label: 'Assign as HW',\n icon: Home2Icon,\n disabled: !canAssignAsHw,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n const studentOptions = [\n {\n id: 'student-card-view',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'student-card-reattempt',\n label: 'Reattempt',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n const analyticsLabel = useMemo(\n () =>\n getCardAnalyticProps({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n }),\n [\n isStudent,\n isHomeWork,\n studentId,\n nodeType,\n canStart,\n canResume,\n homeworkId,\n userNodeId,\n milestoneId,\n ],\n );\n\n return (\n <Styled.CardContainer $position=\"relative\" $width=\"fit-content\">\n <Clickable\n onClick={isStudent ? onStudentCardClick : onTeacherCardClick}\n label=\"homework-card\"\n analyticsLabel={analyticsLabel.analyticsLabel}\n analyticsProps={analyticsLabel.analyticsProps}\n >\n <HomeworkView\n header={header}\n isInQueue={isInQueue}\n nodeData={nodeData}\n studentContainerRef={studentContainerRef}\n subHeader={subHeader}\n userType={userType}\n />\n </Clickable>\n {isStudent && !isHomeWork && (\n <CardMenuOptions\n $width={200}\n options={studentOptions}\n triggerRef={studentContainerRef}\n visible={studentMenuVisible}\n shouldOpenOnRight={false}\n />\n )}\n {!isStudent && (\n <Styled.MenuWrapper $position=\"absolute\" $width=\"fit-content\" $borderRadiusX={2}>\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Review\"\n position=\"bottom\"\n zIndex={6}\n parentWidth=\"100%\"\n hidden={teacherMenuVisible || (state !== 'WAIT_FOR_REVIEW' && isHomeWork)}\n >\n <Styled.CardKebabMenuWrapper\n $alignItems=\"center\"\n $justifyContent=\"center\"\n ref={teacherContainerRef}\n onClick={onTeacherMenuClick}\n >\n <MoreVerticalIcon width={16} height={16} />\n </Styled.CardKebabMenuWrapper>\n </ArrowTooltip>\n <CardMenuOptions\n options={teacherOptions}\n triggerRef={teacherContainerRef}\n visible={teacherMenuVisible}\n shouldOpenOnRight={shouldOpenOnRight}\n />\n </Styled.MenuWrapper>\n )}\n {isInQueue && (\n <Styled.BlurContainer $background=\"WHITE_5\">\n <Styled.BlurFlexView $heightX={1} $widthX={6}>\n <ArrowTooltip renderAs=\"primary\" tooltipItem=\"Not visible to student\" position=\"bottom\">\n <FlexView $heightX={1} $widthX={6} />\n </ArrowTooltip>\n </Styled.BlurFlexView>\n </Styled.BlurContainer>\n )}\n </Styled.CardContainer>\n );\n};\n\nexport default memo(HomeworkCard);\n"],"names":["HomeworkCard","nodeData","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeUnassign","onNodeView","onNodeAssignAsHomework","header","isInQueue","renderAs","shouldOpenOnRight","studentId","subHeader","userMilestoneId","userType","isHomeWork","nodeType","state","permissions","userNodeId","milestoneId","homeworkId","teacherContainerRef","useRef","studentContainerRef","teacherMenuVisible","onTeacherMenuClick","useContextMenuClickHandler","studentMenuVisible","onStudentMenuClick","canStart","canResume","canReview","canUnassign","canReset","canAssignAsHw","isStudent","onStudentViewSheet","useCallback","onStudentCardClick","onTeacherCardClick","handleOnMenuOptionClick","optionId","teacherOptions","Eye2Icon","Styled.StyledMinus2Icon","RedoIcon","Home2Icon","studentOptions","analyticsLabel","useMemo","getCardAnalyticProps","Styled.CardContainer","jsx","Clickable","HomeworkView","CardMenuOptions","jsxs","Styled.MenuWrapper","ArrowTooltip","Styled.CardKebabMenuWrapper","MoreVerticalIcon","Styled.BlurContainer","Styled.BlurFlexView","FlexView","HomeworkCard$1","memo"],"mappings":";;;;;;;;;;;;;;AAiCA,MAAMA,KAAe,CAAC;AAAA;AAAA,EAEpB,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,wBAAAC;AAAA,EAEA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,UAAAC;AACF,MAA0B;AACxB,QAAMC,IAAaN,MAAa,YAC1B;AAAA,IACJ,WAAWO;AAAA,I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|
1
1
|
import { jsxs as x, jsx as o } from "react/jsx-runtime";
|
2
2
|
import { useRef as n, useCallback as p, useMemo as R, useEffect as N } from "react";
|
3
3
|
import _ from "../../chapters-v2/chapter-details/block-sections/block-sections.js";
|
4
|
-
import
|
4
|
+
import k from "../../chapters-v2/chapter-details/chapter-banner/chapter-banner.js";
|
5
5
|
import I from "../../chapters-v2/chapter-details/chapter-details.js";
|
6
|
-
import
|
6
|
+
import A from "../../ui/layout/flex-view.js";
|
7
7
|
import P from "../../ui/separator/separator.js";
|
8
|
-
import { JOURNEY_ID_STUDENT as
|
9
|
-
import { PROGRESS_STAT_MOCK as y, BLOCK_MOCKS as
|
8
|
+
import { JOURNEY_ID_STUDENT as H } from "../journey-id/journey-id-student.js";
|
9
|
+
import { PROGRESS_STAT_MOCK as y, BLOCK_MOCKS as K } from "../mocks/chapter-page-journey-mock-data.js";
|
10
10
|
import { IndicatorType as l } from "../use-journey/constants.js";
|
11
11
|
import { useJourney as v } from "../use-journey/use-journey.js";
|
12
|
-
import
|
12
|
+
import s from "./use-home-page-journey/tooltip-item.js";
|
13
13
|
const $ = () => {
|
14
|
-
const t =
|
14
|
+
const t = H.CHAPTER_PAGE_JOURNEY, r = n(null), e = n(null), a = n(null), c = n([]), { nextCoachmark: d, setJourney: h, endJourney: C } = v(), i = p(() => {
|
15
15
|
d(t, !1, 0, !0);
|
16
16
|
}, [t, d]), g = p(() => {
|
17
17
|
document.body.style.overflow = "unset", C(t);
|
18
18
|
}, [C, t]), f = p(
|
19
19
|
({ chapterDetails: m, userChapterId: B, studentId: E, userType: T }) => {
|
20
|
-
const { name:
|
21
|
-
if (!(r != null && r.current) || !(e != null && e.current) || !
|
20
|
+
const { name: w, image_hue: u, image_url: O } = m;
|
21
|
+
if (!(r != null && r.current) || !(e != null && e.current) || !a.current)
|
22
22
|
return;
|
23
23
|
const S = [
|
24
24
|
{
|
25
25
|
originalElementToHighlightRef: r,
|
26
26
|
isActive: !1,
|
27
27
|
type: l.TOOLTIP,
|
28
|
-
elementToHighlight: /* @__PURE__ */ x(
|
28
|
+
elementToHighlight: /* @__PURE__ */ x(A, { children: [
|
29
29
|
/* @__PURE__ */ o(P, { heightX: 10 }),
|
30
30
|
/* @__PURE__ */ o(
|
31
31
|
I,
|
@@ -35,7 +35,7 @@ const $ = () => {
|
|
35
35
|
userType: T,
|
36
36
|
onBlockSkipUnskip: () => null,
|
37
37
|
onNodeAttempt: () => null,
|
38
|
-
|
38
|
+
onNodeAssignAsHomework: () => null,
|
39
39
|
onNodeMarkAsDone: () => null,
|
40
40
|
onNodeReattempt: () => null,
|
41
41
|
onNodeReview: () => null,
|
@@ -53,7 +53,7 @@ const $ = () => {
|
|
53
53
|
arrowSize: 12,
|
54
54
|
width: 264,
|
55
55
|
tooltipItem: /* @__PURE__ */ o(
|
56
|
-
|
56
|
+
s,
|
57
57
|
{
|
58
58
|
text: "Welcome to the all new chapter experience.",
|
59
59
|
buttonLabel: "Next",
|
@@ -65,11 +65,11 @@ const $ = () => {
|
|
65
65
|
{
|
66
66
|
originalElementToHighlightRef: e,
|
67
67
|
elementToHighlight: /* @__PURE__ */ o(
|
68
|
-
|
68
|
+
k,
|
69
69
|
{
|
70
|
-
title:
|
70
|
+
title: w,
|
71
71
|
progressStats: y,
|
72
|
-
imageUrl:
|
72
|
+
imageUrl: O,
|
73
73
|
imageHue: u
|
74
74
|
}
|
75
75
|
),
|
@@ -84,7 +84,7 @@ const $ = () => {
|
|
84
84
|
width: 264,
|
85
85
|
arrowSize: 12,
|
86
86
|
tooltipItem: /* @__PURE__ */ o(
|
87
|
-
|
87
|
+
s,
|
88
88
|
{
|
89
89
|
text: "A chapter is divided into *core sheets (compulsory), and supplementary sheets.",
|
90
90
|
buttonLabel: "Next",
|
@@ -97,11 +97,11 @@ const $ = () => {
|
|
97
97
|
{
|
98
98
|
originalElementToHighlightRef: e,
|
99
99
|
elementToHighlight: /* @__PURE__ */ o(
|
100
|
-
|
100
|
+
k,
|
101
101
|
{
|
102
|
-
title:
|
102
|
+
title: w,
|
103
103
|
progressStats: y,
|
104
|
-
imageUrl:
|
104
|
+
imageUrl: O,
|
105
105
|
imageHue: u
|
106
106
|
}
|
107
107
|
),
|
@@ -116,7 +116,7 @@ const $ = () => {
|
|
116
116
|
arrowSize: 12,
|
117
117
|
width: 264,
|
118
118
|
tooltipItem: /* @__PURE__ */ o(
|
119
|
-
|
119
|
+
s,
|
120
120
|
{
|
121
121
|
text: "Easily track the progress of the core sheets.",
|
122
122
|
buttonLabel: "Next",
|
@@ -127,8 +127,8 @@ const $ = () => {
|
|
127
127
|
isActive: !1
|
128
128
|
},
|
129
129
|
{
|
130
|
-
originalElementToHighlightRef:
|
131
|
-
elementToHighlight: /* @__PURE__ */ o(
|
130
|
+
originalElementToHighlightRef: a,
|
131
|
+
elementToHighlight: /* @__PURE__ */ o(A, { $widthX: 50, children: /* @__PURE__ */ o(_, { userType: T, blocks: K, imageHue: u }) }),
|
132
132
|
type: l.TOOLTIP,
|
133
133
|
indicator: {
|
134
134
|
position: "top",
|
@@ -140,7 +140,7 @@ const $ = () => {
|
|
140
140
|
arrowSize: 12,
|
141
141
|
width: 264,
|
142
142
|
tooltipItem: /* @__PURE__ */ o(
|
143
|
-
|
143
|
+
s,
|
144
144
|
{
|
145
145
|
text: "Core sheets are marked to help you find them faster.",
|
146
146
|
buttonLabel: "Got it",
|
@@ -152,24 +152,24 @@ const $ = () => {
|
|
152
152
|
}
|
153
153
|
];
|
154
154
|
h(t, S);
|
155
|
-
const
|
156
|
-
clearTimeout(
|
155
|
+
const b = setTimeout(() => {
|
156
|
+
clearTimeout(b), window.scrollTo(0, 0), document.body.style.overflow = "hidden", i();
|
157
157
|
}, 500);
|
158
|
-
c.current.push(
|
158
|
+
c.current.push(b);
|
159
159
|
},
|
160
160
|
[i, g, h, t]
|
161
|
-
),
|
161
|
+
), L = R(
|
162
162
|
() => ({
|
163
163
|
chapterPageRef: r,
|
164
164
|
bannerRef: e,
|
165
|
-
coreBlocksRef:
|
165
|
+
coreBlocksRef: a,
|
166
166
|
startJourney: f
|
167
167
|
}),
|
168
168
|
[f]
|
169
169
|
);
|
170
170
|
return N(() => () => {
|
171
171
|
c.current.forEach((m) => clearTimeout(m)), c.current = [];
|
172
|
-
}, []),
|
172
|
+
}, []), L;
|
173
173
|
};
|
174
174
|
export {
|
175
175
|
$ as useChapterPageJourney
|