@cuemath/leap 3.2.15-beta-0.1 → 3.2.15-link.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +6 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/after-noon.js +34 -0
- package/dist/assets/line-icons/icons/after-noon.js.map +1 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js +42 -0
- package/dist/assets/line-icons/icons/apple-icon-white.js.map +1 -0
- package/dist/assets/line-icons/icons/evening.js +35 -0
- package/dist/assets/line-icons/icons/evening.js.map +1 -0
- package/dist/assets/line-icons/icons/morning.js +35 -0
- package/dist/assets/line-icons/icons/morning.js.map +1 -0
- package/dist/assets/line-icons/icons/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.js.map +1 -0
- package/dist/assets/lottie/lottie.js +11 -6
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +4 -6
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +8 -10
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js +9 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-constants.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +65 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +92 -0
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +18 -13
- 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-styled.js +12 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +1 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +34 -0
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js +22 -0
- package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +51 -0
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +44 -0
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -0
- package/dist/features/auth/comps/pill-button/pill-button.js +75 -0
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -0
- package/dist/features/auth/comps/resend-otp/resend-otp.js +54 -47
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +17 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +1 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +67 -0
- package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +1 -0
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +29 -17
- package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +22 -10
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
- package/dist/features/auth/comps/tabs/tabs.js +5 -5
- package/dist/features/auth/comps/tabs/tabs.js.map +1 -1
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +19 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +1 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +32 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +1 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +44 -0
- package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +1 -0
- package/dist/features/auth/signup-v2/signup-header/signup-header.js +54 -0
- package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +1 -0
- package/dist/features/auth/signup-v2/signup-options/signup-options.js +83 -0
- package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +9 -9
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +4 -7
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +97 -85
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +42 -44
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +50 -57
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +27 -33
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark.js +28 -29
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +2 -2
- 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/use-journey/journey-context-provider.js +72 -73
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +4 -6
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +30 -64
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js +60 -12
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +77 -72
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/image/image.js +1 -1
- package/dist/features/ui/image/image.js.map +1 -1
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +5 -5
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +43 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/nudge/nudge-styled.js +7 -14
- package/dist/features/ui/nudge/nudge-styled.js.map +1 -1
- package/dist/features/ui/nudge/nudge.js +12 -13
- package/dist/features/ui/nudge/nudge.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/button.js +78 -78
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +73 -75
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +25 -29
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
- 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 +207 -242
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
- 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 +313 -307
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +155 -105
- package/dist/index.js +536 -520
- package/dist/index.js.map +1 -1
- package/dist/static/animated-avatar.1ad58b1d.json +1 -0
- package/dist/static/animated-avatar.69b07505.json +1 -0
- package/dist/static/animated-avatar.9c560b46.json +1 -0
- package/dist/static/calendar-purple.1a840b41.svg +1 -0
- package/dist/static/flying-disk.c7f6ed39.json +1 -0
- package/dist/static/graduation-cap.3be3340a.json +1 -0
- package/dist/static/handshake.287e7dfb.svg +1 -0
- package/dist/static/light-bulb.c6db0b23.json +1 -0
- package/dist/static/money.332aacf1.svg +1 -0
- package/dist/static/muscle.9bcfb8a7.json +1 -0
- package/dist/static/nudge-tap.5cb30093.json +1057 -0
- package/dist/static/parent-avatar.822c7b9b.svg +1 -0
- package/dist/static/pencil.23df9da0.json +1 -0
- package/dist/static/plus-sign.de6af957.json +1 -0
- package/dist/static/racing-car.2cbf864e.json +1 -0
- package/dist/static/rocket.0a3ccab0.json +1 -0
- package/dist/static/shovel.abeec04c.json +1 -0
- package/dist/static/stripe-blurple.6abf422f.svg +1 -0
- package/dist/static/trustpilot.bd3d79e1.svg +1 -0
- package/package.json +2 -3
- package/dist/assets/line-icons/icons/hint-fill.js +0 -35
- package/dist/assets/line-icons/icons/hint-fill.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +0 -81
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app-view.js +0 -120
- package/dist/features/puzzles/app/puzzle-app-view.js.map +0 -1
- package/dist/features/puzzles/app/puzzle-app.js +0 -82
- package/dist/features/puzzles/app/puzzle-app.js.map +0 -1
- package/dist/features/puzzles/constants/puzzle-container.js +0 -8
- package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
- package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
- package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js +0 -6
- package/dist/features/ui/arrow-tooltip/arrow-tooltip-constants.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js +0 -63
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +0 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +0 -21
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.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/features/worksheet/worksheet/mocks/activity.js +0 -6
- package/dist/features/worksheet/worksheet/mocks/activity.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/chapter_assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/diagnostic.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/dynamic.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/extra_practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/index.js +0 -95
- package/dist/features/worksheet/worksheet/mocks/behaviors/index.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning-v3.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/learning.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/legacy.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/level2.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/level3.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js +0 -41
- package/dist/features/worksheet/worksheet/mocks/behaviors/mastery.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js +0 -41
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle-card.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_easy.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_hard.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/puzzle_medium.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/recap.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/remedial.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/revision.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat-math-assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_english_learning.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_learning.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js +0 -39
- package/dist/features/worksheet/worksheet/mocks/behaviors/sat_math_recap.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/target_practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic-v2.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/trial-diagnostic.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_assessment.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js +0 -38
- package/dist/features/worksheet/worksheet/mocks/behaviors/turing_practice.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js +0 -5
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +0 -57
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +0 -231
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js +0 -174
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +0 -255
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +0 -1
- package/dist/static/nudge-tap.0591aef4.json +0 -1
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
- package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
- package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
- package/dist/types/models/worksheet.js +0 -5
- package/dist/types/models/worksheet.js.map +0 -1
@@ -1,59 +0,0 @@
|
|
1
|
-
import { jsx as e } from "react/jsx-runtime";
|
2
|
-
import { useRef as c, useCallback as r, useMemo as f } from "react";
|
3
|
-
import y from "../../../ui/buttons/button/button.js";
|
4
|
-
import { JOURNEY_ID_TEACHER as h } from "../../journey-id/journey-id-teacher.js";
|
5
|
-
import { IndicatorType as C } from "../../use-journey/constants.js";
|
6
|
-
import { useJourney as T } from "../../use-journey/use-journey.js";
|
7
|
-
import b from "../use-home-page-journey/tooltip-item.js";
|
8
|
-
const L = () => {
|
9
|
-
const o = h.PUZZLE_UNASSIGN_JOURNEY, t = c(null), d = c([]), { setJourney: n, endJourney: i, nextCoachmark: s } = T(), a = r(() => {
|
10
|
-
s(o, !1, 0, !1);
|
11
|
-
}, [o, s]), l = r(() => {
|
12
|
-
document.body.style.overflow = "unset", i(o);
|
13
|
-
}, [i, o]), u = r(() => {
|
14
|
-
if (!(t != null && t.current))
|
15
|
-
return;
|
16
|
-
const p = [
|
17
|
-
{
|
18
|
-
originalElementToHighlightRef: t,
|
19
|
-
elementToHighlight: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(y, { widthX: 6, renderAs: "primary", size: "small", label: "Unassign" }) }),
|
20
|
-
type: C.TOOLTIP,
|
21
|
-
indicator: {
|
22
|
-
renderAs: "primary",
|
23
|
-
tooltipXCoOrdinates: -100,
|
24
|
-
arrowSize: 12,
|
25
|
-
arrowXCoOrdinates: 100,
|
26
|
-
position: "top",
|
27
|
-
backgroundColor: "PURPLE_4",
|
28
|
-
borderColor: "BLACK",
|
29
|
-
arrowColor: "BLACK",
|
30
|
-
tooltipItem: /* @__PURE__ */ e(
|
31
|
-
b,
|
32
|
-
{
|
33
|
-
text: "You can click here to unassign the puzzle.",
|
34
|
-
buttonLabel: "Got it",
|
35
|
-
onButtonClick: l
|
36
|
-
}
|
37
|
-
)
|
38
|
-
},
|
39
|
-
isActive: !1
|
40
|
-
}
|
41
|
-
];
|
42
|
-
n(o, p);
|
43
|
-
const m = setTimeout(() => {
|
44
|
-
clearTimeout(m), document.body.style.overflow = "hidden", a();
|
45
|
-
}, 500);
|
46
|
-
d.current.push(m);
|
47
|
-
}, [l, a, o, n]);
|
48
|
-
return f(
|
49
|
-
() => ({
|
50
|
-
puzzleUnassignRef: t,
|
51
|
-
startJourney: u
|
52
|
-
}),
|
53
|
-
[u]
|
54
|
-
);
|
55
|
-
};
|
56
|
-
export {
|
57
|
-
L as usePuzzleUnassignJourney
|
58
|
-
};
|
59
|
-
//# sourceMappingURL=use-puzzle-unassign-journey.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"use-puzzle-unassign-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nconst usePuzzleUnassignJourney = () => {\n const journeyId = JOURNEY_ID_TEACHER.PUZZLE_UNASSIGN_JOURNEY;\n\n const puzzleUnassignRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, endJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachMark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, false);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(() => {\n if (!puzzleUnassignRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleUnassignRef,\n elementToHighlight: (\n <div>\n <Button widthX={6} renderAs=\"primary\" size=\"small\" label=\"Unassign\" />\n </div>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: -100,\n arrowSize: 12,\n arrowXCoOrdinates: 100,\n position: 'top',\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text=\"You can click here to unassign the puzzle.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, puzzleAttemptSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachMark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [handleEndJourney, handleNextCoachMark, journeyId, setJourney]);\n\n const data = useMemo(\n () => ({\n puzzleUnassignRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { usePuzzleUnassignJourney };\n"],"names":["usePuzzleUnassignJourney","journeyId","JOURNEY_ID_TEACHER","puzzleUnassignRef","useRef","timerRefs","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","startJourney","puzzleAttemptSteps","jsx","Button","IndicatorType","TooltipItem","delayBeforeStart","useMemo"],"mappings":";;;;;;;AAWA,MAAMA,IAA2B,MAAM;AACrC,QAAMC,IAAYC,EAAmB,yBAE/BC,IAAoBC,EAAuB,IAAI,GAC/CC,IAAYD,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAE,GAAY,YAAAC,GAAY,eAAAC,MAAkBC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAH,EAAAP,GAAW,IAAO,GAAG,EAAK;AAAA,EAAA,GACvC,CAACA,GAAWO,CAAa,CAAC,GAEvBI,IAAmBD,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAC/BJ,EAAWN,CAAS;AAAA,EAAA,GACnB,CAACM,GAAYN,CAAS,CAAC,GAEpBY,IAAeF,EAAY,MAAM;AACjC,QAAA,EAACR,KAAA,QAAAA,EAAmB;AACtB;AAGF,UAAMW,IAAwC;AAAA,MAC5C;AAAA,QACE,+BAA+BX;AAAA,QAC/B,oBACE,gBAAAY,EAAC,OACC,EAAA,UAAA,gBAAAA,EAACC,GAAO,EAAA,QAAQ,GAAG,UAAS,WAAU,MAAK,SAAQ,OAAM,WAAW,CAAA,GACtE;AAAA,QAEF,MAAMC,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,UAAU;AAAA,UACV,qBAAqB;AAAA,UACrB,WAAW;AAAA,UACX,mBAAmB;AAAA,UACnB,UAAU;AAAA,UACV,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,aACE,gBAAAF;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,aAAY;AAAA,cACZ,eAAeN;AAAA,YAAA;AAAA,UACjB;AAAA,QAEJ;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IAAA;AAGF,IAAAN,EAAWL,GAAWa,CAAkB;AAElC,UAAAK,IAAmB,WAAW,MAAM;AACxC,mBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UACXT;OACnB,GAAG;AAEI,IAAAL,EAAA,QAAQ,KAAKc,CAAgB;AAAA,KACtC,CAACP,GAAkBF,GAAqBT,GAAWK,CAAU,CAAC;AAU1D,SARMc;AAAA,IACX,OAAO;AAAA,MACL,mBAAAjB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
|
package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js
DELETED
@@ -1,70 +0,0 @@
|
|
1
|
-
import { jsx as t } from "react/jsx-runtime";
|
2
|
-
import { useRef as u, useCallback as r, useMemo as p } from "react";
|
3
|
-
import h from "../../../ui/layout/flex-view.js";
|
4
|
-
import y from "../../../ui/text/text.js";
|
5
|
-
import { JOURNEY_ID_TEACHER as C } from "../../journey-id/journey-id-teacher.js";
|
6
|
-
import { IndicatorType as T } from "../../use-journey/constants.js";
|
7
|
-
import { useJourney as g } from "../../use-journey/use-journey.js";
|
8
|
-
import E from "../use-home-page-journey/tooltip-item.js";
|
9
|
-
const $ = () => {
|
10
|
-
const e = C.PUZZLE_ASSIGN_JOURNEY, o = u(null), d = u([]), { setJourney: n, endJourney: i, nextCoachmark: s } = g(), l = r(() => {
|
11
|
-
s(e, !1, 0, !1);
|
12
|
-
}, [e, s]), a = r(() => {
|
13
|
-
document.body.style.overflow = "unset", i(e);
|
14
|
-
}, [i, e]), c = r(() => {
|
15
|
-
if (!(o != null && o.current))
|
16
|
-
return;
|
17
|
-
const f = [
|
18
|
-
{
|
19
|
-
originalElementToHighlightRef: o,
|
20
|
-
elementToHighlight: /* @__PURE__ */ t(
|
21
|
-
h,
|
22
|
-
{
|
23
|
-
$widthX: 2.75,
|
24
|
-
$flexDirection: "row",
|
25
|
-
$background: "WHITE",
|
26
|
-
$justifyContent: "center",
|
27
|
-
$alignItems: "center",
|
28
|
-
children: /* @__PURE__ */ t(y, { $renderAs: "ub2", children: "Home" })
|
29
|
-
}
|
30
|
-
),
|
31
|
-
type: T.TOOLTIP,
|
32
|
-
indicator: {
|
33
|
-
renderAs: "primary",
|
34
|
-
tooltipXCoOrdinates: 100,
|
35
|
-
arrowSize: 12,
|
36
|
-
arrowXCoOrdinates: -100,
|
37
|
-
position: "bottom",
|
38
|
-
backgroundColor: "GREEN_4",
|
39
|
-
borderColor: "BLACK",
|
40
|
-
arrowColor: "BLACK",
|
41
|
-
tooltipItem: /* @__PURE__ */ t(
|
42
|
-
E,
|
43
|
-
{
|
44
|
-
text: "Puzzle assigned as homework. Discuss it in the next class.",
|
45
|
-
buttonLabel: "Got it",
|
46
|
-
onButtonClick: a
|
47
|
-
}
|
48
|
-
)
|
49
|
-
},
|
50
|
-
isActive: !1
|
51
|
-
}
|
52
|
-
];
|
53
|
-
n(e, f);
|
54
|
-
const m = setTimeout(() => {
|
55
|
-
clearTimeout(m), document.body.style.overflow = "hidden", l();
|
56
|
-
}, 500);
|
57
|
-
d.current.push(m);
|
58
|
-
}, [a, l, e, n]);
|
59
|
-
return p(
|
60
|
-
() => ({
|
61
|
-
puzzleHomeTabRef: o,
|
62
|
-
startJourney: c
|
63
|
-
}),
|
64
|
-
[c]
|
65
|
-
);
|
66
|
-
};
|
67
|
-
export {
|
68
|
-
$ as useTeacherPuzzleAssignedJourney
|
69
|
-
};
|
70
|
-
//# sourceMappingURL=use-teacher-puzzle-assigned-journey.js.map
|
package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"use-teacher-puzzle-assigned-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nconst useTeacherPuzzleAssignedJourney = () => {\n const journeyId = JOURNEY_ID_TEACHER.PUZZLE_ASSIGN_JOURNEY;\n\n const puzzleHomeTabRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, endJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachMark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, false);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(() => {\n if (!puzzleHomeTabRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleHomeTabRef,\n elementToHighlight: (\n <FlexView\n $widthX={2.75}\n $flexDirection=\"row\"\n $background=\"WHITE\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub2\">Home</Text>\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: 100,\n arrowSize: 12,\n arrowXCoOrdinates: -100,\n position: 'bottom',\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text=\"Puzzle assigned as homework. Discuss it in the next class.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, puzzleAttemptSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachMark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [handleEndJourney, handleNextCoachMark, journeyId, setJourney]);\n\n const data = useMemo(\n () => ({\n puzzleHomeTabRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useTeacherPuzzleAssignedJourney };\n"],"names":["useTeacherPuzzleAssignedJourney","journeyId","JOURNEY_ID_TEACHER","puzzleHomeTabRef","useRef","timerRefs","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","startJourney","puzzleAttemptSteps","jsx","FlexView","Text","IndicatorType","TooltipItem","delayBeforeStart","useMemo"],"mappings":";;;;;;;;AAYA,MAAMA,IAAkC,MAAM;AAC5C,QAAMC,IAAYC,EAAmB,uBAE/BC,IAAmBC,EAAuB,IAAI,GAC9CC,IAAYD,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAE,GAAY,YAAAC,GAAY,eAAAC,MAAkBC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAH,EAAAP,GAAW,IAA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AA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
import { createGetAPI as s } from "@cuemath/rest-api";
|
2
|
-
import { BASE_URL_V3 as r } from "../../../constants/api.js";
|
3
|
-
const { useGet: a, invalidate: z } = s({
|
4
|
-
getURL: (e, o, { courseStream: t }) => `${r}/users/${e}/course-streams/${t}/puzzles-history/`
|
5
|
-
});
|
6
|
-
export {
|
7
|
-
z as invalidateGetPuzzles,
|
8
|
-
a as useGetPuzzles
|
9
|
-
};
|
10
|
-
//# sourceMappingURL=puzzle-dashboard.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-dashboard.js","sources":["../../../../src/features/puzzles/api/puzzle-dashboard.ts"],"sourcesContent":["import type { TCourseStream } from '../../milestone/create/milestone-create-types';\nimport type { IPuzzleCardAssignData } from '../puzzle-container/puzzle-container-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../constants/api';\n\nconst { useGet: useGetPuzzles, invalidate: invalidateGetPuzzles } = createGetAPI<\n IPuzzleCardAssignData[],\n void,\n { courseStream: TCourseStream }\n>({\n getURL: (studentId, _, { courseStream }) =>\n `${BASE_URL_V3}/users/${studentId}/course-streams/${courseStream}/puzzles-history/`,\n});\n\nexport { useGetPuzzles, invalidateGetPuzzles };\n"],"names":["useGetPuzzles","invalidateGetPuzzles","createGetAPI","studentId","_","courseStream","BASE_URL_V3"],"mappings":";;AAOA,MAAM,EAAE,QAAQA,GAAe,YAAYC,EAAA,IAAyBC,EAIlE;AAAA,EACA,QAAQ,CAACC,GAAWC,GAAG,EAAE,cAAAC,EAAA,MACvB,GAAGC,CAAW,UAAUH,CAAS,mBAAmBE,CAAY;AACpE,CAAC;"}
|
@@ -1,81 +0,0 @@
|
|
1
|
-
import o from "styled-components";
|
2
|
-
import n from "../../../assets/line-icons/icons/hint-fill.js";
|
3
|
-
import l from "../../ui/layout/flex-view.js";
|
4
|
-
import r from "../../ui/text/text.js";
|
5
|
-
import { getPuzzleCardPattern as p } from "../utils/puzzle-pattern.js";
|
6
|
-
const d = o(l)(({ theme: t, $visible: i }) => {
|
7
|
-
const { gutter: e } = t.layout;
|
8
|
-
return i ? `
|
9
|
-
overflow: scroll;
|
10
|
-
padding-top: ${e * 1.5}px;
|
11
|
-
padding-bottom: ${e * 2}px;
|
12
|
-
` : "";
|
13
|
-
}), g = o(l)`
|
14
|
-
position: relative;
|
15
|
-
margin: 0 auto;
|
16
|
-
box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: i }) => t.colors[`${i}_4`]};
|
17
|
-
max-width: 343px;
|
18
|
-
width: 100%;
|
19
|
-
min-height: max-content;
|
20
|
-
|
21
|
-
&::before {
|
22
|
-
content: '';
|
23
|
-
position: absolute;
|
24
|
-
top: 0;
|
25
|
-
left: 0;
|
26
|
-
right: 0;
|
27
|
-
bottom: 0;
|
28
|
-
background-image: ${({ $imageHue: t }) => `url(${p(t)})`};
|
29
|
-
background-size: cover;
|
30
|
-
opacity: 0.2;
|
31
|
-
}
|
32
|
-
`, x = o(n)`
|
33
|
-
color: ${({ theme: t }) => t.colors.BLACK_1};
|
34
|
-
|
35
|
-
& .hint-fill-icon-path {
|
36
|
-
fill: ${({ theme: t }) => t.colors.WHITE_1};
|
37
|
-
}
|
38
|
-
`, u = o(r)`
|
39
|
-
& span {
|
40
|
-
font-weight: 700;
|
41
|
-
margin-right: 4px;
|
42
|
-
}
|
43
|
-
`, h = o.div`
|
44
|
-
color: ${({ theme: t }) => t.colors.BLACK};
|
45
|
-
font-size: 14px;
|
46
|
-
line-height: 1.2;
|
47
|
-
font-family: 'Athletics';
|
48
|
-
|
49
|
-
font-weight: 400;
|
50
|
-
font-style: normal;
|
51
|
-
|
52
|
-
em {
|
53
|
-
font-style: italic;
|
54
|
-
}
|
55
|
-
|
56
|
-
ul,
|
57
|
-
ol {
|
58
|
-
list-style-type: initial;
|
59
|
-
padding-left: 32px;
|
60
|
-
}
|
61
|
-
|
62
|
-
ol {
|
63
|
-
list-style-type: decimal;
|
64
|
-
}
|
65
|
-
|
66
|
-
p {
|
67
|
-
margin: 0;
|
68
|
-
}
|
69
|
-
|
70
|
-
li {
|
71
|
-
margin: 4px 0;
|
72
|
-
}
|
73
|
-
`;
|
74
|
-
export {
|
75
|
-
d as PuzzleAppWrapper,
|
76
|
-
g as PuzzleContainer,
|
77
|
-
h as PuzzleQuestionWrapper,
|
78
|
-
u as StyledFeedbackText,
|
79
|
-
x as StyledHintFillIcon
|
80
|
-
};
|
81
|
-
//# sourceMappingURL=puzzle-app-styled.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-app-styled.js","sources":["../../../../src/features/puzzles/app/puzzle-app-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport HintFillIcon from '../../../assets/line-icons/icons/hint-fill';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\nconst PuzzleAppWrapper = styled(FlexView)<{ $visible: boolean }>(({ theme, $visible }) => {\n const { gutter } = theme.layout;\n\n if (!$visible) {\n return ``;\n }\n\n return `\n overflow: scroll;\n padding-top: ${gutter * 1.5}px;\n padding-bottom: ${gutter * 2}px;\n `;\n});\n\nconst PuzzleContainer = styled(FlexView)<{ $imageHue: THueNames; $backgroundOpacity?: number }>`\n position: relative;\n margin: 0 auto;\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n max-width: 343px;\n width: 100%;\n min-height: max-content;\n\n &::before {\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n opacity: 0.2;\n }\n`;\n\nconst StyledHintFillIcon = styled(HintFillIcon)`\n color: ${({ theme }) => theme.colors.BLACK_1};\n\n & .hint-fill-icon-path {\n fill: ${({ theme }) => theme.colors.WHITE_1};\n }\n`;\n\nconst StyledFeedbackText = styled(Text)`\n & span {\n font-weight: 700;\n margin-right: 4px;\n }\n`;\n\nconst PuzzleQuestionWrapper = styled.div`\n color: ${({ theme }) => theme.colors.BLACK};\n font-size: 14px;\n line-height: 1.2;\n font-family: 'Athletics';\n\n font-weight: 400;\n font-style: normal;\n\n em {\n font-style: italic;\n }\n\n ul,\n ol {\n list-style-type: initial;\n padding-left: 32px;\n }\n\n ol {\n list-style-type: decimal;\n }\n\n p {\n margin: 0;\n }\n\n li {\n margin: 4px 0;\n }\n`;\n\nexport {\n PuzzleAppWrapper,\n PuzzleContainer,\n StyledFeedbackText,\n StyledHintFillIcon,\n PuzzleQuestionWrapper,\n};\n"],"names":["PuzzleAppWrapper","styled","FlexView","theme","$visible","gutter","PuzzleContainer","$imageHue","getPuzzleCardPattern","StyledHintFillIcon","HintFillIcon","StyledFeedbackText","Text","PuzzleQuestionWrapper"],"mappings":";;;;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAyB,CAAC,EAAE,OAAAC,GAAO,UAAAC,QAAe;AAClF,QAAA,EAAE,QAAAC,EAAO,IAAIF,EAAM;AAEzB,SAAKC,IAIE;AAAA;AAAA,mBAEUC,IAAS,GAAG;AAAA,sBACTA,IAAS,CAAC;AAAA,MANrB;AAQX,CAAC,GAEKC,IAAkBL,EAAOC,CAAQ;AAAA;AAAA;AAAA,sCAGD,CAAC,EAAE,OAAAC,GAAO,WAAAI,QAAgBJ,EAAM,OAAO,GAAGI,CAAS,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAYtE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA;AAAA,GAM9EE,IAAqBR,EAAOS,CAAY;AAAA,WACnC,CAAC,EAAE,OAAAP,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,YAGlC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAIzCQ,IAAqBV,EAAOW,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA,GAOhCC,IAAwBZ,EAAO;AAAA,WAC1B,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,120 +0,0 @@
|
|
1
|
-
import { jsxs as y, jsx as a } from "react/jsx-runtime";
|
2
|
-
import { memo as A, useRef as S, useCallback as _, useEffect as l, useMemo as $ } from "react";
|
3
|
-
import H from "../../ui/image/image.js";
|
4
|
-
import M from "../../ui/layout/flex-view.js";
|
5
|
-
import x from "../../ui/separator/separator.js";
|
6
|
-
import d from "../../worksheet/constants/events.js";
|
7
|
-
import N from "../../worksheet/worksheet/hooks/use-learnosity.js";
|
8
|
-
import Q from "../../worksheet/worksheet/hooks/use-worksheet-data-helper.js";
|
9
|
-
import { getQuestionsFromItems as V } from "../../worksheet/worksheet/worksheet-helpers.js";
|
10
|
-
import { PuzzleQuestionWrapper as P, PuzzleContainer as R } from "./puzzle-app-styled.js";
|
11
|
-
const F = (u) => {
|
12
|
-
if (!u) return null;
|
13
|
-
const t = u.match(/<img[^>]+src="([^">]+)"/);
|
14
|
-
return t ? t[1] : null;
|
15
|
-
}, L = ({
|
16
|
-
worksheetData: u,
|
17
|
-
loggerRef: t,
|
18
|
-
onWorksheetErrored: n,
|
19
|
-
imageHue: I,
|
20
|
-
onLoaded: p
|
21
|
-
}) => {
|
22
|
-
const { signed_request: g, questions_signed_request: w } = u, z = S(null), {
|
23
|
-
loadingState: i,
|
24
|
-
data: o,
|
25
|
-
error: f
|
26
|
-
} = Q({
|
27
|
-
attemptId: void 0,
|
28
|
-
signedRequest: g,
|
29
|
-
loggerRef: t
|
30
|
-
}), E = _(
|
31
|
-
(s) => {
|
32
|
-
n({
|
33
|
-
code: s.code,
|
34
|
-
message: s.detail
|
35
|
-
});
|
36
|
-
},
|
37
|
-
[n]
|
38
|
-
), { learnosity: r } = N(w, E, t);
|
39
|
-
l(() => {
|
40
|
-
i === "error" && n({
|
41
|
-
message: f ?? "Error loading worksheet"
|
42
|
-
});
|
43
|
-
}, [i, n, f]), l(() => {
|
44
|
-
r && t.current(d.WORKSHEET_V3_LEARNOSITY_INITIALIZED);
|
45
|
-
}, [r, t]), l(() => {
|
46
|
-
r && i === "success" && p && (t.current(d.WORKSHEET_V3_READY), p());
|
47
|
-
}, [r, i, t, p]);
|
48
|
-
const m = $(() => i === "success" && (o != null && o.learnosityItems) ? (t.current(d.WORKSHEET_V3_READY), V(o.learnosityItems, {
|
49
|
-
sectioned: !1,
|
50
|
-
adaptive: !1
|
51
|
-
}).map((e) => ({
|
52
|
-
response_id: e.response_id,
|
53
|
-
type: e.type,
|
54
|
-
stimulus: e.stimulus,
|
55
|
-
template: e.template,
|
56
|
-
stimulus_review: e.stimulus_review,
|
57
|
-
options: e.options,
|
58
|
-
metadata: e.metadata,
|
59
|
-
validation: e.validation
|
60
|
-
// Add other properties as needed
|
61
|
-
}))) : [], [i, o, t]);
|
62
|
-
l(() => {
|
63
|
-
if (r && m.length > 0) {
|
64
|
-
const c = requestAnimationFrame(() => {
|
65
|
-
try {
|
66
|
-
r.renderMath("mathjax");
|
67
|
-
} catch (e) {
|
68
|
-
n({
|
69
|
-
message: `MathJax rendering failed: ${e instanceof Error ? e.message : "Unknown error"}`
|
70
|
-
});
|
71
|
-
}
|
72
|
-
});
|
73
|
-
return () => {
|
74
|
-
cancelAnimationFrame(c);
|
75
|
-
};
|
76
|
-
}
|
77
|
-
}, [r, n, m]);
|
78
|
-
const T = _((s) => {
|
79
|
-
const { stimulus: c = "", template: e = "", response_id: v } = s, h = F(c);
|
80
|
-
return /* @__PURE__ */ y(
|
81
|
-
M,
|
82
|
-
{
|
83
|
-
$background: "TRANSPARENT",
|
84
|
-
$alignItems: "center",
|
85
|
-
className: "puzzle-app-view-question-card",
|
86
|
-
children: [
|
87
|
-
h && /* @__PURE__ */ a(
|
88
|
-
H,
|
89
|
-
{
|
90
|
-
src: h,
|
91
|
-
alt: "Puzzle illustration",
|
92
|
-
width: 183,
|
93
|
-
height: 183,
|
94
|
-
withLoader: !0
|
95
|
-
}
|
96
|
-
),
|
97
|
-
/* @__PURE__ */ a(x, { heightX: 1 }),
|
98
|
-
e && /* @__PURE__ */ a(P, { children: /* @__PURE__ */ a("div", { dangerouslySetInnerHTML: { __html: e } }) })
|
99
|
-
]
|
100
|
-
},
|
101
|
-
v
|
102
|
-
);
|
103
|
-
}, []);
|
104
|
-
return m.length ? /* @__PURE__ */ a(
|
105
|
-
R,
|
106
|
-
{
|
107
|
-
ref: z,
|
108
|
-
$gapX: 1,
|
109
|
-
$gutterX: 1,
|
110
|
-
$imageHue: I,
|
111
|
-
$background: "WHITE_1",
|
112
|
-
className: "puzzle-app-view-container",
|
113
|
-
children: m.map((s) => /* @__PURE__ */ a("div", { children: T(s) }, `question-${s.response_id}`))
|
114
|
-
}
|
115
|
-
) : null;
|
116
|
-
}, U = A(L);
|
117
|
-
export {
|
118
|
-
U as default
|
119
|
-
};
|
120
|
-
//# sourceMappingURL=puzzle-app-view.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-app-view.js","sources":["../../../../src/features/puzzles/app/puzzle-app-view.tsx"],"sourcesContent":["import type {\n ILearnosityError,\n ILearnosityQuestion,\n} from '../../worksheet/worksheet/worksheet-types';\nimport type { IPuzzleAppViewProps } from './puzzle-app-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport EVENTS from '../../worksheet/constants/events';\nimport useLearnosity from '../../worksheet/worksheet/hooks/use-learnosity';\nimport useWorksheetDataHelper from '../../worksheet/worksheet/hooks/use-worksheet-data-helper';\nimport { getQuestionsFromItems } from '../../worksheet/worksheet/worksheet-helpers';\nimport * as Styled from './puzzle-app-styled';\n\nconst extractImageFromHTML = (htmlString: string) => {\n if (!htmlString) return null;\n\n const imgMatch = htmlString.match(/<img[^>]+src=\"([^\">]+)\"/);\n\n return imgMatch ? imgMatch[1] : null;\n};\n\nconst PuzzleAppView: FC<IPuzzleAppViewProps> = ({\n worksheetData,\n loggerRef,\n onWorksheetErrored,\n imageHue,\n onLoaded,\n}) => {\n const { signed_request: itemsSignedRequest, questions_signed_request: questionSignedRequest } =\n worksheetData;\n\n // Ref for the container to trigger MathJax rendering\n const containerRef = useRef<HTMLDivElement>(null);\n\n // Get Learnosity items using the signed_request (not questions_signed_request)\n const {\n loadingState,\n data: learnosityData,\n error: worksheetError,\n } = useWorksheetDataHelper({\n attemptId: undefined,\n signedRequest: itemsSignedRequest,\n loggerRef,\n });\n\n const onLearnosityErrored = useCallback(\n (err: ILearnosityError) => {\n onWorksheetErrored({\n code: err.code,\n message: err.detail,\n });\n },\n [onWorksheetErrored],\n );\n\n // Initialize Learnosity using questions_signed_request (needed for interactive questions)\n const { learnosity } = useLearnosity(questionSignedRequest, onLearnosityErrored, loggerRef);\n\n useEffect(() => {\n if (loadingState === 'error') {\n onWorksheetErrored({\n message: worksheetError ?? 'Error loading worksheet',\n });\n }\n }, [loadingState, onWorksheetErrored, worksheetError]);\n\n // Log when learnosity is ready for future interactive features\n useEffect(() => {\n if (learnosity) {\n loggerRef.current(EVENTS.WORKSHEET_V3_LEARNOSITY_INITIALIZED);\n }\n }, [learnosity, loggerRef]);\n\n useEffect(() => {\n if (learnosity && loadingState === 'success' && onLoaded) {\n loggerRef.current(EVENTS.WORKSHEET_V3_READY);\n onLoaded();\n }\n }, [learnosity, loadingState, loggerRef, onLoaded]);\n\n // Memoize questions processing to prevent re-render loops\n const questions = useMemo(() => {\n // Extract questions from Learnosity items when data is loaded successfully\n if (loadingState === 'success' && learnosityData?.learnosityItems) {\n loggerRef.current(EVENTS.WORKSHEET_V3_READY);\n\n // Convert learnosityItems to questions using the worksheet helper\n const worksheetQuestions = getQuestionsFromItems(learnosityData.learnosityItems, {\n sectioned: false,\n adaptive: false,\n });\n\n // Extract just the Learnosity questions from worksheet questions\n const learnosityQuestions: ILearnosityQuestion[] = worksheetQuestions.map(q => ({\n response_id: q.response_id,\n type: q.type,\n stimulus: q.stimulus,\n template: q.template,\n stimulus_review: q.stimulus_review,\n options: q.options,\n metadata: q.metadata,\n validation: q.validation,\n // Add other properties as needed\n }));\n\n return learnosityQuestions;\n }\n\n return [];\n }, [loadingState, learnosityData, loggerRef]);\n\n // Force MathJax rendering after questions are loaded and rendered\n // Similar to how useLearnosityAppend does it\n useEffect(() => {\n if (learnosity && questions.length > 0) {\n // Use requestAnimationFrame to ensure DOM is updated before rendering math\n const renderMath = () => {\n try {\n learnosity.renderMath('mathjax');\n } catch (error) {\n onWorksheetErrored({\n message: `MathJax rendering failed: ${\n error instanceof Error ? error.message : 'Unknown error'\n }`,\n });\n }\n };\n\n const animationId = requestAnimationFrame(renderMath);\n\n return () => {\n cancelAnimationFrame(animationId);\n };\n }\n }, [learnosity, onWorksheetErrored, questions]);\n\n const renderQuestionContent = useCallback((question: ILearnosityQuestion) => {\n const { stimulus = '', template = '', response_id: responseId } = question;\n const imageUrl = extractImageFromHTML(stimulus);\n\n return (\n <FlexView\n $background=\"TRANSPARENT\"\n key={responseId}\n $alignItems=\"center\"\n className=\"puzzle-app-view-question-card\"\n >\n {/* Main Image or Interactive Content */}\n {imageUrl && (\n <Image\n src={imageUrl}\n alt=\"Puzzle illustration\"\n width={183}\n height={183}\n withLoader={true}\n />\n )}\n\n <Separator heightX={1} />\n\n {/* Question HTML Content */}\n {template && (\n <Styled.PuzzleQuestionWrapper>\n <div dangerouslySetInnerHTML={{ __html: template }} />\n </Styled.PuzzleQuestionWrapper>\n )}\n </FlexView>\n );\n }, []);\n\n if (!questions.length) return null;\n\n return (\n <Styled.PuzzleContainer\n ref={containerRef}\n $gapX={1}\n $gutterX={1}\n $imageHue={imageHue}\n $background=\"WHITE_1\"\n className=\"puzzle-app-view-container\"\n >\n {questions.map(question => (\n <div key={`question-${question.response_id}`}>{renderQuestionContent(question)}</div>\n ))}\n </Styled.PuzzleContainer>\n );\n};\n\nexport default memo(PuzzleAppView);\n"],"names":["extractImageFromHTML","htmlString","imgMatch","PuzzleAppView","worksheetData","loggerRef","onWorksheetErrored","imageHue","onLoaded","itemsSignedRequest","questionSignedRequest","containerRef","useRef","loadingState","learnosityData","worksheetError","useWorksheetDataHelper","onLearnosityErrored","useCallback","err","learnosity","useLearnosity","useEffect","EVENTS","questions","useMemo","getQuestionsFromItems","q","animationId","error","renderQuestionContent","question","stimulus","template","responseId","imageUrl","jsxs","FlexView","jsx","Image","Separator","Styled.PuzzleQuestionWrapper","Styled.PuzzleContainer","PuzzleAppView$1","memo"],"mappings":";;;;;;;;;;AAkBA,MAAMA,IAAuB,CAACC,MAAuB;AAC/C,MAAA,CAACA,EAAmB,QAAA;AAElB,QAAAC,IAAWD,EAAW,MAAM,yBAAyB;AAEpD,SAAAC,IAAWA,EAAS,CAAC,IAAI;AAClC,GAEMC,IAAyC,CAAC;AAAA,EAC9C,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACJ,QAAM,EAAE,gBAAgBC,GAAoB,0BAA0BC,MACpEN,GAGIO,IAAeC,EAAuB,IAAI,GAG1C;AAAA,IACJ,cAAAC;AAAA,IACA,MAAMC;AAAA,IACN,OAAOC;AAAA,MACLC,EAAuB;AAAA,IACzB,WAAW;AAAA,IACX,eAAeP;AAAA,IACf,WA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bO,MAAA,gBAAAO,EAAC,OAA8C,EAAA,UAAAR,EAAsBC,CAAQ,EAAA,GAAnE,YAAYA,EAAS,WAAW,EAAqC,CAChF;AAAA,IAAA;AAAA,EAAA,IAbyB;AAgBhC,GAEeY,IAAAC,EAAKzC,CAAa;"}
|
@@ -1,82 +0,0 @@
|
|
1
|
-
import { jsx as e, jsxs as s, Fragment as z } from "react/jsx-runtime";
|
2
|
-
import { memo as S, useState as p, useRef as v, useCallback as a, useEffect as x } from "react";
|
3
|
-
import { ErrorBoundary as T } from "react-error-boundary";
|
4
|
-
import f from "../../ui/error/error.js";
|
5
|
-
import g from "../../ui/layout/flex-view.js";
|
6
|
-
import W from "../../ui/loader/app-loader/app-loader.js";
|
7
|
-
import u from "../../ui/text/text.js";
|
8
|
-
import _ from "../../worksheet/learnosity-preloader/learnosity-preloader.js";
|
9
|
-
import { usePreviewWorksheetGet as U } from "../../worksheet/worksheet-preview/api/get-preview-worksheet.js";
|
10
|
-
import { LEARNOSITY_QUESTIONS_API as y, LEARNOSITY_QUESTIONS_API_FALLBACK as C } from "../../worksheet/worksheet/stories/worksheet-story-container.js";
|
11
|
-
import { PuzzleAppWrapper as F, StyledFeedbackText as N, StyledHintFillIcon as O } from "./puzzle-app-styled.js";
|
12
|
-
import B from "./puzzle-app-view.js";
|
13
|
-
const D = (r) => {
|
14
|
-
console.log("Worksheet Logger:", r);
|
15
|
-
}, G = () => {
|
16
|
-
const r = new URLSearchParams(window.location.search), t = r.get("itemRef") || "", k = r.get("title") || "", l = r.get("imageHue") || "BLUE", c = r.get("feedbackComments") || void 0, A = r.get("tip") || void 0, [$, m] = p(), [o, b] = p(!1), { isProcessing: E, get: d, data: h, error: L } = U(), w = v(() => null), R = A || "Celebrate persistence more than correct answers - it's a life skill worth building.", n = a(() => {
|
17
|
-
d("test", {
|
18
|
-
action: "review",
|
19
|
-
node_type: "PUZZLE_CARD",
|
20
|
-
items: [t]
|
21
|
-
});
|
22
|
-
}, [d, t]);
|
23
|
-
x(() => {
|
24
|
-
n();
|
25
|
-
}, [n]);
|
26
|
-
const P = a((i) => {
|
27
|
-
m(i.message);
|
28
|
-
}, []), I = a(() => {
|
29
|
-
b(!0);
|
30
|
-
}, []);
|
31
|
-
return t ? $ || L ? /* @__PURE__ */ e(f, { height: "100vh", onTryAgain: n }) : E ? /* @__PURE__ */ e(W, { height: "100vh" }) : /* @__PURE__ */ e(
|
32
|
-
T,
|
33
|
-
{
|
34
|
-
fallback: /* @__PURE__ */ e(f, { height: "100vh" }),
|
35
|
-
onError: (i) => m(i.message),
|
36
|
-
children: /* @__PURE__ */ e(
|
37
|
-
_,
|
38
|
-
{
|
39
|
-
apiURL: y,
|
40
|
-
fallbackAPIURL: C,
|
41
|
-
logger: D,
|
42
|
-
children: /* @__PURE__ */ s(
|
43
|
-
F,
|
44
|
-
{
|
45
|
-
className: "puzzle-app-container",
|
46
|
-
$background: `${l}_2`,
|
47
|
-
$alignItems: "center",
|
48
|
-
$flexGapX: 1,
|
49
|
-
$gutterX: 1,
|
50
|
-
$visible: o,
|
51
|
-
$height: "100vh",
|
52
|
-
children: [
|
53
|
-
o && /* @__PURE__ */ e(u, { $renderAs: "ab1-bold", children: k }),
|
54
|
-
h && /* @__PURE__ */ e(
|
55
|
-
B,
|
56
|
-
{
|
57
|
-
onWorksheetErrored: P,
|
58
|
-
worksheetData: h,
|
59
|
-
loggerRef: w,
|
60
|
-
imageHue: l,
|
61
|
-
onLoaded: I
|
62
|
-
}
|
63
|
-
),
|
64
|
-
o && /* @__PURE__ */ e(z, { children: c ? /* @__PURE__ */ s(N, { $renderAs: "ab2", children: [
|
65
|
-
/* @__PURE__ */ e("span", { children: "Tutor Remark:" }),
|
66
|
-
c
|
67
|
-
] }) : /* @__PURE__ */ s(g, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
|
68
|
-
/* @__PURE__ */ e(g, { $width: 24, $height: 24, children: /* @__PURE__ */ e(O, {}) }),
|
69
|
-
/* @__PURE__ */ e(u, { $renderAs: "ab2", children: R })
|
70
|
-
] }) })
|
71
|
-
]
|
72
|
-
}
|
73
|
-
)
|
74
|
-
}
|
75
|
-
)
|
76
|
-
}
|
77
|
-
) : null;
|
78
|
-
}, re = S(G);
|
79
|
-
export {
|
80
|
-
re as default
|
81
|
-
};
|
82
|
-
//# sourceMappingURL=puzzle-app.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-app.js","sources":["../../../../src/features/puzzles/app/puzzle-app.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useRef, useState } from 'react';\nimport { ErrorBoundary } from 'react-error-boundary';\n\nimport Error from '../../ui/error/error';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport LearnosityPreloader from '../../worksheet/learnosity-preloader/learnosity-preloader';\nimport { usePreviewWorksheetGet } from '../../worksheet/worksheet-preview/api/get-preview-worksheet';\nimport {\n LEARNOSITY_QUESTIONS_API,\n LEARNOSITY_QUESTIONS_API_FALLBACK,\n} from '../../worksheet/worksheet/stories/worksheet-story-container';\nimport * as Styled from './puzzle-app-styled';\nimport PuzzleAppView from './puzzle-app-view';\n\nconst logger = (eventName: string) => {\n // eslint-disable-next-line no-console\n console.log('Worksheet Logger:', eventName);\n};\n\nconst PuzzleApp: FC = () => {\n // Extract props from URL search parameters\n const urlParams = new URLSearchParams(window.location.search);\n const itemRef = urlParams.get('itemRef') || '';\n const title = urlParams.get('title') || '';\n const imageHue = (urlParams.get('imageHue') || 'BLUE') as THueNames;\n const feedbackComments = urlParams.get('feedbackComments') || undefined;\n const tip = urlParams.get('tip') || undefined;\n\n const [error, setError] = useState<string>();\n const [worksheetRendered, setWorksheetRendered] = useState<boolean>(false);\n\n const { isProcessing, get, data: worksheetData, error: fetchError } = usePreviewWorksheetGet();\n const loggerRef = useRef(() => null);\n\n const tipInfo =\n tip || `Celebrate persistence more than correct answers - it's a life skill worth building.`;\n\n const fetchWorksheet = useCallback(() => {\n get('test', {\n action: 'review',\n node_type: 'PUZZLE_CARD',\n items: [itemRef],\n });\n }, [get, itemRef]);\n\n useEffect(() => {\n fetchWorksheet();\n }, [fetchWorksheet]);\n\n const handleWorksheetErrored = useCallback((err: { code?: number; message: string }) => {\n setError(err.message);\n }, []);\n\n const handleWorksheetLoaded = useCallback(() => {\n setWorksheetRendered(true);\n }, []);\n\n if (!itemRef) return null;\n\n if (error || fetchError) {\n return <Error height=\"100vh\" onTryAgain={fetchWorksheet} />;\n }\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <ErrorBoundary\n fallback={<Error height=\"100vh\" />}\n onError={errorInfo => setError(errorInfo.message)}\n >\n <LearnosityPreloader\n apiURL={LEARNOSITY_QUESTIONS_API}\n fallbackAPIURL={LEARNOSITY_QUESTIONS_API_FALLBACK}\n logger={logger}\n >\n <Styled.PuzzleAppWrapper\n className=\"puzzle-app-container\"\n $background={`${imageHue}_2`}\n $alignItems=\"center\"\n $flexGapX={1}\n $gutterX={1}\n $visible={worksheetRendered}\n $height=\"100vh\"\n >\n {worksheetRendered && <Text $renderAs=\"ab1-bold\">{title}</Text>}\n\n {worksheetData && (\n <PuzzleAppView\n onWorksheetErrored={handleWorksheetErrored}\n worksheetData={worksheetData}\n loggerRef={loggerRef}\n imageHue={imageHue}\n onLoaded={handleWorksheetLoaded}\n />\n )}\n\n {worksheetRendered && (\n <>\n {feedbackComments ? (\n <Styled.StyledFeedbackText $renderAs=\"ab2\">\n <span>Tutor Remark:</span>\n {feedbackComments}\n </Styled.StyledFeedbackText>\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <FlexView $width={24} $height={24}>\n <Styled.StyledHintFillIcon />\n </FlexView>\n <Text $renderAs=\"ab2\">{tipInfo}</Text>\n </FlexView>\n )}\n </>\n )}\n </Styled.PuzzleAppWrapper>\n </LearnosityPreloader>\n </ErrorBoundary>\n );\n};\n\nexport default memo(PuzzleApp);\n"],"names":["logger","eventName","PuzzleApp","urlParams","itemRef","title","imageHue","feedbackComments","tip","error","setError","useState","worksheetRendered","setWorksheetRendered","isProcessing","get","worksheetData","fetchError","usePreviewWorksheetGet","loggerRef","useRef","tipInfo","fetchWorksheet","useCallback","useEffect","handleWorksheetErrored","err","handleWorksheetLoaded","jsx","Error","AppLoader","ErrorBoundary","errorInfo","LearnosityPreloader","LEARNOSITY_QUESTIONS_API","LEARNOSITY_QUESTIONS_API_FALLBACK","jsxs","Styled.PuzzleAppWrapper","Text","PuzzleAppView","Styled.StyledFeedbackText","FlexView","Styled.StyledHintFillIcon","puzzleApp","memo"],"mappings":";;;;;;;;;;;;AAmBA,MAAMA,IAAS,CAACC,MAAsB;AAE5B,UAAA,IAAI,qBAAqBA,CAAS;AAC5C,GAEMC,IAAgB,MAAM;AAE1B,QAAMC,IAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM,GACtDC,IAAUD,EAAU,IAAI,SAAS,KAAK,IACtCE,IAAQF,EAAU,IAAI,OAAO,KAAK,IAClCG,IAAYH,EAAU,IAAI,UAAU,KAAK,QACzCI,IAAmBJ,EAAU,IAAI,kBAAkB,KAAK,QACxDK,IAAML,EAAU,IAAI,KAAK,KAAK,QAE9B,CAACM,GAAOC,CAAQ,IAAIC,EAAiB,GACrC,CAACC,GAAmBC,CAAoB,IAAIF,EAAkB,EAAK,GAEnE,EAAE,cAAAG,GAAc,KAAAC,GAAK,MAAMC,GAAe,OAAOC,MAAeC,KAChEC,IAAYC,EAAO,MAAM,IAAI,GAE7BC,IACJb,KAAO,uFAEHc,IAAiBC,EAAY,MAAM;AACvC,IAAAR,EAAI,QAAQ;AAAA,MACV,QAAQ;AAAA,MACR,WAAW;AAAA,MACX,OAAO,CAACX,CAAO;AAAA,IAAA,CAChB;AAAA,EAAA,GACA,CAACW,GAAKX,CAAO,CAAC;AAEjB,EAAAoB,EAAU,MAAM;AACC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Aa,gBAAA,CAAA;AAAA,kBAClBrB;AAAA,gBACH,EAAA,CAAA,sBAECkC,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC5D,UAAA;AAAA,kBAAC,gBAAAb,EAAAa,GAAA,EAAS,QAAQ,IAAI,SAAS,IAC7B,UAAC,gBAAAb,EAAAc,GAAA,CAAA,CAA0B,EAC7B,CAAA;AAAA,kBACC,gBAAAd,EAAAU,GAAA,EAAK,WAAU,OAAO,UAAQjB,GAAA;AAAA,gBAAA,EAAA,CACjC,EAEJ,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA,IA3DiB;AA8DvB,GAEesB,KAAAC,EAAK1C,CAAS;"}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-container.js","sources":["../../../../src/features/puzzles/constants/puzzle-container.ts"],"sourcesContent":["import type { AnimationSegment } from 'lottie-web';\n\nexport const PUZZLE_ASSIGN_ANIMATION = {\n REVEAL: [0, 50] as AnimationSegment,\n REVEAL_ASSIGNED: [58, 160] as AnimationSegment,\n};\n"],"names":["PUZZLE_ASSIGN_ANIMATION"],"mappings":"AAEO,MAAMA,IAA0B;AAAA,EACrC,QAAQ,CAAC,GAAG,EAAE;AAAA,EACd,iBAAiB,CAAC,IAAI,GAAG;AAC3B;"}
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import { PLUGINS as z } from "../../node_modules/@cuemath/analytics-v2/dist/constants.js";
|
2
|
-
var E = /* @__PURE__ */ ((e) => (e.PUZZLE_ASSIGNED = "puzzle_assigned", e.PUZZLE_VIEWED = "puzzle_viewed", e))(E || {});
|
3
|
-
const _ = {
|
4
|
-
puzzle_viewed: [z.MIXPANEL],
|
5
|
-
puzzle_assigned: [z.MIXPANEL]
|
6
|
-
};
|
7
|
-
export {
|
8
|
-
E as PUZZLE_ANALYTICS_EVENTS,
|
9
|
-
_ as PUZZLE_ANALYTICS_WHITELIST_EVENTS
|
10
|
-
};
|
11
|
-
//# sourceMappingURL=puzzle-analytics-events.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-analytics-events.js","sources":["../../../src/features/puzzles/puzzle-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PUZZLE_ANALYTICS_EVENTS {\n PUZZLE_ASSIGNED = 'puzzle_assigned',\n PUZZLE_VIEWED = 'puzzle_viewed',\n}\n\nexport const PUZZLE_ANALYTICS_WHITELIST_EVENTS = {\n [PUZZLE_ANALYTICS_EVENTS.PUZZLE_VIEWED]: [PLUGINS.MIXPANEL],\n [PUZZLE_ANALYTICS_EVENTS.PUZZLE_ASSIGNED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PUZZLE_ANALYTICS_EVENTS","PUZZLE_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,kBAAkB,mBAClBA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA;AAKL,MAAMC,IAAoC;AAAA,EAC9C,eAAwC,CAACC,EAAQ,QAAQ;AAAA,EACzD,iBAA0C,CAACA,EAAQ,QAAQ;AAC9D;"}
|
@@ -1,55 +0,0 @@
|
|
1
|
-
import { jsxs as i, Fragment as $, jsx as e } from "react/jsx-runtime";
|
2
|
-
import { memo as d } from "react";
|
3
|
-
import m from "../../ui/buttons/clickable/clickable.js";
|
4
|
-
import u from "../../ui/image/image.js";
|
5
|
-
import t from "../../ui/text/text.js";
|
6
|
-
import { PuzzleContent as g, AssignedTag as h, PuzzleButton as p } from "./puzzle-container-styled.js";
|
7
|
-
const k = d(
|
8
|
-
({ handleOnPuzzleClick: l, imageUrl: o, title: c, handleAssign: a, assigned: r, assigning: n, analyticsProps: s }) => /* @__PURE__ */ i($, { children: [
|
9
|
-
/* @__PURE__ */ i(
|
10
|
-
g,
|
11
|
-
{
|
12
|
-
$justifyContent: "center",
|
13
|
-
$alignItems: "center",
|
14
|
-
onClick: l,
|
15
|
-
title: "Click to preview",
|
16
|
-
$flexGapX: 1.5,
|
17
|
-
$assigned: r,
|
18
|
-
$gutterX: 1,
|
19
|
-
children: [
|
20
|
-
/* @__PURE__ */ e(u, { width: 136, height: 136, src: o, withLoader: !1, alt: "Puzzle" }),
|
21
|
-
/* @__PURE__ */ e(t, { $renderAs: "h4", $align: "center", children: c }),
|
22
|
-
r && /* @__PURE__ */ e(h, { $gap: 4, $gutter: 8, $background: "BLACK_1", children: /* @__PURE__ */ e(t, { $renderAs: "ac4", $color: "WHITE_1", children: "Assigned" }) })
|
23
|
-
]
|
24
|
-
}
|
25
|
-
),
|
26
|
-
/* @__PURE__ */ e(
|
27
|
-
m,
|
28
|
-
{
|
29
|
-
onClick: a,
|
30
|
-
label: "",
|
31
|
-
analyticsLabel: "puzzle_assigned",
|
32
|
-
disabled: r || n,
|
33
|
-
analyticsProps: s,
|
34
|
-
children: /* @__PURE__ */ e(
|
35
|
-
p,
|
36
|
-
{
|
37
|
-
$background: "BLACK_1",
|
38
|
-
$widthX: 15.75,
|
39
|
-
$alignItems: "center",
|
40
|
-
$justifyContent: "center",
|
41
|
-
$gapX: 0.75,
|
42
|
-
$gutterX: 1,
|
43
|
-
$assigned: r,
|
44
|
-
$assigning: n,
|
45
|
-
children: /* @__PURE__ */ e(t, { $renderAs: "ub1-bold", $color: r ? "BLACK_T_38" : "WHITE_1", children: r ? "Discuss in next class" : "Assign" })
|
46
|
-
}
|
47
|
-
)
|
48
|
-
}
|
49
|
-
)
|
50
|
-
] })
|
51
|
-
);
|
52
|
-
export {
|
53
|
-
k as default
|
54
|
-
};
|
55
|
-
//# sourceMappingURL=puzzle-container-view.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"puzzle-container-view.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-view.tsx"],"sourcesContent":["import type { IPuzzleContainerViewProps } from './puzzle-container-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport Image from '../../ui/image/image';\nimport Text from '../../ui/text/text';\nimport * as Styled from './puzzle-container-styled';\n\nconst PuzzleContainerView: FC<IPuzzleContainerViewProps> = memo(\n ({ handleOnPuzzleClick, imageUrl, title, handleAssign, assigned, assigning, analyticsProps }) => {\n return (\n <>\n <Styled.PuzzleContent\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleOnPuzzleClick}\n title=\"Click to preview\"\n $flexGapX={1.5}\n $assigned={assigned}\n $gutterX={1}\n >\n <Image width={136} height={136} src={imageUrl} withLoader={false} alt=\"Puzzle\" />\n <Text $renderAs=\"h4\" $align=\"center\">\n {title}\n </Text>\n\n {assigned && (\n <Styled.AssignedTag $gap={4} $gutter={8} $background=\"BLACK_1\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n Assigned\n </Text>\n </Styled.AssignedTag>\n )}\n </Styled.PuzzleContent>\n\n <Clickable\n onClick={handleAssign}\n label=\"\"\n analyticsLabel=\"puzzle_assigned\"\n disabled={assigned || assigning}\n analyticsProps={analyticsProps}\n >\n <Styled.PuzzleButton\n $background=\"BLACK_1\"\n $widthX={15.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={0.75}\n $gutterX={1}\n $assigned={assigned}\n $assigning={assigning}\n >\n <Text $renderAs=\"ub1-bold\" $color={assigned ? 'BLACK_T_38' : 'WHITE_1'}>\n {assigned ? 'Discuss in next class' : 'Assign'}\n </Text>\n </Styled.PuzzleButton>\n </Clickable>\n </>\n );\n },\n);\n\nexport default PuzzleContainerView;\n"],"names":["PuzzleContainerView","memo","handleOnPuzzleClick","imageUrl","title","handleAssign","assigned","assigning","analyticsProps","jsxs","Fragment","Styled.PuzzleContent","jsx","Image","Text","Styled.AssignedTag","Clickable","Styled.PuzzleButton"],"mappings":";;;;;;AAUA,MAAMA,IAAqDC;AAAA,EACzD,CAAC,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
|
|
1
|
-
import o from "styled-components";
|
2
|
-
import { ILLUSTRATIONS as t } from "../../../assets/illustrations/illustrations.js";
|
3
|
-
import e from "../../../assets/line-icons/icons/puzzle2.js";
|
4
|
-
import p from "../../ui/layout/flex-view.js";
|
5
|
-
const s = o(p)``, l = o(p)`
|
6
|
-
background-image: url(${t.PUZZLE_DASHBOARD_BANNER});
|
7
|
-
background-size: cover;
|
8
|
-
`, d = o(p)`
|
9
|
-
position: absolute;
|
10
|
-
top: 16px;
|
11
|
-
left: 16px;
|
12
|
-
`, m = o(p)`
|
13
|
-
position: sticky;
|
14
|
-
top: 16px;
|
15
|
-
z-index: 5;
|
16
|
-
`, u = o.div`
|
17
|
-
display: grid;
|
18
|
-
width: 100%;
|
19
|
-
grid-template-columns: repeat(5, 1fr);
|
20
|
-
column-gap: 24px;
|
21
|
-
row-gap: 40px;
|
22
|
-
padding: 0 37px;
|
23
|
-
`, x = o(e)`
|
24
|
-
path {
|
25
|
-
stroke: ${({ theme: r }) => r.colors.BLACK_T_60};
|
26
|
-
opacity: 0.38;
|
27
|
-
}
|
28
|
-
`;
|
29
|
-
export {
|
30
|
-
d as BackIconContainer,
|
31
|
-
m as BackIconWrapper,
|
32
|
-
l as BannerWrapper,
|
33
|
-
u as ContentWrapper,
|
34
|
-
s as PuzzleDashboardWrapper,
|
35
|
-
x as StyledPuzzleIcon
|
36
|
-
};
|
37
|
-
//# sourceMappingURL=puzzle-dashboard-styled.js.map
|