@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,119 +1,180 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import { jsx as e, jsxs as a, Fragment as X } from "react/jsx-runtime";
|
|
2
|
+
import { memo as Y, useCallback as f } from "react";
|
|
3
|
+
import Z from "../../../../assets/line-icons/icons/eye2.js";
|
|
4
|
+
import q from "../../../../assets/line-icons/icons/more-vertical.js";
|
|
5
|
+
import G from "../../../../assets/line-icons/icons/redo.js";
|
|
6
|
+
import J from "../../../../assets/line-icons/icons/skip.js";
|
|
7
|
+
import N from "../../../ui/context-menu/context-menu.js";
|
|
8
|
+
import S from "../../../ui/layout/flex-view.js";
|
|
9
|
+
import E from "../../../ui/text/text.js";
|
|
10
|
+
import Q from "../../comps/node-card/node-card.js";
|
|
11
|
+
import U from "../../comps/node-card/node-menu-options/node-menu-options.js";
|
|
12
|
+
import D from "../../comps/sat-mock-test/sat-mock-test.js";
|
|
13
|
+
import { BLOCK_TYPE as R, BLOCK_NAME as ee } from "../../constants/block-constants.js";
|
|
14
|
+
import { getSheetNLessonCount as te } from "../../utils/index.js";
|
|
15
|
+
import { getNextAccessibleSATSheet as ne } from "../../utils/sat-sheet-utils.js";
|
|
16
|
+
import { BlockSectionWrapper as re, BlockOptionsWrapper as ie, BlockSheetContainer as oe } from "./block-sections-styled.js";
|
|
17
|
+
const ce = ({
|
|
18
|
+
userType: s,
|
|
19
|
+
imageHue: u,
|
|
20
|
+
blockData: r,
|
|
21
|
+
lessonIdx: $,
|
|
22
|
+
isLastBlock: x,
|
|
23
|
+
isGoalBlock: d,
|
|
24
|
+
blockSectionRef: k,
|
|
25
|
+
onNodeAttempt: b,
|
|
26
|
+
onNodeAssignAsHomework: L,
|
|
27
|
+
onNodeMarkAsDone: I,
|
|
28
|
+
onNodeReattempt: M,
|
|
29
|
+
onNodeReview: n,
|
|
30
|
+
onNodeView: O,
|
|
31
|
+
onBlockSkipUnskip: l,
|
|
27
32
|
onNodeUnassign: w,
|
|
28
|
-
onNodeUnlock:
|
|
29
|
-
onNodeSkipUnSkip:
|
|
33
|
+
onNodeUnlock: K,
|
|
34
|
+
onNodeSkipUnSkip: j,
|
|
35
|
+
onBlockReset: m
|
|
30
36
|
}) => {
|
|
31
|
-
const {
|
|
37
|
+
const {
|
|
38
|
+
block_type: h,
|
|
39
|
+
name: _,
|
|
40
|
+
sheets: i,
|
|
41
|
+
permissions: C,
|
|
42
|
+
block_stats: H,
|
|
43
|
+
state: V,
|
|
44
|
+
block_statement: W
|
|
45
|
+
} = r, o = h === R.SAT_MOCK_TEST, {
|
|
46
|
+
can_skip: p,
|
|
47
|
+
can_un_skip: t,
|
|
48
|
+
can_reset: g,
|
|
49
|
+
can_review: T
|
|
50
|
+
} = C, A = ee[h], y = te({
|
|
51
|
+
isSkipped: t,
|
|
52
|
+
sheetsLength: i.length,
|
|
53
|
+
isGoalBlock: d,
|
|
54
|
+
lessonIdx: $,
|
|
55
|
+
isSatMockTestBlock: o
|
|
56
|
+
}), B = o && (g || T) || s === "TEACHER" && (p || t), P = f(() => {
|
|
57
|
+
const c = ne(i);
|
|
58
|
+
if (!c)
|
|
59
|
+
throw new Error("Active SAT sheet is not available");
|
|
60
|
+
n == null || n(c);
|
|
61
|
+
}, [n, i]), v = f(() => {
|
|
62
|
+
l == null || l(r, p);
|
|
63
|
+
}, [r, p, l]), z = f(() => {
|
|
64
|
+
m == null || m(r);
|
|
65
|
+
}, [r, m]), F = [
|
|
32
66
|
{
|
|
33
67
|
id: "node-card-skip",
|
|
34
68
|
label: t ? "Revert 'Skip'" : "Skip All",
|
|
35
|
-
icon:
|
|
36
|
-
disabled:
|
|
37
|
-
onClick:
|
|
69
|
+
icon: J,
|
|
70
|
+
disabled: o,
|
|
71
|
+
onClick: v
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
id: "sat-node-card-review",
|
|
75
|
+
label: "Review",
|
|
76
|
+
icon: Z,
|
|
77
|
+
disabled: !T,
|
|
78
|
+
onClick: P
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
id: "sat-node-card-reset",
|
|
82
|
+
label: "Reset",
|
|
83
|
+
icon: G,
|
|
84
|
+
disabled: !g,
|
|
85
|
+
onClick: z
|
|
38
86
|
}
|
|
39
87
|
];
|
|
40
|
-
return
|
|
41
|
-
|
|
88
|
+
return s === "STUDENT" && t ? null : /* @__PURE__ */ e("div", { ref: k, children: /* @__PURE__ */ e(
|
|
89
|
+
re,
|
|
42
90
|
{
|
|
43
|
-
$background:
|
|
91
|
+
$background: d ? "WHITE_1" : "WHITE_3",
|
|
44
92
|
$gutterX: 1,
|
|
45
|
-
$lastBlock:
|
|
93
|
+
$lastBlock: x,
|
|
46
94
|
$flexGap: 12,
|
|
47
|
-
children: /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
|
|
95
|
+
children: /* @__PURE__ */ a(S, { $flexGap: 12, children: [
|
|
96
|
+
/* @__PURE__ */ a(S, { $flexDirection: "row", $alignItems: "center", $justifyContent: "space-between", children: [
|
|
97
|
+
/* @__PURE__ */ a(S, { $opacity: t ? 0.5 : 1, children: [
|
|
98
|
+
/* @__PURE__ */ a(
|
|
99
|
+
E,
|
|
52
100
|
{
|
|
53
101
|
$renderAs: "ac4",
|
|
54
102
|
$color: "BLACK_T_60",
|
|
55
103
|
$textDecoration: t ? "line-through" : "none",
|
|
56
104
|
children: [
|
|
57
|
-
|
|
105
|
+
A === "Puzzles" ? _ : A,
|
|
58
106
|
" ",
|
|
59
|
-
|
|
107
|
+
y
|
|
60
108
|
]
|
|
61
109
|
}
|
|
62
110
|
),
|
|
63
|
-
!!
|
|
64
|
-
|
|
111
|
+
!!d && !!$ && !o && /* @__PURE__ */ e(
|
|
112
|
+
E,
|
|
65
113
|
{
|
|
66
114
|
$renderAs: "ab2-bold",
|
|
67
115
|
$color: "BLACK_1",
|
|
68
116
|
$textDecoration: t ? "line-through" : "none",
|
|
69
|
-
children:
|
|
117
|
+
children: _
|
|
70
118
|
}
|
|
71
119
|
)
|
|
72
120
|
] }),
|
|
73
|
-
|
|
74
|
-
|
|
121
|
+
B && /* @__PURE__ */ e(
|
|
122
|
+
N,
|
|
75
123
|
{
|
|
76
124
|
targetElement: /* @__PURE__ */ e(
|
|
77
|
-
|
|
125
|
+
ie,
|
|
78
126
|
{
|
|
79
127
|
$width: 20,
|
|
80
128
|
$height: 20,
|
|
81
129
|
$justifyContent: "center",
|
|
82
130
|
$alignItems: "center",
|
|
83
|
-
children: /* @__PURE__ */ e(
|
|
131
|
+
children: /* @__PURE__ */ e(q, { width: 18, height: 18 })
|
|
84
132
|
}
|
|
85
133
|
),
|
|
86
|
-
menuElement: /* @__PURE__ */ e(
|
|
134
|
+
menuElement: /* @__PURE__ */ e(U, { options: F }),
|
|
87
135
|
menuOffset: 5,
|
|
88
136
|
menuZIndex: 4
|
|
89
137
|
}
|
|
90
138
|
)
|
|
91
139
|
] }),
|
|
92
|
-
/* @__PURE__ */ e(
|
|
93
|
-
|
|
140
|
+
/* @__PURE__ */ e(X, { children: o ? /* @__PURE__ */ e(
|
|
141
|
+
D,
|
|
94
142
|
{
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
143
|
+
userType: s,
|
|
144
|
+
imageHue: u || "BLUE",
|
|
145
|
+
sheets: i,
|
|
146
|
+
blockStats: H,
|
|
147
|
+
blockState: V,
|
|
148
|
+
blockStatement: W,
|
|
149
|
+
onNodeAttempt: b,
|
|
150
|
+
onNodeReview: n,
|
|
151
|
+
blockPermissions: C
|
|
152
|
+
}
|
|
153
|
+
) : /* @__PURE__ */ e(oe, { children: i.map((c) => /* @__PURE__ */ e(
|
|
154
|
+
Q,
|
|
155
|
+
{
|
|
156
|
+
imageHue: u || "BLUE",
|
|
157
|
+
userType: s,
|
|
158
|
+
nodeData: c,
|
|
159
|
+
blockType: h,
|
|
99
160
|
isSkipped: t,
|
|
100
|
-
onNodeAttempt:
|
|
101
|
-
onNodeAssignAsHomework:
|
|
102
|
-
onNodeMarkAsDone:
|
|
103
|
-
onNodeReattempt:
|
|
104
|
-
onNodeReview:
|
|
105
|
-
onNodeView:
|
|
161
|
+
onNodeAttempt: b,
|
|
162
|
+
onNodeAssignAsHomework: L,
|
|
163
|
+
onNodeMarkAsDone: I,
|
|
164
|
+
onNodeReattempt: M,
|
|
165
|
+
onNodeReview: n,
|
|
166
|
+
onNodeView: O,
|
|
106
167
|
onNodeUnassign: w,
|
|
107
|
-
onNodeUnlock:
|
|
108
|
-
onNodeSkipUnSkip:
|
|
168
|
+
onNodeUnlock: K,
|
|
169
|
+
onNodeSkipUnSkip: j
|
|
109
170
|
},
|
|
110
|
-
|
|
111
|
-
)) })
|
|
171
|
+
c.node_id
|
|
172
|
+
)) }) })
|
|
112
173
|
] })
|
|
113
174
|
}
|
|
114
175
|
) });
|
|
115
|
-
};
|
|
176
|
+
}, Ae = Y(ce);
|
|
116
177
|
export {
|
|
117
|
-
|
|
178
|
+
Ae as default
|
|
118
179
|
};
|
|
119
180
|
//# sourceMappingURL=block-section-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport { BLOCK_NAME } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n blockSectionRef,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n}) => {\n const { block_type: blockType, name, sheets, permissions } = blockData;\n\n const { can_skip: canSkip, can_un_skip: canUnskip } = permissions;\n const blockName = BLOCK_NAME[blockType];\n\n const sheetNLessonCount = getSheetNLessonCount(canUnskip, sheets.length, isGoalBlock, lessonIdx);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-skip',\n label: canUnskip ? `Revert 'Skip'` : 'Skip All',\n icon: SkipIcon,\n disabled: false,\n onClick: () => onBlockSkipUnskip?.(blockData, canSkip),\n },\n ];\n\n if (userType === 'STUDENT' && canUnskip) return null;\n\n return (\n <div ref={blockSectionRef}>\n <Styled.BlockSectionWrapper\n $background={isGoalBlock ? `WHITE_1` : 'WHITE_3'}\n $gutterX={1}\n $lastBlock={isLastBlock}\n $flexGap={12}\n >\n <FlexView $flexGap={12}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $opacity={canUnskip ? 0.5 : 1}>\n <Text\n $renderAs=\"ac4\"\n $color=\"BLACK_T_60\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {blockName === 'Puzzles' ? name : blockName} {sheetNLessonCount}\n </Text>\n\n {!!isGoalBlock && !!lessonIdx && (\n <Text\n $renderAs=\"ab2-bold\"\n $color=\"BLACK_1\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {name}\n </Text>\n )}\n </FlexView>\n\n {userType === 'TEACHER' && (canSkip || canUnskip) && (\n <ContextMenu\n targetElement={\n <Styled.BlockOptionsWrapper\n $width={20}\n $height={20}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <MoreVerticalIcon width={18} height={18} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <Styled.BlockSheetContainer>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n />\n ))}\n </Styled.BlockSheetContainer>\n </FlexView>\n </Styled.BlockSectionWrapper>\n </div>\n );\n};\n\nexport default BlockSectionView;\n"],"names":["BlockSectionView","userType","imageHue","blockData","lessonIdx","isLastBlock","isGoalBlock","blockSectionRef","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","blockType","name","sheets","permissions","canSkip","canUnskip","blockName","BLOCK_NAME","sheetNLessonCount","getSheetNLessonCount","menuOptions","SkipIcon","jsx","Styled.BlockSectionWrapper","jsxs","FlexView","Text","ContextMenu","Styled.BlockOptionsWrapper","MoreVerticalIcon","NodeMenuOptions","Styled.BlockSheetContainer","nodeData","NodeCard"],"mappings":";;;;;;;;;;;AAeA,MAAMA,IAA2C,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAYC,GAAW,MAAAC,GAAM,QAAAC,GAAQ,aAAAC,EAAgB,IAAAlB,GAEvD,EAAE,UAAUmB,GAAS,aAAaC,MAAcF,GAChDG,IAAYC,EAAWP,CAAS,GAEhC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AACM;AAAAA,gBAAA;AAAA,kBACC,QAAQ;AAAA,kBACR,SAAS;AAAA,kBACT,iBAAgB;AAAA,kBAChB,aAAY;AAAA,kBAEZ,UAAC,gBAAAN,EAAAO,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,gBAAA;AAAA,cAC3C;AAAA,cAEF,aAAa,gBAAAP,EAACQ,GAAgB,EAAA,SAASV,EAAa,CAAA;AAAA,cACpD,YAAY;AAAA,cACZ,YAAY;AAAA,YAAA;AAAA,UACd;AAAA,QAAA,GAEJ;AAAA,0BAECW,GAAA,EACE,UAAAnB,EAAO,IAAI,CACVoB,MAAA,gBAAAV;AAAA,UAACW;AAAA,UAAA;AAAA,YAEC,UAAUvC,KAAY;AAAA,YACtB,UAAAD;AAAA,YACA,UAAAuC;AAAA,YACA,WAAAtB;AAAA,YACA,WAAWK;AAAA,YACX,eAAAf;AAAA,YACA,wBAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,YACA,gBAAAE;AAAA,YACA,cAAAC;AAAA,YACA,kBAAAC;AAAA,UAAA;AAAA,UAdKuB,EAAS;AAAA,QAgBjB,CAAA,GACH;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\n\nimport { memo, useCallback, type FC } from 'react';\n\nimport Eye2Icon from '../../../../assets/line-icons/icons/eye2';\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport RedoIcon from '../../../../assets/line-icons/icons/redo';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport SatMockTest from '../../comps/sat-mock-test/sat-mock-test';\nimport { BLOCK_NAME, BLOCK_TYPE } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport { getNextAccessibleSATSheet } from '../../utils/sat-sheet-utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n blockSectionRef,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n onBlockReset,\n}) => {\n const {\n block_type: blockType,\n name,\n sheets,\n permissions,\n block_stats: blockStats,\n state,\n block_statement: blockStatement,\n } = blockData;\n\n const isSatMockTestBlock = blockType === BLOCK_TYPE.SAT_MOCK_TEST;\n\n const {\n can_skip: canSkip,\n can_un_skip: canUnskip,\n can_reset: canReset,\n can_review: canReview,\n } = permissions;\n const blockName = BLOCK_NAME[blockType];\n\n const sheetNLessonCount = getSheetNLessonCount({\n isSkipped: canUnskip,\n sheetsLength: sheets.length,\n isGoalBlock,\n lessonIdx,\n isSatMockTestBlock,\n });\n\n const canRenderMenuOptions =\n (isSatMockTestBlock && (canReset || canReview)) ||\n (userType === 'TEACHER' && (canSkip || canUnskip));\n\n const handleSATSheetReview = useCallback(() => {\n const nextAccessibleSATSheet = getNextAccessibleSATSheet(sheets);\n\n if (!nextAccessibleSATSheet) {\n throw new Error('Active SAT sheet is not available');\n }\n\n onNodeReview?.(nextAccessibleSATSheet);\n }, [onNodeReview, sheets]);\n\n const handleBlockSkipUnskip = useCallback(() => {\n onBlockSkipUnskip?.(blockData, canSkip);\n }, [blockData, canSkip, onBlockSkipUnskip]);\n\n const handleBlockReset = useCallback(() => {\n onBlockReset?.(blockData);\n }, [blockData, onBlockReset]);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-skip',\n label: canUnskip ? `Revert 'Skip'` : 'Skip All',\n icon: SkipIcon,\n disabled: isSatMockTestBlock,\n onClick: handleBlockSkipUnskip,\n },\n {\n id: 'sat-node-card-review',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleSATSheetReview,\n },\n {\n id: 'sat-node-card-reset',\n label: 'Reset',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleBlockReset,\n },\n ];\n\n if (userType === 'STUDENT' && canUnskip) return null;\n\n return (\n <div ref={blockSectionRef}>\n <Styled.BlockSectionWrapper\n $background={isGoalBlock ? `WHITE_1` : 'WHITE_3'}\n $gutterX={1}\n $lastBlock={isLastBlock}\n $flexGap={12}\n >\n <FlexView $flexGap={12}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $opacity={canUnskip ? 0.5 : 1}>\n <Text\n $renderAs=\"ac4\"\n $color=\"BLACK_T_60\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {blockName === 'Puzzles' ? name : blockName} {sheetNLessonCount}\n </Text>\n\n {!!isGoalBlock && !!lessonIdx && !isSatMockTestBlock && (\n <Text\n $renderAs=\"ab2-bold\"\n $color=\"BLACK_1\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {name}\n </Text>\n )}\n </FlexView>\n\n {canRenderMenuOptions && (\n <ContextMenu\n targetElement={\n <Styled.BlockOptionsWrapper\n $width={20}\n $height={20}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <MoreVerticalIcon width={18} height={18} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <>\n {isSatMockTestBlock ? (\n <SatMockTest\n userType={userType}\n imageHue={imageHue || 'BLUE'}\n sheets={sheets}\n blockStats={blockStats}\n blockState={state}\n blockStatement={blockStatement}\n onNodeAttempt={onNodeAttempt}\n onNodeReview={onNodeReview}\n blockPermissions={permissions}\n />\n ) : (\n <Styled.BlockSheetContainer>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n />\n ))}\n </Styled.BlockSheetContainer>\n )}\n </>\n </FlexView>\n </Styled.BlockSectionWrapper>\n </div>\n );\n};\n\nexport default memo(BlockSectionView);\n"],"names":["BlockSectionView","userType","imageHue","blockData","lessonIdx","isLastBlock","isGoalBlock","blockSectionRef","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","onBlockReset","blockType","name","sheets","permissions","blockStats","state","blockStatement","isSatMockTestBlock","BLOCK_TYPE","canSkip","canUnskip","canReset","canReview","blockName","BLOCK_NAME","sheetNLessonCount","getSheetNLessonCount","canRenderMenuOptions","handleSATSheetReview","useCallback","nextAccessibleSATSheet","getNextAccessibleSATSheet","handleBlockSkipUnskip","handleBlockReset","menuOptions","SkipIcon","Eye2Icon","RedoIcon","jsx","Styled.BlockSectionWrapper","jsxs","FlexView","Text","ContextMenu","Styled.BlockOptionsWrapper","MoreVerticalIcon","NodeMenuOptions","SatMockTest","Styled.BlockSheetContainer","nodeData","NodeCard","BlockSectionView$1","memo"],"mappings":";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AAA,UAAA;AAAA,UAdKyC,EAAS;AAAA,QAAA,CAgBjB,GACH,EAEJ,CAAA;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEeE,KAAAC,EAAK7D,EAAgB;"}
|
|
@@ -1,52 +1,62 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsxs as O, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { memo as y, useMemo as D } from "react";
|
|
3
|
+
import { BLOCK_TYPE as G, SECTION_CODE as I } from "../../constants/block-constants.js";
|
|
3
4
|
import u from "./block-section-view.js";
|
|
4
|
-
import { ChapterDetailsWrapper as
|
|
5
|
-
const
|
|
6
|
-
const {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
5
|
+
import { ChapterDetailsWrapper as L } from "./block-sections-styled.js";
|
|
6
|
+
const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, F = y((h) => {
|
|
7
|
+
const {
|
|
8
|
+
blocks: t,
|
|
9
|
+
imageHue: i,
|
|
10
|
+
userType: r,
|
|
11
|
+
coreBlocksRef: S,
|
|
12
|
+
challengeBlockRef: C,
|
|
13
|
+
downloadBlockRef: E,
|
|
14
|
+
downloadCoreBlockRef: g,
|
|
15
|
+
...d
|
|
16
|
+
} = h;
|
|
17
|
+
let a = 0, k = !1, f = !1;
|
|
18
|
+
const { goalBlocks: p, nonGoalBlocks: B } = D(
|
|
19
|
+
() => t.reduce(
|
|
20
|
+
(o, e) => (e.section_code === N || e.section_code === x || e.block_type === _ ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
|
|
11
21
|
{ goalBlocks: [], nonGoalBlocks: [] }
|
|
12
22
|
),
|
|
13
|
-
[
|
|
23
|
+
[t]
|
|
14
24
|
);
|
|
15
|
-
return /* @__PURE__ */
|
|
16
|
-
|
|
25
|
+
return /* @__PURE__ */ O(
|
|
26
|
+
L,
|
|
17
27
|
{
|
|
18
28
|
$width: "100%",
|
|
19
|
-
$background:
|
|
29
|
+
$background: B.length ? "WHITE_3" : "WHITE_1",
|
|
20
30
|
children: [
|
|
21
|
-
/* @__PURE__ */ c("div", { ref:
|
|
22
|
-
const { block_type:
|
|
23
|
-
let
|
|
24
|
-
const
|
|
25
|
-
return
|
|
31
|
+
/* @__PURE__ */ c("div", { ref: S, children: p.map((o, e) => {
|
|
32
|
+
const { block_type: l, block_id: s, permissions: n, sheets: A } = o;
|
|
33
|
+
let m = 0;
|
|
34
|
+
const R = e === p.length - 1, T = A.find((b) => b.node_type === "PDF");
|
|
35
|
+
return (l === w || l === _) && (n.can_un_skip || (a += 1), m = a), /* @__PURE__ */ c(
|
|
26
36
|
u,
|
|
27
37
|
{
|
|
28
38
|
blockData: o,
|
|
29
|
-
userType:
|
|
30
|
-
isLastBlock:
|
|
31
|
-
lessonIdx:
|
|
32
|
-
imageHue:
|
|
39
|
+
userType: r,
|
|
40
|
+
isLastBlock: R,
|
|
41
|
+
lessonIdx: m,
|
|
42
|
+
imageHue: i,
|
|
33
43
|
isGoalBlock: !0,
|
|
34
|
-
...
|
|
35
|
-
blockSectionRef: void 0
|
|
44
|
+
...d,
|
|
45
|
+
blockSectionRef: T ? g : void 0
|
|
36
46
|
},
|
|
37
|
-
|
|
47
|
+
s
|
|
38
48
|
);
|
|
39
49
|
}) }),
|
|
40
|
-
|
|
41
|
-
const { block_id: e, block_type:
|
|
42
|
-
return
|
|
50
|
+
B.map((o) => {
|
|
51
|
+
const { block_id: e, block_type: l } = o, s = l === "CHALLENGE_ARENA" && !k, n = l === "DOWNLOADS" && !f;
|
|
52
|
+
return s && (k = !0), n && (f = !0), /* @__PURE__ */ c(
|
|
43
53
|
u,
|
|
44
54
|
{
|
|
45
55
|
blockData: o,
|
|
46
|
-
userType:
|
|
47
|
-
imageHue:
|
|
48
|
-
...
|
|
49
|
-
blockSectionRef:
|
|
56
|
+
userType: r,
|
|
57
|
+
imageHue: i,
|
|
58
|
+
...d,
|
|
59
|
+
blockSectionRef: s ? C : n ? E : void 0
|
|
50
60
|
},
|
|
51
61
|
e
|
|
52
62
|
);
|
|
@@ -56,6 +66,6 @@ const C = g((m) => {
|
|
|
56
66
|
);
|
|
57
67
|
});
|
|
58
68
|
export {
|
|
59
|
-
|
|
69
|
+
F as default
|
|
60
70
|
};
|
|
61
71
|
//# sourceMappingURL=block-sections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {
|
|
1
|
+
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings":";;;;;AASA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAR;AAEJ,MAAIS,IAAc,GACdC,IAAuB,IACvBC,IAAsB;AAEpB,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;AAAA,IACpC,MACEb,EAAO;AAAA,MACL,CAACc,GAAKC,OAEFA,EAAM,iBAAiBrB,KACvBqB,EAAM,iBAAiBpB,KACvBoB,EAAM,eAAexB,IAEjBuB,EAAA,WAAW,KAAKC,CAAK,IAErBD,EAAA,cAAc,KAAKC,CAAK,GAGvBD;AAAA,MAET,EAAE,YAAY,CAAA,GAAqB,eAAe,GAAoB;AAAA,IACxE;AAAA,IACF,CAACd,CAAM;AAAA,EAAA;AAIP,SAAA,gBAAAgB;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,aAAcL,EAAc,SAAqB,YAAZ;AAAA,MAErC,UAAA;AAAA,QAAA,gBAAAM,EAAC,SAAI,KAAKf,GACP,YAAW,IAAI,CAACgB,GAAWC,MAAQ;AAClC,gBAAM,EAAE,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