@cuemath/leap 2.9.7 → 2.9.8-as11
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 -0
- 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 +9 -1
- 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/border-path-animation.js +13 -0
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.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 +194 -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/arrow-tooltip/arrow-tooltip.js +30 -29
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js.map +1 -1
- 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 +30 -15
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/lottie-animation/lottie-animation.js +19 -13
- package/dist/features/ui/lottie-animation/lottie-animation.js.map +1 -1
- package/dist/features/ui/theme/button.js +22 -107
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +341 -34
- package/dist/index.js +443 -421
- 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 +1 -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
@@ -0,0 +1,112 @@
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
2
|
+
import S from "../../../../assets/line-icons/icons/more-vertical.js";
|
3
|
+
import I from "../../../../assets/line-icons/icons/skip.js";
|
4
|
+
import O from "../../../ui/context-menu/context-menu.js";
|
5
|
+
import c from "../../../ui/layout/flex-view.js";
|
6
|
+
import u from "../../../ui/text/text.js";
|
7
|
+
import T from "../../comps/node-card/node-card.js";
|
8
|
+
import j from "../../comps/node-card/node-menu-options/node-menu-options.js";
|
9
|
+
import { BLOCK_NAME as k } from "../../constants/block-constants.js";
|
10
|
+
import { getSheetNLessonCount as y } from "../../utils/index.js";
|
11
|
+
import { BlockSectionWrapper as M, BlockOptionsWrapper as B, BlockSheetContainer as K } from "./block-sections-styled.js";
|
12
|
+
const q = ({
|
13
|
+
userType: o,
|
14
|
+
imageHue: m,
|
15
|
+
blockData: l,
|
16
|
+
lessonIdx: s,
|
17
|
+
isLastBlock: C,
|
18
|
+
isGoalBlock: r,
|
19
|
+
onNodeAttempt: g,
|
20
|
+
onNodeAttemptLocationChange: x,
|
21
|
+
onNodeMarkAsDone: _,
|
22
|
+
onNodeReattempt: b,
|
23
|
+
onNodeReview: E,
|
24
|
+
onNodeView: N,
|
25
|
+
onBlockSkipUnskip: i
|
26
|
+
}) => {
|
27
|
+
const { block_type: p, name: a, sheets: d, permissions: w } = l, { can_skip: h, can_un_skip: e } = w, f = k[p], A = y(e, d.length, r, s), L = [
|
28
|
+
{
|
29
|
+
id: "node-card-skip",
|
30
|
+
label: e ? "Revert 'Skip'" : "Skip",
|
31
|
+
icon: I,
|
32
|
+
disabled: !1,
|
33
|
+
onClick: () => i == null ? void 0 : i(l, h)
|
34
|
+
}
|
35
|
+
];
|
36
|
+
return o === "STUDENT" && e ? null : /* @__PURE__ */ t(
|
37
|
+
M,
|
38
|
+
{
|
39
|
+
$background: r ? `${m}_1` : "WHITE_1",
|
40
|
+
$gutterX: 1,
|
41
|
+
$lastBlock: C,
|
42
|
+
$flexGap: 12,
|
43
|
+
children: /* @__PURE__ */ n(c, { $flexGap: 12, children: [
|
44
|
+
/* @__PURE__ */ n(c, { $flexDirection: "row", $alignItems: "center", $justifyContent: "space-between", children: [
|
45
|
+
/* @__PURE__ */ n(c, { $opacity: e ? 0.5 : 1, children: [
|
46
|
+
/* @__PURE__ */ n(
|
47
|
+
u,
|
48
|
+
{
|
49
|
+
$renderAs: "ac4",
|
50
|
+
$color: "BLACK_T_60",
|
51
|
+
$textDecoration: e ? "line-through" : "none",
|
52
|
+
children: [
|
53
|
+
f === "Puzzles" ? a : f,
|
54
|
+
" ",
|
55
|
+
A
|
56
|
+
]
|
57
|
+
}
|
58
|
+
),
|
59
|
+
!!r && !!s && /* @__PURE__ */ t(
|
60
|
+
u,
|
61
|
+
{
|
62
|
+
$renderAs: "ab2-bold",
|
63
|
+
$color: "BLACK_1",
|
64
|
+
$textDecoration: e ? "line-through" : "none",
|
65
|
+
children: a
|
66
|
+
}
|
67
|
+
)
|
68
|
+
] }),
|
69
|
+
o === "TEACHER" && (h || e) && /* @__PURE__ */ t(
|
70
|
+
O,
|
71
|
+
{
|
72
|
+
targetElement: /* @__PURE__ */ t(
|
73
|
+
B,
|
74
|
+
{
|
75
|
+
$width: 20,
|
76
|
+
$height: 20,
|
77
|
+
$justifyContent: "center",
|
78
|
+
$alignItems: "center",
|
79
|
+
children: /* @__PURE__ */ t(S, { width: 16, height: 16 })
|
80
|
+
}
|
81
|
+
),
|
82
|
+
menuElement: /* @__PURE__ */ t(j, { options: L }),
|
83
|
+
menuOffset: 5,
|
84
|
+
menuZIndex: 4
|
85
|
+
}
|
86
|
+
)
|
87
|
+
] }),
|
88
|
+
/* @__PURE__ */ t(K, { $opacity: e ? 0.5 : 1, children: d.map(($) => /* @__PURE__ */ t(
|
89
|
+
T,
|
90
|
+
{
|
91
|
+
imageHue: m || "BLUE",
|
92
|
+
userType: o,
|
93
|
+
nodeData: $,
|
94
|
+
blockType: p,
|
95
|
+
isSkipped: e,
|
96
|
+
onNodeAttempt: g,
|
97
|
+
onNodeAttemptLocationChange: x,
|
98
|
+
onNodeMarkAsDone: _,
|
99
|
+
onNodeReattempt: b,
|
100
|
+
onNodeReview: E,
|
101
|
+
onNodeView: N
|
102
|
+
},
|
103
|
+
$.node_id
|
104
|
+
)) })
|
105
|
+
] })
|
106
|
+
}
|
107
|
+
);
|
108
|
+
};
|
109
|
+
export {
|
110
|
+
q as default
|
111
|
+
};
|
112
|
+
//# sourceMappingURL=block-section-view.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport { BLOCK_NAME } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n}) => {\n const { block_type: blockType, name, sheets, permissions } = blockData;\n\n const { can_skip: canSkip, can_un_skip: canUnskip } = permissions;\n const blockName = BLOCK_NAME[blockType];\n\n const sheetNLessonCount = getSheetNLessonCount(canUnskip, sheets.length, isGoalBlock, lessonIdx);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-skip',\n label: canUnskip ? `Revert 'Skip'` : 'Skip',\n icon: SkipIcon,\n disabled: false,\n onClick: () => onBlockSkipUnskip?.(blockData, canSkip),\n },\n ];\n\n if (userType === 'STUDENT' && canUnskip) return null;\n\n return (\n <Styled.BlockSectionWrapper\n $background={isGoalBlock ? `${imageHue}_1` : 'WHITE_1'}\n $gutterX={1}\n $lastBlock={isLastBlock}\n $flexGap={12}\n >\n <FlexView $flexGap={12}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $opacity={canUnskip ? 0.5 : 1}>\n <Text\n $renderAs=\"ac4\"\n $color=\"BLACK_T_60\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {blockName === 'Puzzles' ? name : blockName} {sheetNLessonCount}\n </Text>\n\n {!!isGoalBlock && !!lessonIdx && (\n <Text\n $renderAs=\"ab2-bold\"\n $color=\"BLACK_1\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {name}\n </Text>\n )}\n </FlexView>\n\n {userType === 'TEACHER' && (canSkip || canUnskip) && (\n <ContextMenu\n targetElement={\n <Styled.BlockOptionsWrapper\n $width={20}\n $height={20}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <MoreVerticalIcon width={16} height={16} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <Styled.BlockSheetContainer $opacity={canUnskip ? 0.5 : 1}>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n />\n ))}\n </Styled.BlockSheetContainer>\n </FlexView>\n </Styled.BlockSectionWrapper>\n );\n};\n\nexport default BlockSectionView;\n"],"names":["BlockSectionView","userType","imageHue","blockData","lessonIdx","isLastBlock","isGoalBlock","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","blockType","name","sheets","permissions","canSkip","canUnskip","blockName","BLOCK_NAME","sheetNLessonCount","getSheetNLessonCount","menuOptions","SkipIcon","jsx","Styled.BlockSectionWrapper","jsxs","FlexView","Text","ContextMenu","Styled.BlockOptionsWrapper","MoreVerticalIcon","NodeMenuOptions","Styled.BlockSheetContainer","nodeData","NodeCard"],"mappings":";;;;;;;;;;;AAeA,MAAMA,IAA2C,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,6BAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAYC,GAAW,MAAAC,GAAM,QAAAC,GAAQ,aAAAC,EAAgB,IAAAd,GAEvD,EAAE,UAAUe,GAAS,aAAaC,MAAcF,G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BAACM;AAAAA,gBAAA;AAAA,kBACC,QAAQ;AAAA,kBACR,SAAS;AAAA,kBACT,iBAAgB;AAAA,kBAChB,aAAY;AAAA,kBAEZ,UAAC,gBAAAN,EAAAO,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,gBAAA;AAAA,cAC3C;AAAA,cAEF,aAAa,gBAAAP,EAACQ,GAAgB,EAAA,SAASV,EAAa,CAAA;AAAA,cACpD,YAAY;AAAA,cACZ,YAAY;AAAA,YAAA;AAAA,UACd;AAAA,QAAA,GAEJ;AAAA,QAEA,gBAAAE,EAACS,GAAA,EAA2B,UAAUhB,IAAY,MAAM,GACrD,UAAOH,EAAA,IAAI,CACVoB,MAAA,gBAAAV;AAAA,UAACW;AAAA,UAAA;AAAA,YAEC,UAAUnC,KAAY;AAAA,YACtB,UAAAD;AAAA,YACA,UAAAmC;AAAA,YACA,WAAAtB;AAAA,YACA,WAAWK;AAAA,YACX,eAAAZ;AAAA,YACA,6BAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,UAAA;AAAA,UAXKwB,EAAS;AAAA,QAajB,CAAA,GACH;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import t from "../../../ui/layout/flex-view.js";
|
3
|
+
const i = o(t)(({ $lastBlock: r }) => `
|
4
|
+
padding-top: 32px;
|
5
|
+
${r ? "padding-bottom: 32px;" : "padding-bottom: 0px;"}
|
6
|
+
`), a = o.div(({ $opacity: r }) => `
|
7
|
+
display: grid;
|
8
|
+
grid-template-columns: repeat(4, 1fr);
|
9
|
+
grid-row-gap: 12px;
|
10
|
+
grid-column-gap: 16px;
|
11
|
+
opacity: ${r ?? 1};
|
12
|
+
|
13
|
+
`), n = o(t)(({ theme: r }) => `
|
14
|
+
cursor: pointer;
|
15
|
+
|
16
|
+
&:hover {
|
17
|
+
border-radius: 50%;
|
18
|
+
background: ${r.colors.WHITE_4};
|
19
|
+
}
|
20
|
+
`), d = o(t)`
|
21
|
+
min-height: calc(
|
22
|
+
100vh - 168px - 56px + 64px
|
23
|
+
); // 168 chapter banner, 56 header height , 64 bottom padding
|
24
|
+
|
25
|
+
&:last-child {
|
26
|
+
padding-bottom: 64px;
|
27
|
+
}
|
28
|
+
`;
|
29
|
+
export {
|
30
|
+
n as BlockOptionsWrapper,
|
31
|
+
i as BlockSectionWrapper,
|
32
|
+
a as BlockSheetContainer,
|
33
|
+
d as ChapterDetailsWrapper
|
34
|
+
};
|
35
|
+
//# sourceMappingURL=block-sections-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"block-sections-styled.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\ninterface IBlockSectionWrapper {\n $lastBlock?: boolean;\n}\n\nconst BlockSectionWrapper = styled(FlexView)<IBlockSectionWrapper>(({ $lastBlock }) => {\n return `\n padding-top: 32px;\n ${$lastBlock ? 'padding-bottom: 32px;' : 'padding-bottom: 0px;'}\n `;\n});\n\ninterface IBlockSheetContainer {\n $opacity?: number;\n}\n\nconst BlockSheetContainer = styled.div<IBlockSheetContainer>(({ $opacity }) => {\n return `\n display: grid;\n grid-template-columns: repeat(4, 1fr);\n grid-row-gap: 12px;\n grid-column-gap: 16px;\n opacity: ${$opacity ?? 1};\n\n `;\n});\n\nconst BlockOptionsWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_4}; \n }\n `;\n});\n\nconst ChapterDetailsWrapper = styled(FlexView)`\n min-height: calc(\n 100vh - 168px - 56px + 64px\n ); // 168 chapter banner, 56 header height , 64 bottom padding\n\n &:last-child {\n padding-bottom: 64px;\n }\n`;\n\nexport { BlockSectionWrapper, ChapterDetailsWrapper, BlockSheetContainer, BlockOptionsWrapper };\n"],"names":["BlockSectionWrapper","styled","FlexView","$lastBlock","BlockSheetContainer","$opacity","BlockOptionsWrapper","theme","ChapterDetailsWrapper"],"mappings":";;AAQA,MAAMA,IAAsBC,EAAOC,CAAQ,EAAwB,CAAC,EAAE,YAAAC,QAC7D;AAAA;AAAA,MAEHA,IAAa,0BAA0B,sBAAsB;AAAA,GAElE,GAMKC,IAAsBH,EAAO,IAA0B,CAAC,EAAE,UAAAI,QACvD;AAAA;AAAA;AAAA;AAAA;AAAA,eAKMA,KAAY,CAAC;AAAA;AAAA,GAG3B,GAEKC,IAAsBL,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAK,QACvC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAEKC,IAAwBP,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,83 @@
|
|
1
|
+
import { jsxs as I, jsx as s } from "react/jsx-runtime";
|
2
|
+
import { memo as w, useMemo as x } from "react";
|
3
|
+
import h from "./block-section-view.js";
|
4
|
+
import { ChapterDetailsWrapper as L } from "./block-sections-styled.js";
|
5
|
+
const E = w((_) => {
|
6
|
+
const {
|
7
|
+
blocks: t,
|
8
|
+
imageHue: n,
|
9
|
+
userType: l,
|
10
|
+
coreBlocksRef: g,
|
11
|
+
onNodeAttempt: i,
|
12
|
+
onNodeAttemptLocationChange: r,
|
13
|
+
onNodeMarkAsDone: c,
|
14
|
+
onNodeReattempt: p,
|
15
|
+
onNodeReview: d,
|
16
|
+
onNodeView: k,
|
17
|
+
onBlockSkipUnskip: m
|
18
|
+
} = _;
|
19
|
+
let a = 0;
|
20
|
+
const { goalBlocks: u, nonGoalBlocks: B } = x(
|
21
|
+
() => t.reduce(
|
22
|
+
(o, e) => (e.section_code === "GOALS" || e.section_code === "READINESS" ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
|
23
|
+
{ goalBlocks: [], nonGoalBlocks: [] }
|
24
|
+
),
|
25
|
+
[t]
|
26
|
+
);
|
27
|
+
return /* @__PURE__ */ I(
|
28
|
+
L,
|
29
|
+
{
|
30
|
+
$width: "100%",
|
31
|
+
$background: B.length ? "WHITE_1" : `${n}_1`,
|
32
|
+
children: [
|
33
|
+
/* @__PURE__ */ s("div", { ref: g, children: u.map((o, e) => {
|
34
|
+
const { block_type: N, block_id: A, permissions: G } = o;
|
35
|
+
let f = 0;
|
36
|
+
const S = e === u.length - 1;
|
37
|
+
return N === "GOAL" && (G.can_un_skip || (a += 1), f = a), /* @__PURE__ */ s(
|
38
|
+
h,
|
39
|
+
{
|
40
|
+
blockData: o,
|
41
|
+
userType: l,
|
42
|
+
isLastBlock: S,
|
43
|
+
lessonIdx: f,
|
44
|
+
imageHue: n,
|
45
|
+
isGoalBlock: !0,
|
46
|
+
onNodeAttempt: i,
|
47
|
+
onNodeAttemptLocationChange: r,
|
48
|
+
onNodeMarkAsDone: c,
|
49
|
+
onNodeReattempt: p,
|
50
|
+
onNodeReview: d,
|
51
|
+
onNodeView: k,
|
52
|
+
onBlockSkipUnskip: m
|
53
|
+
},
|
54
|
+
A
|
55
|
+
);
|
56
|
+
}) }),
|
57
|
+
B.map((o) => {
|
58
|
+
const { block_id: e } = o;
|
59
|
+
return /* @__PURE__ */ s(
|
60
|
+
h,
|
61
|
+
{
|
62
|
+
blockData: o,
|
63
|
+
userType: l,
|
64
|
+
imageHue: n,
|
65
|
+
onNodeAttempt: i,
|
66
|
+
onNodeAttemptLocationChange: r,
|
67
|
+
onNodeMarkAsDone: c,
|
68
|
+
onNodeReattempt: p,
|
69
|
+
onNodeReview: d,
|
70
|
+
onNodeView: k,
|
71
|
+
onBlockSkipUnskip: m
|
72
|
+
},
|
73
|
+
e
|
74
|
+
);
|
75
|
+
})
|
76
|
+
]
|
77
|
+
}
|
78
|
+
);
|
79
|
+
});
|
80
|
+
export {
|
81
|
+
E as default
|
82
|
+
};
|
83
|
+
//# sourceMappingURL=block-sections.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n } = props;\n\n let lessonCount = 0;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (block.section_code === 'GOALS' || block.section_code === 'READINESS') {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `${imageHue}_1` : 'WHITE_1'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n if (blockType === 'GOAL') {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onBlockSkipUnskip={onBlockSkipUnskip}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId } = blockData;\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onBlockSkipUnskip={onBlockSkipUnskip}\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","lessonCount","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","lessonIdx","isLastBlock","BlockSectionView"],"mappings":";;;;AAQM,MAAAA,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,eAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,EACE,IAAAX;AAEJ,MAAIY,IAAc;AAEZ,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;AAAA,IACpC,MACEd,EAAO;AAAA,MACL,CAACe,GAAKC,OACAA,EAAM,iBAAiB,WAAWA,EAAM,iBAAiB,cACvDD,EAAA,WAAW,KAAKC,CAAK,IAErBD,EAAA,cAA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WP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
@@ -0,0 +1,90 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import x from "../../../../assets/line-icons/icons/important.js";
|
3
|
+
import i from "../../../ui/layout/flex-view.js";
|
4
|
+
const f = o(i)(() => `
|
5
|
+
position: relative;
|
6
|
+
height: 168px;
|
7
|
+
`);
|
8
|
+
o.div`
|
9
|
+
width: 760px;
|
10
|
+
height: 100%;
|
11
|
+
position: relative;
|
12
|
+
`;
|
13
|
+
const m = o(i)`
|
14
|
+
position: absolute;
|
15
|
+
left: 73px;
|
16
|
+
top: 32px;
|
17
|
+
`, $ = o.img(({ theme: e }) => {
|
18
|
+
const { gutter: t } = e.layout;
|
19
|
+
return `
|
20
|
+
width: ${t * 6.625}px;
|
21
|
+
height: ${t * 6.625}px;
|
22
|
+
border-radius: 50%;
|
23
|
+
z-index: 1;
|
24
|
+
`;
|
25
|
+
}), y = o.svg(() => `
|
26
|
+
position: absolute;
|
27
|
+
inset: 50%;
|
28
|
+
transform: translate(-50%, -50%) rotate(-90deg);
|
29
|
+
z-index: 2;
|
30
|
+
`), I = o.circle(
|
31
|
+
({ theme: e, $progressCircle: t, $progress: n, $progressBackground: s }) => {
|
32
|
+
const { colors: r, layout: l } = e, { WHITE_1: h } = r, { gutter: a } = l, p = a * 21, u = t ? p - n : n;
|
33
|
+
return `
|
34
|
+
stroke-dasharray: ${p};
|
35
|
+
stroke-dashoffset: ${u};
|
36
|
+
stroke: ${t ? r[s || "BLACK"] : h};
|
37
|
+
|
38
|
+
stroke-width: ${a * 0.1875}px;
|
39
|
+
fill: none;
|
40
|
+
`;
|
41
|
+
}
|
42
|
+
), b = o(i)(({ theme: e }) => `
|
43
|
+
position: absolute;
|
44
|
+
top: 50%;
|
45
|
+
left: ${e.layout.gutter * 13.75}px;
|
46
|
+
transform: translateY(-50%);
|
47
|
+
z-index: 1;
|
48
|
+
`), k = o(x)(({
|
49
|
+
theme: e,
|
50
|
+
$progress: t,
|
51
|
+
$top: n,
|
52
|
+
$left: s
|
53
|
+
}) => {
|
54
|
+
const { gutter: r } = e.layout;
|
55
|
+
return t ? `
|
56
|
+
width: ${r * 1.25}px;
|
57
|
+
height: ${r * 1.25}px;
|
58
|
+
position: absolute;
|
59
|
+
top: ${n ?? 0}px;
|
60
|
+
left: ${s ?? 0}px;
|
61
|
+
transform: translate(-50%, -50%);
|
62
|
+
z-index: 2;
|
63
|
+
` : `
|
64
|
+
width: ${r * 0.75}px;
|
65
|
+
height: ${r * 0.75}px;
|
66
|
+
`;
|
67
|
+
}), w = o.div(({ theme: e }) => {
|
68
|
+
const { layout: t } = e;
|
69
|
+
return `
|
70
|
+
position: absolute;
|
71
|
+
top: 6px;
|
72
|
+
right: 8px;
|
73
|
+
z-index: 2;
|
74
|
+
|
75
|
+
width: ${t.gutter * 1.25}px;
|
76
|
+
height: ${t.gutter * 1.25}px;
|
77
|
+
border-radius: 50%;
|
78
|
+
`;
|
79
|
+
});
|
80
|
+
export {
|
81
|
+
f as BannerContainer,
|
82
|
+
$ as BannerImage,
|
83
|
+
m as BannerImageWrapper,
|
84
|
+
b as BannerTitleWrapper,
|
85
|
+
y as ChapterProgressSVG,
|
86
|
+
I as ChapterProgressSVGCircle,
|
87
|
+
w as StyledCheckIcon,
|
88
|
+
k as StyledImportantIcon
|
89
|
+
};
|
90
|
+
//# sourceMappingURL=chapter-banner-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chapter-banner-styled.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../ui/types';\n\nimport styled from 'styled-components';\n\nimport ImportantIcon from '../../../../assets/line-icons/icons/important';\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst BannerContainer = styled(FlexView)(() => {\n return `\n position: relative;\n height: 168px;\n `;\n});\n\nconst BannerContainerBg = styled.div`\n width: 760px;\n height: 100%;\n position: relative;\n`;\n\nconst BannerImageWrapper = styled(FlexView)`\n position: absolute;\n left: 73px;\n top: 32px;\n`;\n\nconst BannerImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: ${gutter * 6.625}px;\n height: ${gutter * 6.625}px;\n border-radius: 50%;\n z-index: 1;\n `;\n});\n\nconst ChapterProgressSVG = styled.svg(() => {\n return `\n position: absolute;\n inset: 50%;\n transform: translate(-50%, -50%) rotate(-90deg);\n z-index: 2;\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n $progressBackground?: TColorNames;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress, $progressBackground }) => {\n const { colors, layout } = theme;\n const { WHITE_1 } = colors;\n const { gutter } = layout;\n\n const strokeDashArray = gutter * 21;\n const strokeDashOffset = $progressCircle ? strokeDashArray - $progress : $progress;\n\n return `\n stroke-dasharray: ${strokeDashArray};\n stroke-dashoffset: ${strokeDashOffset};\n stroke: ${$progressCircle ? colors[$progressBackground || 'BLACK'] : WHITE_1};\n\n stroke-width: ${gutter * 0.1875}px;\n fill: none;\n `;\n },\n);\n\nconst BannerTitleWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: absolute;\n top: 50%;\n left: ${theme.layout.gutter * 13.75}px;\n transform: translateY(-50%);\n z-index: 1;\n `;\n});\n\ninterface IStyledImportantIconProps {\n $left?: number;\n $top?: number;\n $progress?: boolean;\n}\n\nconst StyledImportantIcon = styled(ImportantIcon)<IStyledImportantIconProps>(({\n theme,\n $progress,\n $top,\n $left,\n}) => {\n const { gutter } = theme.layout;\n\n if ($progress) {\n return `\n width: ${gutter * 1.25}px;\n height: ${gutter * 1.25}px;\n position: absolute;\n top: ${$top ?? 0}px;\n left: ${$left ?? 0}px;\n transform: translate(-50%, -50%);\n z-index: 2;\n `;\n }\n\n return `\n width: ${gutter * 0.75}px;\n height: ${gutter * 0.75}px;\n `;\n});\n\nconst StyledCheckIcon = styled.div(({ theme }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n top: 6px;\n right: 8px;\n z-index: 2;\n\n width: ${layout.gutter * 1.25}px;\n height: ${layout.gutter * 1.25}px;\n border-radius: 50%;\n `;\n});\n\nexport {\n BannerContainer,\n BannerContainerBg,\n BannerImageWrapper,\n BannerImage,\n ChapterProgressSVG,\n ChapterProgressSVGCircle,\n BannerTitleWrapper,\n StyledImportantIcon,\n StyledCheckIcon,\n};\n"],"names":["BannerContainer","styled","FlexView","BannerImageWrapper","BannerImage","theme","gutter","ChapterProgressSVG","ChapterProgressSVGCircle","$progressCircle","$progress","$progressBackground","colors","layout","WHITE_1","strokeDashArray","strokeDashOffset","BannerTitleWrapper","StyledImportantIcon","ImportantIcon","$top","$left","StyledCheckIcon"],"mappings":";;;AAOA,MAAMA,IAAkBC,EAAOC,CAAQ,EAAE,MAChC;AAAA;AAAA;AAAA,GAIR;AAEyBD,EAAO;AAAA;AAAA;AAAA;AAAA;AAM3B,MAAAE,IAAqBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMpCE,IAAcH,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AACtC,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA,aACIC,IAAS,KAAK;AAAA,cACbA,IAAS,KAAK;AAAA;AAAA;AAAA;AAI5B,CAAC,GAEKC,IAAqBN,EAAO,IAAI,MAC7B;AAAA;AAAA;AAAA;AAAA;AAAA,GAMR,GAQKO,IAA2BP,EAAO;AAAA,EACtC,CAAC,EAAE,OAAAI,GAAO,iBAAAI,GAAiB,WAAAC,GAAW,qBAAAC,QAA0B;AACxD,UAAA,EAAE,QAAAC,GAAQ,QAAAC,EAAW,IAAAR,GACrB,EAAE,SAAAS,EAAY,IAAAF,GACd,EAAE,QAAAN,EAAW,IAAAO,GAEbE,IAAkBT,IAAS,IAC3BU,IAAmBP,IAAkBM,IAAkBL,IAAYA;AAElE,WAAA;AAAA,0BACeK,CAAe;AAAA,2BACdC,CAAgB;AAAA,gBAC3BP,IAAkBG,EAAOD,KAAuB,OAAO,IAAIG,CAAO;AAAA;AAAA,sBAE5DR,IAAS,MAAM;AAAA;AAAA;AAAA,EAGnC;AACF,GAEMW,IAAqBhB,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAG,QACtC;AAAA;AAAA;AAAA,YAGGA,EAAM,OAAO,SAAS,KAAK;AAAA;AAAA;AAAA,GAItC,GAQKa,IAAsBjB,EAAOkB,CAAa,EAA6B,CAAC;AAAA,EAC5E,OAAAd;AAAA,EACA,WAAAK;AAAA,EACA,MAAAU;AAAA,EACA,OAAAC;AACF,MAAM;AACE,QAAA,EAAE,QAAAf,EAAO,IAAID,EAAM;AAEzB,SAAIK,IACK;AAAA,eACIJ,IAAS,IAAI;AAAA,gBACZA,IAAS,IAAI;AAAA;AAAA,aAEhBc,KAAQ,CAAC;AAAA,cACRC,KAAS,CAAC;AAAA;AAAA;AAAA,QAMf;AAAA,aACIf,IAAS,IAAI;AAAA,cACZA,IAAS,IAAI;AAAA;AAE3B,CAAC,GAEKgB,IAAkBrB,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AAC1C,QAAA,EAAE,QAAAQ,EAAW,IAAAR;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMIQ,EAAO,SAAS,IAAI;AAAA,cACnBA,EAAO,SAAS,IAAI;AAAA;AAAA;AAGlC,CAAC;"}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
import { jsx as e, jsxs as r } from "react/jsx-runtime";
|
2
|
+
import { memo as D, useMemo as d } from "react";
|
3
|
+
import { ILLUSTRATIONS as b } from "../../../../assets/illustrations/illustrations.js";
|
4
|
+
import g from "../../../../assets/line-icons/icons/check2.js";
|
5
|
+
import V from "../../../ui/image/image.js";
|
6
|
+
import n from "../../../ui/layout/flex-view.js";
|
7
|
+
import i from "../../../ui/text/text.js";
|
8
|
+
import C from "../../comps/tag/tag.js";
|
9
|
+
import { getChapterCompletionPercentage as W } from "../../utils/index.js";
|
10
|
+
import { BannerContainer as M, BannerImageWrapper as O, BannerImage as X, ChapterProgressSVG as j, ChapterProgressSVGCircle as $, StyledImportantIcon as f, StyledCheckIcon as H, BannerTitleWrapper as N } from "./chapter-banner-styled.js";
|
11
|
+
const a = 52, l = 54, c = 54, re = D((I) => {
|
12
|
+
const { progressStats: o, imageHue: S, title: x, imageUrl: R, bannerRef: u } = I, t = d(() => W(o), [o]), { iconTopVal: E, iconLeftVal: w } = d(() => {
|
13
|
+
const h = (-(t === 100 ? 60 : t) * 3.6 - 180) * Math.PI / 180, A = c + a * Math.sin(h), B = l + a * Math.cos(h);
|
14
|
+
return {
|
15
|
+
iconLeftVal: A,
|
16
|
+
iconTopVal: B
|
17
|
+
};
|
18
|
+
}, [t]);
|
19
|
+
if (!o) return null;
|
20
|
+
const { mandatory: T, optional: _, classwork: k } = o, { completed: y = 0, total: s = 0 } = T || {}, { completed: G = 0, total: p = 0 } = _ || {}, { completed: L = 0, total: m = 0 } = k || {}, P = m > 0 && L === m;
|
21
|
+
return /* @__PURE__ */ e(
|
22
|
+
M,
|
23
|
+
{
|
24
|
+
$flexDirection: "row",
|
25
|
+
$justifyContent: "center",
|
26
|
+
$alignItems: "center",
|
27
|
+
$widthX: 50,
|
28
|
+
$background: `${S}_4`,
|
29
|
+
ref: u,
|
30
|
+
children: /* @__PURE__ */ r(n, { $height: 168, $position: "relative", children: [
|
31
|
+
/* @__PURE__ */ e(
|
32
|
+
V,
|
33
|
+
{
|
34
|
+
width: "100%",
|
35
|
+
height: "168px",
|
36
|
+
src: b.CHAPTER_HEADER_BG,
|
37
|
+
alt: "Chapter header background",
|
38
|
+
withLoader: !0
|
39
|
+
}
|
40
|
+
),
|
41
|
+
/* @__PURE__ */ r(O, { children: [
|
42
|
+
/* @__PURE__ */ e(X, { src: R, alt: "Chapter image" }),
|
43
|
+
/* @__PURE__ */ r(j, { width: "108px", height: "108px", children: [
|
44
|
+
/* @__PURE__ */ e(
|
45
|
+
$,
|
46
|
+
{
|
47
|
+
$progress: 0,
|
48
|
+
r: a,
|
49
|
+
cx: l,
|
50
|
+
cy: c
|
51
|
+
}
|
52
|
+
),
|
53
|
+
/* @__PURE__ */ e(
|
54
|
+
$,
|
55
|
+
{
|
56
|
+
$progressCircle: !0,
|
57
|
+
$progressBackground: "BLACK",
|
58
|
+
$progress: 3.3 * t,
|
59
|
+
r: a,
|
60
|
+
cx: l,
|
61
|
+
cy: c
|
62
|
+
}
|
63
|
+
)
|
64
|
+
] }),
|
65
|
+
t > 0 && /* @__PURE__ */ e(f, { $progress: !0, $top: E, $left: w }),
|
66
|
+
t === 100 && /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(C, { Icon: g }) })
|
67
|
+
] }),
|
68
|
+
/* @__PURE__ */ r(N, { $flexGap: 4, children: [
|
69
|
+
/* @__PURE__ */ e(i, { $renderAs: "ah4-bold", children: x }),
|
70
|
+
/* @__PURE__ */ r(n, { $flexDirection: "row", $alignItems: "center", $flexGapX: 2.75, children: [
|
71
|
+
!!s && /* @__PURE__ */ r(n, { $position: "relative", $flexDirection: "row", children: [
|
72
|
+
/* @__PURE__ */ e(f, {}),
|
73
|
+
/* @__PURE__ */ r(n, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
|
74
|
+
/* @__PURE__ */ r(i, { $renderAs: "ab2", children: [
|
75
|
+
"Core - ",
|
76
|
+
y,
|
77
|
+
"/",
|
78
|
+
s
|
79
|
+
] }),
|
80
|
+
P && /* @__PURE__ */ e(C, { Icon: g, label: "CW" })
|
81
|
+
] })
|
82
|
+
] }),
|
83
|
+
p > 0 && /* @__PURE__ */ r(i, { $renderAs: "ab2", children: [
|
84
|
+
"Supplementary - ",
|
85
|
+
G,
|
86
|
+
"/",
|
87
|
+
p
|
88
|
+
] })
|
89
|
+
] })
|
90
|
+
] })
|
91
|
+
] })
|
92
|
+
}
|
93
|
+
);
|
94
|
+
});
|
95
|
+
export {
|
96
|
+
re as default
|
97
|
+
};
|
98
|
+
//# sourceMappingURL=chapter-banner.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chapter-banner.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.tsx"],"sourcesContent":["import type { IChapterBannerProps } from './chapter-banner-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport Tag from '../../comps/tag/tag';\nimport { getChapterCompletionPercentage } from '../../utils';\nimport * as Styled from './chapter-banner-styled';\n\nconst PROGRESS_CIRCLE_RADIUS = 52;\nconst PROGRESS_CIRCLE_CENTER_X = 54;\nconst PROGRESS_CIRCLE_CENTER_Y = 54;\n\n// This component renders a banner for a chapter, displaying its title, progress, and associated tags.\n// It includes an image, progress visualization, and details about the chapter's core and supplementary sheets.\n// It calculates the completion percentage and dynamically positions an icon based on progress.\nconst ChapterBanner: FC<IChapterBannerProps> = memo(props => {\n const { progressStats, imageHue, title, imageUrl, bannerRef } = props;\n\n const completionPercentage = useMemo(() => {\n return getChapterCompletionPercentage(progressStats);\n }, [progressStats]);\n\n const { iconTopVal, iconLeftVal } = useMemo(() => {\n //* Calculate the position of the important icon based on the completion percentage\n //* Convert degrees to radians\n const angleInDegree = completionPercentage === 100 ? 60 : completionPercentage;\n\n const angleInRadian = ((-angleInDegree * 3.6 - 180) * Math.PI) / 180;\n const positionX = PROGRESS_CIRCLE_CENTER_Y + PROGRESS_CIRCLE_RADIUS * Math.sin(angleInRadian);\n const positionY = PROGRESS_CIRCLE_CENTER_X + PROGRESS_CIRCLE_RADIUS * Math.cos(angleInRadian);\n\n return {\n iconLeftVal: positionX,\n iconTopVal: positionY,\n };\n }, [completionPercentage]);\n\n if (!progressStats) return null;\n\n const { mandatory, optional, classwork: classWork } = progressStats;\n const { completed: completedMandatorySheets = 0, total: totalMandatorySheets = 0 } =\n mandatory || {};\n const { completed: completedOptionalSheets = 0, total: totalOptionalSheets = 0 } = optional || {};\n const { completed: completedClassWorkSheets = 0, total: totalClassWorkSheets = 0 } =\n classWork || {};\n const showClassWorkTag =\n totalClassWorkSheets > 0 && completedClassWorkSheets === totalClassWorkSheets;\n\n return (\n <Styled.BannerContainer\n $flexDirection=\"row\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={50}\n $background={`${imageHue}_4`}\n ref={bannerRef}\n >\n <FlexView $height={168} $position=\"relative\">\n <Image\n width=\"100%\"\n height=\"168px\"\n src={ILLUSTRATIONS.CHAPTER_HEADER_BG}\n alt=\"Chapter header background\"\n withLoader\n />\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n <Styled.ChapterProgressSVG width=\"108px\" height=\"108px\">\n <Styled.ChapterProgressSVGCircle\n $progress={0}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={'BLACK'}\n $progress={3.3 * completionPercentage}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n </Styled.ChapterProgressSVG>\n\n {completionPercentage > 0 && (\n <Styled.StyledImportantIcon $progress $top={iconTopVal} $left={iconLeftVal} />\n )}\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIcon>\n <Tag Icon={Check2Icon} />\n </Styled.StyledCheckIcon>\n )}\n </Styled.BannerImageWrapper>\n <Styled.BannerTitleWrapper $flexGap={4}>\n <Text $renderAs=\"ah4-bold\">{title}</Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={2.75}>\n {!!totalMandatorySheets && (\n <FlexView $position=\"relative\" $flexDirection=\"row\">\n <Styled.StyledImportantIcon />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <Text $renderAs=\"ab2\">\n Core - {completedMandatorySheets}/{totalMandatorySheets}\n </Text>\n {showClassWorkTag && <Tag Icon={Check2Icon} label=\"CW\" />}\n </FlexView>\n </FlexView>\n )}\n {totalOptionalSheets > 0 && (\n <Text $renderAs=\"ab2\">\n Supplementary - {completedOptionalSheets}/{totalOptionalSheets}\n </Text>\n )}\n </FlexView>\n </Styled.BannerTitleWrapper>\n </FlexView>\n </Styled.BannerContainer>\n );\n});\n\nexport default ChapterBanner;\n"],"names":["PROGRESS_CIRCLE_RADIUS","PROGRESS_CIRCLE_CENTER_X","PROGRESS_CIRCLE_CENTER_Y","ChapterBanner","memo","props","progressStats","imageHue","title","imageUrl","bannerRef","completionPercentage","useMemo","getChapterCompletionPercentage","iconTopVal","iconLeftVal","angleInRadian","positionX","positionY","mandatory","optional","classWork","completedMandatorySheets","totalMandatorySheets","completedOptionalSheets","totalOptionalSheets","completedClassWorkSheets","totalClassWorkSheets","showClassWorkTag","jsx","Styled.BannerContainer","jsxs","FlexView","Image","ILLUSTRATIONS","Styled.BannerImageWrapper","Styled.BannerImage","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.StyledImportantIcon","Styled.StyledCheckIcon","Tag","Check2Icon","Styled.BannerTitleWrapper","Text"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAyB,IACzBC,IAA2B,IAC3BC,IAA2B,IAK3BC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,eAAAC,GAAe,UAAAC,GAAU,OAAAC,GAAO,UAAAC,GAAU,WAAAC,EAAc,IAAAL,GAE1DM,IAAuBC,EAAQ,MAC5BC,EAA+BP,CAAa,GAClD,CAACA,CAAa,CAAC,GAEZ,EAAE,YAAAQ,GAAY,aAAAC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B,IAAsB,KACpB,gBAAAM,EAAAa,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,cAAA;AAAA,cACHpB;AAAA,cAAwB;AAAA,cAAEC;AAAA,YAAA,GAC7C;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import o from "styled-components";
|
2
|
+
import r from "../../ui/layout/flex-view.js";
|
3
|
+
const a = o.div(({ theme: t }) => `
|
4
|
+
height: 100%;
|
5
|
+
position: absolute;
|
6
|
+
left: 0;
|
7
|
+
right: 0;
|
8
|
+
top: 0;
|
9
|
+
bottom: 0;
|
10
|
+
background: rgba(204, 204, 204, 0.25);
|
11
|
+
z-index: 2;
|
12
|
+
|
13
|
+
& * {
|
14
|
+
pointer-events: none;
|
15
|
+
}
|
16
|
+
|
17
|
+
& img {
|
18
|
+
top: 50%;
|
19
|
+
position: absolute;
|
20
|
+
left: 50%;
|
21
|
+
transform: translate(-50%, -50%);
|
22
|
+
width: ${t.layout.gutter * 5}px;
|
23
|
+
height: ${t.layout.gutter * 5}px;
|
24
|
+
filter: brightness(0);
|
25
|
+
}
|
26
|
+
`), p = o(r)(
|
27
|
+
({ $disablePointerEvents: t, theme: e }) => `
|
28
|
+
position: relative;
|
29
|
+
margin: 0 auto;
|
30
|
+
pointer-events: ${t ? "none" : "auto"};
|
31
|
+
border: 1px solid ${e.colors.WHITE_5};
|
32
|
+
border-top: none;
|
33
|
+
`
|
34
|
+
), s = o(r)`
|
35
|
+
position: absolute;
|
36
|
+
top: 0;
|
37
|
+
left: 0;
|
38
|
+
z-index: 6;
|
39
|
+
`, l = o(r)(({ theme: t }) => `
|
40
|
+
position: sticky;
|
41
|
+
top: ${t.layout.gutter}px;
|
42
|
+
transform: translateX(${t.layout.gutter}px);
|
43
|
+
z-index: 6;
|
44
|
+
`);
|
45
|
+
export {
|
46
|
+
s as BackButtonContainer,
|
47
|
+
l as BackButtonWrapper,
|
48
|
+
p as ContentWrapper,
|
49
|
+
a as LoaderWrapper
|
50
|
+
};
|
51
|
+
//# sourceMappingURL=chapter-details-styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"chapter-details-styled.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nconst LoaderWrapper = styled.div(({ theme }) => {\n return `\n height: 100%;\n position: absolute;\n left: 0;\n right: 0;\n top: 0;\n bottom: 0;\n background: rgba(204, 204, 204, 0.25);\n z-index: 2;\n\n & * {\n pointer-events: none;\n }\n\n & img {\n top: 50%;\n position: absolute;\n left: 50%;\n transform: translate(-50%, -50%);\n width: ${theme.layout.gutter * 5}px;\n height: ${theme.layout.gutter * 5}px;\n filter: brightness(0);\n }\n `;\n});\n\nconst ContentWrapper = styled(FlexView)<{ $disablePointerEvents: boolean }>(\n ({ $disablePointerEvents, theme }) => `\n position: relative;\n margin: 0 auto;\n pointer-events: ${$disablePointerEvents ? 'none' : 'auto'};\n border: 1px solid ${theme.colors.WHITE_5};\n border-top: none;\n `,\n);\n\nconst BackButtonContainer = styled(FlexView)`\n position: absolute;\n top: 0;\n left: 0;\n z-index: 6;\n`;\n\nconst BackButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: ${theme.layout.gutter}px;\n transform: translateX(${theme.layout.gutter}px);\n z-index: 6;\n `;\n});\n\nexport { ContentWrapper, LoaderWrapper, BackButtonContainer, BackButtonWrapper };\n"],"names":["LoaderWrapper","styled","theme","ContentWrapper","FlexView","$disablePointerEvents","BackButtonContainer","BackButtonWrapper"],"mappings":";;AAIA,MAAMA,IAAgBC,EAAO,IAAI,CAAC,EAAE,OAAAC,QAC3B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAmBMA,EAAM,OAAO,SAAS,CAAC;AAAA,gBACtBA,EAAM,OAAO,SAAS,CAAC;AAAA;AAAA;AAAA,GAItC,GAEKC,IAAiBF,EAAOG,CAAQ;AAAA,EACpC,CAAC,EAAE,uBAAAC,GAAuB,OAAAH,EAAA,MAAY;AAAA;AAAA;AAAA,wBAGhBG,IAAwB,SAAS,MAAM;AAAA,0BACrCH,EAAM,OAAO,OAAO;AAAA;AAAA;AAG9C,GAEMI,IAAsBL,EAAOG,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOrCG,IAAoBN,EAAOG,CAAQ,EAAE,CAAC,EAAE,OAAAF,QACrC;AAAA;AAAA,WAEEA,EAAM,OAAO,MAAM;AAAA,4BACFA,EAAM,OAAO,MAAM;AAAA;AAAA,GAG9C;"}
|