@cuemath/leap 2.9.1-aa0 → 2.9.1-j1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +3 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/apple-icon.js +48 -0
- package/dist/assets/line-icons/icons/apple-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/google-icon.js +42 -0
- package/dist/assets/line-icons/icons/google-icon.js.map +1 -0
- package/dist/assets/lottie/lottie.js +11 -1
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +26 -0
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
- package/dist/features/auth/account-selector/account-selector.js +75 -0
- package/dist/features/auth/account-selector/account-selector.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +12 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +11 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -0
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +24 -0
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +29 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +1 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js +8 -0
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +26 -0
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +41 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +48 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +115 -0
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +16 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +1 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +71 -0
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +1 -0
- package/dist/features/auth/signup/custom-input/custom-input-styled.js +38 -0
- package/dist/features/auth/signup/custom-input/custom-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js +79 -0
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js +54 -0
- package/dist/features/auth/signup/custom-input/date-picker-input/date-picker-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input/email-input/email-input.js +30 -0
- package/dist/features/auth/signup/custom-input/email-input/email-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js +31 -0
- package/dist/features/auth/signup/custom-input/grade-input/grade-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input/grade-input/grade-input.js +30 -0
- package/dist/features/auth/signup/custom-input/grade-input/grade-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js +19 -0
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js +33 -0
- package/dist/features/auth/signup/custom-input/input-wrapper/input-wrapper.js.map +1 -0
- package/dist/features/auth/signup/custom-input/otp-input/otp-input.js +41 -0
- package/dist/features/auth/signup/custom-input/otp-input/otp-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js +33 -0
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-code-button.js.map +1 -0
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js +28 -0
- package/dist/features/auth/signup/custom-input/phone-input/country-selector/country-list-menu.js.map +1 -0
- package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js +29 -0
- package/dist/features/auth/signup/custom-input/phone-input/phone-input-styled.js.map +1 -0
- package/dist/features/auth/signup/custom-input/phone-input/phone-input.js +64 -0
- package/dist/features/auth/signup/custom-input/phone-input/phone-input.js.map +1 -0
- package/dist/features/auth/signup/custom-input/student-password/student-password.js +53 -0
- package/dist/features/auth/signup/custom-input/student-password/student-password.js.map +1 -0
- package/dist/features/auth/signup/custom-input/student-username/student-username.js +38 -0
- package/dist/features/auth/signup/custom-input/student-username/student-username.js.map +1 -0
- package/dist/features/auth/signup/signup-constants.js +1022 -0
- package/dist/features/auth/signup/signup-constants.js.map +1 -0
- package/dist/features/auth/signup/signup-methods/signup-methods.js +58 -0
- package/dist/features/auth/signup/signup-methods/signup-methods.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +19 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +61 -0
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +24 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +1 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js +87 -0
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +1 -0
- package/dist/features/chapters/lpar-chapter/block-section/sheet-item/rewards-n-actions/student-actions/student-actions.js +46 -45
- 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 +26 -25
- 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 +60 -59
- 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 +90 -89
- 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 +61 -60
- 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 +64 -63
- 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 +14 -4
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +20 -18
- 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 +6 -5
- package/dist/features/ui/lottie-animation/helper.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +37 -28
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/text/text.js +29 -27
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/worksheet/constants/events.js +0 -3
- package/dist/features/worksheet/constants/events.js.map +1 -1
- package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js +50 -69
- package/dist/features/worksheet/learnosity-preloader/learnosity-preloader.js.map +1 -1
- package/dist/index.d.ts +186 -11
- package/dist/index.js +406 -373
- package/dist/index.js.map +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +332 -0
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +1 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +370 -0
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +252 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +24 -0
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +192 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +19 -0
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +129 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +1 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +129 -0
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +1 -0
- package/dist/node_modules/clsx/dist/clsx.js +18 -0
- package/dist/node_modules/clsx/dist/clsx.js.map +1 -0
- package/dist/node_modules/date-fns/subYears.js +9 -0
- package/dist/node_modules/date-fns/subYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/dist/index.es.js +2700 -0
- package/dist/node_modules/react-datepicker/dist/index.es.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +8 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +8 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +518 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +60 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +53 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +19 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +21 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +21 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +17 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +60 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +16 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +18 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +8 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +19 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +32 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +16 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +71 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +34 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +156 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +111 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +22 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +15 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +42 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +62 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +52 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +46 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +31 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +22 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +34 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +34 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +100 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +49 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +49 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +41 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +75 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +49 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +70 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +72 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +71 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +33 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +75 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +72 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +71 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +23 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +50 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +68 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +104 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +88 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +123 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +13 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +11 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +12 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +14 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +10 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +9 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +1 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +19 -0
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/static/avatar-selected.860ee923.json +1 -0
- package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +1 -0
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +1 -0
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/dob.9ce3c15b.json +1 -0
- package/dist/static/grade.b3730524.json +1 -0
- package/dist/static/key.d6846476.json +1 -0
- package/dist/static/mail.c30e8708.json +1 -0
- package/dist/static/otp.2d08f874.json +1 -0
- package/dist/static/otp.a3029760.json +1 -0
- package/dist/static/parent-avatar.772d53e0.json +1 -0
- package/dist/static/phone-number.0be312ea.json +1 -0
- package/dist/static/phone-number.84f55562.json +1 -0
- package/dist/static/student-avatar.524226bd.json +1 -0
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +1 -0
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +1 -0
- package/dist/static/user-type-selector-grid-bg.aad0b059.svg +1 -0
- package/dist/static/username.9e034d51.json +1 -0
- package/package.json +3 -2
- package/dist/assets/lib/lib.js +0 -7
- package/dist/assets/lib/lib.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- package/dist/static/lib/polypad.js +0 -34472
@@ -1,156 +1,157 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as G, Fragment as H, jsx as r } from "react/jsx-runtime";
|
2
2
|
import { useMemo as S, useCallback as C } from "react";
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import { useUIContext as
|
3
|
+
import j from "../../../../../../assets/line-icons/icons/eye2.js";
|
4
|
+
import q from "../../../../../ui/buttons/button/button.js";
|
5
|
+
import B from "../../../../../ui/buttons/icon-button/icon-button.js";
|
6
|
+
import K from "../../../../../ui/context-menu/context-menu.js";
|
7
|
+
import { useUIContext as V } from "../../../../../ui/context/context.js";
|
8
|
+
import { isV3Worksheet as N } from "../../../../utils/is-v3-worksheet.js";
|
8
9
|
import z from "../context-menu-helper/menu-element/menu-element.js";
|
9
|
-
import
|
10
|
-
import { TEACHER_MENU_OPTIONS as
|
11
|
-
const
|
12
|
-
sheet:
|
10
|
+
import W from "../context-menu-helper/target-element/target-element.js";
|
11
|
+
import { TEACHER_MENU_OPTIONS as o } from "./teacher-actions-constant.js";
|
12
|
+
const rn = ({
|
13
|
+
sheet: n,
|
13
14
|
isDefocused: c,
|
14
|
-
isLastSheet:
|
15
|
-
...
|
15
|
+
isLastSheet: R,
|
16
|
+
...g
|
16
17
|
}) => {
|
17
18
|
const {
|
18
19
|
teacherId: w,
|
19
20
|
milestoneId: s,
|
20
21
|
section: l,
|
21
|
-
onReview:
|
22
|
-
onPreview:
|
22
|
+
onReview: m,
|
23
|
+
onPreview: u,
|
23
24
|
onReset: _,
|
24
25
|
onChangeLocation: A,
|
25
26
|
onMarkAsFamiliar: E,
|
26
27
|
onUnlock: I,
|
27
28
|
onUnAssignSheet: k
|
28
|
-
} =
|
29
|
+
} = g, { permissions: M, user_node_id: t, node_id: i } = n, {
|
29
30
|
can_teacher_review: y,
|
30
31
|
can_reset: f,
|
31
32
|
can_change_attempt_location: d,
|
32
33
|
can_mark_familiar: p,
|
33
|
-
can_unlock:
|
34
|
+
can_unlock: v,
|
34
35
|
can_unassign: h
|
35
|
-
} =
|
36
|
-
const
|
36
|
+
} = M, { onEvent: b } = V(), a = S(() => {
|
37
|
+
const e = {
|
37
38
|
teacher_id: w,
|
38
|
-
node_id:
|
39
|
+
node_id: i,
|
39
40
|
user_node_id: t
|
40
41
|
};
|
41
|
-
return l && (
|
42
|
-
}, [s,
|
43
|
-
(
|
44
|
-
const
|
45
|
-
...
|
46
|
-
cta:
|
42
|
+
return l && (e.section = l), s && (e.milestone_id = s), e;
|
43
|
+
}, [s, i, l, w, t]), O = C(
|
44
|
+
(e) => {
|
45
|
+
const P = {
|
46
|
+
...a,
|
47
|
+
cta: e
|
47
48
|
};
|
48
|
-
b("clicked",
|
49
|
+
b("clicked", P);
|
49
50
|
},
|
50
|
-
[b,
|
51
|
-
),
|
52
|
-
if (y && typeof
|
51
|
+
[b, a]
|
52
|
+
), U = C(() => {
|
53
|
+
if (y && typeof m == "function") {
|
53
54
|
if (!t)
|
54
55
|
throw new Error("No required id is present to open the sheet.");
|
55
|
-
|
56
|
+
m(t, N(n, "review"));
|
56
57
|
return;
|
57
58
|
}
|
58
|
-
if (typeof
|
59
|
-
|
59
|
+
if (typeof u == "function") {
|
60
|
+
u(n, N(n));
|
60
61
|
return;
|
61
62
|
}
|
62
63
|
throw new Error("No callback provided. If provided it must be a function");
|
63
|
-
}, [y,
|
64
|
-
switch (
|
65
|
-
case
|
64
|
+
}, [y, u, m, n, t]), T = (e) => {
|
65
|
+
switch (O(e), e) {
|
66
|
+
case o.CHANGE_LOCATION:
|
66
67
|
if (typeof A != "function")
|
67
68
|
throw new Error("onChangeLocation must be a function");
|
68
|
-
A(
|
69
|
+
A(n);
|
69
70
|
return;
|
70
|
-
case
|
71
|
+
case o.UNASSIGN:
|
71
72
|
if (typeof k != "function")
|
72
73
|
throw new Error("onUnAssignSheet must be a function");
|
73
74
|
if (!t)
|
74
75
|
throw new Error("No user node id is present to unassign the sheet.");
|
75
|
-
k(
|
76
|
+
k(n);
|
76
77
|
return;
|
77
|
-
case
|
78
|
+
case o.MARK_AS_FAMILIAR:
|
78
79
|
if (typeof E != "function")
|
79
80
|
throw new Error("onMarkAsFamiliar must be a function");
|
80
|
-
E(
|
81
|
+
E(i);
|
81
82
|
return;
|
82
83
|
default:
|
83
84
|
if (typeof _ != "function")
|
84
85
|
throw new Error("onReset must be a function");
|
85
|
-
_(
|
86
|
+
_(n);
|
86
87
|
return;
|
87
88
|
}
|
88
|
-
},
|
89
|
+
}, L = () => {
|
89
90
|
if (typeof I != "function")
|
90
91
|
throw new Error("onUnlock must be a function");
|
91
|
-
I(
|
92
|
-
},
|
92
|
+
I(i);
|
93
|
+
}, x = f || !c && d || p || h, F = S(
|
93
94
|
() => [
|
94
95
|
{
|
95
96
|
show: !c && d,
|
96
|
-
label:
|
97
|
+
label: o.CHANGE_LOCATION
|
97
98
|
},
|
98
99
|
{
|
99
100
|
show: f,
|
100
|
-
label:
|
101
|
+
label: o.RESET_PROGRESS
|
101
102
|
},
|
102
103
|
{
|
103
104
|
show: p,
|
104
|
-
label:
|
105
|
+
label: o.MARK_AS_FAMILIAR
|
105
106
|
},
|
106
107
|
{
|
107
108
|
show: h,
|
108
|
-
label:
|
109
|
+
label: o.UNASSIGN
|
109
110
|
}
|
110
111
|
],
|
111
112
|
[c, d, f, p, h]
|
112
113
|
);
|
113
|
-
return /* @__PURE__ */
|
114
|
-
|
115
|
-
|
114
|
+
return /* @__PURE__ */ G(H, { children: [
|
115
|
+
v && /* @__PURE__ */ r(
|
116
|
+
q,
|
116
117
|
{
|
117
118
|
renderAs: "primary",
|
118
119
|
label: "Assign",
|
119
120
|
size: "xsmall",
|
120
121
|
widthX: 7,
|
121
|
-
onClick:
|
122
|
-
analyticsProps:
|
122
|
+
onClick: L,
|
123
|
+
analyticsProps: a,
|
123
124
|
shape: "square"
|
124
125
|
}
|
125
126
|
),
|
126
127
|
/* @__PURE__ */ r(
|
127
|
-
|
128
|
+
B,
|
128
129
|
{
|
129
|
-
Icon:
|
130
|
+
Icon: j,
|
130
131
|
renderAs: "secondary",
|
131
132
|
analyticsLabel: "Review",
|
132
|
-
onClick:
|
133
|
+
onClick: U
|
133
134
|
}
|
134
135
|
),
|
135
|
-
|
136
|
-
|
136
|
+
x && /* @__PURE__ */ r(
|
137
|
+
K,
|
137
138
|
{
|
138
|
-
targetElement: /* @__PURE__ */ r(
|
139
|
+
targetElement: /* @__PURE__ */ r(W, { analyticsLabel: "Sheet menu", analyticsProps: a }),
|
139
140
|
menuElement: /* @__PURE__ */ r(
|
140
141
|
z,
|
141
142
|
{
|
142
|
-
options:
|
143
|
-
handleOnMenuOptionSelection:
|
143
|
+
options: F,
|
144
|
+
handleOnMenuOptionSelection: T
|
144
145
|
}
|
145
146
|
),
|
146
147
|
menuOffset: 10,
|
147
148
|
menuZIndex: 1,
|
148
|
-
placeTop:
|
149
|
+
placeTop: R
|
149
150
|
}
|
150
151
|
)
|
151
152
|
] });
|
152
153
|
};
|
153
154
|
export {
|
154
|
-
|
155
|
+
rn as default
|
155
156
|
};
|
156
157
|
//# sourceMappingURL=teacher-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { TEACHER_MENU_OPTIONS } from './teacher-actions-constant';\n\nconst TeacherActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restTeacherActions\n}) => {\n const {\n teacherId,\n milestoneId,\n section,\n onReview,\n onPreview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onUnAssignSheet,\n } = restTeacherActions;\n const { permissions, user_node_id: userNodeId, node_id: nodeId } = sheet;\n const {\n can_teacher_review: canTeacherReview,\n can_reset: canReset,\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_unlock: canUnlock,\n can_unassign: canUnAssign,\n } = permissions;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const trackEventPayload = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (section) {\n payload.section = section;\n }\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleTrackEvent = useCallback(\n (cta: string) => {\n const payload: TTrackEventPayloadProps = {\n ...trackEventPayload,\n cta,\n };\n\n trackEvent('clicked', payload);\n },\n [trackEvent, trackEventPayload],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n onReview(userNodeId);\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheet);\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = (selectedOption: string) => {\n handleTrackEvent(selectedOption);\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnAssignSheet must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('No user node id is present to unassign the sheet.');\n }\n onUnAssignSheet(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheet);\n\n return;\n }\n };\n\n const handleOnUnlock = () => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(nodeId);\n };\n\n const renderContextMenu =\n canReset || (!isDefocused && canChangeAttemptLocation) || canMarkFamiliar || canUnAssign;\n\n const options = useMemo(\n () => [\n {\n show: !isDefocused && canChangeAttemptLocation,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n },\n {\n show: canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: canMarkFamiliar,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n },\n {\n show: canUnAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [isDefocused, canChangeAttemptLocation, canReset, canMarkFamiliar, canUnAssign],\n );\n\n return (\n <>\n {canUnlock && (\n <Button\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"xsmall\"\n widthX={7}\n onClick={handleOnUnlock}\n analyticsProps={trackEventPayload}\n shape=\"square\"\n />\n )}\n\n <IconButton\n Icon={Eye2Icon}\n renderAs=\"secondary\"\n analyticsLabel={'Review'}\n onClick={handleOnSheetView}\n />\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={trackEventPayload} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","sheet","isDefocused","isLastSheet","restTeacherActions","teacherId","milestoneId","section","onReview","onPreview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onUnAssignSheet","permissions","userNodeId","nodeId","canTeacherReview","canReset","canChangeAttemptLocation","canMarkFamiliar","canUnlock","canUnAssign","trackEvent","useUIContext","trackEventPayload","useMemo","payload","handleTrackEvent","useCallback","cta","handleOnSheetView","handleOnMenuOptionSelection","selectedOption","TEACHER_MENU_OPTIONS","handleOnUnlock","renderContextMenu","options","jsxs","Fragment","jsx","Button","IconButton","Eye2Icon","ContextMenu","TargetElement","MenuElement"],"mappings":"
|
1
|
+
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { IRewardNActionsProps, TTrackEventPayloadProps } from '../reward-n-actions-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useMemo } from 'react';\n\nimport Eye2Icon from '../../../../../../assets/line-icons/icons/eye2';\nimport Button from '../../../../../ui/buttons/button/button';\nimport IconButton from '../../../../../ui/buttons/icon-button/icon-button';\nimport ContextMenu from '../../../../../ui/context-menu/context-menu';\nimport { useUIContext } from '../../../../../ui/context/context';\nimport { isV3Worksheet } from '../../../../utils/is-v3-worksheet';\nimport MenuElement from '../context-menu-helper/menu-element/menu-element';\nimport TargetElement from '../context-menu-helper/target-element/target-element';\nimport { TEACHER_MENU_OPTIONS } from './teacher-actions-constant';\n\nconst TeacherActions: FC<IRewardNActionsProps> = ({\n sheet,\n isDefocused,\n isLastSheet,\n ...restTeacherActions\n}) => {\n const {\n teacherId,\n milestoneId,\n section,\n onReview,\n onPreview,\n onReset,\n onChangeLocation,\n onMarkAsFamiliar,\n onUnlock,\n onUnAssignSheet,\n } = restTeacherActions;\n const { permissions, user_node_id: userNodeId, node_id: nodeId } = sheet;\n const {\n can_teacher_review: canTeacherReview,\n can_reset: canReset,\n can_change_attempt_location: canChangeAttemptLocation,\n can_mark_familiar: canMarkFamiliar,\n can_unlock: canUnlock,\n can_unassign: canUnAssign,\n } = permissions;\n\n const { onEvent: trackEvent } = useUIContext();\n\n const trackEventPayload = useMemo(() => {\n const payload: TTrackEventPayloadProps = {\n teacher_id: teacherId,\n node_id: nodeId,\n user_node_id: userNodeId,\n };\n\n if (section) {\n payload.section = section;\n }\n\n if (milestoneId) {\n payload.milestone_id = milestoneId;\n }\n\n return payload;\n }, [milestoneId, nodeId, section, teacherId, userNodeId]);\n\n const handleTrackEvent = useCallback(\n (cta: string) => {\n const payload: TTrackEventPayloadProps = {\n ...trackEventPayload,\n cta,\n };\n\n trackEvent('clicked', payload);\n },\n [trackEvent, trackEventPayload],\n );\n\n const handleOnSheetView = useCallback(() => {\n if (canTeacherReview && typeof onReview === 'function') {\n if (!userNodeId) {\n throw new Error('No required id is present to open the sheet.');\n }\n\n onReview(userNodeId, isV3Worksheet(sheet, 'review'));\n\n return;\n }\n\n if (typeof onPreview === 'function') {\n onPreview(sheet, isV3Worksheet(sheet));\n\n return;\n }\n\n throw new Error('No callback provided. If provided it must be a function');\n }, [canTeacherReview, onPreview, onReview, sheet, userNodeId]);\n\n const handleOnMenuOptionSelection = (selectedOption: string) => {\n handleTrackEvent(selectedOption);\n switch (selectedOption) {\n case TEACHER_MENU_OPTIONS.CHANGE_LOCATION:\n if (typeof onChangeLocation !== 'function') {\n throw new Error('onChangeLocation must be a function');\n }\n\n onChangeLocation(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.UNASSIGN:\n if (typeof onUnAssignSheet !== 'function') {\n throw new Error('onUnAssignSheet must be a function');\n }\n\n if (!userNodeId) {\n throw new Error('No user node id is present to unassign the sheet.');\n }\n onUnAssignSheet(sheet);\n\n return;\n\n case TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR:\n if (typeof onMarkAsFamiliar !== 'function') {\n throw new Error('onMarkAsFamiliar must be a function');\n }\n\n onMarkAsFamiliar(nodeId);\n\n return;\n\n default:\n if (typeof onReset !== 'function') {\n throw new Error('onReset must be a function');\n }\n\n onReset(sheet);\n\n return;\n }\n };\n\n const handleOnUnlock = () => {\n if (typeof onUnlock !== 'function') {\n throw new Error('onUnlock must be a function');\n }\n\n onUnlock(nodeId);\n };\n\n const renderContextMenu =\n canReset || (!isDefocused && canChangeAttemptLocation) || canMarkFamiliar || canUnAssign;\n\n const options = useMemo(\n () => [\n {\n show: !isDefocused && canChangeAttemptLocation,\n label: TEACHER_MENU_OPTIONS.CHANGE_LOCATION,\n },\n {\n show: canReset,\n label: TEACHER_MENU_OPTIONS.RESET_PROGRESS,\n },\n {\n show: canMarkFamiliar,\n label: TEACHER_MENU_OPTIONS.MARK_AS_FAMILIAR,\n },\n {\n show: canUnAssign,\n label: TEACHER_MENU_OPTIONS.UNASSIGN,\n },\n ],\n [isDefocused, canChangeAttemptLocation, canReset, canMarkFamiliar, canUnAssign],\n );\n\n return (\n <>\n {canUnlock && (\n <Button\n renderAs=\"primary\"\n label=\"Assign\"\n size=\"xsmall\"\n widthX={7}\n onClick={handleOnUnlock}\n analyticsProps={trackEventPayload}\n shape=\"square\"\n />\n )}\n\n <IconButton\n Icon={Eye2Icon}\n renderAs=\"secondary\"\n analyticsLabel={'Review'}\n onClick={handleOnSheetView}\n />\n\n {renderContextMenu && (\n <ContextMenu\n targetElement={\n <TargetElement analyticsLabel=\"Sheet menu\" analyticsProps={trackEventPayload} />\n }\n menuElement={\n <MenuElement\n options={options}\n handleOnMenuOptionSelection={handleOnMenuOptionSelection}\n />\n }\n menuOffset={10}\n menuZIndex={1}\n placeTop={isLastSheet}\n />\n )}\n </>\n );\n};\n\nexport default TeacherActions;\n"],"names":["TeacherActions","sheet","isDefocused","isLastSheet","restTeacherActions","teacherId","milestoneId","section","onReview","onPreview","onReset","onChangeLocation","onMarkAsFamiliar","onUnlock","onUnAssignSheet","permissions","userNodeId","nodeId","canTeacherReview","canReset","canChangeAttemptLocation","canMarkFamiliar","canUnlock","canUnAssign","trackEvent","useUIContext","trackEventPayload","useMemo","payload","handleTrackEvent","useCallback","cta","handleOnSheetView","isV3Worksheet","handleOnMenuOptionSelection","selectedOption","TEACHER_MENU_OPTIONS","handleOnUnlock","renderContextMenu","options","jsxs","Fragment","jsx","Button","IconButton","Eye2Icon","ContextMenu","TargetElement","MenuElement"],"mappings":";;;;;;;;;;;AAeA,MAAMA,KAA2C,CAAC;AAAA,EAChD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,SAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,iBAAAC;AAAA,EACE,IAAAV,GACE,EAAE,aAAAW,GAAa,cAAcC,GAAY,SAASC,EAAW,IAAAhB,GAC7D;AAAA,IACJ,oBAAoBiB;AAAA,IACpB,WAAWC;AAAA,IACX,6BAA6BC;AAAA,IAC7B,mBAAmBC;AAAA,IACnB,YAAYC;AAAA,IACZ,cAAcC;AAAA,EACZ,IAAAR,GAEE,EAAE,SAASS,EAAW,IAAIC,EAAa,GAEvCC,IAAoBC,EAAQ,MAAM;AACtC,UAAMC,IAAmC;AAAA,MACvC,YAAYvB;AAAA,MACZ,SAASY;AAAA,MACT,cAAcD;AAAA,IAAA;AAGhB,WAAIT,MACFqB,EAAQ,UAAUrB,IAGhBD,MACFsB,EAAQ,eAAetB,IAGlBsB;AAAA,EAAA,GACN,CAACtB,GAAaW,GAAQV,GAASF,GAAWW,CAAU,CAAC,GAElDa,IAAmBC;AAAA,IACvB,CAACC,MAAgB;AACf,YAAMH,IAAmC;AAAA,QACvC,GAAGF;AAAA,QACH,KAAAK;AAAA,MAAA;AAGF,MAAAP,EAAW,WAAWI,CAAO;AAAA,IAC/B;AAAA,IACA,CAACJ,GAAYE,CAAiB;AAAA,EAAA,GAG1BM,IAAoBF,EAAY,MAAM;AACtC,QAAAZ,KAAoB,OAAOV,KAAa,YAAY;AACtD,UAAI,CAACQ;AACG,cAAA,IAAI,MAAM,8CAA8C;AAGhE,MAAAR,EAASQ,GAAYiB,EAAchC,GAAO,QAAQ,CAAC;AAEnD;AAAA,IACF;AAEI,QAAA,OAAOQ,KAAc,YAAY;AACzB,MAAAA,EAAAR,GAAOgC,EAAchC,CAAK,CAAC;AAErC;AAAA,IACF;AAEM,UAAA,IAAI,MAAM,yDAAyD;AAAA,EAAA,GACxE,CAACiB,GAAkBT,GAAWD,GAAUP,GAAOe,CAAU,CAAC,GAEvDkB,IAA8B,CAACC,MAA2B;AAE9D,YADAN,EAAiBM,CAAc,GACvBA,GAAgB;AAAA,MACtB,KAAKC,EAAqB;AACpB,YAAA,OAAOzB,KAAqB;AACxB,gBAAA,IAAI,MAAM,qCAAqC;AAGvD,QAAAA,EAAiBV,CAAK;AAEtB;AAAA,MAEF,KAAKmC,EAAqB;AACpB,YAAA,OAAOtB,KAAoB;AACvB,gBAAA,IAAI,MAAM,oCAAoC;AAGtD,YAAI,CAACE;AACG,gBAAA,IAAI,MAAM,mDAAmD;AAErE,QAAAF,EAAgBb,CAAK;AAErB;AAAA,MAEF,KAAKmC,EAAqB;AACpB,YAAA,OAAOxB,KAAqB;AACxB,gBAAA,IAAI,MAAM,qCAAqC;AAGvD,QAAAA,EAAiBK,CAAM;AAEvB;AAAA,MAEF;AACM,YAAA,OAAOP,KAAY;AACf,gBAAA,IAAI,MAAM,4BAA4B;AAG9C,QAAAA,EAAQT,CAAK;AAEb;AAAA,IACJ;AAAA,EAAA,GAGIoC,IAAiB,MAAM;AACvB,QAAA,OAAOxB,KAAa;AAChB,YAAA,IAAI,MAAM,6BAA6B;AAG/C,IAAAA,EAASI,CAAM;AAAA,EAAA,GAGXqB,IACJnB,KAAa,CAACjB,KAAekB,KAA6BC,KAAmBE,GAEzEgB,IAAUZ;AAAA,IACd,MAAM;AAAA,MACJ;AAAA,QACE,MAAM,CAACzB,KAAekB;AAAA,QACtB,OAAOgB,EAAqB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,MAAMjB;AAAA,QACN,OAAOiB,EAAqB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,MAAMf;AAAA,QACN,OAAOe,EAAqB;AAAA,MAC9B;AAAA,MACA;AAAA,QACE,MAAMb;AAAA,QACN,OAAOa,EAAqB;AAAA,MAC9B;AAAA,IACF;AAAA,IACA,CAAClC,GAAakB,GAA0BD,GAAUE,GAAiBE,CAAW;AAAA,EAAA;AAGhF,SAEK,gBAAAiB,EAAAC,GAAA,EAAA,UAAA;AAAA,IACCnB,KAAA,gBAAAoB;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,OAAM;AAAA,QACN,MAAK;AAAA,QACL,QAAQ;AAAA,QACR,SAASN;AAAA,QACT,gBAAgBX;AAAA,QAChB,OAAM;AAAA,MAAA;AAAA,IACR;AAAA,IAGF,gBAAAgB;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAMC;AAAA,QACN,UAAS;AAAA,QACT,gBAAgB;AAAA,QAChB,SAASb;AAAA,MAAA;AAAA,IACX;AAAA,IAECM,KACC,gBAAAI;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,eACG,gBAAAJ,EAAAK,GAAA,EAAc,gBAAe,cAAa,gBAAgBrB,GAAmB;AAAA,QAEhF,aACE,gBAAAgB;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,SAAAT;AAAA,YACA,6BAAAL;AAAA,UAAA;AAAA,QACF;AAAA,QAEF,YAAY;AAAA,QACZ,YAAY;AAAA,QACZ,UAAU/B;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 A = [
|
3
3
|
"SAT_MATH_ASSESSMENT",
|
4
4
|
"SAT_ENGLISH_ASSESSMENT",
|
5
5
|
"SAT_MATH_RECAP",
|
6
6
|
"SAT_MATH_LEARNING",
|
7
7
|
"SAT_ENGLISH_LEARNING"
|
8
8
|
], T = [
|
9
|
-
...
|
9
|
+
...A,
|
10
10
|
E.REMEDIAL,
|
11
11
|
E.LEGACY,
|
12
12
|
E.RECAP,
|
@@ -31,8 +31,18 @@ const S = [
|
|
31
31
|
E.DIAGNOSTIC,
|
32
32
|
E.SUBJECTIVE,
|
33
33
|
E.TURING_SUBJECTIVE
|
34
|
-
]
|
34
|
+
], I = (_, t) => {
|
35
|
+
const { node_type: n, is_worksheet_v3: S, is_lesson_v3_enabled: e } = _;
|
36
|
+
if (t === "review")
|
37
|
+
return T.includes(n);
|
38
|
+
const r = "can_start" in _ ? _.can_start : _.permissions.can_start, s = "can_reattempt" in _ ? _.can_reattempt : _.permissions.can_reattempt, o = "can_redo" in _ ? _.can_redo : !1;
|
39
|
+
return S || e ? !0 : r || s || o ? T.includes(n) : !!A.includes(n);
|
40
|
+
}, N = (_) => {
|
41
|
+
const { node_type: t, is_worksheet_v3: n, is_lesson_v3_enabled: S } = _;
|
42
|
+
return n || S || A.includes(t);
|
43
|
+
};
|
35
44
|
export {
|
36
|
-
|
45
|
+
I as isV3Worksheet,
|
46
|
+
N as isV3WorksheetAttempt
|
37
47
|
};
|
38
48
|
//# sourceMappingURL=is-v3-worksheet.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type { TNodeTypeProps } from '../sheets-list/sheet-item/sheet-item-types';\n\nimport { NODE_TYPE } from '../constants/sheet';\n\nconst SAT_V3_NODE_TYPES: TNodeTypeProps[] = [\n 'SAT_MATH_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_RECAP',\n 'SAT_MATH_LEARNING',\n 'SAT_ENGLISH_LEARNING',\n];\nconst WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[] = [\n ...SAT_V3_NODE_TYPES,\n NODE_TYPE.REMEDIAL,\n NODE_TYPE.LEGACY,\n NODE_TYPE.RECAP,\n NODE_TYPE.GENERAL,\n NODE_TYPE.LEVEL3,\n NODE_TYPE.LEVEL2,\n NODE_TYPE.REVISION,\n NODE_TYPE.TARGET_PRACTICE,\n NODE_TYPE.EXTRA_PRACTICE,\n NODE_TYPE.PRACTICE,\n NODE_TYPE.LEARNING,\n NODE_TYPE.PUZZLE_EASY,\n NODE_TYPE.PUZZLE_MEDIUM,\n NODE_TYPE.PUZZLE_HARD,\n NODE_TYPE.CHAPTER_ASSESSMENT,\n NODE_TYPE.ASSESSMENT,\n NODE_TYPE.MASTERY,\n NODE_TYPE.TRIAL_DIAGNOSTIC,\n NODE_TYPE.DYNAMIC,\n NODE_TYPE.TURING_ASSESSMENT,\n NODE_TYPE.TURING_PRACTICE,\n NODE_TYPE.DIAGNOSTIC,\n NODE_TYPE.SUBJECTIVE,\n NODE_TYPE.TURING_SUBJECTIVE,\n];\n\
|
1
|
+
{"version":3,"file":"is-v3-worksheet.js","sources":["../../../../src/features/sheets/utils/is-v3-worksheet.ts"],"sourcesContent":["import type { IWorksheetAttemptModel } from '../../../types/models/worksheet';\nimport type { TLPARSheetData } from '../../chapters/lpar-chapter/block-section/sheet-item/sheet-item-type';\nimport type { ISheetDataProps, TNodeTypeProps } from '../sheets-list/sheet-item/sheet-item-types';\n\nimport { NODE_TYPE } from '../constants/sheet';\n\nconst SAT_V3_NODE_TYPES: TNodeTypeProps[] = [\n 'SAT_MATH_ASSESSMENT',\n 'SAT_ENGLISH_ASSESSMENT',\n 'SAT_MATH_RECAP',\n 'SAT_MATH_LEARNING',\n 'SAT_ENGLISH_LEARNING',\n];\nconst WORKSHEET_V3_NODE_TYPES: TNodeTypeProps[] = [\n ...SAT_V3_NODE_TYPES,\n NODE_TYPE.REMEDIAL,\n NODE_TYPE.LEGACY,\n NODE_TYPE.RECAP,\n NODE_TYPE.GENERAL,\n NODE_TYPE.LEVEL3,\n NODE_TYPE.LEVEL2,\n NODE_TYPE.REVISION,\n NODE_TYPE.TARGET_PRACTICE,\n NODE_TYPE.EXTRA_PRACTICE,\n NODE_TYPE.PRACTICE,\n NODE_TYPE.LEARNING,\n NODE_TYPE.PUZZLE_EASY,\n NODE_TYPE.PUZZLE_MEDIUM,\n NODE_TYPE.PUZZLE_HARD,\n NODE_TYPE.CHAPTER_ASSESSMENT,\n NODE_TYPE.ASSESSMENT,\n NODE_TYPE.MASTERY,\n NODE_TYPE.TRIAL_DIAGNOSTIC,\n NODE_TYPE.DYNAMIC,\n NODE_TYPE.TURING_ASSESSMENT,\n NODE_TYPE.TURING_PRACTICE,\n NODE_TYPE.DIAGNOSTIC,\n NODE_TYPE.SUBJECTIVE,\n NODE_TYPE.TURING_SUBJECTIVE,\n];\n\nconst isV3Worksheet = (\n sheet: ISheetDataProps | TLPARSheetData,\n mode?: 'resume' | 'review',\n): boolean => {\n const { node_type, is_worksheet_v3, is_lesson_v3_enabled } = sheet;\n\n if (mode === 'review') {\n return WORKSHEET_V3_NODE_TYPES.includes(node_type);\n }\n\n const canStart = 'can_start' in sheet ? sheet.can_start : sheet.permissions.can_start;\n const canReattempt =\n 'can_reattempt' in sheet ? sheet.can_reattempt : sheet.permissions.can_reattempt;\n const canRedo = 'can_redo' in sheet ? sheet.can_redo : false;\n\n if (is_worksheet_v3 || is_lesson_v3_enabled) {\n return true;\n }\n\n // For new and reattemptable worksheets start the worksheet in v3 mode\n if (canStart || canReattempt || canRedo) {\n return WORKSHEET_V3_NODE_TYPES.includes(node_type);\n }\n\n // For SAT assessments start the worksheet in v3 mode\n if (SAT_V3_NODE_TYPES.includes(node_type)) {\n return true;\n }\n\n return false;\n};\n\nconst isV3WorksheetAttempt = (attempt: IWorksheetAttemptModel): boolean => {\n const { node_type, is_worksheet_v3, is_lesson_v3_enabled } = attempt;\n\n return (\n is_worksheet_v3 ||\n is_lesson_v3_enabled ||\n SAT_V3_NODE_TYPES.includes(node_type as TNodeTypeProps)\n );\n};\n\nexport { isV3Worksheet, isV3WorksheetAttempt };\n"],"names":["SAT_V3_NODE_TYPES","WORKSHEET_V3_NODE_TYPES","NODE_TYPE","isV3Worksheet","sheet","mode","node_type","is_worksheet_v3","is_lesson_v3_enabled","canStart","canReattempt","canRedo","isV3WorksheetAttempt","attempt"],"mappings":";AAMA,MAAMA,IAAsC;AAAA,EAC1C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GACMC,IAA4C;AAAA,EAChD,GAAGD;AAAA,EACHE,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ,GAEMC,IAAgB,CACpBC,GACAC,MACY;AACZ,QAAM,EAAE,WAAAC,GAAW,iBAAAC,GAAiB,sBAAAC,EAAA,IAAyBJ;AAE7D,MAAIC,MAAS;AACJ,WAAAJ,EAAwB,SAASK,CAAS;AAGnD,QAAMG,IAAW,eAAeL,IAAQA,EAAM,YAAYA,EAAM,YAAY,WACtEM,IACJ,mBAAmBN,IAAQA,EAAM,gBAAgBA,EAAM,YAAY,eAC/DO,IAAU,cAAcP,IAAQA,EAAM,WAAW;AAEvD,SAAIG,KAAmBC,IACd,KAILC,KAAYC,KAAgBC,IACvBV,EAAwB,SAASK,CAAS,IAI/C,EAAAN,EAAkB,SAASM,CAAS;AAK1C,GAEMM,IAAuB,CAACC,MAA6C;AACzE,QAAM,EAAE,WAAAP,GAAW,iBAAAC,GAAiB,sBAAAC,EAAA,IAAyBK;AAE7D,SACEN,KACAC,KACAR,EAAkB,SAASM,CAA2B;AAE1D;"}
|
@@ -1,27 +1,29 @@
|
|
1
|
-
import { jsxs as u, jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { TargetElementWrapper as
|
5
|
-
const
|
6
|
-
({ targetElement:
|
7
|
-
const
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
import { jsxs as u, jsx as r } from "react/jsx-runtime";
|
2
|
+
import { memo as a, useRef as f, isValidElement as d, cloneElement as x } from "react";
|
3
|
+
import $ from "../hooks/use-context-menu-click-handler.js";
|
4
|
+
import { TargetElementWrapper as C, OptionsMenuWrapper as M, MenuElementWrapper as h } from "./context-menu-styled.js";
|
5
|
+
const k = a(
|
6
|
+
({ targetElement: e, menuElement: i, menuOffset: l, startLeft: s, menuZIndex: m, placeTop: n }) => {
|
7
|
+
const t = f(null), { menuVisible: o, onMenuClick: c } = $(t), p = d(e) ? x(e, {
|
8
|
+
menuVisible: o
|
9
|
+
}) : e;
|
10
|
+
return /* @__PURE__ */ u(C, { ref: t, onClick: c, children: [
|
11
|
+
p,
|
12
|
+
/* @__PURE__ */ r(
|
13
|
+
M,
|
12
14
|
{
|
13
|
-
$menuOffset:
|
14
|
-
$visible:
|
15
|
-
$startLeft:
|
15
|
+
$menuOffset: l,
|
16
|
+
$visible: o,
|
17
|
+
$startLeft: s,
|
16
18
|
$menuZIndex: m,
|
17
|
-
$placeTop:
|
18
|
-
children: /* @__PURE__ */
|
19
|
+
$placeTop: n,
|
20
|
+
children: /* @__PURE__ */ r(h, { $placeTop: n, children: i })
|
19
21
|
}
|
20
22
|
)
|
21
23
|
] });
|
22
24
|
}
|
23
|
-
),
|
25
|
+
), j = k;
|
24
26
|
export {
|
25
|
-
|
27
|
+
j as default
|
26
28
|
};
|
27
29
|
//# sourceMappingURL=context-menu.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({ targetElement, menuElement, menuOffset, startLeft, menuZIndex, placeTop }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {
|
1
|
+
{"version":3,"file":"context-menu.js","sources":["../../../../src/features/ui/context-menu/context-menu.tsx"],"sourcesContent":["import type { IContextMenuProps } from './context-menu-types';\nimport type { FC } from 'react';\n\nimport { cloneElement, isValidElement, memo, useRef } from 'react';\n\nimport useContextMenuClickHandler from '../hooks/use-context-menu-click-handler';\nimport * as Styled from './context-menu-styled';\n\nconst ContextMenu: FC<IContextMenuProps> = memo(\n ({ targetElement, menuElement, menuOffset, startLeft, menuZIndex, placeTop }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\n const enhancedTargetElement = isValidElement(targetElement)\n ? cloneElement(targetElement as React.ReactElement<{ menuVisible?: boolean }>, {\n menuVisible,\n })\n : targetElement;\n\n return (\n <Styled.TargetElementWrapper ref={containerRef} onClick={onMenuClick}>\n {enhancedTargetElement}\n\n <Styled.OptionsMenuWrapper\n $menuOffset={menuOffset}\n $visible={menuVisible}\n $startLeft={startLeft}\n $menuZIndex={menuZIndex}\n $placeTop={placeTop}\n >\n <Styled.MenuElementWrapper $placeTop={placeTop}>{menuElement}</Styled.MenuElementWrapper>\n </Styled.OptionsMenuWrapper>\n </Styled.TargetElementWrapper>\n );\n },\n);\n\nexport default ContextMenu;\n"],"names":["ContextMenu","memo","targetElement","menuElement","menuOffset","startLeft","menuZIndex","placeTop","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","enhancedTargetElement","isValidElement","cloneElement","Styled.TargetElementWrapper","jsx","Styled.OptionsMenuWrapper","Styled.MenuElementWrapper","ContextMenu$1"],"mappings":";;;;AAQA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,eAAAC,GAAe,aAAAC,GAAa,YAAAC,GAAY,WAAAC,GAAW,YAAAC,GAAY,UAAAC,QAAe;AACzE,UAAAC,IAAeC,EAAuB,IAAI,GAE1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,EAA2BJ,CAAY,GAEtEK,IAAwBC,EAAeZ,CAAa,IACtDa,EAAab,GAAgE;AAAA,MAC3E,aAAAQ;AAAA,IACD,CAAA,IACDR;AAEJ,6BACGc,GAAA,EAA4B,KAAKR,GAAc,SAASG,GACtD,UAAA;AAAA,MAAAE;AAAA,MAED,gBAAAI;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,aAAad;AAAA,UACb,UAAUM;AAAA,UACV,YAAYL;AAAA,UACZ,aAAaC;AAAA,UACb,WAAWC;AAAA,UAEX,4BAACY,GAAA,EAA0B,WAAWZ,GAAW,UAAYJ,GAAA;AAAA,QAAA;AAAA,MAC/D;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF,GAEAiB,IAAepB;"}
|
@@ -1,30 +1,30 @@
|
|
1
1
|
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
2
2
|
import { memo as g, useState as f } from "react";
|
3
3
|
import t from "styled-components";
|
4
|
-
import { skeletonLoadingAnimation as
|
4
|
+
import { skeletonLoadingAnimation as c } from "../constants/style.js";
|
5
5
|
import i from "../layout/flex-view.js";
|
6
|
-
const
|
7
|
-
animation: ${
|
6
|
+
const p = t(i)`
|
7
|
+
animation: ${c} 2s linear infinite;
|
8
8
|
position: absolute;
|
9
9
|
left: 0;
|
10
10
|
right: 0;
|
11
11
|
top: 0;
|
12
12
|
bottom: 0;
|
13
|
-
`,
|
13
|
+
`, L = t(i)`
|
14
14
|
overflow: hidden;
|
15
15
|
position: relative;
|
16
|
-
`,
|
17
|
-
({ borderRadius:
|
16
|
+
`, u = g(
|
17
|
+
({ borderRadius: n = 0, borderColor: r, withLoader: a, ...o }) => {
|
18
18
|
const { width: s, height: d } = o, [m, l] = f(!0);
|
19
19
|
return /* @__PURE__ */ h(
|
20
|
-
|
20
|
+
L,
|
21
21
|
{
|
22
22
|
$width: s,
|
23
23
|
$height: d,
|
24
|
-
$borderColor:
|
25
|
-
$borderRadius:
|
24
|
+
$borderColor: r,
|
25
|
+
$borderRadius: n,
|
26
26
|
children: [
|
27
|
-
m && a && /* @__PURE__ */ e(
|
27
|
+
m && a && /* @__PURE__ */ e(p, { $inherit: !0 }),
|
28
28
|
/* @__PURE__ */ e("img", { onLoad: () => {
|
29
29
|
l(!1);
|
30
30
|
}, ...o })
|
@@ -32,8 +32,8 @@ const L = t(i)`
|
|
32
32
|
}
|
33
33
|
);
|
34
34
|
}
|
35
|
-
);
|
35
|
+
), F = u;
|
36
36
|
export {
|
37
|
-
|
37
|
+
F as default
|
38
38
|
};
|
39
39
|
//# sourceMappingURL=image.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF;"}
|
1
|
+
{"version":3,"file":"image.js","sources":["../../../../src/features/ui/image/image.tsx"],"sourcesContent":["import type { IImageProps } from './image-types';\n\nimport { useState, memo } from 'react';\nimport styled from 'styled-components';\n\nimport { skeletonLoadingAnimation } from '../constants/style';\nimport FlexView from '../layout/flex-view';\n\nconst LoadingFlexView = styled(FlexView)`\n animation: ${skeletonLoadingAnimation} 2s linear infinite;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n`;\n\nconst ImageWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nconst Image: React.FC<IImageProps> = memo(\n ({ borderRadius = 0, borderColor, withLoader, ...props }) => {\n const { width, height } = props;\n const [isLoading, setIsLoading] = useState(true);\n const handleImgLoaded = () => {\n setIsLoading(false);\n };\n const showLoader = isLoading && withLoader;\n\n return (\n <ImageWrapper\n $width={width}\n $height={height}\n $borderColor={borderColor}\n $borderRadius={borderRadius}\n >\n {showLoader && <LoadingFlexView $inherit={true} />}\n <img onLoad={handleImgLoaded} {...props} />\n </ImageWrapper>\n );\n },\n);\n\nexport default Image;\n"],"names":["LoadingFlexView","styled","FlexView","skeletonLoadingAnimation","ImageWrapper","Image","memo","borderRadius","borderColor","withLoader","props","width","height","isLoading","setIsLoading","useState","jsxs","jsx","Image$1"],"mappings":";;;;;AAQA,MAAMA,IAAkBC,EAAOC,CAAQ;AAAA,eACxBC,CAAwB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAK9BG,IAA+BC;AAAA,EACnC,CAAC,EAAE,cAAAC,IAAe,GAAG,aAAAC,GAAa,YAAAC,GAAY,GAAGC,QAAY;AACrD,UAAA,EAAE,OAAAC,GAAO,QAAAC,EAAW,IAAAF,GACpB,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAI;AAO7C,WAAA,gBAAAC;AAAA,MAACZ;AAAA,MAAA;AAAA,QACC,QAAQO;AAAA,QACR,SAASC;AAAA,QACT,cAAcJ;AAAA,QACd,eAAeD;AAAA,QAEd,UAAA;AAAA,UATcM,KAAaJ,KASb,gBAAAQ,EAACjB,GAAgB,EAAA,UAAU,GAAM,CAAA;AAAA,UAC/C,gBAAAiB,EAAA,OAAA,EAAI,QAbe,MAAM;AAC5B,YAAAH,EAAa,EAAK;AAAA,UAAA,GAYe,GAAGJ,EAAO,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAG/C;AACF,GAEAQ,IAAeb;"}
|
@@ -1,13 +1,14 @@
|
|
1
|
-
const
|
1
|
+
const o = /* @__PURE__ */ new Map(), h = async (t) => {
|
2
|
+
if (o.has(t)) return o.get(t);
|
2
3
|
let e = null;
|
3
4
|
try {
|
4
|
-
e = await fetch(
|
5
|
-
} catch (
|
6
|
-
console.log("Error while fetching the lottie: ",
|
5
|
+
e = await fetch(t).then((n) => n.json()).catch(() => null), e && o.set(t, e);
|
6
|
+
} catch (n) {
|
7
|
+
console.log("Error while fetching the lottie: ", n);
|
7
8
|
}
|
8
9
|
return e;
|
9
10
|
};
|
10
11
|
export {
|
11
|
-
|
12
|
+
h as fetchLottie
|
12
13
|
};
|
13
14
|
//# sourceMappingURL=helper.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"
|
1
|
+
{"version":3,"file":"helper.js","sources":["../../../../src/features/ui/lottie-animation/helper.ts"],"sourcesContent":["import type { AnimationItem } from 'lottie-web';\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nconst lottieCache = new Map<string, any>();\n\nexport const fetchLottie = async (lottieSrc: string): Promise<AnimationItem | null> => {\n if (lottieCache.has(lottieSrc)) return lottieCache.get(lottieSrc);\n\n let lottieJson: AnimationItem | null = null;\n\n try {\n lottieJson = await fetch(lottieSrc)\n .then(res => res.json())\n .catch(() => null);\n if (lottieJson) {\n lottieCache.set(lottieSrc, lottieJson);\n }\n } catch (error) {\n /* eslint-disable no-console */\n console.log('Error while fetching the lottie: ', error);\n }\n\n return lottieJson;\n};\n"],"names":["lottieCache","fetchLottie","lottieSrc","lottieJson","res","error"],"mappings":"AAGA,MAAMA,wBAAkB,OAEXC,IAAc,OAAOC,MAAqD;AACrF,MAAIF,EAAY,IAAIE,CAAS,EAAU,QAAAF,EAAY,IAAIE,CAAS;AAEhE,MAAIC,IAAmC;AAEnC,MAAA;AACF,IAAAA,IAAa,MAAM,MAAMD,CAAS,EAC/B,KAAK,CAAAE,MAAOA,EAAI,KAAA,CAAM,EACtB,MAAM,MAAM,IAAI,GACfD,KACUH,EAAA,IAAIE,GAAWC,CAAU;AAAA,WAEhCE,GAAO;AAEN,YAAA,IAAI,qCAAqCA,CAAK;AAAA,EACxD;AAEO,SAAAF;AACT;"}
|
@@ -1,51 +1,60 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import { memo as
|
1
|
+
import { jsx as E } from "react/jsx-runtime";
|
2
|
+
import g from "lottie-web";
|
3
|
+
import { memo as w, forwardRef as y, useRef as u, useImperativeHandle as b, useEffect as A } from "react";
|
4
4
|
import I from "../layout/flex-view.js";
|
5
5
|
import { fetchLottie as $ } from "./helper.js";
|
6
|
-
const x =
|
6
|
+
const x = y((v, p) => {
|
7
7
|
const {
|
8
|
-
src:
|
9
|
-
width:
|
10
|
-
height:
|
11
|
-
settings:
|
12
|
-
eventListener:
|
13
|
-
onRender:
|
14
|
-
animateOnIntersect:
|
15
|
-
} =
|
16
|
-
return
|
17
|
-
|
8
|
+
src: m,
|
9
|
+
width: L = "100%",
|
10
|
+
height: h = "100%",
|
11
|
+
settings: l,
|
12
|
+
eventListener: n,
|
13
|
+
onRender: a,
|
14
|
+
animateOnIntersect: c
|
15
|
+
} = v, o = u(null), r = u(null), s = u(null);
|
16
|
+
return b(
|
17
|
+
p,
|
18
18
|
() => ({
|
19
|
-
playSegments: (
|
20
|
-
|
19
|
+
playSegments: (i, e) => {
|
20
|
+
var t;
|
21
|
+
return (t = r.current) == null ? void 0 : t.playSegments(i, e);
|
22
|
+
},
|
23
|
+
addEventListener: (i, e) => {
|
24
|
+
var t;
|
25
|
+
return (t = r.current) == null ? void 0 : t.addEventListener(i, e);
|
26
|
+
},
|
27
|
+
removeEventListener: (i, e) => {
|
28
|
+
var t;
|
29
|
+
return (t = r.current) == null ? void 0 : t.removeEventListener(i, e);
|
21
30
|
}
|
22
31
|
}),
|
23
32
|
[]
|
24
|
-
),
|
33
|
+
), A(() => ((async () => {
|
25
34
|
try {
|
26
|
-
const e = await $(
|
27
|
-
|
28
|
-
container:
|
35
|
+
const e = await $(m);
|
36
|
+
o.current && (r.current = g.loadAnimation({
|
37
|
+
container: o.current,
|
29
38
|
animationData: e,
|
30
39
|
renderer: "svg",
|
31
40
|
loop: !0,
|
32
41
|
autoplay: !0,
|
33
|
-
...
|
34
|
-
}),
|
35
|
-
([
|
42
|
+
...l
|
43
|
+
}), c && (s.current = new IntersectionObserver(
|
44
|
+
([t]) => {
|
36
45
|
var f, d;
|
37
|
-
|
46
|
+
t && t.isIntersecting ? (f = r.current) == null || f.play() : (d = r.current) == null || d.pause();
|
38
47
|
},
|
39
48
|
{ threshold: 0 }
|
40
|
-
),
|
49
|
+
), o.current && s.current.observe(o.current)), a == null || a(), n && r.current.addEventListener(n.name, n.callback));
|
41
50
|
} catch (e) {
|
42
51
|
throw Error(`Error loading Lottie animation: ${e}`);
|
43
52
|
}
|
44
53
|
})(), () => {
|
45
54
|
var e;
|
46
|
-
|
47
|
-
}), [
|
48
|
-
}), F =
|
55
|
+
r.current && (n && r.current.removeEventListener(n.name, n.callback), c && ((e = s.current) == null || e.disconnect()), r.current.destroy());
|
56
|
+
}), [m, n, a, c, l]), /* @__PURE__ */ E(I, { ref: o, $width: L, $height: h });
|
57
|
+
}), F = w(x);
|
49
58
|
export {
|
50
59
|
F as default
|
51
60
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type {
|
1
|
+
{"version":3,"file":"lottie-animation.js","sources":["../../../../src/features/ui/lottie-animation/lottie-animation.tsx"],"sourcesContent":["import type { ILottieAnimationProps, ILottieAnimationRef } from './types';\nimport type { AnimationEventName, AnimationItem } from 'lottie-web';\n\nimport lottie from 'lottie-web';\nimport { forwardRef, memo, useEffect, useImperativeHandle, useRef } from 'react';\n\nimport FlexView from '../layout/flex-view';\nimport { fetchLottie } from './helper';\n\nconst LottieAnimation = forwardRef<ILottieAnimationRef, ILottieAnimationProps>((props, ref) => {\n const {\n src,\n width = '100%',\n height = '100%',\n settings,\n eventListener,\n onRender,\n animateOnIntersect,\n } = props;\n\n const container = useRef<HTMLDivElement>(null);\n const animationInstance = useRef<AnimationItem | null>(null);\n const intersectionObserver = useRef<IntersectionObserver | null>(null);\n\n useImperativeHandle(\n ref,\n () => ({\n playSegments: (segments: [number, number], forceFlag?: boolean) =>\n animationInstance.current?.playSegments(segments, forceFlag),\n addEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.addEventListener(eventName as AnimationEventName, callback),\n removeEventListener: (eventName: string, callback: () => void) =>\n animationInstance.current?.removeEventListener(eventName as AnimationEventName, callback),\n }),\n [],\n );\n\n useEffect(() => {\n const loadAnimation = async () => {\n try {\n const animationData = await fetchLottie(src);\n\n if (container.current) {\n animationInstance.current = lottie.loadAnimation({\n container: container.current,\n animationData,\n renderer: 'svg',\n loop: true,\n autoplay: true,\n ...settings,\n });\n\n if (animateOnIntersect) {\n intersectionObserver.current = new IntersectionObserver(\n ([entry]) => {\n if (entry && entry.isIntersecting) {\n animationInstance.current?.play();\n } else {\n animationInstance.current?.pause();\n }\n },\n { threshold: 0 },\n );\n\n if (container.current) {\n intersectionObserver.current.observe(container.current);\n }\n }\n\n onRender?.();\n if (eventListener) {\n animationInstance.current.addEventListener(eventListener.name, eventListener.callback);\n }\n }\n } catch (error) {\n throw Error(`Error loading Lottie animation: ${error}`);\n }\n };\n\n loadAnimation();\n\n return () => {\n if (animationInstance.current) {\n if (eventListener) {\n animationInstance.current.removeEventListener(eventListener.name, eventListener.callback);\n }\n\n if (animateOnIntersect) {\n intersectionObserver.current?.disconnect();\n }\n animationInstance.current.destroy();\n }\n };\n }, [src, eventListener, onRender, animateOnIntersect, settings]);\n\n return <FlexView ref={container} $width={width} $height={height} />;\n});\n\nexport default memo(LottieAnimation);\n"],"names":["LottieAnimation","forwardRef","props","ref","src","width","height","settings","eventListener","onRender","animateOnIntersect","container","useRef","animationInstance","intersectionObserver","useImperativeHandle","segments","forceFlag","_a","eventName","callback","useEffect","animationData","fetchLottie","lottie","entry","_b","error","FlexView","LottieAnimation$1","memo"],"mappings":";;;;;AASA,MAAMA,IAAkBC,EAAuD,CAACC,GAAOC,MAAQ;AACvF,QAAA;AAAA,IACJ,KAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC,IAAS;AAAA,IACT,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,oBAAAC;AAAA,EACE,IAAAR,GAEES,IAAYC,EAAuB,IAAI,GACvCC,IAAoBD,EAA6B,IAAI,GACrDE,IAAuBF,EAAoC,IAAI;AAErE,SAAAG;AAAA,IACEZ;AAAA,IACA,OAAO;AAAA,MACL,cAAc,CAACa,GAA4BC,MACzC;;AAAA,gBAAAC,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,aAAaF,GAAUC;AAAA;AAAA,MACpD,kBAAkB,CAACE,GAAmBC,MACpC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,iBAAiBC,GAAiCC;AAAA;AAAA,MAC/E,qBAAqB,CAACD,GAAmBC,MACvC;;AAAA,gBAAAF,IAAAL,EAAkB,YAAlB,gBAAAK,EAA2B,oBAAoBC,GAAiCC;AAAA;AAAA,IAAQ;AAAA,IAE5F,CAAC;AAAA,EAAA,GAGHC,EAAU,QACc,YAAY;AAC5B,QAAA;AACI,YAAAC,IAAgB,MAAMC,EAAYnB,CAAG;AAE3C,MAAIO,EAAU,YACME,EAAA,UAAUW,EAAO,cAAc;AAAA,QAC/C,WAAWb,EAAU;AAAA,QACrB,eAAAW;AAAA,QACA,UAAU;AAAA,QACV,MAAM;AAAA,QACN,UAAU;AAAA,QACV,GAAGf;AAAA,MAAA,CACJ,GAEGG,MACFI,EAAqB,UAAU,IAAI;AAAA,QACjC,CAAC,CAACW,CAAK,MAAM;;AACP,UAAAA,KAASA,EAAM,kBACjBP,IAAAL,EAAkB,YAAlB,QAAAK,EAA2B,UAE3BQ,IAAAb,EAAkB,YAAlB,QAAAa,EAA2B;AAAA,QAE/B;AAAA,QACA,EAAE,WAAW,EAAE;AAAA,MAAA,GAGbf,EAAU,WACSG,EAAA,QAAQ,QAAQH,EAAU,OAAO,IAI/CF,KAAA,QAAAA,KACPD,KACFK,EAAkB,QAAQ,iBAAiBL,EAAc,MAAMA,EAAc,QAAQ;AAAA,aAGlFmB,GAAO;AACR,YAAA,MAAM,mCAAmCA,CAAK,EAAE;AAAA,IACxD;AAAA,EAAA,MAKK,MAAM;;AACX,IAAId,EAAkB,YAChBL,KACFK,EAAkB,QAAQ,oBAAoBL,EAAc,MAAMA,EAAc,QAAQ,GAGtFE,OACFQ,IAAAJ,EAAqB,YAArB,QAAAI,EAA8B,eAEhCL,EAAkB,QAAQ;EAC5B,IAED,CAACT,GAAKI,GAAeC,GAAUC,GAAoBH,CAAQ,CAAC,qBAEvDqB,GAAS,EAAA,KAAKjB,GAAW,QAAQN,GAAO,SAASC,EAAQ,CAAA;AACnE,CAAC,GAEcuB,IAAAC,EAAK9B,CAAe;"}
|