@cuemath/leap 2.9.1-j2 → 2.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +0 -3
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lib/lib.js +7 -0
- package/dist/assets/lib/lib.js.map +1 -0
- package/dist/assets/lottie/lottie.js +1 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +45 -46
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js +25 -26
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
- package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js +59 -60
- package/dist/features/sheets/lessons-list/lesson-item/lesson-item-cta-info.js.map +1 -1
- package/dist/features/sheets/resources-list/resource-item/resource-item.js +89 -90
- package/dist/features/sheets/resources-list/resource-item/resource-item.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js +60 -61
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js +63 -64
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/sheets/utils/is-v3-worksheet.js +4 -14
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +18 -20
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/image/image.js +12 -12
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/lottie-animation/helper.js +5 -6
- package/dist/features/ui/lottie-animation/helper.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +28 -37
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/text/text.js +27 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/worksheet/constants/events.js +3 -0
- package/dist/features/worksheet/constants/events.js.map +1 -1
- package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js +69 -50
- package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
- package/dist/index.d.ts +11 -185
- package/dist/index.js +373 -406
- package/dist/index.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/static/lib/polypad.js +34463 -0
- package/package.json +2 -3
- 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 -26
- package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
- package/dist/features/auth/account-selector/account-selector.js +0 -75
- 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 -24
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.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 -26
- 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 -41
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +0 -48
- 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 -115
- 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 -16
- 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 -71
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +0 -1
- package/dist/features/auth/signup/custom-input/custom-input-styled.js +0 -38
- package/dist/features/auth/signup/custom-input/custom-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js +0 -79
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js +0 -54
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input/email-input/email-input.js +0 -30
- package/dist/features/auth/signup/custom-input/email-input/email-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js +0 -31
- package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input/grade-input/grade-input.js +0 -30
- package/dist/features/auth/signup/custom-input/grade-input/grade-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js +0 -19
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js +0 -33
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js.map +0 -1
- package/dist/features/auth/signup/custom-input/otp-input/otp-input.js +0 -41
- package/dist/features/auth/signup/custom-input/otp-input/otp-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js +0 -33
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js.map +0 -1
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js +0 -28
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js.map +0 -1
- package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js +0 -29
- package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input/phone-input/phone-input.js +0 -64
- package/dist/features/auth/signup/custom-input/phone-input/phone-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input/student-password/student-password.js +0 -53
- package/dist/features/auth/signup/custom-input/student-password/student-password.js.map +0 -1
- package/dist/features/auth/signup/custom-input/student-username/student-username.js +0 -38
- package/dist/features/auth/signup/custom-input/student-username/student-username.js.map +0 -1
- package/dist/features/auth/signup/signup-constants.js +0 -1022
- package/dist/features/auth/signup/signup-constants.js.map +0 -1
- package/dist/features/auth/signup/signup-methods/signup-methods.js +0 -58
- 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 -61
- 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/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.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/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,111 +1,110 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { useMemo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { useUIContext as
|
6
|
-
import { NODE_TYPE as
|
7
|
-
import
|
8
|
-
import Y from "../context-menu-helper/
|
9
|
-
import
|
10
|
-
|
11
|
-
|
12
|
-
sheet: t,
|
1
|
+
import { jsxs as q, Fragment as A, jsx as s } from "react/jsx-runtime";
|
2
|
+
import { useMemo as y, useCallback as I } from "react";
|
3
|
+
import g from "../../../../../ui/buttons/button/button.js";
|
4
|
+
import j from "../../../../../ui/context-menu/context-menu.js";
|
5
|
+
import { useUIContext as U } from "../../../../../ui/context/context.js";
|
6
|
+
import { NODE_TYPE as V } from "../../../../constants/sheet.js";
|
7
|
+
import W from "../context-menu-helper/menu-element/menu-element.js";
|
8
|
+
import Y from "../context-menu-helper/target-element/target-element.js";
|
9
|
+
import { MENU_OPTIONS as E } from "./student-actions-constant.js";
|
10
|
+
const K = ({
|
11
|
+
sheet: v,
|
13
12
|
isDefocused: o,
|
14
|
-
isLastSheet:
|
15
|
-
...
|
13
|
+
isLastSheet: C,
|
14
|
+
...N
|
16
15
|
}) => {
|
17
|
-
const { teacherId:
|
18
|
-
can_start:
|
19
|
-
can_resume:
|
16
|
+
const { teacherId: _, milestoneId: a, section: m, onStart: d, onResume: c, onReattempt: u, onReview: p } = N, { permissions: x, node_id: l, user_node_id: e, node_type: M } = v, {
|
17
|
+
can_start: r,
|
18
|
+
can_resume: f,
|
20
19
|
can_review: h,
|
21
|
-
can_reattempt:
|
22
|
-
is_review_disabled:
|
23
|
-
} =
|
24
|
-
const
|
25
|
-
teacher_id:
|
26
|
-
node_id:
|
20
|
+
can_reattempt: w,
|
21
|
+
is_review_disabled: R
|
22
|
+
} = x, t = M === V.DYNAMIC ? e : l, { onEvent: b } = U(), i = y(() => {
|
23
|
+
const n = {
|
24
|
+
teacher_id: _,
|
25
|
+
node_id: l,
|
27
26
|
user_node_id: e
|
28
27
|
};
|
29
|
-
return
|
30
|
-
}, [
|
31
|
-
if (!
|
28
|
+
return a && (n.milestone_id = a), m && (n.section = m), n;
|
29
|
+
}, [a, l, m, _, e]), T = I(() => {
|
30
|
+
if (!t)
|
32
31
|
throw new Error("No required id is present to open the sheet.");
|
33
|
-
if (
|
34
|
-
|
32
|
+
if (r && typeof d == "function") {
|
33
|
+
d(t, e);
|
35
34
|
return;
|
36
35
|
}
|
37
|
-
if (
|
38
|
-
|
36
|
+
if (f && typeof c == "function") {
|
37
|
+
c(t, e);
|
39
38
|
return;
|
40
39
|
}
|
41
40
|
throw new Error("No callback provided. If provided it must be a function");
|
42
|
-
}, [
|
43
|
-
(
|
44
|
-
if (
|
45
|
-
...
|
46
|
-
cta:
|
47
|
-
}),
|
41
|
+
}, [f, r, t, c, d, e]), S = I(
|
42
|
+
(n) => {
|
43
|
+
if (b("clicked", {
|
44
|
+
...i,
|
45
|
+
cta: n
|
46
|
+
}), n === E.REVIEW) {
|
48
47
|
if (!e)
|
49
48
|
throw new Error("No required id is present to open the sheet.");
|
50
|
-
if (typeof
|
49
|
+
if (typeof p != "function")
|
51
50
|
throw new Error("onReview must be a function");
|
52
|
-
|
51
|
+
p(e);
|
53
52
|
return;
|
54
53
|
}
|
55
|
-
if (!
|
54
|
+
if (!t)
|
56
55
|
throw new Error("No required id is present to open the sheet.");
|
57
|
-
if (typeof
|
56
|
+
if (typeof u != "function")
|
58
57
|
throw new Error("onReattempt must be a function");
|
59
|
-
|
58
|
+
u(t, e);
|
60
59
|
},
|
61
|
-
[
|
62
|
-
),
|
60
|
+
[i, t, u, p, b, e]
|
61
|
+
), k = r || f, O = !o && w || h, P = y(
|
63
62
|
() => [
|
64
63
|
{
|
65
64
|
show: h,
|
66
|
-
label:
|
67
|
-
disable:
|
65
|
+
label: E.REVIEW,
|
66
|
+
disable: R
|
68
67
|
},
|
69
68
|
{
|
70
|
-
show: !o &&
|
71
|
-
label:
|
69
|
+
show: !o && w,
|
70
|
+
label: E.REATTEMPT
|
72
71
|
}
|
73
72
|
],
|
74
|
-
[
|
73
|
+
[w, h, o, R]
|
75
74
|
);
|
76
|
-
return /* @__PURE__ */ A
|
77
|
-
|
78
|
-
|
75
|
+
return /* @__PURE__ */ q(A, { children: [
|
76
|
+
k && /* @__PURE__ */ s(
|
77
|
+
g,
|
79
78
|
{
|
80
|
-
label:
|
79
|
+
label: r ? "Start" : "Resume",
|
81
80
|
widthX: 7,
|
82
81
|
renderAs: "primary",
|
83
82
|
size: "xsmall",
|
84
|
-
onClick:
|
83
|
+
onClick: T,
|
85
84
|
disabled: o,
|
86
|
-
analyticsProps:
|
85
|
+
analyticsProps: i,
|
87
86
|
shape: "square"
|
88
87
|
}
|
89
88
|
),
|
90
|
-
|
91
|
-
|
89
|
+
O && /* @__PURE__ */ s(
|
90
|
+
j,
|
92
91
|
{
|
93
|
-
targetElement: /* @__PURE__ */ s(
|
92
|
+
targetElement: /* @__PURE__ */ s(Y, { analyticsLabel: "Sheet menu", analyticsProps: i }),
|
94
93
|
menuElement: /* @__PURE__ */ s(
|
95
|
-
|
94
|
+
W,
|
96
95
|
{
|
97
|
-
options:
|
96
|
+
options: P,
|
98
97
|
handleOnMenuOptionSelection: S
|
99
98
|
}
|
100
99
|
),
|
101
100
|
menuOffset: 10,
|
102
101
|
menuZIndex: 1,
|
103
|
-
placeTop:
|
102
|
+
placeTop: C
|
104
103
|
}
|
105
104
|
)
|
106
105
|
] });
|
107
106
|
};
|
108
107
|
export {
|
109
|
-
|
108
|
+
K as default
|
110
109
|
};
|
111
110
|
//# sourceMappingURL=student-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { NODE_TYPE } from '../../../../constants/sheet';\nimport
|
1
|
+
{"version":3,"file":"student-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/student-actions/student-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Button from '../../../../../ui/buttons/button/button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { NODE_TYPE } from '../../../../constants/sheet';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { MENU_OPTIONS } from './student-actions-constant';\n\nconst StudentActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restStudentActionProps\n}) => {\n const { teacherId, milestoneId, section, onStart, onResume, onReattempt, onReview } =\n restStudentActionProps;\n const { permissions, node_id: nodeId, user_node_id: userNodeId, node_type: nodeType } = sheet;\n\n const {\n can_start: canStart,\n can_resume: canResume,\n can_review: canReview,\n can_reattempt: canReattempt,\n is_review_disabled: isReviewHidden,\n } = permissions;\n\n const id = nodeType === NODE_TYPE.DYNAMIC ? userNodeId : nodeId;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const analyticsProps = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n if (section) {\n payload.section = section;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleOnPrimaryCtaClick = useCallback(() => {\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (canStart && typeof onStart === 'function') {\n onStart(id, userNodeId);\n\n return;\n }\n\n if (canResume && typeof onResume === 'function') {\n onResume(id, userNodeId);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canResume, canStart, id, onResume, onStart, userNodeId]);\n\n const handleOnMenuOptionSelection = useCallback(\n (selectedOption: string) => {\n trackEvent('clicked', {\n ...analyticsProps,\n cta: selectedOption,\n });\n if (selectedOption === MENU_OPTIONS.REVIEW) {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReview !== 'function') {\n throw new Error('onReview must be a function');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (!id) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n if (typeof onReattempt !== 'function') {\n throw new Error('onReattempt must be a function');\n }\n\n onReattempt(id, userNodeId);\n\n return;\n },\n [analyticsProps, id, onReattempt, onReview, trackEvent, userNodeId],\n );\n\n const renderPrimaryCta = canStart || canResume;\n const renderContextMenu = (!isDefocused && canReattempt) || canReview;\n\n const options = useMemo(\n () => [\n {\n show: canReview,\n label: MENU_OPTIONS.REVIEW,\n disable: isReviewHidden,\n },\n {\n show: !isDefocused && canReattempt,\n label: MENU_OPTIONS.REATTEMPT,\n },\n ],\n [canReattempt, canReview, isDefocused, isReviewHidden],\n );\n\n return (\n <>\n {renderPrimaryCta && (\n <Button\n label={canStart ? 'Start' : 'Resume'}\n widthX={7}\n renderAs=\"primary\"\n size=\"xsmall\"\n onClick={handleOnPrimaryCtaClick}\n disabled={isDefocused}\n analyticsProps={analyticsProps}\n shape=\"square\"\n />\n )}\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={analyticsProps} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default StudentActions;\n"],"names":["StudentActions","sheet","isDefocused","isLastSheet","restStudentActionProps","teacherId","milestoneId","section","onStart","onResume","onReattempt","onReview","permissions","nodeId","userNodeId","nodeType","canStart","canResume","canReview","canReattempt","isReviewHidden","id","NODE_TYPE","trackEvent","useUIContext","analyticsProps","useMemo","payload","handleOnPrimaryCtaClick","useCallback","handleOnMenuOptionSelection","selectedOption","MENU_OPTIONS","renderPrimaryCta","renderContextMenu","options","jsxs","Fragment","jsx","Button","ContextMenu","TargetElement","MenuElement"],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AAA;AAAA,YACC,SAAAP;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU3B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
@@ -1,157 +1,156 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as P, Fragment as G, jsx as r } from "react/jsx-runtime";
|
2
2
|
import { useMemo as S, useCallback as C } from "react";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import { useUIContext as
|
8
|
-
import { isV3Worksheet as N } from "../../../../utils/is-v3-worksheet.js";
|
3
|
+
import H from "../../../../../../assets/line-icons/icons/eye2.js";
|
4
|
+
import j from "../../../../../ui/buttons/button/button.js";
|
5
|
+
import q from "../../../../../ui/buttons/icon-button/icon-button.js";
|
6
|
+
import B from "../../../../../ui/context-menu/context-menu.js";
|
7
|
+
import { useUIContext as K } from "../../../../../ui/context/context.js";
|
9
8
|
import z from "../context-menu-helper/menu-element/menu-element.js";
|
10
|
-
import
|
11
|
-
import { TEACHER_MENU_OPTIONS as
|
12
|
-
const
|
13
|
-
sheet:
|
9
|
+
import V from "../context-menu-helper/target-element/target-element.js";
|
10
|
+
import { TEACHER_MENU_OPTIONS as e } from "./teacher-actions-constant.js";
|
11
|
+
const on = ({
|
12
|
+
sheet: o,
|
14
13
|
isDefocused: c,
|
15
|
-
isLastSheet:
|
16
|
-
...
|
14
|
+
isLastSheet: N,
|
15
|
+
...R
|
17
16
|
}) => {
|
18
17
|
const {
|
19
18
|
teacherId: w,
|
20
19
|
milestoneId: s,
|
21
20
|
section: l,
|
22
|
-
onReview:
|
23
|
-
onPreview:
|
21
|
+
onReview: u,
|
22
|
+
onPreview: m,
|
24
23
|
onReset: _,
|
25
24
|
onChangeLocation: A,
|
26
25
|
onMarkAsFamiliar: E,
|
27
26
|
onUnlock: I,
|
28
27
|
onUnAssignSheet: k
|
29
|
-
} =
|
28
|
+
} = R, { permissions: g, user_node_id: t, node_id: a } = o, {
|
30
29
|
can_teacher_review: y,
|
31
30
|
can_reset: f,
|
32
31
|
can_change_attempt_location: d,
|
33
32
|
can_mark_familiar: p,
|
34
|
-
can_unlock:
|
33
|
+
can_unlock: M,
|
35
34
|
can_unassign: h
|
36
|
-
} =
|
37
|
-
const
|
35
|
+
} = g, { onEvent: b } = K(), i = S(() => {
|
36
|
+
const n = {
|
38
37
|
teacher_id: w,
|
39
|
-
node_id:
|
38
|
+
node_id: a,
|
40
39
|
user_node_id: t
|
41
40
|
};
|
42
|
-
return l && (
|
43
|
-
}, [s,
|
44
|
-
(
|
45
|
-
const
|
46
|
-
...
|
47
|
-
cta:
|
41
|
+
return l && (n.section = l), s && (n.milestone_id = s), n;
|
42
|
+
}, [s, a, l, w, t]), v = C(
|
43
|
+
(n) => {
|
44
|
+
const F = {
|
45
|
+
...i,
|
46
|
+
cta: n
|
48
47
|
};
|
49
|
-
b("clicked",
|
48
|
+
b("clicked", F);
|
50
49
|
},
|
51
|
-
[b,
|
52
|
-
),
|
53
|
-
if (y && typeof
|
50
|
+
[b, i]
|
51
|
+
), O = C(() => {
|
52
|
+
if (y && typeof u == "function") {
|
54
53
|
if (!t)
|
55
54
|
throw new Error("No required id is present to open the sheet.");
|
56
|
-
|
55
|
+
u(t);
|
57
56
|
return;
|
58
57
|
}
|
59
|
-
if (typeof
|
60
|
-
|
58
|
+
if (typeof m == "function") {
|
59
|
+
m(o);
|
61
60
|
return;
|
62
61
|
}
|
63
62
|
throw new Error("No callback provided. If provided it must be a function");
|
64
|
-
}, [y,
|
65
|
-
switch (
|
66
|
-
case
|
63
|
+
}, [y, m, u, o, t]), U = (n) => {
|
64
|
+
switch (v(n), n) {
|
65
|
+
case e.CHANGE_LOCATION:
|
67
66
|
if (typeof A != "function")
|
68
67
|
throw new Error("onChangeLocation must be a function");
|
69
|
-
A(
|
68
|
+
A(o);
|
70
69
|
return;
|
71
|
-
case
|
70
|
+
case e.UNASSIGN:
|
72
71
|
if (typeof k != "function")
|
73
72
|
throw new Error("onUnAssignSheet must be a function");
|
74
73
|
if (!t)
|
75
74
|
throw new Error("No user node id is present to unassign the sheet.");
|
76
|
-
k(
|
75
|
+
k(o);
|
77
76
|
return;
|
78
|
-
case
|
77
|
+
case e.MARK_AS_FAMILIAR:
|
79
78
|
if (typeof E != "function")
|
80
79
|
throw new Error("onMarkAsFamiliar must be a function");
|
81
|
-
E(
|
80
|
+
E(a);
|
82
81
|
return;
|
83
82
|
default:
|
84
83
|
if (typeof _ != "function")
|
85
84
|
throw new Error("onReset must be a function");
|
86
|
-
_(
|
85
|
+
_(o);
|
87
86
|
return;
|
88
87
|
}
|
89
|
-
},
|
88
|
+
}, T = () => {
|
90
89
|
if (typeof I != "function")
|
91
90
|
throw new Error("onUnlock must be a function");
|
92
|
-
I(
|
93
|
-
},
|
91
|
+
I(a);
|
92
|
+
}, L = f || !c && d || p || h, x = S(
|
94
93
|
() => [
|
95
94
|
{
|
96
95
|
show: !c && d,
|
97
|
-
label:
|
96
|
+
label: e.CHANGE_LOCATION
|
98
97
|
},
|
99
98
|
{
|
100
99
|
show: f,
|
101
|
-
label:
|
100
|
+
label: e.RESET_PROGRESS
|
102
101
|
},
|
103
102
|
{
|
104
103
|
show: p,
|
105
|
-
label:
|
104
|
+
label: e.MARK_AS_FAMILIAR
|
106
105
|
},
|
107
106
|
{
|
108
107
|
show: h,
|
109
|
-
label:
|
108
|
+
label: e.UNASSIGN
|
110
109
|
}
|
111
110
|
],
|
112
111
|
[c, d, f, p, h]
|
113
112
|
);
|
114
|
-
return /* @__PURE__ */ G
|
115
|
-
|
116
|
-
|
113
|
+
return /* @__PURE__ */ P(G, { children: [
|
114
|
+
M && /* @__PURE__ */ r(
|
115
|
+
j,
|
117
116
|
{
|
118
117
|
renderAs: "primary",
|
119
118
|
label: "Assign",
|
120
119
|
size: "xsmall",
|
121
120
|
widthX: 7,
|
122
|
-
onClick:
|
123
|
-
analyticsProps:
|
121
|
+
onClick: T,
|
122
|
+
analyticsProps: i,
|
124
123
|
shape: "square"
|
125
124
|
}
|
126
125
|
),
|
127
126
|
/* @__PURE__ */ r(
|
128
|
-
|
127
|
+
q,
|
129
128
|
{
|
130
|
-
Icon:
|
129
|
+
Icon: H,
|
131
130
|
renderAs: "secondary",
|
132
131
|
analyticsLabel: "Review",
|
133
|
-
onClick:
|
132
|
+
onClick: O
|
134
133
|
}
|
135
134
|
),
|
136
|
-
|
137
|
-
|
135
|
+
L && /* @__PURE__ */ r(
|
136
|
+
B,
|
138
137
|
{
|
139
|
-
targetElement: /* @__PURE__ */ r(
|
138
|
+
targetElement: /* @__PURE__ */ r(V, { analyticsLabel: "Sheet menu", analyticsProps: i }),
|
140
139
|
menuElement: /* @__PURE__ */ r(
|
141
140
|
z,
|
142
141
|
{
|
143
|
-
options:
|
144
|
-
handleOnMenuOptionSelection:
|
142
|
+
options: x,
|
143
|
+
handleOnMenuOptionSelection: U
|
145
144
|
}
|
146
145
|
),
|
147
146
|
menuOffset: 10,
|
148
147
|
menuZIndex: 1,
|
149
|
-
placeTop:
|
148
|
+
placeTop: N
|
150
149
|
}
|
151
150
|
)
|
152
151
|
] });
|
153
152
|
};
|
154
153
|
export {
|
155
|
-
|
154
|
+
on as default
|
156
155
|
};
|
157
156
|
//# sourceMappingURL=teacher-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport
|
1
|
+
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { TEACHER_MENU_OPTIONS } from './teacher-actions-constant';\n\nconst TeacherActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restTeacherActions\n}) => {\n const {\n teacherId,\n milestoneId,\n section,\n onReview,\n onPreview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onUnAssignSheet,\n } = restTeacherActions;\n const { permissions, user_node_id: userNodeId, node_id: nodeId } = sheet;\n const {\n can_teacher_review: canTeacherReview,\n can_reset: canReset,\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_unlock: canUnlock,\n can_unassign: canUnAssign,\n } = permissions;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const trackEventPayload = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (section) {\n payload.section = section;\n }\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleTrackEvent = useCallback(\n (cta: string) => {\n const payload: TTrackEventPayloadProps = {\n ...trackEventPayload,\n cta,\n };\n\n trackEvent('clicked', payload);\n },\n [trackEvent, trackEventPayload],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheet);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = (selectedOption: string) => {\n handleTrackEvent(selectedOption);\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnAssignSheet must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('No user node id is present to unassign the sheet.');\n }\n onUnAssignSheet(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheet);\n\n return;\n }\n };\n\n const handleOnUnlock = () => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(nodeId);\n };\n\n const renderContextMenu =\n canReset || (!isDefocused && canChangeAttemptLocation) || canMarkFamiliar || canUnAssign;\n\n const options = useMemo(\n () => [\n {\n show: !isDefocused && canChangeAttemptLocation,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n },\n {\n show: canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: canMarkFamiliar,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n },\n {\n show: canUnAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [isDefocused, canChangeAttemptLocation, canReset, canMarkFamiliar, canUnAssign],\n );\n\n return (\n <>\n {canUnlock && (\n <Button\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"xsmall\"\n widthX={7}\n onClick={handleOnUnlock}\n analyticsProps={trackEventPayload}\n shape=\"square\"\n />\n )}\n\n <IconButton\n Icon={Eye2Icon}\n renderAs=\"secondary\"\n analyticsLabel={'Review'}\n onClick={handleOnSheetView}\n />\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={trackEventPayload} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","sheet","isDefocused","isLastSheet","restTeacherActions","teacherId","milestoneId","section","onReview","onPreview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onUnAssignSheet","permissions","userNodeId","nodeId","canTeacherReview","canReset","canChangeAttemptLocation","canMarkFamiliar","canUnlock","canUnAssign","trackEvent","useUIContext","trackEventPayload","useMemo","payload","handleTrackEvent","useCallback","cta","handleOnSheetView","handleOnMenuOptionSelection","selectedOption","TEACHER_MENU_OPTIONS","handleOnUnlock","renderContextMenu","options","jsxs","Fragment","jsx","Button","IconButton","Eye2Icon","ContextMenu","TargetElement","MenuElement"],"mappings":";;;;;;;;;;AAcA,MAAMA,KAA2C,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,k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MAAK;AAAA,QACL,QAAQ;AAAA,QACR,SAASN;AAAA,QACT,gBAAgBV;AAAA,QAChB,OAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAGF,gBAAAe;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMC;AAAA,QACN,UAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,SAASZ;AAAA,MAAA;AAAA,IACX;AAAA,IAECK,KACC,gBAAAI;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,eACG,gBAAAJ,EAAAK,GAAA,EAAc,gBAAe,cAAa,gBAAgBpB,GAAmB;AAAA,QAEhF,aACE,gBAAAe;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAAAT;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU9B;AAAA,MAAA;AAAA,IACZ;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
@@ -1,12 +1,12 @@
|
|
1
1
|
import { NODE_TYPE as E } from "../constants/sheet.js";
|
2
|
-
const
|
2
|
+
const S = [
|
3
3
|
"SAT_MATH_ASSESSMENT",
|
4
4
|
"SAT_ENGLISH_ASSESSMENT",
|
5
5
|
"SAT_MATH_RECAP",
|
6
6
|
"SAT_MATH_LEARNING",
|
7
7
|
"SAT_ENGLISH_LEARNING"
|
8
8
|
], T = [
|
9
|
-
...
|
9
|
+
...S,
|
10
10
|
E.REMEDIAL,
|
11
11
|
E.LEGACY,
|
12
12
|
E.RECAP,
|
@@ -31,18 +31,8 @@ const A = [
|
|
31
31
|
E.DIAGNOSTIC,
|
32
32
|
E.SUBJECTIVE,
|
33
33
|
E.TURING_SUBJECTIVE
|
34
|
-
]
|
35
|
-
const { node_type: n, is_worksheet_v3: S, is_lesson_v3_enabled: e } = _;
|
36
|
-
if (t === "review")
|
37
|
-
return T.includes(n);
|
38
|
-
const r = "can_start" in _ ? _.can_start : _.permissions.can_start, s = "can_reattempt" in _ ? _.can_reattempt : _.permissions.can_reattempt, o = "can_redo" in _ ? _.can_redo : !1;
|
39
|
-
return S || e ? !0 : r || s || o ? T.includes(n) : !!A.includes(n);
|
40
|
-
}, N = (_) => {
|
41
|
-
const { node_type: t, is_worksheet_v3: n, is_lesson_v3_enabled: S } = _;
|
42
|
-
return n || S || A.includes(t);
|
43
|
-
};
|
34
|
+
];
|
44
35
|
export {
|
45
|
-
|
46
|
-
N as isV3WorksheetAttempt
|
36
|
+
T as WORKSHEET_V3_NODE_TYPES
|
47
37
|
};
|
48
38
|
//# sourceMappingURL=is-v3-worksheet.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type { TNodeTypeProps } from '../sheets-list/sheet-item/sheet-item-types';\n\nimport { NODE_TYPE } from '../constants/sheet';\n\nconst SAT_V3_NODE_TYPES: TNodeTypeProps[] = [\n 'SAT_MATH_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_RECAP',\n 'SAT_MATH_LEARNING',\n 'SAT_ENGLISH_LEARNING',\n];\nconst WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[] = [\n ...SAT_V3_NODE_TYPES,\n NODE_TYPE.REMEDIAL,\n NODE_TYPE.LEGACY,\n NODE_TYPE.RECAP,\n NODE_TYPE.GENERAL,\n NODE_TYPE.LEVEL3,\n NODE_TYPE.LEVEL2,\n NODE_TYPE.REVISION,\n NODE_TYPE.TARGET_PRACTICE,\n NODE_TYPE.EXTRA_PRACTICE,\n NODE_TYPE.PRACTICE,\n NODE_TYPE.LEARNING,\n NODE_TYPE.PUZZLE_EASY,\n NODE_TYPE.PUZZLE_MEDIUM,\n NODE_TYPE.PUZZLE_HARD,\n NODE_TYPE.CHAPTER_ASSESSMENT,\n NODE_TYPE.ASSESSMENT,\n NODE_TYPE.MASTERY,\n NODE_TYPE.TRIAL_DIAGNOSTIC,\n NODE_TYPE.DYNAMIC,\n NODE_TYPE.TURING_ASSESSMENT,\n NODE_TYPE.TURING_PRACTICE,\n NODE_TYPE.DIAGNOSTIC,\n NODE_TYPE.SUBJECTIVE,\n NODE_TYPE.TURING_SUBJECTIVE,\n];\n\nexport { WORKSHEET_V3_NODE_TYPES };\n"],"names":["SAT_V3_NODE_TYPES","WORKSHEET_V3_NODE_TYPES","NODE_TYPE"],"mappings":";AAIA,MAAMA,IAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACMC,IAA4C;AAAA,EAChD,GAAGD;AAAA,EACHE,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ;"}
|
@@ -1,29 +1,27 @@
|
|
1
|
-
import { jsxs as u, jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({ targetElement:
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
/* @__PURE__ */ r(
|
13
|
-
M,
|
1
|
+
import { jsxs as u, jsx as t } from "react/jsx-runtime";
|
2
|
+
import { memo as c, useRef as f } from "react";
|
3
|
+
import a from "../hooks/use-context-menu-click-handler.js";
|
4
|
+
import { TargetElementWrapper as x, OptionsMenuWrapper as $, MenuElementWrapper as d } from "./context-menu-styled.js";
|
5
|
+
const C = c(
|
6
|
+
({ targetElement: r, menuElement: o, menuOffset: i, startLeft: l, menuZIndex: m, placeTop: e }) => {
|
7
|
+
const n = f(null), { menuVisible: s, onMenuClick: p } = a(n);
|
8
|
+
return /* @__PURE__ */ u(x, { ref: n, onClick: p, children: [
|
9
|
+
r,
|
10
|
+
/* @__PURE__ */ t(
|
11
|
+
$,
|
14
12
|
{
|
15
|
-
$menuOffset:
|
16
|
-
$visible:
|
17
|
-
$startLeft:
|
13
|
+
$menuOffset: i,
|
14
|
+
$visible: s,
|
15
|
+
$startLeft: l,
|
18
16
|
$menuZIndex: m,
|
19
|
-
$placeTop:
|
20
|
-
children: /* @__PURE__ */
|
17
|
+
$placeTop: e,
|
18
|
+
children: /* @__PURE__ */ t(d, { $placeTop: e, children: o })
|
21
19
|
}
|
22
20
|
)
|
23
21
|
] });
|
24
22
|
}
|
25
|
-
),
|
23
|
+
), b = C;
|
26
24
|
export {
|
27
|
-
|
25
|
+
b as default
|
28
26
|
};
|
29
27
|
//# sourceMappingURL=context-menu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport {
|
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;"}
|