@cuemath/leap 2.9.12-j2 → 3.0.1-as1
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 +9 -3
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/bin2.js +7 -8
- package/dist/assets/line-icons/icons/bin2.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
- package/dist/assets/line-icons/icons/exclamation.js +26 -0
- package/dist/assets/line-icons/icons/exclamation.js.map +1 -0
- package/dist/assets/line-icons/icons/home2.js +25 -0
- package/dist/assets/line-icons/icons/home2.js.map +1 -0
- package/dist/assets/line-icons/icons/important.js +23 -0
- package/dist/assets/line-icons/icons/important.js.map +1 -0
- package/dist/assets/line-icons/icons/skip-colored.js +43 -0
- package/dist/assets/line-icons/icons/skip-colored.js.map +1 -0
- package/dist/assets/line-icons/icons/status.js +41 -0
- package/dist/assets/line-icons/icons/status.js.map +1 -0
- package/dist/assets/lottie/lottie.js +8 -11
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/api.js +3 -2
- package/dist/constants/api.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +3 -3
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +13 -11
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +99 -33
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +92 -49
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list-styled.js +5 -5
- package/dist/features/chapters/chapters-list/chapters-list-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list.js +64 -70
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/chapters-v2/api/chapter.js +10 -0
- package/dist/features/chapters-v2/api/chapter.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +112 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +35 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +83 -0
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +90 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +98 -0
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +51 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +1 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +129 -0
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +159 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +16 -0
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js +12 -0
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js +30 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +32 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +9 -0
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +189 -0
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +194 -0
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +13 -0
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/tag/tag.js +28 -0
- package/dist/features/chapters-v2/comps/tag/tag.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +20 -0
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -0
- package/dist/features/chapters-v2/constants/node-constants.js +14 -0
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -0
- package/dist/features/chapters-v2/utils/index.js +45 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +169 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/features/communication/pub-sub/constants.js +12 -6
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/card-menu-option.js +28 -0
- package/dist/features/homework/card-menu-option.js.map +1 -0
- package/dist/features/homework/card-menu-options.js +22 -0
- package/dist/features/homework/card-menu-options.js.map +1 -0
- package/dist/features/homework/card-title.js +16 -0
- package/dist/features/homework/card-title.js.map +1 -0
- package/dist/features/homework/homework-analytics-events.js +10 -0
- package/dist/features/homework/homework-analytics-events.js.map +1 -0
- package/dist/features/homework/homework-card-view.js +143 -0
- package/dist/features/homework/homework-card-view.js.map +1 -0
- package/dist/features/homework/homework-card.js +245 -0
- package/dist/features/homework/homework-card.js.map +1 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +10 -0
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +63 -0
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +157 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js +67 -0
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -0
- package/dist/features/homework/node-progress.js +29 -0
- package/dist/features/homework/node-progress.js.map +1 -0
- package/dist/features/homework/styles.js +130 -0
- package/dist/features/homework/styles.js.map +1 -0
- package/dist/features/homework/utils.js +48 -0
- package/dist/features/homework/utils.js.map +1 -0
- package/dist/features/journey/comps/coachmark/coachmark.js +24 -24
- package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +173 -0
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +268 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js +513 -0
- package/dist/features/journey/hooks/use-home-page-journey/recent-chapters-mock.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/styles.js +23 -0
- package/dist/features/journey/hooks/use-home-page-journey/styles.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +22 -0
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js +270 -0
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js.map +1 -0
- 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 +5 -0
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +584 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -0
- package/dist/features/journey/use-journey/journey-context-provider.js +36 -28
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +10 -5
- package/dist/features/journey/use-journey/journey-styled.js.map +1 -1
- package/dist/features/milestone/create/api/goal-submit.js +1 -1
- package/dist/features/milestone/create/api/goal-submit.js.map +1 -1
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js +42 -49
- package/dist/features/milestone/create/comps/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +12 -4
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js +128 -105
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +14 -20
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js.map +1 -1
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js +26 -50
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +49 -43
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/create/utils/index.js +33 -38
- package/dist/features/milestone/create/utils/index.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +51 -53
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js +42 -40
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +64 -62
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-helpers.js +50 -53
- package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +54 -52
- package/dist/features/milestone/edit/milestone-edit-container.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js +9 -17
- package/dist/features/milestone/milestone-list-container/api/get-milestones.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +138 -105
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +107 -123
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +157 -176
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js +24 -10
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +80 -86
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js +10 -22
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-utils.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +70 -37
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +114 -176
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +29 -16
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js +17 -25
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js +23 -35
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +110 -113
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/api/goal-resource-assign.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
- package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list-styled.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +116 -113
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +165 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +25 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +87 -0
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js +5 -5
- package/dist/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +46 -50
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +9 -0
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js +16 -0
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +1 -0
- package/dist/features/recent-chapters/recent-chapters.js +39 -0
- package/dist/features/recent-chapters/recent-chapters.js.map +1 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js +45 -0
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -0
- package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
- package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js +4 -3
- package/dist/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/ui/animated-arc/animated-arc.js +7 -7
- package/dist/features/ui/animated-arc/animated-arc.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +30 -29
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- package/dist/features/ui/border-path-animation/border-path-animation-styled.js +51 -0
- package/dist/features/ui/border-path-animation/border-path-animation-styled.js.map +1 -0
- package/dist/features/ui/border-path-animation/border-path-animation.js +108 -0
- package/dist/features/ui/border-path-animation/border-path-animation.js.map +1 -0
- package/dist/features/ui/constants/z-index.js +1 -1
- package/dist/features/ui/constants/z-index.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu-styled.js +28 -14
- package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +25 -17
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +32 -24
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/theme/button.js +24 -7
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +340 -269
- package/dist/index.js +451 -471
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/differenceInDays.js +17 -0
- package/dist/node_modules/date-fns/differenceInDays.js.map +1 -0
- package/dist/static/chapter-header-bg-2.c8d96894.svg +1 -0
- package/dist/static/competitive-arena.b9c40801.json +1 -0
- package/dist/static/learn.71b13323.json +1 -0
- package/dist/static/node-custom-test-bg.d3b757be.svg +1 -0
- package/dist/static/node-learn-bg.b61f815c.svg +1 -0
- package/dist/static/node-practice-bg.16cbaf2a.svg +1 -0
- package/dist/static/node-project-bg.e6a33e28.svg +1 -0
- package/dist/static/node-puzzle-bg.3422135c.svg +1 -0
- package/dist/static/node-recap-bg.546154e4.svg +1 -0
- package/dist/static/node-test-prep-bg.42c0b9c4.svg +1 -0
- package/dist/static/node-video-bg.3df3f73a.svg +1 -0
- package/dist/static/practice.158dd488.json +1 -0
- package/dist/static/project.eb665827.json +1 -0
- package/dist/static/puzzle.b298c7e4.json +1 -0
- package/dist/static/recap.0dd2c1e2.json +1 -0
- package/dist/static/test.803d6036.json +1 -0
- package/dist/static/video.b41451e2.json +1 -0
- package/package.json +2 -3
- package/dist/assets/illustrations/loader-1.svg.js +0 -6
- package/dist/assets/illustrations/loader-1.svg.js.map +0 -1
- package/dist/assets/line-icons/icons/apple-icon.js +0 -48
- package/dist/assets/line-icons/icons/apple-icon.js.map +0 -1
- package/dist/assets/line-icons/icons/google-icon.js +0 -42
- package/dist/assets/line-icons/icons/google-icon.js.map +0 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +0 -37
- package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
- package/dist/features/auth/account-selector/account-selector.js +0 -90
- package/dist/features/auth/account-selector/account-selector.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +0 -12
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +0 -11
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +0 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +0 -17
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +0 -1
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js +0 -20
- package/dist/features/auth/comps/input-status-icon/input-status-icon.js.map +0 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js +0 -29
- package/dist/features/auth/comps/overlay-loader/overlay-loader-styled.js.map +0 -1
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js +0 -8
- package/dist/features/auth/comps/overlay-loader/overlay-loader.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js +0 -25
- package/dist/features/auth/comps/resend-otp/otp-timer/otp-timer.js.map +0 -1
- package/dist/features/auth/comps/resend-otp/resend-otp.js +0 -38
- package/dist/features/auth/comps/resend-otp/resend-otp.js.map +0 -1
- package/dist/features/auth/comps/tabs/tabs-styled.js +0 -23
- package/dist/features/auth/comps/tabs/tabs-styled.js.map +0 -1
- package/dist/features/auth/comps/tabs/tabs.js +0 -23
- package/dist/features/auth/comps/tabs/tabs.js.map +0 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +0 -12
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +0 -1
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +0 -67
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +0 -1
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +0 -89
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +0 -1
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +0 -60
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +0 -1
- package/dist/features/auth/login/login-constants.js +0 -12
- package/dist/features/auth/login/login-constants.js.map +0 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +0 -31
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +0 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +0 -46
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +0 -50
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +0 -129
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +0 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js +0 -27
- package/dist/features/auth/signup/claim-user-account/claim-user-account-styled.js.map +0 -1
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js +0 -76
- package/dist/features/auth/signup/claim-user-account/claim-user-account.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js +0 -38
- package/dist/features/auth/signup/custom-input-field/custom-input-field-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +0 -85
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js +0 -86
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js +0 -58
- package/dist/features/auth/signup/custom-input-field/date-picker-input/date-picker-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js +0 -31
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js +0 -30
- package/dist/features/auth/signup/custom-input-field/grade-input/grade-input.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js +0 -11
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +0 -33
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.js +0 -33
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-code-button.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js +0 -28
- package/dist/features/auth/signup/custom-input-field/phone-input/country-selector/country-list-menu.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input-styled.js +0 -29
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input-styled.js.map +0 -1
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js +0 -67
- package/dist/features/auth/signup/custom-input-field/phone-input/phone-input.js.map +0 -1
- package/dist/features/auth/signup/signup-constants.js +0 -1022
- package/dist/features/auth/signup/signup-constants.js.map +0 -1
- package/dist/features/auth/signup/signup-methods/signup-methods.js +0 -68
- package/dist/features/auth/signup/signup-methods/signup-methods.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js +0 -19
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card-styled.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js +0 -62
- package/dist/features/auth/signup/user-type-selector/user-type-card/user-type-card.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js +0 -24
- package/dist/features/auth/signup/user-type-selector/user-type-selector-styled.js.map +0 -1
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js +0 -87
- package/dist/features/auth/signup/user-type-selector/user-type-selector.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -332
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js.map +0 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -370
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js +0 -252
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js +0 -24
- package/dist/node_modules/@floating-ui/react/dist/floating-ui.react.utils.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -192
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -19
- package/dist/node_modules/@floating-ui/react/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -129
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js.map +0 -1
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -129
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js.map +0 -1
- package/dist/node_modules/clsx/dist/clsx.js +0 -18
- package/dist/node_modules/clsx/dist/clsx.js.map +0 -1
- package/dist/node_modules/date-fns/subYears.js +0 -9
- package/dist/node_modules/date-fns/subYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/dist/index.es.js +0 -2700
- package/dist/node_modules/react-datepicker/dist/index.es.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/addLeadingZeros.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/defaultOptions.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js +0 -518
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/formatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js +0 -60
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/lightFormatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js +0 -53
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/format/longFormatters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/normalizeDates.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js +0 -21
- package/dist/node_modules/react-datepicker/node_modules/date-fns/_lib/protectedTokens.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMilliseconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js +0 -21
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addWeeks.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/addYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constants.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/constructFrom.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js +0 -17
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInCalendarYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/differenceInDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/endOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js +0 -60
- package/dist/node_modules/react-datepicker/node_modules/date-fns/format.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDayOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDaysInMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getDefaultOptions.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISODay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js +0 -16
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getISOWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getTime.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js +0 -18
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/getYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isAfter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isBefore.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js +0 -8
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isEqual.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isSameYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isValid.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/isWithinInterval.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildFormatLongFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildLocalizeFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -32
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -16
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatDistance.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatLong.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/formatRelative.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -156
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/localize.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js +0 -111
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US/_lib/match.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js +0 -22
- package/dist/node_modules/react-datepicker/node_modules/date-fns/locale/en-US.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/max.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js +0 -15
- package/dist/node_modules/react-datepicker/node_modules/date-fns/min.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js +0 -42
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/Setter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/constants.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMMidnightParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/AMPMParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js +0 -62
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DateParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js +0 -52
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayOfYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js +0 -46
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/DayPeriodParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js +0 -31
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/EraParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js +0 -22
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ExtendedYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/FractionOfSecondParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0To11Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour0to23Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1To24Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js +0 -34
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/Hour1to12Parser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js +0 -100
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISODayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +0 -41
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/ISOWeekYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js +0 -75
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalDayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js +0 -49
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +0 -70
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/LocalWeekYearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MinuteParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js +0 -72
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/MonthParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/QuarterParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js +0 -33
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/SecondParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +0 -75
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +0 -72
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneMonthParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +0 -71
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +0 -23
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/TimestampSecondsParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js +0 -50
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers/YearParser.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js +0 -68
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/parsers.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js +0 -104
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse/_lib/utils.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js +0 -88
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parse.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js +0 -123
- package/dist/node_modules/react-datepicker/node_modules/date-fns/parseISO.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js +0 -13
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setHours.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISODay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMinutes.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setSeconds.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js +0 -11
- package/dist/node_modules/react-datepicker/node_modules/date-fns/setYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfDay.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfISOWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfMonth.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfQuarter.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js +0 -12
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeek.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js +0 -14
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfWeekYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js +0 -10
- package/dist/node_modules/react-datepicker/node_modules/date-fns/startOfYear.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subDays.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subMonths.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subQuarters.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subWeeks.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/subYears.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js +0 -9
- package/dist/node_modules/react-datepicker/node_modules/date-fns/toDate.js.map +0 -1
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js +0 -19
- package/dist/node_modules/react-datepicker/node_modules/date-fns/transpose.js.map +0 -1
- package/dist/static/avatar-selected.860ee923.json +0 -1
- package/dist/static/circle-cuemath-logo-white.e9fafb91.svg +0 -1
- package/dist/static/cuemath-app-qr-code.ba6cc09b.svg +0 -1
- package/dist/static/cuemath-app-qr-code.d0912fc7.png +0 -0
- package/dist/static/dob.9ce3c15b.json +0 -1
- package/dist/static/error.cbe1ddde.json +0 -1
- package/dist/static/grade.b3730524.json +0 -1
- package/dist/static/key.d6846476.json +0 -1
- package/dist/static/mail.c30e8708.json +0 -1
- package/dist/static/otp.2d08f874.json +0 -1
- package/dist/static/otp.a3029760.json +0 -1
- package/dist/static/parent-avatar.772d53e0.json +0 -1
- package/dist/static/phone-number.0be312ea.json +0 -1
- package/dist/static/phone-number.84f55562.json +0 -1
- package/dist/static/student-avatar.524226bd.json +0 -1
- package/dist/static/user-type-selector-grid-bg.3c9c8ad6.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.3ce8142d.svg +0 -1
- package/dist/static/user-type-selector-grid-bg.aad0b059.svg +0 -1
- package/dist/static/username.9e034d51.json +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import type { TNodeDataTestItemsDataProps } from '../../../chapters-v2/comps/node-card/node-card-types';\nimport type { ITestSheetsList } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport HomeworkCard from '../../../homework/homework-card';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport * as Styled from './test-list-view-styled';\n\nconst getTopicNameFromItems = (items?: TNodeDataTestItemsDataProps[]): string => {\n if (!items?.length) return '';\n\n const uniqueTopics = new Set<string>();\n\n for (const item of items) {\n uniqueTopics.add(item.chapter_name);\n }\n\n return [...uniqueTopics].join(', ');\n};\n\nconst TestSheetsList: FC<ITestSheetsList> = memo(\n ({\n milestoneId,\n studentId,\n sheets,\n userType,\n onCreateNewTest,\n isMilestoneActive,\n canUpdatedPlan,\n ...sheetCallbacks\n }) => {\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $position=\"relative\"\n $justifyContent=\"space-between\"\n >\n <Styled.TestSheetItemWrapper>\n {sheets.map((sheet, idx) => {\n const {\n items,\n node_id: nodeId,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const testChapterName = getTopicNameFromItems(items);\n const sheetTimeText = isTimed ? `${totalSheetTime} Mins` : '';\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = `${totalQuestionsText} • ${sheetTimeText}`;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n header={testChapterName}\n subHeader={subHeader}\n nodeData={sheet}\n renderAs=\"milestone\"\n studentId={studentId}\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallbacks}\n />\n );\n })}\n </Styled.TestSheetItemWrapper>\n\n {userType === 'TEACHER' && canUpdatedPlan && (\n <Styled.IconContainer\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.IconButtonCover>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n onClick={onCreateNewTest}\n disabled={!isMilestoneActive}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </Styled.IconButtonCover>\n </Styled.IconContainer>\n )}\n </FlexView>\n );\n },\n);\n\nexport default TestSheetsList;\n"],"names":["getTopicNameFromItems","items","uniqueTopics","item","TestSheetsList","memo","milestoneId","studentId","sheets","userType","onCreateNewTest","isMilestoneActive","canUpdatedPlan","sheetCallbacks","jsxs","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","jsx","Styled.TestSheetItemWrapper","sheet","idx","nodeId","sheetTime","totalQuestions","worksheetId","isTimed","totalSheetTime","testChapterName","sheetTimeText","subHeader","pluralize","HomeworkCard","Styled.IconContainer","Styled.IconButtonCover","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;;AAeA,MAAMA,IAAwB,CAACC,MAAkD;AAC3E,MAAA,EAACA,KAAA,QAAAA,EAAO,QAAe,QAAA;AAErB,QAAAC,wBAAmB;AAEzB,aAAWC,KAAQF;AACJ,IAAAC,EAAA,IAAIC,EAAK,YAAY;AAGpC,SAAO,CAAC,GAAGD,CAAY,EAAE,KAAK,IAAI;AACpC,GAEME,IAAsCC;AAAA,EAC1C,CAAC;AAAA,IACC,aAAAC;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;AAAA,gBACC,MAAMC;AAAA,gBACN,UAAS;AAAA,gBACT,gBAAgBC,EAAgC;AAAA,gBAChD,SAAS1B;AAAA,gBACT,UAAU,CAACC;AAAA,gBACX,gBAAgB;AAAA,kBACd,cAAcL;AAAA,gBAChB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAKV;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import { createPostAPI as
|
2
|
-
import {
|
3
|
-
const { usePost:
|
4
|
-
getURL: (
|
1
|
+
import { createPostAPI as e } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V3_1 as s } from "../../../../../constants/api.js";
|
3
|
+
const { usePost: i } = e({
|
4
|
+
getURL: (o, { userMilestoneId: t }) => `${s}/user-milestone/${t}/tests`
|
5
5
|
});
|
6
6
|
export {
|
7
|
-
|
7
|
+
i as usePostTestSheetAssign
|
8
8
|
};
|
9
9
|
//# sourceMappingURL=test-sheet-assign.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"test-sheet-assign.js","sources":["../../../../../../src/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.ts"],"sourcesContent":["import type { TTestDifficultyLevel } from '../tests-creation-types';\nimport type { ITestHelpPreviewResponse } from './preview-test-sheet';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport {
|
1
|
+
{"version":3,"file":"test-sheet-assign.js","sources":["../../../../../../src/features/milestone/milestone-tests/tests-creation/api/test-sheet-assign.ts"],"sourcesContent":["import type { TTestDifficultyLevel } from '../tests-creation-types';\nimport type { ITestHelpPreviewResponse } from './preview-test-sheet';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../../constants/api';\n\ninterface ITestSheetAssignPayload {\n items: ITestHelpPreviewResponse[];\n node_params: {\n is_timed: boolean;\n sheet_time: number;\n difficulty_level: TTestDifficultyLevel;\n };\n}\n\nconst { usePost: usePostTestSheetAssign } = createPostAPI<\n never,\n ITestSheetAssignPayload,\n { userMilestoneId: string }\n>({\n getURL: (_, { userMilestoneId }) => `${BASE_URL_V3_1}/user-milestone/${userMilestoneId}/tests`,\n});\n\nexport { usePostTestSheetAssign };\n"],"names":["usePostTestSheetAssign","createPostAPI","_","userMilestoneId","BASE_URL_V3_1"],"mappings":";;AAgBA,MAAM,EAAE,SAASA,EAAuB,IAAIC,EAI1C;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,iBAAAC,EAAsB,MAAA,GAAGC,CAAa,mBAAmBD,CAAe;AACxF,CAAC;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item.js","sources":["../../../../../../../../src/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItem } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, memo } from 'react';\n\nimport ArrowTooltip from '../../../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Image from '../../../../../../ui/image/image';\nimport FlexView from '../../../../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItem> = memo(({ chapter, selected, onChapterSelection }) => {\n const {\n image_url: imageUrl,\n name,\n id: userChapterId,\n sheets_data: sheetData,\n item_bank_enabled: itemBankEnabled,\n } = chapter;\n const { test } = sheetData.supplementary_sheets_grouped;\n\n const isDisabled = !itemBankEnabled && !test?.length;\n\n const handleOnChapterSelection = useCallback(() => {\n if (isDisabled) return null;\n\n onChapterSelection(userChapterId);\n }, [onChapterSelection, userChapterId, isDisabled]);\n\n return (\n <ArrowTooltip\n position=\"bottom\"\n renderAs=\"primary\"\n tooltipItem=\"Chapter unavailable for test creation\"\n hidden={!isDisabled}\n widthX={9.5}\n >\n <Styled.ChapterItemWrapper\n $widthX={9.5}\n $heightX={8.875}\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n $position=\"relative\"\n $alignItems=\"center\"\n $disabled={isDisabled}\n $borderColor={selected ? 'BLACK_T_87' : 'WHITE_5'}\n $background={selected ? 'WHITE_3' : 'WHITE_1'}\n onClick={handleOnChapterSelection}\n >\n <FlexView $position=\"relative\">\n <Image\n src={imageUrl || ''}\n alt={name}\n withLoader\n width={56}\n height={56}\n borderRadius={50}\n />\n </FlexView>\n
|
1
|
+
{"version":3,"file":"chapter-item.js","sources":["../../../../../../../../src/features/milestone/milestone-tests/tests-creation/test-stages/chapter-selection/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItem } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, memo } from 'react';\n\nimport ArrowTooltip from '../../../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Image from '../../../../../../ui/image/image';\nimport FlexView from '../../../../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItem> = memo(({ chapter, selected, onChapterSelection }) => {\n const {\n image_url: imageUrl,\n name,\n id: userChapterId,\n sheets_data: sheetData,\n item_bank_enabled: itemBankEnabled,\n } = chapter;\n const { test } = sheetData.supplementary_sheets_grouped;\n\n const isDisabled = !itemBankEnabled && !test?.length;\n\n const handleOnChapterSelection = useCallback(() => {\n if (isDisabled) return null;\n\n onChapterSelection(userChapterId);\n }, [onChapterSelection, userChapterId, isDisabled]);\n\n return (\n <ArrowTooltip\n position=\"bottom\"\n renderAs=\"primary\"\n tooltipItem=\"Chapter unavailable for test creation\"\n hidden={!isDisabled}\n widthX={9.5}\n >\n <Styled.ChapterItemWrapper\n $widthX={9.5}\n $heightX={8.875}\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n $position=\"relative\"\n $alignItems=\"center\"\n $disabled={isDisabled}\n $borderColor={selected ? 'BLACK_T_87' : 'WHITE_5'}\n $background={selected ? 'WHITE_3' : 'WHITE_1'}\n onClick={handleOnChapterSelection}\n >\n <FlexView $position=\"relative\">\n <Image\n src={imageUrl || ''}\n alt={name}\n withLoader\n width={56}\n height={56}\n borderRadius={50}\n />\n </FlexView>\n <Styled.StyledText\n $renderAs={selected ? 'ab3-bold' : 'ab3'}\n $align=\"center\"\n $color={isDisabled ? 'BLACK_T_38' : 'BLACK_T_87'}\n >\n {name}\n </Styled.StyledText>\n </Styled.ChapterItemWrapper>\n </ArrowTooltip>\n );\n});\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","chapter","selected","onChapterSelection","imageUrl","name","userChapterId","sheetData","itemBankEnabled","test","isDisabled","handleOnChapterSelection","useCallback","jsx","ArrowTooltip","jsxs","Styled.ChapterItemWrapper","FlexView","Image","Styled.StyledText"],"mappings":";;;;;;AAUA,MAAMA,IAAgCC,EAAK,CAAC,EAAE,SAAAC,GAAS,UAAAC,GAAU,oBAAAC,QAAyB;AAClF,QAAA;AAAA,IACJ,WAAWC;AAAA,IACX,MAAAC;AAAA,IACA,IAAIC;AAAA,IACJ,aAAaC;AAAA,IACb,mBAAmBC;AAAA,EACjB,IAAAP,GACE,EAAE,MAAAQ,EAAK,IAAIF,EAAU,8BAErBG,IAAa,CAACF,KAAmB,EAACC,KAAA,QAAAA,EAAM,SAExCE,IAA2BC,EAAY,MAAM;AACjD,QAAIF,EAAmB,QAAA;AAEvB,IAAAP,EAAmBG,CAAa;AAAA,EAC/B,GAAA,CAACH,GAAoBG,GAAeI,CAAU,CAAC;AAGhD,SAAA,gBAAAG;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,aAAY;AAAA,MACZ,QAAQ,CAACJ;AAAA,MACT,QAAQ;AAAA,MAER,UAAA,gBAAAK;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,SAAS;AAAA,UACT,UAAU;AAAA,UACV,OAAO;AAAA,UACP,UAAU;AAAA,UACV,UAAU;AAAA,UACV,WAAU;AAAA,UACV,aAAY;AAAA,UACZ,WAAWN;AAAA,UACX,cAAcR,IAAW,eAAe;AAAA,UACxC,aAAaA,IAAW,YAAY;AAAA,UACpC,SAASS;AAAA,UAET,UAAA;AAAA,YAAC,gBAAAE,EAAAI,GAAA,EAAS,WAAU,YAClB,UAAA,gBAAAJ;AAAA,cAACK;AAAA,cAAA;AAAA,gBACC,KAAKd,KAAY;AAAA,gBACjB,KAAKC;AAAA,gBACL,YAAU;AAAA,gBACV,OAAO;AAAA,gBACP,QAAQ;AAAA,gBACR,cAAc;AAAA,cAAA;AAAA,YAAA,GAElB;AAAA,YACA,gBAAAQ;AAAA,cAACM;AAAAA,cAAA;AAAA,gBACC,WAAWjB,IAAW,aAAa;AAAA,gBACnC,QAAO;AAAA,gBACP,QAAQQ,IAAa,eAAe;AAAA,gBAEnC,UAAAL;AAAA,cAAA;AAAA,YACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { jsx as l, jsxs as W } from "react/jsx-runtime";
|
2
|
-
import { memo as G, useState as
|
2
|
+
import { memo as G, useState as T, useCallback as i, useEffect as E } from "react";
|
3
3
|
import U from "../../../ui/buttons/button/button.js";
|
4
4
|
import X from "../../../ui/layout/flex-view.js";
|
5
5
|
import q from "../../../ui/loader/app-loader/app-loader.js";
|
@@ -16,16 +16,16 @@ const ee = {
|
|
16
16
|
title: null,
|
17
17
|
duration: null,
|
18
18
|
chapters: null
|
19
|
-
}, te = G((
|
20
|
-
const { milestoneId: s, studentId:
|
19
|
+
}, te = G((y) => {
|
20
|
+
const { milestoneId: s, studentId: O, testNumber: D, onTestAssign: C, onExit: L, onError: c } = y, [_, x] = T("CHAPTER_SELECTION"), [o, f] = T(ee), [h, v] = T([]), m = i((e) => {
|
21
21
|
x(e);
|
22
|
-
}, []),
|
22
|
+
}, []), F = i(
|
23
23
|
(e, t) => {
|
24
|
-
(e || !(t != null && t.length)) && (m("CHAPTER_SELECTION"),
|
25
|
-
const { chapters: r, selectedChapters: u } = n, V = r == null ? void 0 : r.map((
|
26
|
-
...
|
24
|
+
(e || !(t != null && t.length)) && (m("CHAPTER_SELECTION"), f((n) => {
|
25
|
+
const { chapters: r, selectedChapters: u } = n, V = r == null ? void 0 : r.map((P) => u != null && u.includes(P.id) ? {
|
26
|
+
...P,
|
27
27
|
item_bank_enabled: !1
|
28
|
-
} :
|
28
|
+
} : P);
|
29
29
|
return {
|
30
30
|
...n,
|
31
31
|
chapters: V ?? null,
|
@@ -35,43 +35,40 @@ const ee = {
|
|
35
35
|
};
|
36
36
|
}), c(
|
37
37
|
"We're experiencing a temporary limitation with the chapters you've selected. Please select alternative chapters and proceed."
|
38
|
-
)), e ? c(e) : t &&
|
38
|
+
)), e ? c(e) : t && v(t);
|
39
39
|
},
|
40
|
-
[c,
|
41
|
-
),
|
40
|
+
[c, v, m]
|
41
|
+
), H = i(
|
42
42
|
(e) => {
|
43
|
-
e ? c(e) :
|
43
|
+
e ? c(e) : C();
|
44
44
|
},
|
45
|
-
[c,
|
45
|
+
[c, C]
|
46
46
|
), {
|
47
|
-
get:
|
48
|
-
data:
|
49
|
-
isProcessing:
|
47
|
+
get: I,
|
48
|
+
data: N,
|
49
|
+
isProcessing: $,
|
50
50
|
isProcessingFailed: b,
|
51
|
-
error:
|
51
|
+
error: p
|
52
52
|
} = B(s, {
|
53
|
-
with_plan: !0,
|
54
53
|
with_sheets: !0
|
55
|
-
}), { post:
|
56
|
-
onComplete: $
|
57
|
-
}), { post: E, isProcessing: R } = J({
|
54
|
+
}), { post: A, isProcessing: M } = Y({
|
58
55
|
onComplete: F
|
59
|
-
}), {
|
56
|
+
}), { post: S, isProcessing: R } = J({
|
57
|
+
onComplete: H
|
58
|
+
}), { user_milestone_plan: j } = N || {}, { user_chapters: a } = j || {}, w = i(
|
60
59
|
(e) => {
|
61
|
-
|
60
|
+
A(e);
|
62
61
|
},
|
63
|
-
[
|
64
|
-
),
|
65
|
-
|
66
|
-
with_plan: !0,
|
62
|
+
[A]
|
63
|
+
), d = i(() => {
|
64
|
+
I(s, {
|
67
65
|
with_sheets: !0
|
68
66
|
});
|
69
|
-
}, [
|
67
|
+
}, [I, s]), k = i(() => {
|
70
68
|
const { duration: e, difficultyLevel: t, selectedChapters: n } = o;
|
71
|
-
e && t && n &&
|
69
|
+
e && t && n && S(
|
72
70
|
{
|
73
|
-
items:
|
74
|
-
title: `Test ${f}`,
|
71
|
+
items: h,
|
75
72
|
node_params: {
|
76
73
|
is_timed: !0,
|
77
74
|
sheet_time: e * 60,
|
@@ -79,29 +76,28 @@ const ee = {
|
|
79
76
|
}
|
80
77
|
},
|
81
78
|
{
|
82
|
-
studentId: h,
|
83
79
|
userMilestoneId: s
|
84
80
|
}
|
85
81
|
);
|
86
|
-
}, [
|
82
|
+
}, [S, o, s, h]), g = i(
|
87
83
|
(e, t) => {
|
88
84
|
if (m(e), t) {
|
89
85
|
const { difficultyLevel: n, duration: r } = t;
|
90
|
-
|
86
|
+
f((u) => ({ ...u, ...t })), e === "PREVIEW" && n && r && w({
|
91
87
|
difficulty_level: n,
|
92
88
|
duration: r,
|
93
89
|
user_chapter_ids: o.selectedChapters || []
|
94
90
|
});
|
95
91
|
}
|
96
92
|
},
|
97
|
-
[m,
|
93
|
+
[m, w, o]
|
98
94
|
);
|
99
|
-
return
|
100
|
-
s &&
|
101
|
-
}, [s,
|
102
|
-
a && a.length > 0 &&
|
103
|
-
}, [a]),
|
104
|
-
/* @__PURE__ */ l(z, { $renderAs: "h6", children: (
|
95
|
+
return E(() => {
|
96
|
+
s && d();
|
97
|
+
}, [s, d]), E(() => {
|
98
|
+
a && a.length > 0 && f((e) => ({ ...e, chapters: a }));
|
99
|
+
}, [a]), $ || M ? /* @__PURE__ */ l(q, { height: "100vh" }) : b ? /* @__PURE__ */ W(X, { $height: "100vh", $flexGapX: 1.5, $alignItems: "center", $justifyContent: "center", children: [
|
100
|
+
/* @__PURE__ */ l(z, { $renderAs: "h6", children: (p == null ? void 0 : p.message) || "Oops! Something went wrong." }),
|
105
101
|
/* @__PURE__ */ l(
|
106
102
|
U,
|
107
103
|
{
|
@@ -110,26 +106,26 @@ const ee = {
|
|
110
106
|
shape: "square",
|
111
107
|
renderAs: "primary",
|
112
108
|
label: "Try again",
|
113
|
-
onClick:
|
109
|
+
onClick: d
|
114
110
|
}
|
115
111
|
)
|
116
|
-
] }) : a ?
|
112
|
+
] }) : a ? _ === "PREVIEW" ? /* @__PURE__ */ l(
|
117
113
|
Z,
|
118
114
|
{
|
119
|
-
studentId:
|
120
|
-
items:
|
121
|
-
testNumber:
|
115
|
+
studentId: O,
|
116
|
+
items: h,
|
117
|
+
testNumber: D,
|
122
118
|
isAssignInProgress: R,
|
123
|
-
onTestStageChange:
|
119
|
+
onTestStageChange: g,
|
124
120
|
onTestSheetAssign: k
|
125
121
|
}
|
126
|
-
) :
|
122
|
+
) : _ === "DIFFICULTY_AND_DURATION_SELECTION" ? /* @__PURE__ */ l(
|
127
123
|
Q,
|
128
124
|
{
|
129
125
|
testFormData: o,
|
130
|
-
onTestStageChange:
|
126
|
+
onTestStageChange: g
|
131
127
|
}
|
132
|
-
) : /* @__PURE__ */ l(K, { testFormData: o, onProceed:
|
128
|
+
) : /* @__PURE__ */ l(K, { testFormData: o, onProceed: g, onExit: L }) : null;
|
133
129
|
}), pe = te;
|
134
130
|
export {
|
135
131
|
pe as default
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tests-creation.js","sources":["../../../../../src/features/milestone/milestone-tests/tests-creation/tests-creation.tsx"],"sourcesContent":["import type { ITestHelpPreviewPayload, ITestHelpPreviewResponse } from './api/preview-test-sheet';\nimport type { ITestFromData, ITestsCreationProps, TTestsStage } from './tests-creation-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useState } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useMilestoneGet } from '../../edit/comps/edit-milestone-modal/api/get-milestone';\nimport { usePostTestHelpPreview } from './api/preview-test-sheet';\nimport { usePostTestSheetAssign } from './api/test-sheet-assign';\nimport ChapterSelection from './test-stages/chapter-selection/chapter-selection';\nimport DifficultyAndDurationSelection from './test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection';\nimport TestPreview from './test-stages/test-preview/test-preview';\n\nconst initFormData: ITestFromData = {\n selectedChapters: null,\n difficultyLevel: null,\n title: null,\n duration: null,\n chapters: null,\n};\n\nconst TestsCreation: FC<ITestsCreationProps> = memo(props => {\n const { milestoneId, studentId, testNumber, onTestAssign, onExit, onError } = props;\n\n const [testStage, setTestStage] = useState<TTestsStage>('CHAPTER_SELECTION');\n const [testFormData, setTestFromData] = useState<ITestFromData>(initFormData);\n const [testPreviewItems, setTestPreviewItems] = useState<ITestHelpPreviewResponse[]>([]);\n\n const handleOnTestStageChange = useCallback((nextStage: TTestsStage) => {\n setTestStage(nextStage);\n }, []);\n\n const handleOnTestHelpPreviewComplete = useCallback(\n (errorMessage: string | null, data?: ITestHelpPreviewResponse[]) => {\n if (errorMessage || !data?.length) {\n handleOnTestStageChange('CHAPTER_SELECTION');\n\n setTestFromData(prev => {\n const { chapters, selectedChapters } = prev;\n\n const updatedChapters = chapters?.map(chapter => {\n if (selectedChapters?.includes(chapter.id)) {\n return {\n ...chapter,\n item_bank_enabled: false,\n };\n }\n\n return chapter;\n });\n\n return {\n ...prev,\n chapters: updatedChapters ?? null,\n selectedChapters: null,\n difficultyLevel: null,\n duration: null,\n };\n });\n\n onError(\n `We're experiencing a temporary limitation with the chapters you've selected. Please select alternative chapters and proceed.`,\n );\n }\n\n if (errorMessage) {\n onError(errorMessage);\n } else if (data) {\n setTestPreviewItems(data);\n }\n },\n [onError, setTestPreviewItems, handleOnTestStageChange],\n );\n\n const handleOnTestSheetAssignComplete = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n onError(errorMessage);\n } else {\n onTestAssign();\n }\n },\n [onError, onTestAssign],\n );\n\n const {\n get: getMilestone,\n data: currentMilestoneData,\n isProcessing: isMilestoneProcessing,\n isProcessingFailed: isMilestoneProcessingFailed,\n error: milestoneGetError,\n } = useMilestoneGet(milestoneId, {\n with_plan: true,\n with_sheets: true,\n });\n\n const { post: postTestHelpPreview, isProcessing: testPreviewIsProcessing } =\n usePostTestHelpPreview({\n onComplete: handleOnTestHelpPreviewComplete,\n });\n\n const { post: postTestSheetAssign, isProcessing: testAssignIsProcessing } =\n usePostTestSheetAssign({\n onComplete: handleOnTestSheetAssignComplete,\n });\n\n const { user_milestone_plan: userMilestonePlan } = currentMilestoneData || {};\n const { user_chapters: userChapters } = userMilestonePlan || {};\n\n const handleOnPostTestHelpPreview = useCallback(\n (data: ITestHelpPreviewPayload) => {\n postTestHelpPreview(data);\n },\n [postTestHelpPreview],\n );\n\n const handleOnGetMilestone = useCallback(() => {\n getMilestone(milestoneId, {\n with_plan: true,\n with_sheets: true,\n });\n }, [getMilestone, milestoneId]);\n\n const handleOnTestSheetAssign = useCallback(() => {\n const { duration, difficultyLevel, selectedChapters } = testFormData;\n\n if (duration && difficultyLevel && selectedChapters) {\n postTestSheetAssign(\n {\n items: testPreviewItems,\n title: `Test ${testNumber}`,\n node_params: {\n is_timed: true,\n sheet_time: duration * 60,\n difficulty_level: difficultyLevel,\n },\n },\n {\n studentId,\n userMilestoneId: milestoneId,\n },\n );\n }\n }, [postTestSheetAssign, testFormData, studentId, milestoneId, testPreviewItems, testNumber]);\n\n const handleOnProceed = useCallback(\n (nextStage: TTestsStage, updatedForm?: ITestFromData) => {\n handleOnTestStageChange(nextStage);\n\n if (updatedForm) {\n const { difficultyLevel, duration } = updatedForm;\n\n setTestFromData(prev => ({ ...prev, ...updatedForm }));\n\n if (nextStage === 'PREVIEW' && difficultyLevel && duration) {\n handleOnPostTestHelpPreview({\n difficulty_level: difficultyLevel,\n duration: duration,\n user_chapter_ids: testFormData.selectedChapters || [],\n });\n }\n }\n },\n [handleOnTestStageChange, handleOnPostTestHelpPreview, testFormData],\n );\n\n useEffect(() => {\n if (milestoneId) {\n handleOnGetMilestone();\n }\n }, [milestoneId, handleOnGetMilestone]);\n\n useEffect(() => {\n if (userChapters && userChapters.length > 0) {\n setTestFromData(prev => ({ ...prev, chapters: userChapters }));\n }\n }, [userChapters]);\n\n if (isMilestoneProcessing || testPreviewIsProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isMilestoneProcessingFailed) {\n return (\n <FlexView $height=\"100vh\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{milestoneGetError?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnGetMilestone}\n />\n </FlexView>\n );\n }\n\n if (!userChapters) return null;\n\n if (testStage === 'PREVIEW') {\n return (\n <TestPreview\n studentId={studentId}\n items={testPreviewItems}\n testNumber={testNumber}\n isAssignInProgress={testAssignIsProcessing}\n onTestStageChange={handleOnProceed}\n onTestSheetAssign={handleOnTestSheetAssign}\n />\n );\n }\n\n if (testStage === 'DIFFICULTY_AND_DURATION_SELECTION') {\n return (\n <DifficultyAndDurationSelection\n testFormData={testFormData}\n onTestStageChange={handleOnProceed}\n />\n );\n }\n\n return (\n <ChapterSelection testFormData={testFormData} onProceed={handleOnProceed} onExit={onExit} />\n );\n});\n\nexport default TestsCreation;\n"],"names":["initFormData","TestsCreation","memo","props","milestoneId","studentId","testNumber","onTestAssign","onExit","onError","testStage","setTestStage","useState","testFormData","setTestFromData","testPreviewItems","setTestPreviewItems","handleOnTestStageChange","useCallback","nextStage","handleOnTestHelpPreviewComplete","errorMessage","data","prev","chapters","selectedChapters","updatedChapters","chapter","handleOnTestSheetAssignComplete","getMilestone","currentMilestoneData","isMilestoneProcessing","isMilestoneProcessingFailed","milestoneGetError","useMilestoneGet","postTestHelpPreview","testPreviewIsProcessing","usePostTestHelpPreview","postTestSheetAssign","testAssignIsProcessing","usePostTestSheetAssign","userMilestonePlan","userChapters","handleOnPostTestHelpPreview","handleOnGetMilestone","handleOnTestSheetAssign","duration","difficultyLevel","handleOnProceed","updatedForm","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","TestPreview","DifficultyAndDurationSelection","ChapterSelection","TestsCreation$1"],"mappings":";;;;;;;;;;;;AAiBA,MAAMA,KAA8B;AAAA,EAClC,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,UAAU;AAAA,EACV,UAAU;AACZ,GAEMC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,aAAAC,GAAa,WAAAC,GAAW,YAAAC,GAAY,cAAAC,GAAc,QAAAC,GAAQ,SAAAC,EAAY,IAAAN,GAExE,CAACO,GAAWC,CAAY,IAAIC,EAAsB,mBAAmB,GACrE,CAACC,GAAcC,CAAe,IAAIF,EAAwBZ,EAAY,GACtE,CAACe,GAAkBC,CAAmB,IAAIJ,EAAqC,CAAE,CAAA,GAEjFK,IAA0BC,EAAY,CAACC,MAA2B;AACtE,IAAAR,EAAaQ,CAAS;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAkCF;AAAA,IACtC,CAACG,GAA6BC,MAAsC;AAC9D,OAAAD,KAAgB,EAACC,KAAA,QAAAA,EAAM,aACzBL,EAAwB,mBAAmB,GAE3CH,EAAgB,CAAQS,MAAA;AAChB,cAAA,EAAE,UAAAC,GAAU,kBAAAC,EAAqB,IAAAF,GAEjCG,IAAkBF,KAAA,gBAAAA,EAAU,IAAI,CAAWG,MAC3CF,KAAA,QAAAA,EAAkB,SAASE,EAAQ,MAC9B;AAAA,UACL,GAAGA;AAAA,UACH,mBAAmB;AAAA,QAAA,IAIhBA;AAGF,eAAA;AAAA,UACL,GAAGJ;AAAA,UACH,UAAUG,KAAmB;AAAA,UAC7B,kBAAkB;AAAA,UAClB,iBAAiB;AAAA,UACjB,UAAU;AAAA,QAAA;AAAA,MACZ,CACD,GAEDjB;AAAA,QACE;AAAA,M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R,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASZ;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA,IAICF,IAEDhC,MAAc,YAEd,gBAAAyC;AAAA,IAACM;AAAA,IAAA;AAAA,MACC,WAAApD;AAAA,MACA,OAAOU;AAAA,MACP,YAAAT;AAAA,MACA,oBAAoBiC;AAAA,MACpB,mBAAmBS;AAAA,MACnB,mBAAmBH;AAAA,IAAA;AAAA,EAAA,IAKrBnC,MAAc,sCAEd,gBAAAyC;AAAA,IAACO;AAAA,IAAA;AAAA,MACC,cAAA7C;AAAA,MACA,mBAAmBmC;AAAA,IAAA;AAAA,EAAA,IAMtB,gBAAAG,EAAAQ,GAAA,EAAiB,cAAA9C,GAA4B,WAAWmC,GAAiB,QAAAxC,EAAgB,CAAA,IAzBlE;AA2B5B,CAAC,GAEDoD,KAAe3D;"}
|
1
|
+
{"version":3,"file":"tests-creation.js","sources":["../../../../../src/features/milestone/milestone-tests/tests-creation/tests-creation.tsx"],"sourcesContent":["import type { ITestHelpPreviewPayload, ITestHelpPreviewResponse } from './api/preview-test-sheet';\nimport type { ITestFromData, ITestsCreationProps, TTestsStage } from './tests-creation-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useState } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useMilestoneGet } from '../../edit/comps/edit-milestone-modal/api/get-milestone';\nimport { usePostTestHelpPreview } from './api/preview-test-sheet';\nimport { usePostTestSheetAssign } from './api/test-sheet-assign';\nimport ChapterSelection from './test-stages/chapter-selection/chapter-selection';\nimport DifficultyAndDurationSelection from './test-stages/difficulty-and-duration-selection/difficulty-and-duration-selection';\nimport TestPreview from './test-stages/test-preview/test-preview';\n\nconst initFormData: ITestFromData = {\n selectedChapters: null,\n difficultyLevel: null,\n title: null,\n duration: null,\n chapters: null,\n};\n\nconst TestsCreation: FC<ITestsCreationProps> = memo(props => {\n const { milestoneId, studentId, testNumber, onTestAssign, onExit, onError } = props;\n\n const [testStage, setTestStage] = useState<TTestsStage>('CHAPTER_SELECTION');\n const [testFormData, setTestFromData] = useState<ITestFromData>(initFormData);\n const [testPreviewItems, setTestPreviewItems] = useState<ITestHelpPreviewResponse[]>([]);\n\n const handleOnTestStageChange = useCallback((nextStage: TTestsStage) => {\n setTestStage(nextStage);\n }, []);\n\n const handleOnTestHelpPreviewComplete = useCallback(\n (errorMessage: string | null, data?: ITestHelpPreviewResponse[]) => {\n if (errorMessage || !data?.length) {\n handleOnTestStageChange('CHAPTER_SELECTION');\n\n setTestFromData(prev => {\n const { chapters, selectedChapters } = prev;\n\n const updatedChapters = chapters?.map(chapter => {\n if (selectedChapters?.includes(chapter.id)) {\n return {\n ...chapter,\n item_bank_enabled: false,\n };\n }\n\n return chapter;\n });\n\n return {\n ...prev,\n chapters: updatedChapters ?? null,\n selectedChapters: null,\n difficultyLevel: null,\n duration: null,\n };\n });\n\n onError(\n `We're experiencing a temporary limitation with the chapters you've selected. Please select alternative chapters and proceed.`,\n );\n }\n\n if (errorMessage) {\n onError(errorMessage);\n } else if (data) {\n setTestPreviewItems(data);\n }\n },\n [onError, setTestPreviewItems, handleOnTestStageChange],\n );\n\n const handleOnTestSheetAssignComplete = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n onError(errorMessage);\n } else {\n onTestAssign();\n }\n },\n [onError, onTestAssign],\n );\n\n const {\n get: getMilestone,\n data: currentMilestoneData,\n isProcessing: isMilestoneProcessing,\n isProcessingFailed: isMilestoneProcessingFailed,\n error: milestoneGetError,\n } = useMilestoneGet(milestoneId, {\n with_sheets: true,\n });\n\n const { post: postTestHelpPreview, isProcessing: testPreviewIsProcessing } =\n usePostTestHelpPreview({\n onComplete: handleOnTestHelpPreviewComplete,\n });\n\n const { post: postTestSheetAssign, isProcessing: testAssignIsProcessing } =\n usePostTestSheetAssign({\n onComplete: handleOnTestSheetAssignComplete,\n });\n\n const { user_milestone_plan: userMilestonePlan } = currentMilestoneData || {};\n const { user_chapters: userChapters } = userMilestonePlan || {};\n\n const handleOnPostTestHelpPreview = useCallback(\n (data: ITestHelpPreviewPayload) => {\n postTestHelpPreview(data);\n },\n [postTestHelpPreview],\n );\n\n const handleOnGetMilestone = useCallback(() => {\n getMilestone(milestoneId, {\n with_sheets: true,\n });\n }, [getMilestone, milestoneId]);\n\n const handleOnTestSheetAssign = useCallback(() => {\n const { duration, difficultyLevel, selectedChapters } = testFormData;\n\n if (duration && difficultyLevel && selectedChapters) {\n postTestSheetAssign(\n {\n items: testPreviewItems,\n node_params: {\n is_timed: true,\n sheet_time: duration * 60,\n difficulty_level: difficultyLevel,\n },\n },\n {\n userMilestoneId: milestoneId,\n },\n );\n }\n }, [postTestSheetAssign, testFormData, milestoneId, testPreviewItems]);\n\n const handleOnProceed = useCallback(\n (nextStage: TTestsStage, updatedForm?: ITestFromData) => {\n handleOnTestStageChange(nextStage);\n\n if (updatedForm) {\n const { difficultyLevel, duration } = updatedForm;\n\n setTestFromData(prev => ({ ...prev, ...updatedForm }));\n\n if (nextStage === 'PREVIEW' && difficultyLevel && duration) {\n handleOnPostTestHelpPreview({\n difficulty_level: difficultyLevel,\n duration: duration,\n user_chapter_ids: testFormData.selectedChapters || [],\n });\n }\n }\n },\n [handleOnTestStageChange, handleOnPostTestHelpPreview, testFormData],\n );\n\n useEffect(() => {\n if (milestoneId) {\n handleOnGetMilestone();\n }\n }, [milestoneId, handleOnGetMilestone]);\n\n useEffect(() => {\n if (userChapters && userChapters.length > 0) {\n setTestFromData(prev => ({ ...prev, chapters: userChapters }));\n }\n }, [userChapters]);\n\n if (isMilestoneProcessing || testPreviewIsProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isMilestoneProcessingFailed) {\n return (\n <FlexView $height=\"100vh\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{milestoneGetError?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={handleOnGetMilestone}\n />\n </FlexView>\n );\n }\n\n if (!userChapters) return null;\n\n if (testStage === 'PREVIEW') {\n return (\n <TestPreview\n studentId={studentId}\n items={testPreviewItems}\n testNumber={testNumber}\n isAssignInProgress={testAssignIsProcessing}\n onTestStageChange={handleOnProceed}\n onTestSheetAssign={handleOnTestSheetAssign}\n />\n );\n }\n\n if (testStage === 'DIFFICULTY_AND_DURATION_SELECTION') {\n return (\n <DifficultyAndDurationSelection\n testFormData={testFormData}\n onTestStageChange={handleOnProceed}\n />\n );\n }\n\n return (\n <ChapterSelection testFormData={testFormData} onProceed={handleOnProceed} onExit={onExit} />\n );\n});\n\nexport default TestsCreation;\n"],"names":["initFormData","TestsCreation","memo","props","milestoneId","studentId","testNumber","onTestAssign","onExit","onError","testStage","setTestStage","useState","testFormData","setTestFromData","testPreviewItems","setTestPreviewItems","handleOnTestStageChange","useCallback","nextStage","handleOnTestHelpPreviewComplete","errorMessage","data","prev","chapters","selectedChapters","updatedChapters","chapter","handleOnTestSheetAssignComplete","getMilestone","currentMilestoneData","isMilestoneProcessing","isMilestoneProcessingFailed","milestoneGetError","useMilestoneGet","postTestHelpPreview","testPreviewIsProcessing","usePostTestHelpPreview","postTestSheetAssign","testAssignIsProcessing","usePostTestSheetAssign","userMilestonePlan","userChapters","handleOnPostTestHelpPreview","handleOnGetMilestone","handleOnTestSheetAssign","duration","difficultyLevel","handleOnProceed","updatedForm","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","TestPreview","DifficultyAndDurationSelection","ChapterSelection","TestsCreation$1"],"mappings":";;;;;;;;;;;;AAiBA,MAAMA,KAA8B;AAAA,EAClC,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,OAAO;AAAA,EACP,UAAU;AA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7C;AAAA,MACA,mBAAmBmC;AAAA,IAAA;AAAA,EAAA,IAMtB,gBAAAG,EAAAQ,GAAA,EAAiB,cAAA9C,GAA4B,WAAWmC,GAAiB,QAAAxC,EAAgB,CAAA,IAzBlE;AA2B5B,CAAC,GAEDoD,KAAe3D;"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { createGetAPI as r } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V3 as s } from "../../../constants/api.js";
|
3
|
+
const { useGet: p } = r({
|
4
|
+
getURL: (e, o, { courseStream: t }) => `${s}/users/${e}/course-streams/${t}/recent-chapters`
|
5
|
+
});
|
6
|
+
export {
|
7
|
+
p as useGetRecentChapters
|
8
|
+
};
|
9
|
+
//# sourceMappingURL=get-recent-chapters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"get-recent-chapters.js","sources":["../../../../src/features/recent-chapters/api/get-recent-chapters.ts"],"sourcesContent":["import type { IChapterDataProps } from '../../chapters/chapter/chapter-types';\nimport type { TCourseStream } from '../../milestone/create/milestone-create-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../constants/api';\n\nconst { useGet: useGetRecentChapters } = createGetAPI<\n IChapterDataProps[],\n void,\n { courseStream: TCourseStream }\n>({\n getURL: (studentId: string, _, { courseStream }) =>\n `${BASE_URL_V3}/users/${studentId}/course-streams/${courseStream}/recent-chapters`,\n});\n\nexport { useGetRecentChapters };\n"],"names":["useGetRecentChapters","createGetAPI","studentId","_","courseStream","BASE_URL_V3"],"mappings":";;AAOA,MAAM,EAAE,QAAQA,EAAqB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAmBC,GAAG,EAAE,cAAAC,EAAA,MAC/B,GAAGC,CAAW,UAAUH,CAAS,mBAAmBE,CAAY;AACpE,CAAC;"}
|
@@ -0,0 +1,16 @@
|
|
1
|
+
import e from "styled-components";
|
2
|
+
const p = e.div(({ theme: t }) => {
|
3
|
+
const { WHITE_5: r, WHITE_2: a } = t.colors;
|
4
|
+
return `
|
5
|
+
display: grid;
|
6
|
+
grid-template-columns: repeat(4, 1fr);
|
7
|
+
align-content: start;
|
8
|
+
background: ${a};
|
9
|
+
background-image: linear-gradient(${r} 0.5px, transparent 0.5px), linear-gradient(90deg, ${r} 0.5px, transparent 0.5px);
|
10
|
+
background-size: 45px 45px;
|
11
|
+
`;
|
12
|
+
});
|
13
|
+
export {
|
14
|
+
p as ChaptersWrapper
|
15
|
+
};
|
16
|
+
//# sourceMappingURL=recent-chapters-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"recent-chapters-styled.js","sources":["../../../src/features/recent-chapters/recent-chapters-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nconst ChaptersWrapper = styled.div(({ theme }) => {\n const { WHITE_5, WHITE_2 } = theme.colors;\n\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n align-content: start;\n background: ${WHITE_2};\n background-image: linear-gradient(${WHITE_5} 0.5px, transparent 0.5px), linear-gradient(90deg, ${WHITE_5} 0.5px, transparent 0.5px);\n background-size: 45px 45px;\n `;\n});\n\nexport { ChaptersWrapper };\n"],"names":["ChaptersWrapper","styled","theme","WHITE_5","WHITE_2"],"mappings":";AAEA,MAAMA,IAAkBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAAY;AAChD,QAAM,EAAE,SAAAC,GAAS,SAAAC,MAAYF,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA,kBAISE,CAAO;AAAA,wCACeD,CAAO,sDAAsDA,CAAO;AAAA;AAAA;AAG5G,CAAC;"}
|
@@ -0,0 +1,39 @@
|
|
1
|
+
import { jsxs as s, jsx as l } from "react/jsx-runtime";
|
2
|
+
import { useCallback as f, useEffect as h } from "react";
|
3
|
+
import C from "../chapters/chapters-list/chapter-item/chapter-item.js";
|
4
|
+
import d from "../ui/layout/flex-view.js";
|
5
|
+
import u from "../ui/text/text.js";
|
6
|
+
import { useGetRecentChapters as x } from "./api/get-recent-chapters.js";
|
7
|
+
import { ChaptersWrapper as g } from "./recent-chapters-styled.js";
|
8
|
+
const R = ({
|
9
|
+
studentId: r,
|
10
|
+
courseStream: t,
|
11
|
+
onChapterClick: p,
|
12
|
+
recentChaptersRef: a
|
13
|
+
}) => {
|
14
|
+
const { get: o, data: e, isProcessingFailed: m } = x(), i = f(() => {
|
15
|
+
o(r, void 0, { courseStream: t });
|
16
|
+
}, [t, o, r]);
|
17
|
+
return h(() => {
|
18
|
+
i();
|
19
|
+
}, [i]), m ? null : e && e.length > 0 ? /* @__PURE__ */ s(d, { $flexRowGapX: 1, ref: a, children: [
|
20
|
+
/* @__PURE__ */ s(u, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
21
|
+
"Recent Chapters (",
|
22
|
+
e == null ? void 0 : e.length,
|
23
|
+
")"
|
24
|
+
] }),
|
25
|
+
/* @__PURE__ */ l(g, { children: e.map((n, c) => /* @__PURE__ */ l(
|
26
|
+
C,
|
27
|
+
{
|
28
|
+
chapter: n,
|
29
|
+
onChapterClick: p,
|
30
|
+
itemIndex: c
|
31
|
+
},
|
32
|
+
n.id
|
33
|
+
)) })
|
34
|
+
] }) : null;
|
35
|
+
}, G = R;
|
36
|
+
export {
|
37
|
+
G as default
|
38
|
+
};
|
39
|
+
//# sourceMappingURL=recent-chapters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"recent-chapters.js","sources":["../../../src/features/recent-chapters/recent-chapters.tsx"],"sourcesContent":["import type { IChaptersListProps } from '../chapters/chapters-list/chapters-list-types';\nimport type { TCourseStream } from '../milestone/create/milestone-create-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { useCallback, useEffect } from 'react';\n\nimport ChapterItem from '../chapters/chapters-list/chapter-item/chapter-item';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\nimport { useGetRecentChapters } from './api/get-recent-chapters';\nimport * as Styled from './recent-chapters-styled';\n\ninterface RecentChaptersProps {\n studentId: string;\n courseStream: TCourseStream;\n userType: TUserTypes;\n onChapterClick: IChaptersListProps['onChapterClick'];\n recentChaptersRef?: React.RefObject<HTMLDivElement>;\n}\n\nconst RecentChapters: FC<RecentChaptersProps> = ({\n studentId,\n courseStream,\n onChapterClick,\n recentChaptersRef,\n}) => {\n const { get: getChapters, data: chapterData, isProcessingFailed } = useGetRecentChapters();\n\n const fetchChapterDetails = useCallback(() => {\n getChapters(studentId, undefined, { courseStream });\n }, [courseStream, getChapters, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n if (chapterData && chapterData.length > 0) {\n return (\n <FlexView $flexRowGapX={1} ref={recentChaptersRef}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Recent Chapters ({chapterData?.length})\n </Text>\n <Styled.ChaptersWrapper>\n {chapterData.map((chapter, idx) => (\n <ChapterItem\n key={chapter.id}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n ))}\n </Styled.ChaptersWrapper>\n </FlexView>\n );\n }\n\n return null;\n};\n\nexport default RecentChapters;\n"],"names":["RecentChapters","studentId","courseStream","onChapterClick","recentChaptersRef","getChapters","chapterData","isProcessingFailed","useGetRecentChapters","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","Text","jsx","Styled.ChaptersWrapper","chapter","idx","ChapterItem","RecentChapters$1"],"mappings":";;;;;;;AAqBA,MAAMA,IAA0C,CAAC;AAAA,EAC/C,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,KAAKC,GAAa,MAAMC,GAAa,oBAAAC,EAAA,IAAuBC,KAE9DC,IAAsBC,EAAY,MAAM;AAC5C,IAAAL,EAAYJ,GAAW,QAAW,EAAE,cAAAC,EAAc,CAAA;AAAA,EACjD,GAAA,CAACA,GAAcG,GAAaJ,CAAS,CAAC;AAMzC,SAJAU,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAEpBF,IACK,OAGLD,KAAeA,EAAY,SAAS,IAEnC,gBAAAM,EAAAC,GAAA,EAAS,cAAc,GAAG,KAAKT,GAC9B,UAAA;AAAA,IAAA,gBAAAQ,EAACE,GAAK,EAAA,WAAU,aAAY,QAAO,cAAa,UAAA;AAAA,MAAA;AAAA,MAC5BR,KAAA,gBAAAA,EAAa;AAAA,MAAO;AAAA,IAAA,GACxC;AAAA,IACA,gBAAAS,EAACC,GAAA,EACE,YAAY,IAAI,CAACC,GAASC,MACzB,gBAAAH;AAAA,MAACI;AAAA,MAAA;AAAA,QAEC,SAAAF;AAAA,QACA,gBAAAd;AAAA,QACA,WAAWe;AAAA,MAAA;AAAA,MAHND,EAAQ;AAAA,IAKhB,CAAA,GACH;AAAA,EACF,EAAA,CAAA,IAIG;AACT,GAEAG,IAAepB;"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
2
|
+
import { h as $ } from "../../../node_modules/humanize-plus/dist/humanize.js";
|
3
|
+
import { memo as x } from "react";
|
4
|
+
import _ from "styled-components";
|
5
|
+
import g from "../../homework/homework-card.js";
|
6
|
+
import w from "../../ui/layout/flex-view.js";
|
7
|
+
const R = _.div`
|
8
|
+
display: grid;
|
9
|
+
grid-template-columns: repeat(3, 200px);
|
10
|
+
grid-gap: 32px;
|
11
|
+
justify-content: center;
|
12
|
+
padding: 32px 0;
|
13
|
+
`, T = ({
|
14
|
+
sheets: r,
|
15
|
+
studentId: n,
|
16
|
+
userType: m,
|
17
|
+
...d
|
18
|
+
}) => /* @__PURE__ */ t(w, { children: /* @__PURE__ */ t(R, { children: r.map((o, s) => {
|
19
|
+
const {
|
20
|
+
title: a,
|
21
|
+
node_id: p,
|
22
|
+
worksheet_id: l,
|
23
|
+
is_timed: c,
|
24
|
+
sheet_time: u,
|
25
|
+
total_questions: e
|
26
|
+
} = o, h = Math.ceil((u || 0) / 60), i = e ? `${e} ${$.pluralize(e, "Question")}` : "", f = c ? `${i} • ${h} Mins` : i;
|
27
|
+
return /* @__PURE__ */ t(
|
28
|
+
g,
|
29
|
+
{
|
30
|
+
header: a,
|
31
|
+
subHeader: f,
|
32
|
+
userType: m,
|
33
|
+
studentId: n,
|
34
|
+
nodeData: o,
|
35
|
+
renderAs: "milestone",
|
36
|
+
shouldOpenOnRight: (s + 1) % 3 === 0,
|
37
|
+
...d
|
38
|
+
},
|
39
|
+
`${l}_${p}_${s}`
|
40
|
+
);
|
41
|
+
}) }) }), z = x(T);
|
42
|
+
export {
|
43
|
+
z as default
|
44
|
+
};
|
45
|
+
//# sourceMappingURL=resource-list.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import type { IResourcesListProps } from './types';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport { memo } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({\n sheets,\n studentId,\n userType,\n ...sheetCallBacks\n}) => (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText} • ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n studentId={studentId}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n);\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","studentId","userType","sheetCallBacks","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAUA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC;AAAA,EAC9C,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MACE,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAP,GAAA,EACE,YAAO,IAAI,CAACS,GAAOC,MAAQ;AACpB,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,SAASC;AAAA,IACT,cAAcC;AAAA,IACd,UAAUC;AAAA,IACV,YAAYC;AAAA,IACZ,iBAAiBC;AAAA,EACf,IAAAP,GACEQ,IAAiB,KAAK,MAAMF,KAAa,KAAK,EAAE,GAChDG,IAAqBF,IACvB,GAAGA,CAAc,IAAIG,EAAU,UAAAH,GAAgB,UAAU,CAAC,KAC1D,IACEI,IAAYN,IACd,GAAGI,CAAkB,MAAMD,CAAc,UACzCC;AAGF,SAAA,gBAAAX;AAAA,IAACc;AAAA,IAAA;AAAA,MAEC,QAAQV;AAAA,MACR,WAAAS;AAAA,MACA,UAAAf;AAAA,MACA,WAAAD;AAAA,MACA,UAAUK;AAAA,MACV,UAAS;AAAA,MACT,oBAAoBC,IAAM,KAAK,MAAM;AAAA,MACpC,GAAGJ;AAAA,IAAA;AAAA,IARC,GAAGO,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,EAAA;AAW1C,CAAC,GACH,EACF,CAAA,GAGaY,IAAAC,EAAKrB,CAAa;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n\n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../src/features/sheets/resources-list/resource-item/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface IResourceItemCard {\n $isMilestoneWidget?: boolean;\n}\n\nconst ResourceItemCard = styled(FlexView)<IResourceItemCard>(({ theme, $isMilestoneWidget }) => {\n const { WHITE_5 } = theme.colors;\n\n return `\n border: 1px solid ${WHITE_5};\n ${\n $isMilestoneWidget &&\n `\n border-top-width: 0;\n border-left-width: 0;\n \n &:nth-child(even) {\n border-right-width: 0;\n }\n `\n }\n `;\n});\n\nconst ResourceItemTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst IconButtonWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { BLACK_T_87 } = theme.colors;\n\n return `\n width: ${gutter * 2}px;\n height: ${gutter * 2}px;\n border: 1px solid ${BLACK_T_87};\n border-radius: 50%;\n cursor: pointer;\n `;\n});\n\nexport { ResourceItemCard, ResourceItemTitle, IconButtonWrapper };\n"],"names":["ResourceItemCard","styled","FlexView","theme","$isMilestoneWidget","WHITE_5","ResourceItemTitle","Text","IconButtonWrapper","gutter","BLACK_T_87"],"mappings":";;;AASM,MAAAA,IAAmBC,EAAOC,CAAQ,EAAqB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAyB;AACxF,QAAA,EAAE,SAAAC,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA,0BACiBE,CAAO;AAAA,QAEzBD,KACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAQF;AAAA;AAEN,CAAC,GAEKE,IAAoBL,EAAOM,CAAI,EAAE,MAC9B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAOR,GAEKC,IAAoBP,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAClD,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM,QACnB,EAAE,YAAAO,EAAW,IAAIP,EAAM;AAEtB,SAAA;AAAA,eACMM,IAAS,CAAC;AAAA,gBACTA,IAAS,CAAC;AAAA,0BACAC,CAAU;AAAA;AAAA;AAAA;AAIpC,CAAC;"}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
const
|
1
|
+
const A = {
|
2
2
|
CHANGE_LOCATION: "Change location",
|
3
3
|
RESET_PROGRESS: "Reset progress",
|
4
4
|
MARK_AS_FAMILIAR: "Mark as learned",
|
@@ -11,9 +11,10 @@ const E = {
|
|
11
11
|
MARK_AS_DONE: "Mark as Done",
|
12
12
|
SKIP: "Skip",
|
13
13
|
REVERT_SKIP: "Revert Skip",
|
14
|
-
REDO: "Redo"
|
14
|
+
REDO: "Redo",
|
15
|
+
ASSIGN_AS_HW: "Assign as HW"
|
15
16
|
};
|
16
17
|
export {
|
17
|
-
|
18
|
+
A as TEACHER_MENU_OPTIONS
|
18
19
|
};
|
19
20
|
//# sourceMappingURL=teacher-actions-constant.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions-constant.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.ts"],"sourcesContent":["export const TEACHER_MENU_OPTIONS = {\n CHANGE_LOCATION: 'Change location',\n RESET_PROGRESS: 'Reset progress',\n MARK_AS_FAMILIAR: 'Mark as learned',\n MARK_BACK_AS_RELEVANT: 'Mark back as relevant',\n MARK_AS_NOT_NEEDED: 'Mark as not needed',\n UNASSIGN: 'Unassign',\n //* New options\n ENABLE_AS_HW: 'Enable as HW',\n REVERT_TO_CW: 'Revert to CW',\n MARK_AS_DONE: 'Mark as Done',\n SKIP: 'Skip',\n REVERT_SKIP: 'Revert Skip',\n REDO: 'Redo',\n} as const;\n"],"names":["TEACHER_MENU_OPTIONS"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;
|
1
|
+
{"version":3,"file":"teacher-actions-constant.js","sources":["../../../../../../../src/features/sheets/sheets-list/sheet-item/reward-n-actions/teacher-actions/teacher-actions-constant.ts"],"sourcesContent":["export const TEACHER_MENU_OPTIONS = {\n CHANGE_LOCATION: 'Change location',\n RESET_PROGRESS: 'Reset progress',\n MARK_AS_FAMILIAR: 'Mark as learned',\n MARK_BACK_AS_RELEVANT: 'Mark back as relevant',\n MARK_AS_NOT_NEEDED: 'Mark as not needed',\n UNASSIGN: 'Unassign',\n //* New options\n ENABLE_AS_HW: 'Enable as HW',\n REVERT_TO_CW: 'Revert to CW',\n MARK_AS_DONE: 'Mark as Done',\n SKIP: 'Skip',\n REVERT_SKIP: 'Revert Skip',\n REDO: 'Redo',\n ASSIGN_AS_HW: 'Assign as HW',\n} as const;\n"],"names":["TEACHER_MENU_OPTIONS"],"mappings":"AAAO,MAAMA,IAAuB;AAAA,EAClC,iBAAiB;AAAA,EACjB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,uBAAuB;AAAA,EACvB,oBAAoB;AAAA,EACpB,UAAU;AAAA;AAAA,EAEV,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd,MAAM;AAAA,EACN,aAAa;AAAA,EACb,MAAM;AAAA,EACN,cAAc;AAChB;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/features/trial-session/comps/learning-plan/index.tsx"],"sourcesContent":["import type { IChapterDataProps } from '../../../chapters/chapter/chapter-types';\n\nimport throttle from 'lodash.throttle';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { useGetChapterData } from '../../../chapters/api/chapter';\nimport Chapter from '../../../chapters/chapter/chapter';\nimport MilestoneList from '../../../milestone/milestone-list-container/milestone-list-container';\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport * as Styled from './learning-plan-styled';\nimport { useLearningPlanScrollSync } from './use-learning-plan-scroll-sync';\n\nconst LearningPlan: React.FC = () => {\n const { trialHomeData, studentId, teacherId, formData, isTeacher, updateSlideConfig } =\n useTrialSessionContext();\n const {\n demo_info: { student_classroom_id: studentClassroomId, stream },\n } = trialHomeData || {};\n const { name = '', chapterId } = formData || {};\n\n const containerRef = useRef<HTMLDivElement>(null);\n const scrollPointsRef = useRef<number[]>([]);\n const isSendingScrollPointsRef = useRef(false);\n\n const {\n publishScrollEvents,\n closeChannel,\n scrollPoints: receivedScrollPoints,\n } = useLearningPlanScrollSync(studentClassroomId);\n\n const {\n get: getChapterData,\n data: chapterData,\n isProcessing,\n isProcessingFailed,\n error,\n } = useGetChapterData();\n\n const fetchChapter = useCallback(() => {\n if (chapterId && studentId) {\n getChapterData(chapterId, undefined, {\n studentId,\n }).then(() => {\n const scrollElement = containerRef.current;\n\n scrollElement?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n });\n }\n }, [getChapterData, studentId, chapterId]);\n\n const handleOnChapterClick = useCallback(\n (chapter: IChapterDataProps) => {\n updateSlideConfig({\n chapterId: chapter.id,\n });\n },\n [updateSlideConfig],\n );\n\n const handleOnBackIconClick = useCallback(() => {\n updateSlideConfig({\n chapterId: undefined,\n });\n }, [updateSlideConfig]);\n\n const sendScrollPoints = useCallback(() => {\n if (scrollPointsRef.current.length === 0 || isSendingScrollPointsRef.current) return;\n\n isSendingScrollPointsRef.current = true;\n\n if (publishScrollEvents) {\n publishScrollEvents({\n eventName: 'TRIAL_SESSION_GOAL_PLAN_SCROLL',\n eventPayload: {\n scrollPoints: scrollPointsRef.current,\n },\n });\n }\n\n scrollPointsRef.current = [];\n isSendingScrollPointsRef.current = false;\n }, [publishScrollEvents]);\n\n const throttleSend = useMemo(() => throttle(sendScrollPoints, 500), [sendScrollPoints]);\n\n const handleScroll = useCallback(() => {\n const scrollPoint = containerRef.current?.scrollTop || 0;\n\n scrollPointsRef.current.push(scrollPoint);\n\n throttleSend();\n }, [throttleSend]);\n\n useEffect(() => {\n fetchChapter();\n }, [fetchChapter]);\n\n useEffect(() => {\n if (containerRef.current) {\n if ((chapterData && isTeacher) || isTeacher) {\n const scrollElement = containerRef.current;\n\n scrollElement.addEventListener('scroll', handleScroll);\n\n return () => {\n if (scrollElement) {\n scrollElement.removeEventListener('scroll', handleScroll);\n }\n };\n }\n }\n }, [isTeacher, chapterData, handleScroll]);\n\n useEffect(() => {\n const scrollElement = containerRef.current;\n\n if (\n receivedScrollPoints &&\n Array.isArray(receivedScrollPoints) &&\n !isTeacher &&\n scrollElement\n ) {\n const averageScroll = Math.floor(\n receivedScrollPoints.reduce((a, b) => a + b, 0) / receivedScrollPoints.length,\n );\n\n scrollElement.scrollTo({\n top: averageScroll,\n behavior: 'smooth',\n });\n }\n }, [receivedScrollPoints, isTeacher]);\n\n useEffect(() => {\n return () => {\n closeChannel();\n };\n }, [closeChannel]);\n\n if (isProcessing) {\n return <AppLoader height=\"100%\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $height=\"100%\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{error?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapter}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.Container ref={containerRef} $isScrollable={isTeacher}>\n <Styled.Wrapper\n $clickable={isTeacher}\n $gutterX={2}\n $isScrollable={isTeacher}\n id=\"milestone-list-element-container\"\n >\n {chapterId && chapterData ? (\n <>\n <Styled.BackIconWrapper>\n <Styled.BackIcon $clickable={isTeacher} onClick={handleOnBackIconClick} />\n </Styled.BackIconWrapper>\n\n <Styled.ChapterWrapper>\n <Chapter\n user_type={isTeacher ? 'TEACHER' : 'STUDENT'}\n teacherId={teacherId}\n {...chapterData}\n loading={isProcessing}\n />\n </Styled.ChapterWrapper>\n </>\n ) : (\n <MilestoneList\n userType={isTeacher ? 'TEACHER' : 'STUDENT'}\n studentName={name}\n studentId={studentId}\n studentClassroomId={studentClassroomId}\n milestoneType=\"DRAFT\"\n onChapterClick={handleOnChapterClick}\n courseStream={stream}\n />\n )}\n </Styled.Wrapper>\n </Styled.Container>\n );\n};\n\nexport default LearningPlan;\n"],"names":["LearningPlan","trialHomeData","studentId","teacherId","formData","isTeacher","updateSlideConfig","useTrialSessionContext","studentClassroomId","stream","name","chapterId","containerRef","useRef","scrollPointsRef","isSendingScrollPointsRef","publishScrollEvents","closeChannel","receivedScrollPoints","useLearningPlanScrollSync","getChapterData","chapterData","isProcessing","isProcessingFailed","error","useGetChapterData","fetchChapter","useCallback","scrollElement","handleOnChapterClick","chapter","handleOnBackIconClick","sendScrollPoints","throttleSend","useMemo","throttle","handleScroll","scrollPoint","_a","useEffect","averageScroll","a","b","jsx","AppLoader","jsxs","FlexView","Text","Button","Styled.Container","Styled.Wrapper","Fragment","Styled.BackIconWrapper","Styled.BackIcon","Styled.ChapterWrapper","Chapter","MilestoneList"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,KAAyB,MAAM;AAC7B,QAAA,EAAE,eAAAC,GAAe,WAAAC,GAAW,WAAAC,GAAW,UAAAC,GAAU,WAAAC,GAAW,mBAAAC,MAChEC,KACI;AAAA,IACJ,WAAW,EAAE,sBAAsBC,GAAoB,QAAAC,EAAO;AAAA,EAAA,IAC5DR,KAAiB,CAAA,GACf,EAAE,MAAAS,IAAO,IAAI,WAAAC,EAAU,IAAIP,KAAY,CAAA,GAEvCQ,IAAeC,EAAuB,IAAI,GAC1CC,IAAkBD,EAAiB,CAAA,CAAE,GACrCE,IAA2BF,EAAO,EAAK,GAEvC;AAAA,IACJ,qBAAAG;AAAA,IACA,cAAAC;AAAA,IACA,cAAcC;AAAA,EAAA,IACZC,EAA0BX,CAAkB,GAE1C;AAAA,IACJ,KAAKY;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,OAAAC;AAAA,MACEC,EAAkB,GAEhBC,IAAeC,EAAY,MAAM;AACrC,IAAIhB,KAAaT,KACfkB,EAAeT,GAAW,QAAW;AAAA,MACnC,WAAAT;AAAA,IAAA,CACD,EAAE,KAAK,MAAM;AACZ,YAAM0B,IAAgBhB,EAAa;AAEnC,MAAAgB,KAAA,QAAAA,EAAe,SAAS;AAAA,QACtB,KAAK;AAAA,QACL,UAAU;AAAA,MAAA;AAAA,IACX,CACF;AAAA,EAEF,GAAA,CAACR,GAAgBlB,GAAWS,CAAS,CAAC,GAEnCkB,IAAuBF;AAAA,IAC3B,CAACG,MAA+B;AACZ,MAAAxB,EAAA;AAAA,QAChB,WAAWwB,EAAQ;AAAA,MAAA,CACpB;AAAA,IACH;AAAA,IACA,CAACxB,CAAiB;AAAA,EAAA,GAGdyB,IAAwBJ,EAAY,MAAM;AAC5B,IAAArB,EAAA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,UAAUnD,IAAY,YAAY;AAAA,UAClC,aAAaK;AAAA,UACb,WAAAR;AAAA,UACA,oBAAAM;AAAA,UACA,eAAc;AAAA,UACd,gBAAgBqB;AAAA,UAChB,cAAcpB;AAAA,QAAA;AAAA,MAChB;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/features/trial-session/comps/learning-plan/index.tsx"],"sourcesContent":["import type { IChapterDataProps } from '../../../chapters/chapter/chapter-types';\n\nimport throttle from 'lodash.throttle';\nimport React, { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport { useGetChapterData } from '../../../chapters/api/chapter';\nimport Chapter from '../../../chapters/chapter/chapter';\nimport MilestoneList from '../../../milestone/milestone-list-container/milestone-list-container';\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport * as Styled from './learning-plan-styled';\nimport { useLearningPlanScrollSync } from './use-learning-plan-scroll-sync';\n\nconst LearningPlan: React.FC = () => {\n const { trialHomeData, studentId, teacherId, formData, isTeacher, updateSlideConfig } =\n useTrialSessionContext();\n const {\n demo_info: { student_classroom_id: studentClassroomId, stream },\n } = trialHomeData || {};\n const { name = '', chapterId } = formData || {};\n\n const containerRef = useRef<HTMLDivElement>(null);\n const scrollPointsRef = useRef<number[]>([]);\n const isSendingScrollPointsRef = useRef(false);\n\n const {\n publishScrollEvents,\n closeChannel,\n scrollPoints: receivedScrollPoints,\n } = useLearningPlanScrollSync(studentClassroomId);\n\n const {\n get: getChapterData,\n data: chapterData,\n isProcessing,\n isProcessingFailed,\n error,\n } = useGetChapterData();\n\n const fetchChapter = useCallback(() => {\n if (chapterId && studentId) {\n getChapterData(chapterId, undefined, {\n studentId,\n }).then(() => {\n const scrollElement = containerRef.current;\n\n scrollElement?.scrollTo({\n top: 0,\n behavior: 'smooth',\n });\n });\n }\n }, [getChapterData, studentId, chapterId]);\n\n const handleOnChapterClick = useCallback(\n (chapter: IChapterDataProps) => {\n updateSlideConfig({\n chapterId: chapter.id,\n });\n },\n [updateSlideConfig],\n );\n\n const handleOnBackIconClick = useCallback(() => {\n updateSlideConfig({\n chapterId: undefined,\n });\n }, [updateSlideConfig]);\n\n const sendScrollPoints = useCallback(() => {\n if (scrollPointsRef.current.length === 0 || isSendingScrollPointsRef.current) return;\n\n isSendingScrollPointsRef.current = true;\n\n if (publishScrollEvents) {\n publishScrollEvents({\n eventName: 'TRIAL_SESSION_GOAL_PLAN_SCROLL',\n eventPayload: {\n scrollPoints: scrollPointsRef.current,\n },\n });\n }\n\n scrollPointsRef.current = [];\n isSendingScrollPointsRef.current = false;\n }, [publishScrollEvents]);\n\n const throttleSend = useMemo(() => throttle(sendScrollPoints, 500), [sendScrollPoints]);\n\n const handleScroll = useCallback(() => {\n const scrollPoint = containerRef.current?.scrollTop || 0;\n\n scrollPointsRef.current.push(scrollPoint);\n\n throttleSend();\n }, [throttleSend]);\n\n useEffect(() => {\n fetchChapter();\n }, [fetchChapter]);\n\n useEffect(() => {\n if (containerRef.current) {\n if ((chapterData && isTeacher) || isTeacher) {\n const scrollElement = containerRef.current;\n\n scrollElement.addEventListener('scroll', handleScroll);\n\n return () => {\n if (scrollElement) {\n scrollElement.removeEventListener('scroll', handleScroll);\n }\n };\n }\n }\n }, [isTeacher, chapterData, handleScroll]);\n\n useEffect(() => {\n const scrollElement = containerRef.current;\n\n if (\n receivedScrollPoints &&\n Array.isArray(receivedScrollPoints) &&\n !isTeacher &&\n scrollElement\n ) {\n const averageScroll = Math.floor(\n receivedScrollPoints.reduce((a, b) => a + b, 0) / receivedScrollPoints.length,\n );\n\n scrollElement.scrollTo({\n top: averageScroll,\n behavior: 'smooth',\n });\n }\n }, [receivedScrollPoints, isTeacher]);\n\n useEffect(() => {\n return () => {\n closeChannel();\n };\n }, [closeChannel]);\n\n if (isProcessing) {\n return <AppLoader height=\"100%\" />;\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $height=\"100%\" $flexGapX={1.5} $alignItems=\"center\" $justifyContent=\"center\">\n <Text $renderAs=\"h6\">{error?.message || 'Oops! Something went wrong.'}</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapter}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.Container ref={containerRef} $isScrollable={isTeacher}>\n <Styled.Wrapper\n $clickable={isTeacher}\n $gutterX={2}\n $isScrollable={isTeacher}\n id=\"milestone-list-element-container\"\n >\n {chapterId && chapterData ? (\n <>\n <Styled.BackIconWrapper>\n <Styled.BackIcon $clickable={isTeacher} onClick={handleOnBackIconClick} />\n </Styled.BackIconWrapper>\n\n <Styled.ChapterWrapper>\n <Chapter\n user_type={isTeacher ? 'TEACHER' : 'STUDENT'}\n teacherId={teacherId}\n {...chapterData}\n loading={isProcessing}\n />\n </Styled.ChapterWrapper>\n </>\n ) : (\n <MilestoneList\n userType={isTeacher ? 'TEACHER' : 'STUDENT'}\n studentName={name}\n studentId={studentId}\n studentClassroomId={studentClassroomId}\n milestoneType=\"DRAFT\"\n onChapterClick={handleOnChapterClick}\n courseStream={stream}\n />\n )}\n </Styled.Wrapper>\n </Styled.Container>\n );\n};\n\nexport default LearningPlan;\n"],"names":["LearningPlan","trialHomeData","studentId","teacherId","formData","isTeacher","updateSlideConfig","useTrialSessionContext","studentClassroomId","stream","name","chapterId","containerRef","useRef","scrollPointsRef","isSendingScrollPointsRef","publishScrollEvents","closeChannel","receivedScrollPoints","useLearningPlanScrollSync","getChapterData","chapterData","isProcessing","isProcessingFailed","error","useGetChapterData","fetchChapter","useCallback","scrollElement","handleOnChapterClick","chapter","handleOnBackIconClick","sendScrollPoints","throttleSend","useMemo","throttle","handleScroll","scrollPoint","_a","useEffect","averageScroll","a","b","jsx","AppLoader","jsxs","FlexView","Text","Button","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UnD,IAAY,YAAY;AAAA,UAClC,aAAaK;AAAA,UACb,WAAAR;AAAA,UACA,oBAAAM;AAAA,UACA,eAAc;AAAA,UACd,gBAAgBqB;AAAA,UAChB,cAAcpB;AAAA,QAAA;AAAA,MAChB;AAAA,IAAA;AAAA,EAGN,EAAA,CAAA;AAEJ;"}
|
@@ -8,8 +8,8 @@ const b = ({
|
|
8
8
|
color: y,
|
9
9
|
targetAngle: a,
|
10
10
|
startAngle: c = 0,
|
11
|
-
duration:
|
12
|
-
mode:
|
11
|
+
duration: o = 2,
|
12
|
+
mode: s = "draw",
|
13
13
|
delay: n = 0,
|
14
14
|
showAnimatedRainbowArc: $ = !1
|
15
15
|
}) => {
|
@@ -20,17 +20,17 @@ const b = ({
|
|
20
20
|
return g(() => {
|
21
21
|
const t = f.current;
|
22
22
|
if (t) {
|
23
|
-
if (
|
23
|
+
if (s === "draw") {
|
24
24
|
const m = t.getTotalLength();
|
25
25
|
t.style.strokeDasharray = `${m}`, t.style.strokeDashoffset = `${m}`, t.getBoundingClientRect(), requestAnimationFrame(() => {
|
26
|
-
t.style.transition = `stroke-dashoffset ${
|
26
|
+
t.style.transition = `stroke-dashoffset ${o}s linear ${n}s`, t.style.strokeDashoffset = "0";
|
27
27
|
});
|
28
28
|
}
|
29
|
-
|
30
|
-
t.style.transition = `opacity ${
|
29
|
+
s === "fade" && (t.style.opacity = "0", t.getBoundingClientRect(), requestAnimationFrame(() => {
|
30
|
+
t.style.transition = `opacity ${o} ease-in-out ${n}s`, t.style.opacity = "1";
|
31
31
|
}));
|
32
32
|
}
|
33
|
-
}, [h,
|
33
|
+
}, [h, s, o, n]), /* @__PURE__ */ p(R, { width: 2 * e, height: 2 * e, viewBox: `0 0 ${2 * e} ${2 * e}`, children: /* @__PURE__ */ p(
|
34
34
|
k,
|
35
35
|
{
|
36
36
|
ref: f,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"animated-arc.js","sources":["../../../../src/features/ui/animated-arc/animated-arc.tsx"],"sourcesContent":["import type { IAnimatedArcProps } from './animated-arc-types';\n\nimport React, { useRef, useLayoutEffect, useMemo } from 'react';\n\nimport { describeArc } from './animated-arc-helpers';\nimport * as Styled from './animated-arc-styled';\n\nconst AnimatedArc: React.FC<IAnimatedArcProps> = ({\n radius,\n strokeWidth,\n color,\n targetAngle,\n startAngle = 0,\n duration = 2,\n mode = 'draw',\n delay = 0,\n showAnimatedRainbowArc = false,\n}) => {\n const pathRef = useRef<SVGPathElement>(null);\n\n const center = radius;\n const arcRadius = radius - strokeWidth / 2; // draw arc inside the visible bounds\n const arcPath = useMemo(\n () => describeArc(center, center, arcRadius, startAngle, targetAngle),\n [targetAngle, startAngle, arcRadius, center],\n );\n\n useLayoutEffect(() => {\n const path = pathRef.current;\n\n if (!path) return;\n\n if (mode === 'draw') {\n const length = path.getTotalLength();\n\n path.style.strokeDasharray = `${length}`;\n path.style.strokeDashoffset = `${length}`;\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `stroke-dashoffset ${duration}s linear ${delay}s`;\n path.style.strokeDashoffset = '0';\n });\n }\n\n if (mode === 'fade') {\n path.style.opacity = '0';\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `opacity ${duration}
|
1
|
+
{"version":3,"file":"animated-arc.js","sources":["../../../../src/features/ui/animated-arc/animated-arc.tsx"],"sourcesContent":["import type { IAnimatedArcProps } from './animated-arc-types';\n\nimport React, { useRef, useLayoutEffect, useMemo } from 'react';\n\nimport { describeArc } from './animated-arc-helpers';\nimport * as Styled from './animated-arc-styled';\n\nconst AnimatedArc: React.FC<IAnimatedArcProps> = ({\n radius,\n strokeWidth,\n color,\n targetAngle,\n startAngle = 0,\n duration = 2,\n mode = 'draw',\n delay = 0,\n showAnimatedRainbowArc = false,\n}) => {\n const pathRef = useRef<SVGPathElement>(null);\n\n const center = radius;\n const arcRadius = radius - strokeWidth / 2; // draw arc inside the visible bounds\n const arcPath = useMemo(\n () => describeArc(center, center, arcRadius, startAngle, targetAngle),\n [targetAngle, startAngle, arcRadius, center],\n );\n\n useLayoutEffect(() => {\n const path = pathRef.current;\n\n if (!path) return;\n\n if (mode === 'draw') {\n const length = path.getTotalLength();\n\n path.style.strokeDasharray = `${length}`;\n path.style.strokeDashoffset = `${length}`;\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `stroke-dashoffset ${duration}s linear ${delay}s`;\n path.style.strokeDashoffset = '0';\n });\n }\n\n if (mode === 'fade') {\n path.style.opacity = '0';\n path.getBoundingClientRect();\n\n requestAnimationFrame(() => {\n path.style.transition = `opacity ${duration} ease-in-out ${delay}s`;\n path.style.opacity = '1';\n });\n }\n }, [arcPath, mode, duration, delay]);\n\n return (\n <Styled.Svg width={2 * radius} height={2 * radius} viewBox={`0 0 ${2 * radius} ${2 * radius}`}>\n <Styled.Path\n ref={pathRef}\n d={arcPath}\n fill=\"none\"\n stroke={color}\n strokeWidth={strokeWidth}\n strokeLinecap=\"butt\"\n $showAnimatedRainbowArc={showAnimatedRainbowArc}\n />\n </Styled.Svg>\n );\n};\n\nexport default AnimatedArc;\n"],"names":["AnimatedArc","radius","strokeWidth","color","targetAngle","startAngle","duration","mode","delay","showAnimatedRainbowArc","pathRef","useRef","center","arcRadius","arcPath","useMemo","describeArc","useLayoutEffect","path","length","Styled.Svg","jsx","Styled.Path","AnimatedArc$1"],"mappings":";;;;AAOA,MAAMA,IAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,UAAAC,IAAW;AAAA,EACX,MAAAC,IAAO;AAAA,EACP,OAAAC,IAAQ;AAAA,EACR,wBAAAC,IAAyB;AAC3B,MAAM;AACE,QAAAC,IAAUC,EAAuB,IAAI,GAErCC,IAASX,GACTY,IAAYZ,IAASC,IAAc,GACnCY,IAAUC;AAAA,IACd,MAAMC,EAAYJ,GAAQA,GAAQC,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