@cuemath/leap 3.3.0 → 3.3.2-2.beta-guru-01
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/gif/gif.js +3 -0
- package/dist/assets/gif/gif.js.map +1 -1
- package/dist/assets/illustrations/illustrations.js +10 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/images/images.js +10 -0
- package/dist/assets/images/images.js.map +1 -1
- package/dist/assets/line-icons/icons/cue-coin.js +182 -0
- package/dist/assets/line-icons/icons/cue-coin.js.map +1 -0
- package/dist/assets/line-icons/icons/wins-common-icon.js +26 -0
- package/dist/assets/line-icons/icons/wins-common-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/wins-epic-icon.js +25 -0
- package/dist/assets/line-icons/icons/wins-epic-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/wins-legendary-icon.js +25 -0
- package/dist/assets/line-icons/icons/wins-legendary-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/wins-mystery-icon.js +105 -0
- package/dist/assets/line-icons/icons/wins-mystery-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/wins-mythic-icon.js +28 -0
- package/dist/assets/line-icons/icons/wins-mythic-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/wins-rare-icon.js +28 -0
- package/dist/assets/line-icons/icons/wins-rare-icon.js.map +1 -0
- package/dist/assets/lottie/lottie.js +10 -3
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/config.js +5 -0
- package/dist/constants/config.js.map +1 -0
- package/dist/constants/country.js +9 -0
- package/dist/constants/country.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +6 -6
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +4 -4
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -1
- package/dist/features/auth/comps/otp-input/otp-input.js +19 -18
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +17 -17
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +26 -24
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +32 -30
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +20 -19
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +9 -9
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +58 -29
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +78 -41
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +5 -4
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js +1 -1
- package/dist/features/auth/pla-signup/signup-header/signup-header.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +37 -35
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +75 -70
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +55 -50
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +47 -25
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -1
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js +16 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable-styled.js.map +1 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js +62 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable-view.js.map +1 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable.js +17 -0
- package/dist/features/auth/signup-unavailable/signup-unavailable.js.map +1 -0
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/question-overview.js +19 -18
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/question-overview.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary-styled.js +7 -7
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary-styled.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary.js +26 -24
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/summary-module.js +15 -13
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/summary-module.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/constants/index.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +130 -69
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +43 -33
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +137 -95
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +36 -31
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -1
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test-styled.js +22 -0
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test.js +141 -0
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +7 -5
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +22 -12
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/chapters-v2/utils/sat-sheet-utils.js +12 -0
- package/dist/features/chapters-v2/utils/sat-sheet-utils.js.map +1 -0
- package/dist/features/circle-games/games/web-view/web-view.js +0 -1
- package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js +86 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +140 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +8 -4
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +23 -29
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +400 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/constants.js +13 -10
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js +42 -40
- package/dist/features/milestone/create/comps/add-custom-chapter/add-custom-chapter.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +70 -64
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +54 -29
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +48 -28
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +79 -76
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +97 -94
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +160 -143
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +22 -12
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +64 -59
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-container.js +17 -15
- package/dist/features/milestone/create/milestone-create-container.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +170 -153
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +19 -17
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js +19 -20
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/test-preview/test-preview.js.map +1 -1
- package/dist/features/parent-dashboard/api/get-student-profile-summary.js +9 -0
- package/dist/features/parent-dashboard/api/get-student-profile-summary.js.map +1 -0
- package/dist/features/parent-dashboard/api/parent-home.js +10 -0
- package/dist/features/parent-dashboard/api/parent-home.js.map +1 -0
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +30 -0
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js +25 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js +15 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js +90 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js +19 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js +32 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js +67 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js.map +1 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js +42 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js +20 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js.map +1 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js +10 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +42 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +67 -0
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js +24 -0
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-switch-user-journey.js +71 -0
- package/dist/features/parent-dashboard/hooks/use-switch-user-journey.js.map +1 -0
- package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js +40 -0
- package/dist/features/parent-dashboard/modals/help-and-support/help-and-support.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js +44 -0
- package/dist/features/parent-dashboard/modals/student-login-info/student-login-info.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js +32 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-helpers.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +12 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +44 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +13 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +28 -0
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js +43 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-constants.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +59 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js +86 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +26 -0
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-styled.js +33 -0
- package/dist/features/parent-dashboard/parent-dashboard-styled.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-types.js +6 -0
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-view.js +215 -0
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard.js +8 -0
- package/dist/features/parent-dashboard/parent-dashboard.js.map +1 -0
- package/dist/features/sentry/constants/ignored.js +10 -6
- package/dist/features/sentry/constants/ignored.js.map +1 -1
- package/dist/features/sheets/constants/sheet.js +23 -10
- package/dist/features/sheets/constants/sheet.js.map +1 -1
- package/dist/features/sheets/utils/is-v3-worksheet.js +17 -0
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/trial-session/api/course-stream.js.map +1 -1
- package/dist/features/trial-session/comps/about-cuemath/about-cuemath-constants.js +1 -1
- package/dist/features/trial-session/comps/about-cuemath/about-cuemath-constants.js.map +1 -1
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +66 -60
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js +62 -88
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +12 -12
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js +25 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js +43 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +49 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +132 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +127 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +53 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +53 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js +5 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js +17 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js +5 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +96 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/trial-session/comps/school-goals/school-goals.js +25 -24
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js +34 -0
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-card.js +41 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +39 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js +179 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/session-report-styled.js +6 -29
- package/dist/features/trial-session/comps/session-report/session-report-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +44 -174
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +20 -5
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js +59 -126
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/constant.js +10 -0
- package/dist/features/trial-session/comps/student-profile/constant.js.map +1 -0
- package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js +53 -0
- package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -0
- package/dist/features/trial-session/comps/student-profile/student-profile.js +93 -46
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js +12 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +121 -42
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +174 -56
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/comps/worksheet/worksheet.js +23 -23
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +65 -63
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/left-panel/index.js +1 -1
- package/dist/features/trial-session/left-panel/index.js.map +1 -1
- package/dist/features/trial-session/right-panel/slide-components-map.js +32 -32
- package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
- package/dist/features/trial-session/trial-session-constants.js +3 -3
- package/dist/features/trial-session/trial-session-constants.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +32 -29
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/constants/z-index.js +5 -3
- package/dist/features/ui/constants/z-index.js.map +1 -1
- package/dist/features/ui/inputs/base-select-input/select-section/select-section.js +12 -11
- package/dist/features/ui/inputs/base-select-input/select-section/select-section.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list-styled.js +2 -7
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list-styled.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +29 -27
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/modals/modal.js +30 -28
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/wins-dashboard/belts-elements-stickers/belts-elements-stickers.js +109 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/belts-elements-stickers.js.map +1 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/belts.js +95 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/belts.js.map +1 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/elements.js +184 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/elements.js.map +1 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/progress-bar-horizontal.js +36 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/progress-bar-horizontal.js.map +1 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/reward-elements.js +83 -0
- package/dist/features/wins-dashboard/belts-elements-stickers/reward-elements.js.map +1 -0
- package/dist/features/wins-dashboard/constants.js +161 -0
- package/dist/features/wins-dashboard/constants.js.map +1 -0
- package/dist/features/wins-dashboard/header/wins-header.js +95 -0
- package/dist/features/wins-dashboard/header/wins-header.js.map +1 -0
- package/dist/features/wins-dashboard/student-badges/animated-tabbar.js +66 -0
- package/dist/features/wins-dashboard/student-badges/animated-tabbar.js.map +1 -0
- package/dist/features/wins-dashboard/student-badges/hooks/use-student-badge-list-hook.js +135 -0
- package/dist/features/wins-dashboard/student-badges/hooks/use-student-badge-list-hook.js.map +1 -0
- package/dist/features/wins-dashboard/student-badges/student-badge.js +168 -0
- package/dist/features/wins-dashboard/student-badges/student-badge.js.map +1 -0
- package/dist/features/wins-dashboard/student-badges/student-badges-lists.js +137 -0
- package/dist/features/wins-dashboard/student-badges/student-badges-lists.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +86 -90
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +147 -0
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-container.js +62 -42
- package/dist/features/worksheet/worksheet/worksheet-container.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +197 -199
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +228 -300
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -34
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +206 -215
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js +33 -33
- package/dist/features/worksheet/worksheet-preview/dynamic-worksheet-preview/dynamic-worksheet-preview.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +30 -28
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +69 -73
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +30 -79
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +473 -45
- package/dist/index.js +695 -627
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
- package/dist/node_modules/date-fns/fromUnixTime.js +9 -0
- package/dist/node_modules/date-fns/fromUnixTime.js.map +1 -0
- package/dist/static/awesome.4239f583.json +1 -0
- package/dist/static/black-belt.81b3ebf9.png +0 -0
- package/dist/static/blue-belt.508a1b4b.png +0 -0
- package/dist/static/{book-checked-green.c275dbd9.svg → book-checked-green.0436b91e.svg} +1 -1
- package/dist/static/brown-belt.09bb7e93.png +0 -0
- package/dist/static/clapping-hands.17e7ecf0.json +1 -0
- package/dist/static/common.9e8ceef1.svg +1 -0
- package/dist/static/community-bulb-yellow-2.f89c30f9.svg +1 -0
- package/dist/static/cool.cd6921bb.json +1 -0
- package/dist/static/epic.37a0265a.svg +1 -0
- package/dist/static/error-responsive.9916ff66.json +1 -0
- package/dist/static/error.dd744fa5.json +1 -0
- package/dist/static/green-belt.5501296f.png +0 -0
- package/dist/static/learning-puzzle-bot.6fe93cf6.svg +1 -0
- package/dist/static/legendary.f15d09ca.svg +1 -0
- package/dist/static/like-button.281a2618.json +1 -0
- package/dist/static/mastered-badge.91d25e92.png +0 -0
- package/dist/static/mystery.81ada5fb.svg +1 -0
- package/dist/static/mythic.58ba0ae0.svg +1 -0
- package/dist/static/orange-belt.1fefcc8c.png +0 -0
- package/dist/static/personalization.7a6c33e8.svg +1 -0
- package/dist/static/personalized-session.b4fd7df8.gif +0 -0
- package/dist/static/purple-belt.e15611b4.png +0 -0
- package/dist/static/rare.1ffaa311.svg +1 -0
- package/dist/static/red-belt.11f841d9.png +0 -0
- package/dist/static/regular-practice.b15f24d9.gif +0 -0
- package/dist/static/star-strike-emoji.c0b31028.json +1 -0
- package/dist/static/stepup.321df6ed.gif +0 -0
- package/dist/static/trophy.5ef1853a.json +1 -0
- package/dist/static/username-responsive.787b5515.json +1 -0
- package/dist/static/username.2c755605.json +1 -0
- package/dist/static/white-belt.ea93103e.png +0 -0
- package/dist/static/yellow-belt.0c47b8cc.png +0 -0
- package/package.json +1 -1
- package/dist/features/trial-session/comps/session-report/report-card.js +0 -26
- package/dist/features/trial-session/comps/session-report/report-card.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
- package/dist/static/error.cbe1ddde.json +0 -1
- package/dist/static/username.9e034d51.json +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet-questions-controller.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.tsx"],"sourcesContent":["import type {\n IButtonTypes,\n IWorksheetQuestionsControllerProps,\n} from './worksheet-questions-controller-types';\nimport type { FC } from 'react';\n\nimport { deepEqual } from 'fast-equals';\nimport { memo, useEffect, useMemo, useState } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport HandIcon from '../../../../assets/line-icons/icons/hand';\nimport QuestionIcon from '../../../../assets/line-icons/icons/question';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { useWorksheetJourney } from '../hooks/use-worksheet-journey';\nimport useHandlerCallbacks from './use-handler-callbacks';\n\nconst WorksheetQuestionsController: FC<IWorksheetQuestionsControllerProps> = memo(props => {\n const {\n layout,\n learnosity,\n question,\n questions,\n responses,\n questionIndex,\n canSubmitWorksheet,\n isQuestionUnlocked,\n isQuestionAppended,\n response,\n behavior,\n userType,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n getTimeSpentOnQuestion,\n onSubmit,\n onSkip,\n onUnassign,\n onReview,\n } = props;\n\n const { onHelp, onResponseChange, onTeacherValidation, loggerRef } = props;\n const {\n navigationMode,\n canAttempt,\n hints,\n checkButtonLabel,\n retryButtonLabel,\n validation,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n canTeacherValidate,\n hintsTimer,\n skippableTime,\n skippable,\n canUnAssign,\n canTeacherValidateDisabled,\n } = behavior;\n\n const { response_id, item_type, type, instructor_stimulus, is_optional } = question;\n const hintsAvailable = !hints\n ? 0\n : learnosity.question(response_id)?.getMetadata()?.hints?.length ?? 0;\n\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isExitTicket = item_type === 'exit-ticket';\n const hintsRemaining = canAttempt && hintsAvailable - (response?.hintsUsed ?? 0) > 0;\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n const [showHintsButton, setShowHintsButton] = useState(false);\n const [skipped, setSkipped] = useState(false);\n const [showSkipButton, setShowSkipButton] = useState(false);\n\n const { puzzleAttemptCtaRef, puzzleReviewCtaRef, puzzleUnassignRef } = useWorksheetJourney({\n behavior,\n });\n\n useEffect(() => {\n if (hintsTimer && hintsRemaining) {\n const timeoutId = setTimeout(() => {\n setShowHintsButton(true);\n }, hintsTimer * 1000);\n\n return () => clearTimeout(timeoutId);\n }\n setShowHintsButton(hintsRemaining);\n }, [hintsTimer, hintsRemaining]);\n\n useEffect(() => {\n const canShowSkip = !response?.response && !response?.skipped;\n\n //* If hints are available and user has exhausted all hints then we show skip button.\n //* If hints are not available and user has not given any response or have not skipped a question then we show skip button after skippableTime/ 90 seconds.\n //* Else skip button is hidden.\n if (skippable) {\n if (hintsAvailable > 0 && !hintsRemaining) {\n setShowSkipButton(canShowSkip);\n } else if (hintsAvailable === 0 && canShowSkip) {\n const timeoutId = setTimeout(\n () => {\n setShowSkipButton(canShowSkip);\n },\n (skippableTime ?? 0) * 1000,\n );\n\n return () => clearTimeout(timeoutId);\n } else {\n setShowSkipButton(false);\n }\n }\n }, [hintsAvailable, hintsRemaining, response, skippable, skippableTime]);\n\n const {\n checkButton,\n checkButtonDisabled,\n hintsButton,\n retryButton,\n nextButton,\n nextButtonDisabled,\n startButton,\n readyButton,\n validateButton,\n skipSectionButton,\n submitAttemptButton,\n skipButton,\n unassignButton,\n reviewButton,\n submitAttemptButtonDisabled,\n submitAttemptButtonTooltip,\n submitAttemptButtonTooltipText,\n reviewButtonDisabled,\n } = useMemo<IButtonTypes>(() => {\n const showSkipSectionButton =\n canTeacherValidate && is_optional && response?.assignStatus === 'assigned';\n\n const getSystemValidationButtons = (): IButtonTypes => {\n //* maximumAttempts = -2 means this is a puzzle card.\n if (maximumAttempts === -2) {\n if (userType === 'STUDENT') {\n if (canAttempt) {\n return {\n submitAttemptButton: true,\n };\n }\n\n return {\n submitAttemptButton: true,\n submitAttemptButtonDisabled: true,\n submitAttemptButtonTooltip: true,\n submitAttemptButtonTooltipText: canTeacherValidate\n ? 'To be discussed with tutor'\n : 'Already solved',\n };\n }\n\n if (canUnAssign) {\n return {\n unassignButton: true,\n };\n }\n\n return {\n reviewButton: canTeacherValidate,\n reviewButtonDisabled: canTeacherValidateDisabled,\n };\n }\n\n if (!canAttempt) {\n return {\n nextButton: true,\n };\n }\n\n if (!validation && behavior.navigationMode === 'LINEAR') {\n return {\n nextButton: true,\n nextButtonDisabled: !response?.response,\n hintsButton: showHintsButton,\n skipButton: showSkipButton,\n };\n }\n\n if (!validation) {\n return {\n nextButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if (!response || !response.response || !response.score) {\n return {\n checkButton: true,\n checkButtonDisabled: true,\n hintsButton: showHintsButton,\n };\n }\n\n const { responseEdited, score, attemptsHistory } = response;\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n if (maximumAttemptsReached && !canExceedAttempts) {\n return {\n nextButton: true,\n };\n }\n\n if (responseEdited) {\n const lastAttemptResponse = attemptsHistory?.slice(-1)[0]?.response;\n\n return {\n nextButton: maximumAttemptsReached,\n checkButton: true,\n checkButtonDisabled: deepEqual(response.response, lastAttemptResponse),\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) < score.max_score) {\n return {\n nextButton: maximumAttemptsReached,\n retryButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) === score.max_score) {\n return {\n nextButton: true,\n };\n }\n\n return {};\n };\n\n const isPendingTeacherValidation = () =>\n questions.some(({ response_id: questionId }) => {\n const { assignStatus, validatedByTeacher } = responses[questionId] ?? {};\n\n return assignStatus === 'skipped' ? false : validatedByTeacher !== true;\n });\n\n if (teacherValidationEnabled) {\n const { validatedByTeacher } = response ?? {};\n\n // TODO: change the condition to if teacher validator is needed or not\n if (navigationMode === 'ADAPTIVE' || navigationMode === 'CURRENT') {\n if (userType === 'STUDENT') {\n return {\n hintsButton: showHintsButton,\n validateButton: false,\n };\n }\n\n return {\n validateButton: false,\n };\n }\n\n if (validatedByTeacher) {\n return {\n validateButton: true,\n submitAttemptButton:\n canTeacherValidate && canAttempt && userType === 'STUDENT' && canSubmitWorksheet\n ? !isPendingTeacherValidation()\n : false,\n };\n }\n\n if (!isQuestionUnlocked) {\n return {};\n }\n\n if (userType === 'STUDENT') {\n if (isSystemIntro) {\n return {\n startButton: canTeacherValidate && canAttempt,\n };\n }\n\n if (type !== 'clozetext') {\n return {\n ...getSystemValidationButtons(),\n nextButton: false,\n };\n }\n\n return {\n hintsButton: showHintsButton,\n readyButton: canTeacherValidate && isExitTicket && !response?.submittedByStudent,\n };\n }\n\n if (isSystemIntro) {\n return {\n skipSectionButton: showSkipSectionButton,\n };\n }\n\n if (type !== 'clozetext') {\n const { responseEdited, score } = response ?? {};\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton:\n responseEdited || !canTeacherValidate\n ? false\n : !!(score?.score && score?.max_score && !((score.score ?? 0) < score.max_score)),\n };\n }\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton: canTeacherValidate && (isExitTicket ? response?.submittedByStudent : true),\n };\n }\n\n return getSystemValidationButtons();\n }, [\n canTeacherValidate,\n is_optional,\n response,\n teacherValidationEnabled,\n canAttempt,\n validation,\n behavior.navigationMode,\n maximumAttempts,\n canExceedAttempts,\n showHintsButton,\n showSkipButton,\n questions,\n responses,\n canUnAssign,\n navigationMode,\n isQuestionUnlocked,\n userType,\n isSystemIntro,\n type,\n isExitTicket,\n canSubmitWorksheet,\n canTeacherValidateDisabled,\n ]);\n\n const {\n handleResponseChange,\n handleHelpButtonClick,\n handleBackButtonClick,\n handleNextButtonClick,\n handleCheckButtonClick,\n handleRetryButtonClick,\n handleHintButtonClick,\n handleValidateButtonClick,\n handleStartButtonClick,\n handleSkipSectionButtonClick,\n handleReadyButtonClick,\n handleSkipButtonClick,\n } = useHandlerCallbacks({\n layout,\n question,\n questions,\n learnosity,\n questionIndex,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n onResponseChange,\n onTeacherValidation,\n onHelp,\n behavior,\n loggerRef,\n setSkipped,\n getTimeSpentOnQuestion,\n });\n\n useEffect(() => {\n if (skipped) {\n setSkipped(false);\n setShowSkipButton(false);\n handleNextButtonClick();\n if (onSkip) {\n onSkip(question.item_display_number, question.question_number);\n }\n }\n }, [\n handleNextButtonClick,\n onSkip,\n question.item_display_number,\n question.question_number,\n skipped,\n ]);\n\n useEffect(() => {\n const questionInstance = isQuestionAppended ? learnosity.question(response_id) : undefined;\n\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.on('changed', handleResponseChange);\n questionInstance.enable();\n }\n\n return () => {\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.off('changed', handleResponseChange);\n questionInstance.disable();\n }\n };\n }, [\n canAttempt,\n checkButton,\n handleResponseChange,\n isQuestionAppended,\n learnosity,\n response_id,\n validation,\n ]);\n\n return (\n <FlexView\n $background=\"WHITE\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"flex-end\"\n >\n {hintsButton && (\n <IconButton\n Icon={QuestionIcon}\n analyticsLabel=\"Hint\"\n renderAs=\"secondary\"\n disabled={!isQuestionAppended}\n onClick={handleHintButtonClick}\n />\n )}\n {!hintsButton && handleHelpButtonClick && (checkButton || retryButton) && (\n <IconButton\n Icon={HandIcon}\n analyticsLabel=\"Ask for help\"\n renderAs=\"secondary\"\n onClick={handleHelpButtonClick}\n />\n )}\n {handleBackButtonClick && (\n <Button\n widthX={6}\n renderAs=\"secondary\"\n size=\"small\"\n label=\"Back\"\n disabled={questionIndex === 0}\n onClick={handleBackButtonClick}\n />\n )}\n {skipButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Skip\"\n onClick={handleSkipButtonClick}\n />\n )}\n {nextButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Next\"\n onClick={handleNextButtonClick}\n disabled={nextButtonDisabled === true}\n />\n )}\n {retryButton && (\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label={retryButtonLabel}\n disabled={!isQuestionAppended}\n onClick={handleRetryButtonClick}\n />\n )}\n {checkButton && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={checkButtonLabel}\n disabled={checkButtonDisabled === true || !isQuestionAppended}\n onClick={handleCheckButtonClick}\n />\n )}\n {startButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Start\" onClick={handleStartButtonClick} />\n )}\n {readyButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Submit\" onClick={handleReadyButtonClick} />\n )}\n {skipSectionButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={SkipIcon}\n analyticsLabel=\"Skip Section\"\n onClick={handleSkipSectionButtonClick}\n />\n )}\n {!submitAttemptButton && validateButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={Check2Icon}\n disabled={response?.validatedByTeacher}\n analyticsLabel=\"Validate\"\n onClick={handleValidateButtonClick}\n />\n )}\n {submitAttemptButton && (\n <ArrowTooltip\n position=\"top\"\n renderAs=\"primary\"\n tooltipItem={submitAttemptButtonTooltipText ?? ''}\n hidden={!submitAttemptButtonTooltip}\n >\n <div ref={isPuzzleCard ? puzzleAttemptCtaRef : undefined}>\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={isPuzzleCard ? 'I have solved' : 'Submit'}\n onClick={onSubmit}\n disabled={submitAttemptButtonDisabled}\n />\n </div>\n </ArrowTooltip>\n )}\n {unassignButton && (\n <div ref={puzzleUnassignRef}>\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label=\"Unassign\"\n onClick={onUnassign}\n />\n </div>\n )}\n {reviewButton && (\n <ArrowTooltip\n tooltipItem=\"Review this in class with student.\"\n position=\"top\"\n renderAs=\"primary\"\n hidden={!reviewButtonDisabled}\n >\n <div ref={puzzleReviewCtaRef}>\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label=\"Review\"\n onClick={onReview}\n disabled={reviewButtonDisabled}\n />\n </div>\n </ArrowTooltip>\n )}\n </FlexView>\n );\n});\n\nexport default WorksheetQuestionsController;\n"],"names":["WorksheetQuestionsController","memo","props","layout","learnosity","question","questions","responses","questionIndex","canSubmitWorksheet","isQuestionUnlocked","isQuestionAppended","response","behavior","userType","setActiveQuestionId","setSummaryVisible","setBlocker","setResponses","getTimeSpentOnQuestion","onSubmit","onSkip","onUnassign","onReview","onHelp","onResponseChange","onTeacherValidation","loggerRef","navigationMode","canAttempt","hints","checkButtonLabel","retryButtonLabel","validation","maximumAttempts","canExceedAttempts","teacherValidationEnabled","canTeacherValidate","hintsTimer","skippableTime","skippable","canUnAssign","canTeacherValidateDisabled","response_id","item_type","type","instructor_stimulus","is_optional","hintsAvailable","_c","_b","_a","isSystemIntro","isExitTicket","hintsRemaining","isPuzzleCard","useMemo","showHintsButton","setShowHintsButton","useState","skipped","setSkipped","showSkipButton","setShowSkipButton","puzzleAttemptCtaRef","puzzleReviewCtaRef","puzzleUnassignRef","useWorksheetJourney","useEffect","timeoutId","canShowSkip","checkButton","checkButtonDisabled","hintsButton","retryButton","nextButton","nextButtonDisabled","startButton","readyButton","validateButton","skipSectionButton","submitAttemptButton","skipButton","unassignButton","reviewButton","submitAttemptButtonDisabled","submitAttemptButtonTooltip","submitAttemptButtonTooltipText","reviewButtonDisabled","showSkipSectionButton","getSystemValidationButtons","responseEdited","score","attemptsHistory","maximumAttemptsReached","lastAttemptResponse","deepEqual","isPendingTeacherValidation","questionId","assignStatus","validatedByTeacher","handleResponseChange","handleHelpButtonClick","handleBackButtonClick","handleNextButtonClick","handleCheckButtonClick","handleRetryButtonClick","handleHintButtonClick","handleValidateButtonClick","handleStartButtonClick","handleSkipSectionButtonClick","handleReadyButtonClick","handleSkipButtonClick","useHandlerCallbacks","questionInstance","jsxs","FlexView","jsx","IconButton","QuestionIcon","HandIcon","Button","SkipIcon","Check2Icon","ArrowTooltip"],"mappings":";;;;;;;;;;;;;AAoBM,MAAAA,KAAuEC,GAAK,CAASC,MAAA;;AACnF,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,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gG;AAAA,UAAA;AAAA,QACX;AAAA,QAED3B,MACC,gBAAAoC;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,UAAS;AAAA,YACT,aAAarC,MAAkC;AAAA,YAC/C,QAAQ,CAACD;AAAA,YAET,UAAC,gBAAA+B,EAAA,OAAA,EAAI,KAAK9D,IAAeS,KAAsB,QAC7C,UAAA,gBAAAqD;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,OAAOlE,IAAe,kBAAkB;AAAA,gBACxC,SAASnC;AAAA,gBACT,UAAUiE;AAAA,cAAA;AAAA,YAAA,GAEd;AAAA,UAAA;AAAA,QACF;AAAA,QAEDF,MACC,gBAAAkC,EAAC,OAAI,EAAA,KAAKnD,IACR,UAAA,gBAAAmD;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,QAAQ;AAAA,YACR,UAAS;AAAA,YACT,MAAK;AAAA,YACL,OAAM;AAAA,YACN,SAASnG;AAAA,UAAA;AAAA,QAAA,GAEb;AAAA,QAED8D,MACC,gBAAAiC;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,aAAY;AAAA,YACZ,UAAS;AAAA,YACT,UAAS;AAAA,YACT,QAAQ,CAACpC;AAAA,YAET,UAAA,gBAAA6B,EAAC,OAAI,EAAA,KAAKpD,IACR,UAAA,gBAAAoD;AAAA,cAACI;AAAA,cAAA;AAAA,gBACC,QAAQ;AAAA,gBACR,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,SAASlG;AAAA,gBACT,UAAUiE;AAAA,cAAA;AAAA,YAAA,GAEd;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
1
|
+
{"version":3,"file":"worksheet-questions-controller.js","sources":["../../../../../src/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.tsx"],"sourcesContent":["import type {\n IButtonTypes,\n IWorksheetQuestionsControllerProps,\n} from './worksheet-questions-controller-types';\nimport type { FC } from 'react';\n\nimport { deepEqual } from 'fast-equals';\nimport { memo, useEffect, useMemo, useState } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport HandIcon from '../../../../assets/line-icons/icons/hand';\nimport QuestionIcon from '../../../../assets/line-icons/icons/question';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport Button from '../../../ui/buttons/button/button';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useHandlerCallbacks from './use-handler-callbacks';\n\nconst WorksheetQuestionsController: FC<IWorksheetQuestionsControllerProps> = memo(props => {\n const {\n layout,\n learnosity,\n question,\n questions,\n responses,\n questionIndex,\n canSubmitWorksheet,\n isQuestionUnlocked,\n isQuestionAppended,\n response,\n behavior,\n userType,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n getTimeSpentOnQuestion,\n onSkip,\n actionBarRightElement,\n onSubmit,\n } = props;\n\n const { onHelp, onResponseChange, onTeacherValidation, loggerRef } = props;\n const {\n navigationMode,\n canAttempt,\n hints,\n checkButtonLabel,\n retryButtonLabel,\n validation,\n maximumAttempts,\n canExceedAttempts,\n teacherValidationEnabled,\n canTeacherValidate,\n hintsTimer,\n skippableTime,\n skippable,\n } = behavior;\n\n const { response_id, item_type, type, instructor_stimulus, is_optional } = question;\n const hintsAvailable = !hints\n ? 0\n : learnosity.question(response_id)?.getMetadata()?.hints?.length ?? 0;\n\n const isSystemIntro = instructor_stimulus === 'SystemIntro';\n const isExitTicket = item_type === 'exit-ticket';\n const hintsRemaining = canAttempt && hintsAvailable - (response?.hintsUsed ?? 0) > 0;\n\n const [showHintsButton, setShowHintsButton] = useState(false);\n const [skipped, setSkipped] = useState(false);\n const [showSkipButton, setShowSkipButton] = useState(false);\n\n useEffect(() => {\n if (hintsTimer && hintsRemaining) {\n const timeoutId = setTimeout(() => {\n setShowHintsButton(true);\n }, hintsTimer * 1000);\n\n return () => clearTimeout(timeoutId);\n }\n setShowHintsButton(hintsRemaining);\n }, [hintsTimer, hintsRemaining]);\n\n useEffect(() => {\n const canShowSkip = !response?.response && !response?.skipped;\n\n //* If hints are available and user has exhausted all hints then we show skip button.\n //* If hints are not available and user has not given any response or have not skipped a question then we show skip button after skippableTime/ 90 seconds.\n //* Else skip button is hidden.\n if (skippable) {\n if (hintsAvailable > 0 && !hintsRemaining) {\n setShowSkipButton(canShowSkip);\n } else if (hintsAvailable === 0 && canShowSkip) {\n const timeoutId = setTimeout(\n () => {\n setShowSkipButton(canShowSkip);\n },\n (skippableTime ?? 0) * 1000,\n );\n\n return () => clearTimeout(timeoutId);\n } else {\n setShowSkipButton(false);\n }\n }\n }, [hintsAvailable, hintsRemaining, response, skippable, skippableTime]);\n\n const {\n checkButton,\n checkButtonDisabled,\n hintsButton,\n retryButton,\n nextButton,\n nextButtonDisabled,\n startButton,\n readyButton,\n validateButton,\n skipSectionButton,\n submitAttemptButton,\n skipButton,\n } = useMemo<IButtonTypes>(() => {\n const showSkipSectionButton =\n canTeacherValidate && is_optional && response?.assignStatus === 'assigned';\n\n const getSystemValidationButtons = (): IButtonTypes => {\n //* maximumAttempts = -2 means this is a puzzle card.\n if (maximumAttempts === -2) {\n if (userType === 'STUDENT') {\n if (canAttempt) {\n return {\n hintsButton: showHintsButton,\n };\n }\n }\n\n return {};\n }\n\n if (!canAttempt) {\n return {\n nextButton: true,\n };\n }\n\n if (!validation && behavior.navigationMode === 'LINEAR') {\n return {\n nextButton: true,\n nextButtonDisabled: !response?.response,\n hintsButton: showHintsButton,\n skipButton: showSkipButton,\n };\n }\n\n if (!validation) {\n return {\n nextButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if (!response || !response.response || !response.score) {\n return {\n checkButton: true,\n checkButtonDisabled: true,\n hintsButton: showHintsButton,\n };\n }\n\n const { responseEdited, score, attemptsHistory } = response;\n const maximumAttemptsReached = (attemptsHistory?.length ?? 0) >= maximumAttempts;\n\n if (maximumAttemptsReached && !canExceedAttempts) {\n return {\n nextButton: true,\n };\n }\n\n if (responseEdited) {\n const lastAttemptResponse = attemptsHistory?.slice(-1)[0]?.response;\n\n return {\n nextButton: maximumAttemptsReached,\n checkButton: true,\n checkButtonDisabled: deepEqual(response.response, lastAttemptResponse),\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) < score.max_score) {\n return {\n nextButton: maximumAttemptsReached,\n retryButton: true,\n hintsButton: showHintsButton,\n };\n }\n\n if ((score.score ?? 0) === score.max_score) {\n return {\n nextButton: true,\n };\n }\n\n return {};\n };\n\n const isPendingTeacherValidation = () =>\n questions.some(({ response_id: questionId }) => {\n const { assignStatus, validatedByTeacher } = responses[questionId] ?? {};\n\n return assignStatus === 'skipped' ? false : validatedByTeacher !== true;\n });\n\n if (teacherValidationEnabled) {\n const { validatedByTeacher } = response ?? {};\n\n // TODO: change the condition to if teacher validator is needed or not\n if (navigationMode === 'ADAPTIVE' || navigationMode === 'CURRENT') {\n if (userType === 'STUDENT') {\n return {\n hintsButton: showHintsButton,\n validateButton: false,\n };\n }\n\n return {\n validateButton: false,\n };\n }\n\n if (validatedByTeacher) {\n return {\n validateButton: true,\n submitAttemptButton:\n canTeacherValidate && canAttempt && userType === 'STUDENT' && canSubmitWorksheet\n ? !isPendingTeacherValidation()\n : false,\n };\n }\n\n if (!isQuestionUnlocked) {\n return {};\n }\n\n if (userType === 'STUDENT') {\n if (isSystemIntro) {\n return {\n startButton: canTeacherValidate && canAttempt,\n };\n }\n\n if (type !== 'clozetext') {\n return {\n ...getSystemValidationButtons(),\n nextButton: false,\n };\n }\n\n return {\n hintsButton: showHintsButton,\n readyButton: canTeacherValidate && isExitTicket && !response?.submittedByStudent,\n };\n }\n\n if (isSystemIntro) {\n return {\n skipSectionButton: showSkipSectionButton,\n };\n }\n\n if (type !== 'clozetext') {\n const { responseEdited, score } = response ?? {};\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton:\n responseEdited || !canTeacherValidate\n ? false\n : !!(score?.score && score?.max_score && !((score.score ?? 0) < score.max_score)),\n };\n }\n\n return {\n skipSectionButton: showSkipSectionButton,\n validateButton: canTeacherValidate && (isExitTicket ? response?.submittedByStudent : true),\n };\n }\n\n return getSystemValidationButtons();\n }, [\n canTeacherValidate,\n is_optional,\n response,\n teacherValidationEnabled,\n canAttempt,\n validation,\n behavior.navigationMode,\n maximumAttempts,\n canExceedAttempts,\n showHintsButton,\n showSkipButton,\n questions,\n responses,\n navigationMode,\n isQuestionUnlocked,\n userType,\n isSystemIntro,\n type,\n isExitTicket,\n canSubmitWorksheet,\n ]);\n\n const {\n handleResponseChange,\n handleHelpButtonClick,\n handleBackButtonClick,\n handleNextButtonClick,\n handleCheckButtonClick,\n handleRetryButtonClick,\n handleHintButtonClick,\n handleValidateButtonClick,\n handleStartButtonClick,\n handleSkipSectionButtonClick,\n handleReadyButtonClick,\n handleSkipButtonClick,\n } = useHandlerCallbacks({\n layout,\n question,\n questions,\n learnosity,\n questionIndex,\n setActiveQuestionId,\n setSummaryVisible,\n setBlocker,\n setResponses,\n onResponseChange,\n onTeacherValidation,\n onHelp,\n behavior,\n loggerRef,\n setSkipped,\n getTimeSpentOnQuestion,\n });\n\n useEffect(() => {\n if (skipped) {\n setSkipped(false);\n setShowSkipButton(false);\n handleNextButtonClick();\n if (onSkip) {\n onSkip(question.item_display_number, question.question_number);\n }\n }\n }, [\n handleNextButtonClick,\n onSkip,\n question.item_display_number,\n question.question_number,\n skipped,\n ]);\n\n useEffect(() => {\n const questionInstance = isQuestionAppended ? learnosity.question(response_id) : undefined;\n\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.on('changed', handleResponseChange);\n questionInstance.enable();\n }\n\n return () => {\n if (questionInstance && canAttempt && (!validation || checkButton)) {\n questionInstance.off('changed', handleResponseChange);\n questionInstance.disable();\n }\n };\n }, [\n canAttempt,\n checkButton,\n handleResponseChange,\n isQuestionAppended,\n learnosity,\n response_id,\n validation,\n ]);\n\n return (\n <FlexView\n $background=\"WHITE\"\n $flexDirection=\"row\"\n $flexGapX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"flex-end\"\n >\n {hintsButton && (\n <IconButton\n Icon={QuestionIcon}\n analyticsLabel=\"Hint\"\n renderAs=\"secondary\"\n disabled={!isQuestionAppended}\n onClick={handleHintButtonClick}\n />\n )}\n {!hintsButton && handleHelpButtonClick && (checkButton || retryButton) && (\n <IconButton\n Icon={HandIcon}\n analyticsLabel=\"Ask for help\"\n renderAs=\"secondary\"\n onClick={handleHelpButtonClick}\n />\n )}\n {handleBackButtonClick && (\n <Button\n widthX={6}\n renderAs=\"secondary\"\n size=\"small\"\n label=\"Back\"\n disabled={questionIndex === 0}\n onClick={handleBackButtonClick}\n />\n )}\n {skipButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Skip\"\n onClick={handleSkipButtonClick}\n />\n )}\n {nextButton && (\n <Button\n widthX={6}\n renderAs={retryButton ? 'secondary' : 'primary'}\n size=\"small\"\n label=\"Next\"\n onClick={handleNextButtonClick}\n disabled={nextButtonDisabled === true}\n />\n )}\n {retryButton && (\n <Button\n widthX={6}\n renderAs=\"primary\"\n size=\"small\"\n label={retryButtonLabel}\n disabled={!isQuestionAppended}\n onClick={handleRetryButtonClick}\n />\n )}\n {checkButton && (\n <Button\n renderAs=\"primary\"\n size=\"small\"\n label={checkButtonLabel}\n disabled={checkButtonDisabled === true || !isQuestionAppended}\n onClick={handleCheckButtonClick}\n />\n )}\n {startButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Start\" onClick={handleStartButtonClick} />\n )}\n {readyButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Submit\" onClick={handleReadyButtonClick} />\n )}\n {skipSectionButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={SkipIcon}\n analyticsLabel=\"Skip Section\"\n onClick={handleSkipSectionButtonClick}\n />\n )}\n {!submitAttemptButton && validateButton && (\n <IconButton\n renderAs=\"primary\"\n Icon={Check2Icon}\n disabled={response?.validatedByTeacher}\n analyticsLabel=\"Validate\"\n onClick={handleValidateButtonClick}\n />\n )}\n {submitAttemptButton && (\n <Button renderAs=\"primary\" size=\"small\" label=\"Submit\" onClick={onSubmit} />\n )}\n {actionBarRightElement && actionBarRightElement}\n </FlexView>\n );\n});\n\nexport default WorksheetQuestionsController;\n"],"names":["WorksheetQuestionsController","memo","props","layout","learnosity","question","questions","responses","questionIndex","canSubmitWorksheet","isQuestionUnlocked","isQuestionAppended","response","behavior","userType","setActiveQuestionId","setSummaryVisible","setBlocker","setResponses","getTimeSpentOnQuestion","onSkip","actionBarRightElement","onSubmit","onHelp","onResponseChange","onTeacherValidation","loggerRef","navigationMode","canAttempt","hints","checkButtonLabel","retryButtonLabel","validation","maximumAttempts","canExceedAttempts","teacherValidationEnabled","canTeacherValidate","hintsTimer","skippableTime","skippable","response_id","item_type","type","instructor_stimulus","is_optional","hintsAvailable","_c","_b","_a","isSystemIntro","isExitTicket","hintsRemaining","showHintsButton","setShowHintsButton","useState","skipped","setSkipped","showSkipButton","setShowSkipButton","useEffect","timeoutId","canShowSkip","checkButton","checkButtonDisabled","hintsButton","retryButton","nextButton","nextButtonDisabled","startButton","readyButton","validateButton","skipSectionButton","submitAttemptButton","skipButton","useMemo","showSkipSectionButton","getSystemValidationButtons","responseEdited","score","attemptsHistory","maximumAttemptsReached","lastAttemptResponse","deepEqual","isPendingTeacherValidation","questionId","assignStatus","validatedByTeacher","handleResponseChange","handleHelpButtonClick","handleBackButtonClick","handleNextButtonClick","handleCheckButtonClick","handleRetryButtonClick","handleHintButtonClick","handleValidateButtonClick","handleStartButtonClick","handleSkipSectionButtonClick","handleReadyButtonClick","handleSkipButtonClick","useHandlerCallbacks","questionInstance","jsxs","FlexView","jsx","IconButton","QuestionIcon","HandIcon","Button","SkipIcon","Check2Icon"],"mappings":";;;;;;;;;;;AAkBM,MAAAA,KAAuEC,GA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
|
|
2
2
|
import i from "../../ui/layout/flex-view.js";
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
3
|
+
import { WORKSHEET_CONTAINER_BORDER_RADIUS as n, TOP_NAVIGATION_HEIGHT as d, ACTION_BAR_HEIGHT as p, SIDEBAR_WIDTH as c } from "./constants.js";
|
|
4
|
+
const b = t(i)(({ $topOffset: o }) => `
|
|
5
5
|
position: sticky;
|
|
6
6
|
top: ${o}px;
|
|
7
7
|
z-index: 1;
|
|
8
|
-
`),
|
|
8
|
+
`), $ = t.div(({ theme: o }) => {
|
|
9
9
|
const { colors: r } = o;
|
|
10
10
|
return `
|
|
11
11
|
width: 16px;
|
|
@@ -13,18 +13,18 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
|
13
13
|
border-radius: 32px;
|
|
14
14
|
border: 0.667px solid ${r.BLACK_T_87}
|
|
15
15
|
`;
|
|
16
|
-
}),
|
|
16
|
+
}), g = t(i)`
|
|
17
17
|
position: relative;
|
|
18
|
-
`,
|
|
19
|
-
({ $isCardView: o, theme: r, $
|
|
20
|
-
${o
|
|
18
|
+
`, u = t(i)(
|
|
19
|
+
({ $isCardView: o, theme: r, $questionPadding: e }) => `
|
|
20
|
+
${o ? `
|
|
21
21
|
border-left: 1px solid ${r.colors.GREY_2};
|
|
22
22
|
border-right: 1px solid ${r.colors.GREY_2};
|
|
23
23
|
` : ""}
|
|
24
|
-
padding-top: ${e
|
|
24
|
+
padding-top: ${e}px;
|
|
25
25
|
z-index: 0;
|
|
26
26
|
`
|
|
27
|
-
),
|
|
27
|
+
), E = t(i)(
|
|
28
28
|
({ theme: o, $topOffset: r }) => `
|
|
29
29
|
position: sticky;
|
|
30
30
|
top: ${r}px;
|
|
@@ -33,23 +33,23 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
|
33
33
|
justify-content: flex-end;
|
|
34
34
|
background-color: ${o.colors.WHITE};
|
|
35
35
|
`
|
|
36
|
-
),
|
|
36
|
+
), _ = t(i)`
|
|
37
37
|
border: 1px solid ${({ theme: o }) => o.colors.GREY_2};
|
|
38
38
|
border-top: 0px;
|
|
39
39
|
border-radius: ${n}px ${n}px 0 0;
|
|
40
40
|
overflow: hidden;
|
|
41
|
-
`,
|
|
42
|
-
({ theme: { colors: o }, $height: r, $isCardView: e, $marginTop: s
|
|
41
|
+
`, f = t(i)(
|
|
42
|
+
({ theme: { colors: o }, $height: r, $isCardView: e, $marginTop: s }) => `
|
|
43
43
|
position: sticky;
|
|
44
44
|
top: calc(100% - ${r}px);
|
|
45
45
|
margin-top: -${s}px;
|
|
46
46
|
z-index: 1;
|
|
47
|
-
${e
|
|
47
|
+
${e ? `
|
|
48
48
|
border-left: 1px solid ${o.GREY_2};
|
|
49
49
|
border-right: 1px solid ${o.GREY_2};
|
|
50
50
|
` : ""}
|
|
51
51
|
`
|
|
52
|
-
),
|
|
52
|
+
), I = t(i)(
|
|
53
53
|
({ theme: { colors: o }, $isCardView: r }) => `
|
|
54
54
|
align-items: center;
|
|
55
55
|
justify-content: center;
|
|
@@ -63,12 +63,12 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
|
63
63
|
border-top-right-radius: 8px;
|
|
64
64
|
` : ""}
|
|
65
65
|
`
|
|
66
|
-
),
|
|
66
|
+
), R = t(i)(
|
|
67
67
|
({ theme: o, $minHeight: r, $topOffset: e }) => `
|
|
68
68
|
box-sizing: content-box;
|
|
69
69
|
position: sticky;
|
|
70
70
|
width: calc(100% - 2px);
|
|
71
|
-
top: ${e +
|
|
71
|
+
top: ${e + d}px;
|
|
72
72
|
z-index: 2;
|
|
73
73
|
min-height: ${r}${typeof r == "number" ? "px" : ""};
|
|
74
74
|
padding-bottom: ${p / 2}px;
|
|
@@ -83,17 +83,17 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
|
83
83
|
box-sizing: border-box;
|
|
84
84
|
}
|
|
85
85
|
`
|
|
86
|
-
),
|
|
86
|
+
), W = t(i)`
|
|
87
87
|
position: absolute;
|
|
88
88
|
width: 100%;
|
|
89
89
|
bottom: ${p}px;
|
|
90
90
|
left: 0;
|
|
91
|
-
`,
|
|
91
|
+
`, h = t(i)(({ theme: o }) => `
|
|
92
92
|
position: sticky;
|
|
93
93
|
top: 0;
|
|
94
94
|
left: 0;
|
|
95
95
|
z-index: ${o.zIndex.DESMOS_CALCULATOR};
|
|
96
|
-
`),
|
|
96
|
+
`), k = t(i)(
|
|
97
97
|
({ theme: o, $active: r }) => `
|
|
98
98
|
width: 36px;
|
|
99
99
|
height: 36px;
|
|
@@ -110,26 +110,26 @@ const g = t(i)(({ $topOffset: o }) => `
|
|
|
110
110
|
stroke: ${r ? o.colors.WHITE : o.colors.BLACK};
|
|
111
111
|
}
|
|
112
112
|
`
|
|
113
|
-
),
|
|
113
|
+
), T = t(i)`
|
|
114
114
|
position: absolute;
|
|
115
115
|
bottom: 8px;
|
|
116
|
-
right: -${
|
|
116
|
+
right: -${c}px;
|
|
117
117
|
align-items: center;
|
|
118
118
|
z-index: 1;
|
|
119
119
|
`;
|
|
120
120
|
export {
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
121
|
+
f as ActionbarContainer,
|
|
122
|
+
I as ActionbarWrapper,
|
|
123
|
+
R as BlockerWrapper,
|
|
124
|
+
h as DesmosCalcWrapper,
|
|
125
|
+
k as IconContainer,
|
|
126
|
+
E as NavigationContainer,
|
|
127
|
+
_ as NavigationWrapper,
|
|
128
|
+
$ as NudgeBannerIcon,
|
|
129
|
+
b as NudgeBannerWrapper,
|
|
130
|
+
u as QuestionsWrapper,
|
|
131
|
+
T as StudentWorksheetSideBar,
|
|
132
|
+
W as SummaryWrapper,
|
|
133
|
+
g as WorksheetContainer
|
|
134
134
|
};
|
|
135
135
|
//# sourceMappingURL=worksheet-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet-styled.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport {\n ACTION_BAR_HEIGHT,\n
|
|
1
|
+
{"version":3,"file":"worksheet-styled.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport {\n ACTION_BAR_HEIGHT,\n SIDEBAR_WIDTH,\n TOP_NAVIGATION_HEIGHT,\n WORKSHEET_CONTAINER_BORDER_RADIUS,\n} from './constants';\n\nconst NudgeBannerWrapper = styled(FlexView)<{ $topOffset: number }>(({ $topOffset }) => {\n return `\n position: sticky;\n top: ${$topOffset}px;\n z-index: 1;\n `;\n});\n\nconst NudgeBannerIcon = styled.div(({ theme }) => {\n const { colors } = theme;\n\n return `\n width: 16px;\n height: 16px;\n border-radius: 32px;\n border: 0.667px solid ${colors.BLACK_T_87}\n `;\n});\n\nconst WorksheetContainer = styled(FlexView)`\n position: relative;\n`;\n\ninterface IQuestionsWrapperProps {\n $actionbarHeight: number;\n $isCardView: boolean;\n $questionPadding: number;\n}\n\nconst QuestionsWrapper = styled(FlexView)<IQuestionsWrapperProps>(\n ({ $isCardView, theme, $questionPadding }) => `\n ${\n $isCardView\n ? `\n border-left: 1px solid ${theme.colors.GREY_2};\n border-right: 1px solid ${theme.colors.GREY_2};\n `\n : ''\n }\n padding-top: ${$questionPadding}px;\n z-index: 0;\n`,\n);\n\nconst NavigationContainer = styled(FlexView)<{ $topOffset: number }>(\n ({ theme, $topOffset }) => `\n position: sticky;\n top: ${$topOffset}px;\n width: 100%;\n z-index: 1;\n justify-content: flex-end;\n background-color: ${theme.colors.WHITE};\n`,\n);\n\nconst NavigationWrapper = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.GREY_2};\n border-top: 0px;\n border-radius: ${WORKSHEET_CONTAINER_BORDER_RADIUS}px ${WORKSHEET_CONTAINER_BORDER_RADIUS}px 0 0;\n overflow: hidden;\n`;\n\nconst ActionbarContainer = styled(FlexView)<{\n $isCardView: boolean;\n $marginTop: string | number;\n}>(\n ({ theme: { colors }, $height, $isCardView, $marginTop }) => `\n position: sticky;\n top: calc(100% - ${$height}px);\n margin-top: -${$marginTop}px;\n z-index: 1;\n ${\n $isCardView\n ? `\n border-left: 1px solid ${colors.GREY_2};\n border-right: 1px solid ${colors.GREY_2};\n `\n : ''\n }\n `,\n);\n\nconst ActionbarWrapper = styled(FlexView)<{ $isCardView: boolean }>(\n ({ theme: { colors }, $isCardView }) => `\n align-items: center;\n justify-content: center;\n align-self: center;\n background-color: ${colors.WHITE};\n border-top: 1px solid ${colors.GREY_2};\n ${\n $isCardView\n ? `\n border-left: 1px solid ${colors.GREY_2};\n border-right: 1px solid ${colors.GREY_2};\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n `\n : ''\n }\n `,\n);\n\ninterface IBlockerWrapperProps {\n $minHeight: number | string;\n $topOffset: number;\n}\n\nconst BlockerWrapper = styled(FlexView)<IBlockerWrapperProps>(\n ({ theme, $minHeight, $topOffset }) => `\n box-sizing: content-box;\n position: sticky;\n width: calc(100% - 2px);\n top: ${$topOffset + TOP_NAVIGATION_HEIGHT}px;\n z-index: 2;\n min-height: ${$minHeight}${typeof $minHeight === 'number' ? 'px' : ''};\n padding-bottom: ${ACTION_BAR_HEIGHT / 2}px;\n background-color: ${theme.colors.WHITE_70};\n border-left: 1px solid ${theme.colors.GREY_2};\n border-right: 1px solid ${theme.colors.GREY_2};\n backdrop-filter: blur(7px);\n align-items: center;\n justify-content: center;\n\n & * {\n box-sizing: border-box;\n }\n`,\n);\n\nconst SummaryWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n bottom: ${ACTION_BAR_HEIGHT}px;\n left: 0;\n`;\n\nconst DesmosCalcWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: 0;\n left: 0;\n z-index: ${theme.zIndex.DESMOS_CALCULATOR};\n `;\n});\n\nconst IconContainer = styled(FlexView)<{ $active: boolean }>(\n ({ theme, $active }) => `\n width: 36px;\n height: 36px;\n border-radius: 50%;\n &:hover {\n cursor: pointer;\n background-color: ${theme.colors.BLACK};\n svg path {\n stroke: ${theme.colors.WHITE};\n }\n }\n background-color: ${$active ? theme.colors.BLACK : theme.colors.WHITE};\n svg path {\n stroke: ${$active ? theme.colors.WHITE : theme.colors.BLACK};\n }\n`,\n);\n\nconst StudentWorksheetSideBar = styled(FlexView)`\n position: absolute;\n bottom: 8px;\n right: -${SIDEBAR_WIDTH}px;\n align-items: center;\n z-index: 1;\n`;\n\nexport {\n NudgeBannerWrapper,\n NudgeBannerIcon,\n WorksheetContainer,\n QuestionsWrapper,\n NavigationContainer,\n ActionbarContainer,\n NavigationWrapper,\n ActionbarWrapper,\n BlockerWrapper,\n SummaryWrapper,\n IconContainer,\n DesmosCalcWrapper,\n StudentWorksheetSideBar,\n};\n"],"names":["NudgeBannerWrapper","styled","FlexView","$topOffset","NudgeBannerIcon","theme","colors","WorksheetContainer","QuestionsWrapper","$isCardView","$questionPadding","NavigationContainer","NavigationWrapper","WORKSHEET_CONTAINER_BORDER_RADIUS","ActionbarContainer","$height","$marginTop","ActionbarWrapper","BlockerWrapper","$minHeight","TOP_NAVIGATION_HEIGHT","ACTION_BAR_HEIGHT","SummaryWrapper","DesmosCalcWrapper","IconContainer","$active","StudentWorksheetSideBar","SIDEBAR_WIDTH"],"mappings":";;;AAUA,MAAMA,IAAqBC,EAAOC,CAAQ,EAA0B,CAAC,EAAE,YAAAC,QAC9D;AAAA;AAAA,WAEEA,CAAU;AAAA;AAAA,GAGpB,GAEKC,IAAkBH,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AAC1C,QAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA,4BAImBC,EAAO,UAAU;AAAA;AAE7C,CAAC,GAEKC,IAAqBN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E,OAAAG,GAAO,YAAAc,GAAY,YAAAhB,EAAiB,MAAA;AAAA;AAAA;AAAA;AAAA,SAIhCA,IAAaiB,CAAqB;AAAA;AAAA,gBAE3BD,CAAU,GAAG,OAAOA,KAAe,WAAW,OAAO,EAAE;AAAA,oBACnDE,IAAoB,CAAC;AAAA,sBACnBhB,EAAM,OAAO,QAAQ;AAAA,2BAChBA,EAAM,OAAO,MAAM;AAAA,4BAClBA,EAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAS/C,GAEMiB,IAAiBrB,EAAOC,CAAQ;AAAA;AAAA;AAAA,YAG1BmB,CAAiB;AAAA;AAAA,GAIvBE,IAAoBtB,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAG,QACrC;AAAA;AAAA;AAAA;AAAA,eAIMA,EAAM,OAAO,iBAAiB;AAAA,GAE5C,GAEKmB,IAAgBvB,EAAOC,CAAQ;AAAA,EACnC,CAAC,EAAE,OAAAG,GAAO,SAAAoB,EAAA,MAAc;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAMFpB,EAAM,OAAO,KAAK;AAAA;AAAA,gBAE1BA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA,sBAGZoB,IAAUpB,EAAM,OAAO,QAAQA,EAAM,OAAO,KAAK;AAAA;AAAA,cAEzDoB,IAAUpB,EAAM,OAAO,QAAQA,EAAM,OAAO,KAAK;AAAA;AAAA;AAG/D,GAEMqB,IAA0BzB,EAAOC,CAAQ;AAAA;AAAA;AAAA,YAGnCyB,CAAa;AAAA;AAAA;AAAA;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worksheet-types.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-types.ts"],"sourcesContent":["import type { IActionData, TPublish, TSubscribe } from '../../cue-canvas/types/cue-canvas';\nimport type { TPublishMouseMove, TSubscribeMouseMove } from '../../pointer-sync/pointer-types';\nimport type { TColorNames, THueNames, TUserTypes } from '../../ui/types';\nimport type { IFile } from './worksheet-question/subjective-review';\nimport type { MutableRefObject, ReactElement } from 'react';\n\nexport enum QUESTION_TAGS {\n TRIAL_TOPIC = 'trial-topic',\n QUESTION_CODE = 'question code',\n}\n\nexport enum QUESTIONS_RATING {\n E = 3,\n S = 2, // Just right\n H = 1,\n}\n\nexport interface ILearnosityError {\n code: number;\n consumerKey: string;\n detail: string;\n errorUI: string;\n msg: string;\n}\n\ninterface ILearnosityQuestionMetadata {\n widget_reference: string;\n sheet_reference: string;\n hints?: string[];\n solution?: string[];\n teacher_tips?: string[];\n valid_response_count: number;\n source: {\n organisation_id: number;\n };\n}\n\nexport type TInstructorStimulus =\n | 'SystemIntro' // lesson v3\n | 'Intro' // lesson v3\n | 'Concept-Intro' // lesson v3\n | 'Instruction' // lesson v3\n | 'Task' // lesson v3\n | 'Try' // trial v3\n | 'Learn' // trial v3\n | 'Apply'; // trial v3\nexport type TItemType =\n | 'overview'\n | 'learning-we-do'\n | 'learning-your-turn'\n | 'learning-explore'\n | 'practice-basic'\n | 'practice-basic-optional'\n | 'practice-regular'\n | 'practice-regular-optional'\n | 'exit-ticket'\n | 'advanced-we-do'\n | 'advanced-your-turn'\n | 'advanced-explore'\n | 'advanced-practice';\n\nexport type TSectionName =\n | 'overview'\n | 'learning'\n | 'practice-basic'\n | 'practice-regular'\n | 'exit-ticket'\n | 'advanced';\n\nexport interface IQuestionValidResponse {\n score: number;\n value: unknown[];\n}\n\nexport interface ISheetNudgeBannerInfo {\n bannerBackgroundColor: TColorNames;\n label: string;\n}\n\nexport interface ILearnosityQuestion {\n response_id: string;\n instructor_stimulus?: TInstructorStimulus;\n metadata: ILearnosityQuestionMetadata;\n instant_feedback?: boolean;\n math_renderer?: string;\n template?: string;\n tokenization?: string;\n numberPad?: string[];\n symbols?: unknown[];\n response_container?: Record<string, unknown>;\n ui_style?: Record<string, unknown>;\n shuffle_options?: boolean;\n // for custom type question validation is undefined.\n validation?: {\n scoring_type?: string;\n unscored?: boolean;\n valid_response?: IQuestionValidResponse;\n alt_responses?: IQuestionValidResponse[];\n penalty?: number;\n min_score_if_attempted?: number;\n };\n is_math?: boolean;\n labels?: Record<string, unknown>;\n line?: Record<string, unknown>;\n points?: string[];\n snap_to_ticks?: boolean;\n ticks?: Record<string, unknown>;\n max_length?: number;\n type:\n | 'hotspot'\n | 'tokenhighlight'\n | 'numberline'\n | 'clozeassociation'\n | 'clozetext'\n | 'association'\n | 'classification'\n | 'clozedropdown'\n | 'clozeformula'\n | 'mcq'\n | 'choicematrix'\n | 'plaintext'\n | 'drawing';\n case_sensitive?: boolean;\n show_copy?: boolean;\n show_cut?: boolean;\n show_paste?: boolean;\n spellcheck?: boolean;\n stimulus?: string;\n stimulus_review?: string;\n stimulus_list?: string[];\n image?: Record<string, unknown>;\n areas?: unknown[];\n area_attributes?: Record<string, unknown>;\n possible_responses?: string[][] | string[];\n duplicate_responses?: boolean;\n response_containers?: unknown[];\n options?: Record<string, unknown>[] | string[];\n feedback_attempts?: number;\n stems?: string[];\n multiple_responses?: boolean;\n}\n\nexport interface ILearnosityItem {\n reference: string;\n questions: ILearnosityQuestion[];\n source: Record<string, unknown>;\n content: string;\n metadata: Record<string, unknown> | unknown[];\n workflow: unknown[];\n response_ids: string[];\n feature_ids: unknown[];\n features: unknown[];\n itemType?: TItemType;\n tags?: string[];\n}\n\nexport interface IWorksheetQuestion extends ILearnosityQuestion {\n item_reference: string;\n item_type?: TItemType;\n section_name?: TSectionName;\n is_optional?: boolean;\n item_tags: string[];\n item_tags_map: Record<string, string>;\n item_number: number;\n item_display_number: number;\n question_number: number;\n total_questions: number;\n}\n\nexport interface ILearnosityQuestionScore {\n score?: number | null;\n max_score: number;\n unscored?: boolean;\n}\n\nexport interface ILearnosityQuestionResponse {\n value: unknown;\n responses?: unknown;\n type: unknown;\n updatedFormat?: boolean;\n wordCount?: number;\n apiVersion: string;\n revision: number;\n feedbackAttemptsCount?: number;\n}\n\nexport interface IAttempt {\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n}\n\ninterface ITeacherReview {\n reviewComment?: string;\n images?: string[];\n}\nexport interface IWorksheetResponse {\n widgetReference: string;\n itemReference: string;\n itemPosition: number; // 0 based\n questionPosition: number; // 0 based\n isOkayTypeQuestion: boolean;\n response?: ILearnosityQuestionResponse;\n simState?: Record<string, unknown>;\n score?: ILearnosityQuestionScore;\n responseEdited?: boolean;\n hintsUsed?: number;\n markedForReview?: boolean;\n attemptsHistory?: IAttempt[];\n validatedByTeacher?: boolean;\n submittedByStudent?: boolean;\n assignStatus?: 'assigned' | 'skipped';\n rating?: number;\n skipped?: boolean;\n doubtResolved?: boolean;\n teacherReview?: ITeacherReview;\n tags?: Record<string, string>;\n timeSpent?: number;\n}\n\ntype TMathRenderer = 'mathjax' | 'mathquill';\nexport interface ILearnosity {\n ready: () => void;\n questions: () => Record<string, unknown>;\n question: (responseId: string) =>\n | {\n enable: () => boolean;\n disable: () => boolean;\n getQuestion: () => ILearnosityQuestion;\n getMetadata: () => ILearnosityQuestionMetadata;\n getResponse: () => ILearnosityQuestionResponse;\n getScore: (\n callback?: (score: ILearnosityQuestionScore | null) => void,\n ) => ILearnosityQuestionScore;\n validate: (\n options?: { showCorrectAnswers?: boolean; feedbackAttempts?: boolean },\n callback?: () => void,\n ) => void;\n resetValidationUI: () => void;\n on: (eventName: 'changed', callback: () => void) => void;\n off: (eventName: 'changed', callback?: () => void) => void;\n }\n | undefined;\n append: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n appendQuestion: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n reset: () => void;\n renderMath: (renderer: TMathRenderer) => void;\n}\n\nexport interface IWorksheetBehavior {\n /**\n * If true, Opens the worksheet in resume mode.\n * - If false, Opens the worksheet in review mode.\n */\n canAttempt: boolean;\n /**\n * If true, the user can mark the question for review.\n */\n canMarkForReview: boolean;\n /**\n * The mode of navigation for the worksheet.\n * - `OPEN` mode allows the user to navigate to any question in the worksheet.\n * - `LINEAR` mode allows the user to navigate to the next question only.\n * - `ADAPTIVE` mode allows the user to navigate future questions based on the rating of the current question.\n * - `CURRENT` mode allows the user to navigate to the current question only. Back and forth not allowed.\n */\n navigationMode: 'OPEN' | 'LINEAR' | 'ADAPTIVE' | 'CURRENT';\n /**\n * The initial question to display when the worksheet is loaded.\n * - `FIRST` mode displays the first question in the worksheet.\n * - `CURRENT` mode displays the question that the user was last on.\n */\n initialQuestion: 'FIRST' | 'CURRENT';\n /**\n * If hints are available, on clicking the help button, first availble hint will be shown.\n * Clicking again will show the next hint.\n * If no more hints are available, onHelp will be called.\n */\n hints: boolean;\n /**\n * The time in seconds after which the hints button will be shown.\n */\n hintsTimer?: number; // in seconds\n /**\n * If true, the user can skip the question without attempting it.\n * Skip button will be shown only after the hints are exausted and skipTimer is reached.\n */\n skippable?: boolean;\n /**\n * The time in seconds after which the user can skip the question.\n */\n skippableTime?: number; // in seconds\n /**\n * If true, teacher validation is needed for the question to proceed\n */\n teacherValidationEnabled: boolean;\n /**\n * If worksheet is attempting outside the class setting\n * * In case of puzzle worksheet.\n * * If true,\n * For student we show tooltip with 'Discuss with tutor in class'.\n * For teacher we show review cta.\n * * If false,\n * For student we show tooltip with 'Already solved'.\n * For teacher we don't show review cta.\n */\n canTeacherValidate: boolean;\n /**\n * * In case of puzzle worksheet for teacher\n * * If true,\n * Teacher validation button will be disabled.\n * * If false,\n * Teacher validation button will be active.\n */\n canTeacherValidateDisabled?: boolean;\n /**\n * If true, questions will be validated and feedback will be shown.\n */\n validation: boolean;\n /**\n * If true, questions will be validated and feedback will be shown along with the correct answer.\n */\n solutionHidden?: boolean;\n /**\n * If true, solution will be hidden.\n */\n review: boolean;\n /**\n * The maximum number of attempts allowed for each question.\n * 0 means unlimited attempts.\n * -1 means attempts will not be validated, hence not pushed to attempt history.\n * -2 means the sheet is a puzzle sheet\n * After reaching the maximum number of attempts, the user cannot attempt the question anymore.\n * If maxAtttmpts reached and canExceedAttempts is true, the user can still attempt the question\n * , also user will have the option to move to next question\n */\n maximumAttempts: number;\n /**\n * If true, the user can exceed the maximum number of attempts.\n */\n canExceedAttempts: boolean;\n /**\n * If the worksheet minimumAccuracy is not met, on clicking the final submit button, onMinimumAccuracyNotMet will be called.\n */\n minimumAccuracy: number;\n /**\n * Label for the check button\n * For example,\n * - \"Check\" for Checking the answer\n * - \"Submit\" for Submitting the answer when doing assessment\n */\n checkButtonLabel: string;\n /**\n * If attempt is incorrect, we show retry button, this is the label for the retry button\n * For example,\n * - 'Try Again' for retrying the question\n */\n retryButtonLabel: string;\n /**\n * If true show demos calculator https://www.desmos.com/calculator\n */\n canShowDesmosCalc: boolean;\n /**\n * If true, the user can unassign the sheet.\n */\n canUnAssign?: boolean;\n /**\n * If true, journey will be started.\n */\n canStartJourney?: boolean;\n}\n\nexport type TWORKSHHET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';\n\nexport interface IWorksheetCallbackProps {\n onResponseChange?: (options: {\n responseId: string;\n response: IWorksheetResponse;\n isNewAttempt: boolean;\n question: IWorksheetQuestion;\n }) => void;\n onBulkResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onMediaStateChange?: (\n question: IWorksheetQuestion,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n onTeacherValidation?: (questionId: string, rating?: keyof typeof QUESTIONS_RATING) => void;\n onOptionalItemAssignment?: (itemType: TItemType) => void;\n onOptionalItemSkip?: (itemType: TItemType) => void;\n onHelp?: (options: { questionId: string; questionNumber: string }) => void;\n onMinimumAccuracyNotMet?: (accuracy: number) => void;\n onExitTicketStart?: () => void;\n onExitTicketSubmit?: () => void;\n onSubmit?: (responses: Record<string, IWorksheetResponse>) => void;\n onUnassign?: () => void;\n onReview?: () => void;\n loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;\n}\n\nexport interface ICueCanvasCallbackProps {\n onPublishStrokes?: TPublish;\n onReceiveStrokes?: TSubscribe;\n}\n\nexport interface ICueCanvasProps {\n initialStrokesData?: Record<string, IActionData[]>;\n isCanvasEnabled: boolean;\n canToggleScribbling?: boolean;\n}\n\nexport interface IPointerSyncCallbackProps {\n onPublishMouseMove?: TPublishMouseMove;\n onSubscribeMouseMove?: TSubscribeMouseMove;\n}\n\nexport interface IWorksheetLayout {\n containerStyle: 'none' | 'card';\n navigationBar: 'none' | 'top' | 'bottom';\n actionBar: 'none' | 'bottom';\n containerWidth: string;\n topOffset: number; // Offset from the top of the screen, for eg: height of the header\n questionsScrollable: boolean;\n minQuestionHeight: string | number;\n minSummaryHeight: string | number;\n renderSideBar: boolean;\n showUserPointer?: boolean;\n renderQuestionHeader?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface ISubjectiveSheetProps {\n onAddReviewComment?: (\n responseId: string,\n commentData: {\n score: ILearnosityQuestionScore;\n teacherReview: ITeacherReview;\n },\n ) => void;\n openImagesReviewModal?: (props: IOpenImageReviewModalProps) => void;\n handleReviewSubmit?: () => void;\n isSubmittingReview?: boolean;\n isReviewPending?: boolean;\n}\n\ninterface IBaseWorksheetProps {\n userType: TUserTypes;\n userId: string;\n studentId: string;\n studentName?: string;\n worksheetName: string;\n background?: 'none' | 'paper';\n layout: IWorksheetLayout;\n behavior: IWorksheetBehavior;\n initialResponseId?: string;\n initialItemIndex?: number;\n updatedResponses?: Record<string, IWorksheetResponse>;\n worksheetCompleted: boolean;\n showNudgeBanner?: boolean;\n markedAsCompleted?: boolean;\n onResolveDoubt?: (responseId: string) => void;\n onActiveQuestionChange?: (question: IWorksheetQuestion) => void;\n canResolveDoubt?: boolean;\n onSkip?: (itemIndex: number, widgetIndex: number) => void;\n canShowActionBar?: boolean;\n}\n\nexport interface IWorksheetProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n learnosityActivityRef?: string;\n learnosityItems: ILearnosityItem[];\n learnosityResponses?: Record<string, IWorksheetResponse>;\n learnosity: ILearnosity;\n appendedQuestionIds: string[];\n questionsSignedRequest: string;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n studentId: string;\n attemptId?: string;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IUpdateImages {\n filteredImages: string[];\n newImages: IFile[];\n}\nexport interface IOpenImageReviewModalProps {\n isReviewed?: boolean;\n disableScoreForm?: boolean;\n imageUrls?: string[];\n filteredImageUrls?: (props: IUpdateImages) => void;\n uploadedImages?: (IFile | string)[];\n image?: string;\n}\n\nexport interface IWorksheetContainerProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n studentId: string;\n attemptId?: string;\n itemsSignedRequest: string;\n questionsSignedRequest: string;\n onLoaded: () => void;\n onErrored: (error: { code?: number; message: string }) => void;\n onResponsesLoaded?: (responses: Record<string, IWorksheetResponse>) => void;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IWorksheetRef {\n validateQuestion: (\n responseId: string,\n rating?: keyof typeof QUESTIONS_RATING,\n skipRemainingQuestions?: boolean,\n ) => void;\n assignOptionalItems: (itemType: TItemType) => void;\n skipOptionalItems: (itemType: TItemType) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n}\n\ninterface IWorksheetHeaderLayoutArgs {\n isPuzzleWorksheet?: boolean;\n isTestWorksheet?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface IWorksheetHeaderLayoutProps {\n (args: IWorksheetHeaderLayoutArgs): {\n bgColor: TColorNames;\n borderColor?: TColorNames;\n textColor?: TColorNames;\n };\n}\n"],"names":["QUESTION_TAGS","QUESTIONS_RATING"],"mappings":"AAMY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KAHUA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
1
|
+
{"version":3,"file":"worksheet-types.js","sources":["../../../../src/features/worksheet/worksheet/worksheet-types.ts"],"sourcesContent":["import type { TNodeTypes } from '../../../types/models/worksheet';\nimport type { IActionData, TPublish, TSubscribe } from '../../cue-canvas/types/cue-canvas';\nimport type { TPublishMouseMove, TSubscribeMouseMove } from '../../pointer-sync/pointer-types';\nimport type { TColorNames, THueNames, TUserTypes } from '../../ui/types';\nimport type { IFile } from './worksheet-question/subjective-review';\nimport type { MutableRefObject, ReactElement } from 'react';\n\nexport enum QUESTION_TAGS {\n TRIAL_TOPIC = 'trial-topic',\n QUESTION_CODE = 'question code',\n}\n\nexport enum QUESTIONS_RATING {\n E = 3,\n S = 2, // Just right\n H = 1,\n}\n\nexport interface ILearnosityError {\n code: number;\n consumerKey: string;\n detail: string;\n errorUI: string;\n msg: string;\n}\n\ninterface ILearnosityQuestionMetadata {\n widget_reference: string;\n sheet_reference: string;\n hints?: string[];\n solution?: string[];\n teacher_tips?: string[];\n valid_response_count: number;\n source: {\n organisation_id: number;\n };\n}\n\nexport type TInstructorStimulus =\n | 'SystemIntro' // lesson v3\n | 'Intro' // lesson v3\n | 'Concept-Intro' // lesson v3\n | 'Instruction' // lesson v3\n | 'Task' // lesson v3\n | 'Try' // trial v3\n | 'Learn' // trial v3\n | 'Apply'; // trial v3\nexport type TItemType =\n | 'overview'\n | 'learning-we-do'\n | 'learning-your-turn'\n | 'learning-explore'\n | 'practice-basic'\n | 'practice-basic-optional'\n | 'practice-regular'\n | 'practice-regular-optional'\n | 'exit-ticket'\n | 'advanced-we-do'\n | 'advanced-your-turn'\n | 'advanced-explore'\n | 'advanced-practice';\n\nexport type TSectionName =\n | 'overview'\n | 'learning'\n | 'practice-basic'\n | 'practice-regular'\n | 'exit-ticket'\n | 'advanced';\n\nexport interface IQuestionValidResponse {\n score: number;\n value: unknown[];\n}\n\nexport interface ISheetNudgeBannerInfo {\n bannerBackgroundColor: TColorNames;\n label: string;\n}\n\nexport interface ILearnosityQuestion {\n response_id: string;\n instructor_stimulus?: TInstructorStimulus;\n metadata: ILearnosityQuestionMetadata;\n instant_feedback?: boolean;\n math_renderer?: string;\n template?: string;\n tokenization?: string;\n numberPad?: string[];\n symbols?: unknown[];\n response_container?: Record<string, unknown>;\n ui_style?: Record<string, unknown>;\n shuffle_options?: boolean;\n // for custom type question validation is undefined.\n validation?: {\n scoring_type?: string;\n unscored?: boolean;\n valid_response?: IQuestionValidResponse;\n alt_responses?: IQuestionValidResponse[];\n penalty?: number;\n min_score_if_attempted?: number;\n };\n is_math?: boolean;\n labels?: Record<string, unknown>;\n line?: Record<string, unknown>;\n points?: string[];\n snap_to_ticks?: boolean;\n ticks?: Record<string, unknown>;\n max_length?: number;\n type:\n | 'hotspot'\n | 'tokenhighlight'\n | 'numberline'\n | 'clozeassociation'\n | 'clozetext'\n | 'association'\n | 'classification'\n | 'clozedropdown'\n | 'clozeformula'\n | 'mcq'\n | 'choicematrix'\n | 'plaintext'\n | 'drawing';\n case_sensitive?: boolean;\n show_copy?: boolean;\n show_cut?: boolean;\n show_paste?: boolean;\n spellcheck?: boolean;\n stimulus?: string;\n stimulus_review?: string;\n stimulus_list?: string[];\n image?: Record<string, unknown>;\n areas?: unknown[];\n area_attributes?: Record<string, unknown>;\n possible_responses?: string[][] | string[];\n duplicate_responses?: boolean;\n response_containers?: unknown[];\n options?: Record<string, unknown>[] | string[];\n feedback_attempts?: number;\n stems?: string[];\n multiple_responses?: boolean;\n}\n\nexport interface ILearnosityItem {\n reference: string;\n questions: ILearnosityQuestion[];\n source: Record<string, unknown>;\n content: string;\n metadata: Record<string, unknown> | unknown[];\n workflow: unknown[];\n response_ids: string[];\n feature_ids: unknown[];\n features: unknown[];\n itemType?: TItemType;\n tags?: string[];\n}\n\nexport interface IWorksheetQuestion extends ILearnosityQuestion {\n item_reference: string;\n item_type?: TItemType;\n section_name?: TSectionName;\n is_optional?: boolean;\n item_tags: string[];\n item_tags_map: Record<string, string>;\n item_number: number;\n item_display_number: number;\n question_number: number;\n total_questions: number;\n}\n\nexport interface ILearnosityQuestionScore {\n score?: number | null;\n max_score: number;\n unscored?: boolean;\n}\n\nexport interface ILearnosityQuestionResponse {\n value: unknown;\n responses?: unknown;\n type: unknown;\n updatedFormat?: boolean;\n wordCount?: number;\n apiVersion: string;\n revision: number;\n feedbackAttemptsCount?: number;\n}\n\nexport interface IAttempt {\n response: ILearnosityQuestionResponse;\n score: ILearnosityQuestionScore;\n}\n\ninterface ITeacherReview {\n reviewComment?: string;\n images?: string[];\n}\nexport interface IWorksheetResponse {\n widgetReference: string;\n itemReference: string;\n itemPosition: number; // 0 based\n questionPosition: number; // 0 based\n isOkayTypeQuestion: boolean;\n response?: ILearnosityQuestionResponse;\n simState?: Record<string, unknown>;\n score?: ILearnosityQuestionScore;\n responseEdited?: boolean;\n hintsUsed?: number;\n markedForReview?: boolean;\n attemptsHistory?: IAttempt[];\n validatedByTeacher?: boolean;\n submittedByStudent?: boolean;\n assignStatus?: 'assigned' | 'skipped';\n rating?: number;\n skipped?: boolean;\n doubtResolved?: boolean;\n teacherReview?: ITeacherReview;\n tags?: Record<string, string>;\n timeSpent?: number;\n}\n\ntype TMathRenderer = 'mathjax' | 'mathquill';\nexport interface ILearnosity {\n ready: () => void;\n questions: () => Record<string, unknown>;\n question: (responseId: string) =>\n | {\n enable: () => boolean;\n disable: () => boolean;\n getQuestion: () => ILearnosityQuestion;\n getMetadata: () => ILearnosityQuestionMetadata;\n getResponse: () => ILearnosityQuestionResponse;\n getScore: (\n callback?: (score: ILearnosityQuestionScore | null) => void,\n ) => ILearnosityQuestionScore;\n validate: (\n options?: { showCorrectAnswers?: boolean; feedbackAttempts?: boolean },\n callback?: () => void,\n ) => void;\n resetValidationUI: () => void;\n on: (eventName: 'changed', callback: () => void) => void;\n off: (eventName: 'changed', callback?: () => void) => void;\n }\n | undefined;\n append: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n appendQuestion: (toAppend: {\n questions: ILearnosityQuestion[];\n responses?: Record<string, unknown>;\n }) => void;\n reset: () => void;\n renderMath: (renderer: TMathRenderer) => void;\n}\n\nexport interface IWorksheetBehavior {\n /**\n * If true, Opens the worksheet in resume mode.\n * - If false, Opens the worksheet in review mode.\n */\n canAttempt: boolean;\n /**\n * If true, the user can mark the question for review.\n */\n canMarkForReview: boolean;\n /**\n * The mode of navigation for the worksheet.\n * - `OPEN` mode allows the user to navigate to any question in the worksheet.\n * - `LINEAR` mode allows the user to navigate to the next question only.\n * - `ADAPTIVE` mode allows the user to navigate future questions based on the rating of the current question.\n * - `CURRENT` mode allows the user to navigate to the current question only. Back and forth not allowed.\n */\n navigationMode: 'OPEN' | 'LINEAR' | 'ADAPTIVE' | 'CURRENT';\n /**\n * The initial question to display when the worksheet is loaded.\n * - `FIRST` mode displays the first question in the worksheet.\n * - `CURRENT` mode displays the question that the user was last on.\n */\n initialQuestion: 'FIRST' | 'CURRENT';\n /**\n * If hints are available, on clicking the help button, first availble hint will be shown.\n * Clicking again will show the next hint.\n * If no more hints are available, onHelp will be called.\n */\n hints: boolean;\n /**\n * The time in seconds after which the hints button will be shown.\n */\n hintsTimer?: number; // in seconds\n /**\n * If true, the user can skip the question without attempting it.\n * Skip button will be shown only after the hints are exausted and skipTimer is reached.\n */\n skippable?: boolean;\n /**\n * The time in seconds after which the user can skip the question.\n */\n skippableTime?: number; // in seconds\n /**\n * If true, teacher validation is needed for the question to proceed\n */\n teacherValidationEnabled: boolean;\n /**\n * If worksheet is attempting outside the class setting\n * This needs teacherValidationEnabled to be true\n * TODO-ANTIL: Accept only validation which can be 'system' or 'teacher' or undefined\n */\n canTeacherValidate: boolean;\n /**\n * If true, questions will be validated and feedback will be shown.\n */\n validation: boolean;\n /**\n * If true, solution wont be shown to the user.\n */\n solutionHidden?: boolean;\n /**\n * If true, questions will be validated and feedback will be shown along with the correct answer.\n */\n review: boolean;\n /**\n * The maximum number of attempts allowed for each question.\n * 0 means unlimited attempts.\n * -1 means attempts will not be validated, hence not pushed to attempt history.\n * -2 means the sheet is a puzzle sheet\n * After reaching the maximum number of attempts, the user cannot attempt the question anymore.\n * If maxAtttmpts reached and canExceedAttempts is true, the user can still attempt the question\n * , also user will have the option to move to next question\n */\n maximumAttempts: number;\n /**\n * If true, the user can exceed the maximum number of attempts.\n */\n canExceedAttempts: boolean;\n /**\n * If the worksheet minimumAccuracy is not met, on clicking the final submit button, onMinimumAccuracyNotMet will be called.\n */\n minimumAccuracy: number;\n /**\n * Label for the check button\n * For example,\n * - \"Check\" for Checking the answer\n * - \"Submit\" for Submitting the answer when doing assessment\n */\n checkButtonLabel: string;\n /**\n * If attempt is incorrect, we show retry button, this is the label for the retry button\n * For example,\n * - 'Try Again' for retrying the question\n */\n retryButtonLabel: string;\n /**\n * If true show demos calculator https://www.desmos.com/calculator\n */\n canShowDesmosCalc: boolean;\n\n // If true, canvas is enabled and user can use canvas to scribble on the worksheet by toggling the scribble button\n canvasEnabled?: boolean;\n\n // If true, the user can scribble on workheet\n canScribble?: boolean;\n}\n\nexport type TWORKSHHET_QUESTION_MEDIA_TYPE = 'SIMULATION' | 'VIDEO' | 'AUDIO';\n\nexport interface IWorksheetCallbackProps {\n onResponseChange?: (options: {\n responseId: string;\n response: IWorksheetResponse;\n isNewAttempt: boolean;\n question: IWorksheetQuestion;\n }) => void;\n onBulkResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onResponsesChange?: (responses: Record<string, IWorksheetResponse>) => void;\n onMediaStateChange?: (\n question: IWorksheetQuestion,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n onTeacherValidation?: (questionId: string, rating?: keyof typeof QUESTIONS_RATING) => void;\n onOptionalItemAssignment?: (itemType: TItemType) => void;\n onOptionalItemSkip?: (itemType: TItemType) => void;\n onHelp?: (options: { questionId: string; questionNumber: string }) => void;\n onMinimumAccuracyNotMet?: (accuracy: number) => void;\n onExitTicketStart?: () => void;\n onExitTicketSubmit?: () => void;\n onSubmit?: (responses: Record<string, IWorksheetResponse>) => void;\n loggerRef: MutableRefObject<(eventName: string, data?: Record<string, unknown>) => void>;\n}\n\nexport interface ICueCanvasCallbackProps {\n onPublishStrokes?: TPublish;\n onReceiveStrokes?: TSubscribe;\n}\n\nexport interface ICueCanvasProps {\n initialStrokesData?: Record<string, IActionData[]>;\n}\n\nexport interface IPointerSyncCallbackProps {\n onPublishMouseMove?: TPublishMouseMove;\n onSubscribeMouseMove?: TSubscribeMouseMove;\n}\n\nexport interface IWorksheetLayout {\n containerStyle: 'none' | 'card';\n navigationBar: 'none' | 'top' | 'bottom';\n actionBar: 'none' | 'bottom';\n containerWidth: string;\n topOffset: number; // Offset from the top of the screen, for eg: height of the header\n questionsScrollable: boolean;\n minQuestionHeight: string | number;\n minSummaryHeight: string | number;\n renderSideBar: boolean;\n showUserPointer?: boolean;\n renderQuestionHeader?: boolean;\n imageHue?: THueNames;\n background?: 'none' | 'paper';\n questionPadding: number;\n}\n\nexport interface ISubjectiveSheetProps {\n onAddReviewComment?: (\n responseId: string,\n commentData: {\n score: ILearnosityQuestionScore;\n teacherReview: ITeacherReview;\n },\n ) => void;\n openImagesReviewModal?: (props: IOpenImageReviewModalProps) => void;\n handleReviewSubmit?: () => void;\n isSubmittingReview?: boolean;\n isReviewPending?: boolean;\n}\n\ninterface IBaseWorksheetProps {\n userType: TUserTypes;\n userId: string;\n studentId: string;\n studentName?: string;\n worksheetName: string;\n layout: IWorksheetLayout;\n behavior: IWorksheetBehavior;\n initialResponseId?: string;\n initialItemIndex?: number;\n updatedResponses?: Record<string, IWorksheetResponse>;\n worksheetCompleted: boolean;\n showNudgeBanner?: boolean;\n markedAsCompleted?: boolean;\n onResolveDoubt?: (responseId: string) => void;\n onActiveQuestionChange?: (question: IWorksheetQuestion) => void;\n canResolveDoubt?: boolean;\n onSkip?: (itemIndex: number, widgetIndex: number) => void;\n canShowActionBar?: boolean;\n actionBarRightElement?: ReactElement; // Extra Elements to be rendered in the action bar\n}\n\nexport interface IWorksheetProps\n extends IBaseWorksheetProps,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n learnosityActivityRef?: string;\n learnosityItems: ILearnosityItem[];\n learnosityResponses?: Record<string, IWorksheetResponse>;\n learnosity: ILearnosity;\n appendedQuestionIds: string[];\n questionsSignedRequest: string;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n studentId: string;\n attemptId?: string;\n subjectiveProps?: ISubjectiveSheetProps;\n}\n\nexport interface IUpdateImages {\n filteredImages: string[];\n newImages: IFile[];\n}\nexport interface IOpenImageReviewModalProps {\n isReviewed?: boolean;\n disableScoreForm?: boolean;\n imageUrls?: string[];\n filteredImageUrls?: (props: IUpdateImages) => void;\n uploadedImages?: (IFile | string)[];\n image?: string;\n}\n\nexport interface IWorksheetContainerProps\n extends Omit<IBaseWorksheetProps, 'behavior'>,\n IWorksheetCallbackProps,\n ICueCanvasProps,\n ICueCanvasCallbackProps,\n IPointerSyncCallbackProps {\n studentId: string;\n attemptId?: string;\n itemsSignedRequest: string;\n questionsSignedRequest: string;\n onLoaded: () => void;\n onErrored: (error: { code?: number; message: string }) => void;\n onResponsesLoaded?: (responses: Record<string, IWorksheetResponse>) => void;\n openQuestionFeedbackModal?: (itemRef: string) => void;\n summaryDescription?: ReactElement | null;\n canSubmitWorksheet?: boolean;\n subjectiveProps?: ISubjectiveSheetProps;\n inClass?: boolean; // If true, the worksheet is rendered inside class\n isLessonV3Enabled?: boolean; // If true, the worksheet is rendered in lesson v3 mode\n isDesmosEnabled?: boolean; // If true, the worksheet can show desmos calculator\n nodeType: TNodeTypes; // NodeType of the worksheet\n mode: 'resume' | 'review' | 'preview'; // mode of the worksheet\n}\n\nexport interface IWorksheetRef {\n validateQuestion: (\n responseId: string,\n rating?: keyof typeof QUESTIONS_RATING,\n skipRemainingQuestions?: boolean,\n ) => void;\n assignOptionalItems: (itemType: TItemType) => void;\n skipOptionalItems: (itemType: TItemType) => void;\n updateMediaState: (\n responseId: string,\n mediaType: TWORKSHHET_QUESTION_MEDIA_TYPE,\n mediaState: Record<string, unknown>,\n ) => void;\n}\n\ninterface IWorksheetHeaderLayoutArgs {\n isPuzzleWorksheet?: boolean;\n isTestWorksheet?: boolean;\n imageHue?: THueNames;\n}\n\nexport interface IWorksheetHeaderLayoutProps {\n (args: IWorksheetHeaderLayoutArgs): {\n bgColor: TColorNames;\n borderColor?: TColorNames;\n textColor?: TColorNames;\n };\n}\n"],"names":["QUESTION_TAGS","QUESTIONS_RATING"],"mappings":"AAOY,IAAAA,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA,GAKAC,sBAAAA,OACVA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KACAA,EAAAA,EAAA,IAAI,CAAJ,IAAA,KAHUA,IAAAA,KAAA,CAAA,CAAA;"}
|