@cuemath/leap 2.9.4-as4 → 2.9.4-link.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +0 -9
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/bin2.js +8 -7
- 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/lottie/lottie.js +1 -9
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/api.js +2 -3
- package/dist/constants/api.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +33 -99
- 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 +49 -92
- 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 +70 -64
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +2 -5
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/journey/comps/coachmark/coachmark-styled.js +5 -12
- package/dist/features/journey/comps/coachmark/coachmark-styled.js.map +1 -1
- 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/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/use-journey/journey-context-provider.js +28 -36
- package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
- package/dist/features/journey/use-journey/journey-styled.js +5 -10
- 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 +49 -42
- 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 +4 -12
- 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 +105 -128
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map +1 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +92 -0
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +1 -0
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +25 -0
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +1 -0
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +20 -14
- 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 +50 -26
- package/dist/features/milestone/create/comps/sheets-list/sheets-list.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +43 -49
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/create/utils/index.js +38 -33
- 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 +53 -51
- 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 +40 -42
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-container.js +62 -64
- package/dist/features/milestone/edit/goal-edit-container.js.map +1 -1
- package/dist/features/milestone/edit/goal-edit-helpers.js +53 -50
- package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-container.js +52 -54
- 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 +17 -9
- 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 +104 -136
- 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/context-menu-helper/menu-element-styled.js +13 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +38 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +123 -107
- 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 +175 -155
- 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 +10 -24
- 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 +86 -80
- 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 +22 -10
- 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-status.js +53 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +37 -70
- 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 +176 -114
- 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-info.js +25 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-rank.js +16 -29
- 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 +23 -19
- 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 +35 -23
- 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 +100 -96
- package/dist/features/milestone/milestone-list-container/milestone-list-container.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 +112 -114
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js +18 -16
- package/dist/features/milestone/milestone-tests/tests-creation/tests-creation.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +34 -6
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +135 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-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 +3 -4
- 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/offering-information/offering-information.js +21 -21
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/pricing-cards.js +46 -46
- package/dist/features/trial-session/comps/pricing/pricing-cards.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/pricing.js +25 -25
- package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/arrow-tooltip.js +29 -30
- 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 +14 -28
- package/dist/features/ui/context-menu/context-menu-styled.js.map +1 -1
- package/dist/features/ui/context-menu/context-menu.js +15 -30
- package/dist/features/ui/context-menu/context-menu.js.map +1 -1
- package/dist/features/ui/theme/button.js +107 -22
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +32 -308
- package/dist/index.js +470 -498
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/alarm.js +0 -41
- package/dist/assets/line-icons/icons/alarm.js.map +0 -1
- package/dist/assets/line-icons/icons/dart.js +0 -23
- package/dist/assets/line-icons/icons/dart.js.map +0 -1
- package/dist/assets/line-icons/icons/exclamation.js +0 -26
- package/dist/assets/line-icons/icons/exclamation.js.map +0 -1
- package/dist/assets/line-icons/icons/home2.js +0 -25
- package/dist/assets/line-icons/icons/home2.js.map +0 -1
- package/dist/assets/line-icons/icons/important.js +0 -23
- package/dist/assets/line-icons/icons/important.js.map +0 -1
- package/dist/assets/line-icons/icons/puzzle.js +0 -25
- package/dist/assets/line-icons/icons/puzzle.js.map +0 -1
- package/dist/assets/line-icons/icons/recap.js +0 -32
- package/dist/assets/line-icons/icons/recap.js.map +0 -1
- package/dist/assets/line-icons/icons/skip-colored.js +0 -43
- package/dist/assets/line-icons/icons/skip-colored.js.map +0 -1
- package/dist/assets/line-icons/icons/status.js +0 -41
- package/dist/assets/line-icons/icons/status.js.map +0 -1
- package/dist/assets/line-icons/icons/testtube.js +0 -33
- package/dist/assets/line-icons/icons/testtube.js.map +0 -1
- package/dist/features/chapters-v2/api/chapter.js +0 -10
- package/dist/features/chapters-v2/api/chapter.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +0 -112
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js +0 -26
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections-styled.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +0 -73
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js +0 -90
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +0 -97
- package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js +0 -52
- package/dist/features/chapters-v2/chapter-details/chapter-details-styled.js.map +0 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +0 -103
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js +0 -13
- package/dist/features/chapters-v2/comps/node-card/border-path-animation.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +0 -153
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +0 -16
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-card.js +0 -12
- package/dist/features/chapters-v2/comps/node-card/node-card.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js +0 -32
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options-styled.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js +0 -31
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-options.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +0 -171
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +0 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +0 -192
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +0 -1
- package/dist/features/chapters-v2/comps/tag/tag-styled.js +0 -13
- package/dist/features/chapters-v2/comps/tag/tag-styled.js.map +0 -1
- package/dist/features/chapters-v2/comps/tag/tag.js +0 -28
- package/dist/features/chapters-v2/comps/tag/tag.js.map +0 -1
- package/dist/features/chapters-v2/constants/block-constants.js +0 -20
- package/dist/features/chapters-v2/constants/block-constants.js.map +0 -1
- package/dist/features/chapters-v2/constants/node-constants.js +0 -14
- package/dist/features/chapters-v2/constants/node-constants.js.map +0 -1
- package/dist/features/chapters-v2/utils/index.js +0 -41
- package/dist/features/chapters-v2/utils/index.js.map +0 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +0 -144
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
- package/dist/features/homework/card-menu-options.js +0 -38
- package/dist/features/homework/card-menu-options.js.map +0 -1
- package/dist/features/homework/card-title.js +0 -15
- package/dist/features/homework/card-title.js.map +0 -1
- package/dist/features/homework/homework-card-view.js +0 -131
- package/dist/features/homework/homework-card-view.js.map +0 -1
- package/dist/features/homework/homework-card.js +0 -205
- package/dist/features/homework/homework-card.js.map +0 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +0 -10
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +0 -1
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +0 -71
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +0 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +0 -208
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +0 -1
- package/dist/features/homework/node-progress.js +0 -29
- package/dist/features/homework/node-progress.js.map +0 -1
- package/dist/features/homework/styles.js +0 -130
- package/dist/features/homework/styles.js.map +0 -1
- package/dist/features/journey/hooks/use-home-page-journey.js +0 -189
- package/dist/features/journey/hooks/use-home-page-journey.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -85
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters.js +0 -39
- package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +0 -39
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInDays.js +0 -17
- package/dist/node_modules/date-fns/differenceInDays.js.map +0 -1
- package/dist/static/chapter-header-bg-2.c8d96894.svg +0 -1
- package/dist/static/competitive-arena.b9c40801.json +0 -1
- package/dist/static/learn.71b13323.json +0 -1
- package/dist/static/node-custom-test-bg.d3b757be.svg +0 -1
- package/dist/static/node-learn-bg.b61f815c.svg +0 -1
- package/dist/static/node-practice-bg.16cbaf2a.svg +0 -1
- package/dist/static/node-project-bg.e6a33e28.svg +0 -1
- package/dist/static/node-puzzle-bg.3422135c.svg +0 -1
- package/dist/static/node-recap-bg.546154e4.svg +0 -1
- package/dist/static/node-test-prep-bg.42c0b9c4.svg +0 -1
- package/dist/static/node-video-bg.3df3f73a.svg +0 -1
- package/dist/static/practice.158dd488.json +0 -1
- package/dist/static/project.eb665827.json +0 -1
- package/dist/static/puzzle.b298c7e4.json +0 -1
- package/dist/static/recap.0dd2c1e2.json +0 -1
- package/dist/static/test.803d6036.json +0 -1
- package/dist/static/video.b41451e2.json +0 -1
@@ -1,73 +0,0 @@
|
|
1
|
-
import { jsxs as G, jsx as f } from "react/jsx-runtime";
|
2
|
-
import { memo as I } from "react";
|
3
|
-
import L from "../../../ui/layout/flex-view.js";
|
4
|
-
import u from "./block-section-view.js";
|
5
|
-
const b = I((A) => {
|
6
|
-
const {
|
7
|
-
blocks: t,
|
8
|
-
imageHue: n,
|
9
|
-
userType: i,
|
10
|
-
onNodeAttempt: s,
|
11
|
-
onNodeAttemptLocationChange: c,
|
12
|
-
onNodeMarkAsDone: l,
|
13
|
-
onNodeReattempt: r,
|
14
|
-
onNodeReview: d,
|
15
|
-
onNodeView: p,
|
16
|
-
onBlockSkipUnskip: m
|
17
|
-
} = A;
|
18
|
-
let k = 0;
|
19
|
-
const S = t.filter(
|
20
|
-
(o) => o.section_code === "GOALS" || o.section_code === "READINESS"
|
21
|
-
), N = t.filter(
|
22
|
-
(o) => o.section_code !== "GOALS" && o.section_code !== "READINESS"
|
23
|
-
);
|
24
|
-
return /* @__PURE__ */ G(L, { $width: "100%", children: [
|
25
|
-
S.map((o, e) => {
|
26
|
-
const { block_type: _, block_id: B, is_skipped: w } = o;
|
27
|
-
let a = 0;
|
28
|
-
const x = e === S.length - 1;
|
29
|
-
return _ === "GOAL" && (w || (k += 1), a = k), /* @__PURE__ */ f(
|
30
|
-
u,
|
31
|
-
{
|
32
|
-
blockData: o,
|
33
|
-
userType: i,
|
34
|
-
isLastBlock: x,
|
35
|
-
lessonIdx: a,
|
36
|
-
imageHue: n,
|
37
|
-
isGoalBlock: !0,
|
38
|
-
onNodeAttempt: s,
|
39
|
-
onNodeAttemptLocationChange: c,
|
40
|
-
onNodeMarkAsDone: l,
|
41
|
-
onNodeReattempt: r,
|
42
|
-
onNodeReview: d,
|
43
|
-
onNodeView: p,
|
44
|
-
onBlockSkipUnskip: m
|
45
|
-
},
|
46
|
-
B
|
47
|
-
);
|
48
|
-
}),
|
49
|
-
N.map((o) => {
|
50
|
-
const { block_id: e } = o;
|
51
|
-
return /* @__PURE__ */ f(
|
52
|
-
u,
|
53
|
-
{
|
54
|
-
blockData: o,
|
55
|
-
userType: i,
|
56
|
-
imageHue: n,
|
57
|
-
onNodeAttempt: s,
|
58
|
-
onNodeAttemptLocationChange: c,
|
59
|
-
onNodeMarkAsDone: l,
|
60
|
-
onNodeReattempt: r,
|
61
|
-
onNodeReview: d,
|
62
|
-
onNodeView: p,
|
63
|
-
onBlockSkipUnskip: m
|
64
|
-
},
|
65
|
-
e
|
66
|
-
);
|
67
|
-
})
|
68
|
-
] });
|
69
|
-
});
|
70
|
-
export {
|
71
|
-
b as default
|
72
|
-
};
|
73
|
-
//# sourceMappingURL=block-sections.js.map
|
@@ -1 +0,0 @@
|
|
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 } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport BlockSectionView from './block-section-view';\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {\n blocks,\n imageHue,\n userType,\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 = blocks.filter(\n block => block.section_code === 'GOALS' || block.section_code === 'READINESS',\n );\n\n const nonGoalBlocks = blocks.filter(\n block => block.section_code !== 'GOALS' && block.section_code !== 'READINESS',\n );\n\n return (\n <FlexView $width=\"100%\">\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, is_skipped: isSkipped } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n if (blockType === 'GOAL') {\n if (!isSkipped) {\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\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 </FlexView>\n );\n});\n\nexport default BlockSections;\n"],"names":["BlockSections","memo","props","blocks","imageHue","userType","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","lessonCount","goalBlocks","block","nonGoalBlocks","jsxs","FlexView","blockData","idx","blockType","blockId","isSkipped","lessonIdx","isLastBlock","jsx","BlockSectionView"],"mappings":";;;;AAQM,MAAAA,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,mBAAAC;AAAA,EACE,IAAAV;AAEJ,MAAIW,IAAc;AAElB,QAAMC,IAAaX,EAAO;AAAA,IACxB,CAASY,MAAAA,EAAM,iBAAiB,WAAWA,EAAM,iBAAiB;AAAA,EAAA,GAG9DC,IAAgBb,EAAO;AAAA,IAC3B,CAASY,MAAAA,EAAM,iBAAiB,WAAWA,EAAM,iBAAiB;AAAA,EAAA;AAIlE,SAAA,gBAAAE,EAACC,GAAS,EAAA,QAAO,QACd,UAAA;AAAA,IAAWJ,EAAA,IAAI,CAACK,GAAWC,MAAQ;AAClC,YAAM,EAAE,YAAYC,GAAW,UAAUC,GAAS,YAAYC,EAAc,IAAAJ;AAC5E,UAAIK,IAAY;AAEV,YAAAC,IAAcL,MAAQN,EAAW,SAAS;AAEhD,aAAIO,MAAc,WACXE,MACYV,KAAA,IAGLW,IAAAX,IAIZ,gBAAAa;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,WAAAR;AAAA,UACA,UAAAd;AAAA,UACA,aAAAoB;AAAA,UAEA,WAAAD;AAAA,UACA,UAAApB;AAAA,UACA,aAAW;AAAA,UACX,eAAAE;AAAA,UACA,6BAAAC;AAAA,UACA,kBAAAC;AAAA,UACA,iBAAAC;AAAA,UACA,cAAAC;AAAA,UACA,YAAAC;AAAA,UACA,mBAAAC;AAAA,QAAA;AAAA,QAVKU;AAAA,MAAA;AAAA,IAWP,CAEH;AAAA,IAEAN,EAAc,IAAI,CAAaG,MAAA;AACxB,YAAA,EAAE,UAAUG,EAAY,IAAAH;AAG5B,aAAA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UAEC,WAAAR;AAAA,UACA,UAAAd;AAAA,UACA,UAAAD;AAAA,UACA,eAAAE;AAAA,UACA,6BAAAC;AAAA,UACA,kBAAAC;AAAA,UACA,iBAAAC;AAAA,UACA,cAAAC;AAAA,UACA,YAAAC;AAAA,UACA,mBAAAC;AAAA,QAAA;AAAA,QAVKU;AAAA,MAAA;AAAA,IAWP,CAEH;AAAA,EACH,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,90 +0,0 @@
|
|
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
|
package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner-styled.js.map
DELETED
@@ -1 +0,0 @@
|
|
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;"}
|
@@ -1,97 +0,0 @@
|
|
1
|
-
import { jsx as e, jsxs as t } from "react/jsx-runtime";
|
2
|
-
import { memo as B, useMemo as d } from "react";
|
3
|
-
import { ILLUSTRATIONS as D } 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 b, BannerImageWrapper as M, BannerImage as O, ChapterProgressSVG as X, ChapterProgressSVGCircle as $, StyledImportantIcon as f, StyledCheckIcon as j, BannerTitleWrapper as H } from "./chapter-banner-styled.js";
|
11
|
-
const a = 52, l = 54, c = 54, ee = B((I) => {
|
12
|
-
const { progressStats: o, imageHue: S, title: x, imageUrl: u } = I, r = d(() => W(o), [o]), { iconTopVal: R, iconLeftVal: E } = d(() => {
|
13
|
-
const h = (-(r === 100 ? 60 : r) * 3.6 - 180) * Math.PI / 180, P = c + a * Math.sin(h), A = l + a * Math.cos(h);
|
14
|
-
return {
|
15
|
-
iconLeftVal: P,
|
16
|
-
iconTopVal: A
|
17
|
-
};
|
18
|
-
}, [r]);
|
19
|
-
if (!o) return null;
|
20
|
-
const { mandatory: _, optional: w, class_work: T } = o, { completed: k = 0, total: s = 0 } = _ || {}, { completed: y = 0, total: p = 0 } = w || {}, { completed: G = 0, total: m = 0 } = T || {}, L = m > 0 && G === m;
|
21
|
-
return /* @__PURE__ */ e(
|
22
|
-
b,
|
23
|
-
{
|
24
|
-
$flexDirection: "row",
|
25
|
-
$justifyContent: "center",
|
26
|
-
$alignItems: "center",
|
27
|
-
$widthX: 50,
|
28
|
-
$background: `${S}_4`,
|
29
|
-
children: /* @__PURE__ */ t(n, { $height: 168, $position: "relative", children: [
|
30
|
-
/* @__PURE__ */ e(
|
31
|
-
V,
|
32
|
-
{
|
33
|
-
width: "100%",
|
34
|
-
height: "168px",
|
35
|
-
src: D.CHAPTER_HEADER_BG,
|
36
|
-
alt: "Chapter header background",
|
37
|
-
withLoader: !0
|
38
|
-
}
|
39
|
-
),
|
40
|
-
/* @__PURE__ */ t(M, { children: [
|
41
|
-
/* @__PURE__ */ e(O, { src: u, alt: "Chapter image" }),
|
42
|
-
/* @__PURE__ */ t(X, { width: "108px", height: "108px", children: [
|
43
|
-
/* @__PURE__ */ e(
|
44
|
-
$,
|
45
|
-
{
|
46
|
-
$progress: 0,
|
47
|
-
r: a,
|
48
|
-
cx: l,
|
49
|
-
cy: c
|
50
|
-
}
|
51
|
-
),
|
52
|
-
/* @__PURE__ */ e(
|
53
|
-
$,
|
54
|
-
{
|
55
|
-
$progressCircle: !0,
|
56
|
-
$progressBackground: "BLACK",
|
57
|
-
$progress: 3.3 * r,
|
58
|
-
r: a,
|
59
|
-
cx: l,
|
60
|
-
cy: c
|
61
|
-
}
|
62
|
-
)
|
63
|
-
] }),
|
64
|
-
r > 0 && /* @__PURE__ */ e(f, { $progress: !0, $top: R, $left: E }),
|
65
|
-
r === 100 && /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(C, { Icon: g }) })
|
66
|
-
] }),
|
67
|
-
/* @__PURE__ */ t(H, { $flexGap: 4, children: [
|
68
|
-
/* @__PURE__ */ e(i, { $renderAs: "ah4-bold", children: x }),
|
69
|
-
/* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGapX: 2.75, children: [
|
70
|
-
!!s && /* @__PURE__ */ t(n, { $position: "relative", $flexDirection: "row", children: [
|
71
|
-
/* @__PURE__ */ e(f, {}),
|
72
|
-
/* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGap: 4, children: [
|
73
|
-
/* @__PURE__ */ t(i, { $renderAs: "ab2", children: [
|
74
|
-
"Core - ",
|
75
|
-
k,
|
76
|
-
"/",
|
77
|
-
s
|
78
|
-
] }),
|
79
|
-
L && /* @__PURE__ */ e(C, { Icon: g, label: "CW" })
|
80
|
-
] })
|
81
|
-
] }),
|
82
|
-
p > 0 && /* @__PURE__ */ t(i, { $renderAs: "ab2", children: [
|
83
|
-
"Supplementary - ",
|
84
|
-
y,
|
85
|
-
"/",
|
86
|
-
p
|
87
|
-
] })
|
88
|
-
] })
|
89
|
-
] })
|
90
|
-
] })
|
91
|
-
}
|
92
|
-
);
|
93
|
-
});
|
94
|
-
export {
|
95
|
-
ee as default
|
96
|
-
};
|
97
|
-
//# sourceMappingURL=chapter-banner.js.map
|
@@ -1 +0,0 @@
|
|
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 } = 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, class_work: 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 >\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={4}>\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","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,MAAaJ,GAE/CK,IAAuBC,EAAQ,MAC5BC,EAA+BN,CAAa,GAClD,CAACA,CAAa,CAAC,GAEZ,EAAE,YAAAO,GAAY,aAAAC,EAAY,IAAIH,EAAQ,MAAM;AAKhD,UAAMI,KAAkB,EAFFL,MAAyB,MAAM,KAAKA,KAEjB,MAAM,OAAO,KAAK,KAAM,KAC3DM,IAAYd,IAA2BF,IAAyB,KAAK,IAAIe,CAAa,GACtFE,IAAYhB,IAA2BD,IAAyB,KAAK,IAAIe,CAAa;AAErF,WAAA;AAAA,MACL,aAAaC;AAAA,MACb,YAAYC;AAAA,IAAA;AAAA,EACd,GACC,CAACP,CAAoB,CAAC;AAErB,MAAA,CAACJ,EAAsB,QAAA;AAE3B,QAAM,EAAE,WAAAY,GAAW,UAAAC,GAAU,YAAYC,MAAcd,GACjD,EAAE,WAAWe,IAA2B,GAAG,OAAOC,IAAuB,EAAA,IAC7EJ,KAAa,IACT,EAAE,WAAWK,IAA0B,GAAG,OAAOC,IAAsB,EAAA,IAAML,KAAY,IACzF,EAAE,WAAWM,IAA2B,GAAG,OAAOC,IAAuB,EAAA,IAC7EN,KAAa,IACTO,IACJD,IAAuB,KAAKD,MAA6BC;AAGzD,SAAA,gBAAAE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,iBAAgB;AAAA,MAChB,aAAY;AAAA,MACZ,SAAS;AAAA,MACT,aAAa,GAAGtB,CAAQ;AAAA,MAExB,UAAC,gBAAAuB,EAAAC,GAAA,EAAS,SAAS,KAAK,WAAU,YAChC,UAAA;AAAA,QAAA,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,QAAO;AAAA,YACP,KAAKC,EAAc;AAAA,YACnB,KAAI;AAAA,YACJ,YAAU;AAAA,UAAA;AAAA,QACZ;AAAA,QACA,gBAAAH,EAACI,GAAA,EACC,UAAA;AAAA,UAAA,gBAAAN,EAACO,GAAA,EAAmB,KAAK1B,GAAU,KAAI,iBAAgB;AAAA,4BACtD2B,GAAA,EAA0B,OAAM,SAAQ,QAAO,SAC9C,UAAA;AAAA,YAAA,gBAAAR;AAAA,cAACS;AAAAA,cAAA;AAAA,gBACC,WAAW;AAAA,gBACX,GAAGrC;AAAA,gBACH,IAAIC;AAAA,gBACJ,IAAIC;AAAA,cAAA;AAAA,YACN;AAAA,YACA,gBAAA0B;AAAA,cAACS;AAAAA,cAAA;AAAA,gBACC,iBAAe;AAAA,gBACf,qBAAqB;AAAA,gBACrB,WAAW,MAAM3B;AAAA,gBACjB,GAAGV;AAAA,gBACH,IAAIC;AAAA,gBACJ,IAAIC;AAAA,cAAA;AAAA,YACN;AAAA,UAAA,GACF;AAAA,UAECQ,IAAuB,KACtB,gBAAAkB,EAACU,GAAA,EAA2B,WAAS,IAAC,MAAMzB,GAAY,OAAOC,EAAa,CAAA;AAAA,UAG7EJ,MAAyB,OACxB,gBAAAkB,EAACW,GAAA,EACC,UAAC,gBAAAX,EAAAY,GAAA,EAAI,MAAMC,EAAA,CAAY,EACzB,CAAA;AAAA,QAAA,GAEJ;AAAA,QACC,gBAAAX,EAAAY,GAAA,EAA0B,UAAU,GACnC,UAAA;AAAA,UAAC,gBAAAd,EAAAe,GAAA,EAAK,WAAU,YAAY,UAAMnC,GAAA;AAAA,4BACjCuB,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,WAAW,MAC5D,UAAA;AAAA,YAAA,CAAC,CAACT,KACD,gBAAAQ,EAACC,KAAS,WAAU,YAAW,gBAAe,OAC5C,UAAA;AAAA,cAAC,gBAAAH,EAAAU,GAAA,EAA2B;AAAA,gCAC3BP,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC5D,UAAA;AAAA,gBAAC,gBAAAD,EAAAa,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,kBAAA;AAAA,kBACZtB;AAAA,kBAAyB;AAAA,kBAAEC;AAAA,gBAAA,GACrC;AAAA,gBACCK,KAAqB,gBAAAC,EAAAY,GAAA,EAAI,MAAMC,GAAY,OAAM,MAAK;AAAA,cAAA,GACzD;AAAA,YAAA,GACF;AAAA,YAEDjB,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;"}
|
@@ -1,52 +0,0 @@
|
|
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
|
-
padding-bottom: ${e.layout.gutter * 4}px;
|
34
|
-
`
|
35
|
-
), s = o(r)`
|
36
|
-
position: absolute;
|
37
|
-
top: 0;
|
38
|
-
left: 0;
|
39
|
-
z-index: 6;
|
40
|
-
`, u = o(r)(({ theme: t }) => `
|
41
|
-
position: sticky;
|
42
|
-
top: ${t.layout.gutter}px;
|
43
|
-
transform: translateX(${t.layout.gutter}px);
|
44
|
-
z-index: 6;
|
45
|
-
`);
|
46
|
-
export {
|
47
|
-
s as BackButtonContainer,
|
48
|
-
u as BackButtonWrapper,
|
49
|
-
p as ContentWrapper,
|
50
|
-
a as LoaderWrapper
|
51
|
-
};
|
52
|
-
//# sourceMappingURL=chapter-details-styled.js.map
|
@@ -1 +0,0 @@
|
|
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 padding-bottom: ${theme.layout.gutter * 4}px;\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,wBAEtBA,EAAM,OAAO,SAAS,CAAC;AAAA;AAE/C,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;"}
|
@@ -1,103 +0,0 @@
|
|
1
|
-
import { jsxs as p, jsx as t } from "react/jsx-runtime";
|
2
|
-
import { memo as B, useCallback as x, useEffect as l } from "react";
|
3
|
-
import { ILLUSTRATIONS as y } from "../../../assets/illustrations/illustrations.js";
|
4
|
-
import I from "../../../assets/line-icons/icons/back2.js";
|
5
|
-
import w from "../../ui/buttons/button/button.js";
|
6
|
-
import L from "../../ui/buttons/icon-button/icon-button.js";
|
7
|
-
import N from "../../ui/layout/flex-view.js";
|
8
|
-
import S from "../../ui/loader/app-loader/app-loader.js";
|
9
|
-
import _ from "../../ui/text/text.js";
|
10
|
-
import { useGetChapterDetails as b } from "../api/chapter.js";
|
11
|
-
import D from "./block-sections/block-sections.js";
|
12
|
-
import E from "./chapter-banner/chapter-banner.js";
|
13
|
-
import { ContentWrapper as T, BackButtonContainer as v, BackButtonWrapper as R, LoaderWrapper as j } from "./chapter-details-styled.js";
|
14
|
-
const P = B((c) => {
|
15
|
-
const {
|
16
|
-
userChapterId: i,
|
17
|
-
studentId: n,
|
18
|
-
userType: a,
|
19
|
-
onBlockSkipUnskip: h,
|
20
|
-
onNodeAttempt: d,
|
21
|
-
onNodeAttemptLocationChange: g,
|
22
|
-
onNodeMarkAsDone: f,
|
23
|
-
onNodeReattempt: u,
|
24
|
-
onNodeReview: C,
|
25
|
-
onNodeView: k,
|
26
|
-
onExit: $
|
27
|
-
} = c, {
|
28
|
-
get: s,
|
29
|
-
data: e,
|
30
|
-
isProcessing: r,
|
31
|
-
isProcessingFailed: A,
|
32
|
-
isStale: m
|
33
|
-
} = b(), o = x(() => {
|
34
|
-
s(i, void 0, { studentId: n });
|
35
|
-
}, [s, i, n]);
|
36
|
-
return l(() => {
|
37
|
-
o();
|
38
|
-
}, [o]), l(() => {
|
39
|
-
!r && m && o();
|
40
|
-
}, [o, r, m]), A ? /* @__PURE__ */ p(N, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
|
41
|
-
/* @__PURE__ */ t(_, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
42
|
-
/* @__PURE__ */ t(
|
43
|
-
w,
|
44
|
-
{
|
45
|
-
widthX: 14,
|
46
|
-
size: "small",
|
47
|
-
shape: "square",
|
48
|
-
renderAs: "primary",
|
49
|
-
label: "Try again",
|
50
|
-
onClick: o
|
51
|
-
}
|
52
|
-
)
|
53
|
-
] }) : !e && r ? /* @__PURE__ */ t(S, { height: "80vh" }) : /* @__PURE__ */ p(
|
54
|
-
T,
|
55
|
-
{
|
56
|
-
$widthX: 50,
|
57
|
-
$disablePointerEvents: r,
|
58
|
-
$justifyContent: "center",
|
59
|
-
$alignItems: "center",
|
60
|
-
children: [
|
61
|
-
a === "TEACHER" && /* @__PURE__ */ t(v, { $height: "100%", children: /* @__PURE__ */ t(R, { children: /* @__PURE__ */ t(
|
62
|
-
L,
|
63
|
-
{
|
64
|
-
Icon: I,
|
65
|
-
renderAs: "secondary-gray",
|
66
|
-
analyticsLabel: "chapter_page_exit",
|
67
|
-
size: "xsmall",
|
68
|
-
onClick: $
|
69
|
-
}
|
70
|
-
) }) }),
|
71
|
-
r && /* @__PURE__ */ t(j, { children: /* @__PURE__ */ t("img", { src: y.LOADER_1, alt: "loader" }) }),
|
72
|
-
e && /* @__PURE__ */ t(
|
73
|
-
E,
|
74
|
-
{
|
75
|
-
title: e.name,
|
76
|
-
imageHue: e.image_hue,
|
77
|
-
imageUrl: e.image_url,
|
78
|
-
progressStats: e == null ? void 0 : e.progress_stat
|
79
|
-
}
|
80
|
-
),
|
81
|
-
e && /* @__PURE__ */ t(
|
82
|
-
D,
|
83
|
-
{
|
84
|
-
imageHue: e.image_hue,
|
85
|
-
userType: a,
|
86
|
-
blocks: e.blocks,
|
87
|
-
onBlockSkipUnskip: h,
|
88
|
-
onNodeAttempt: d,
|
89
|
-
onNodeAttemptLocationChange: g,
|
90
|
-
onNodeMarkAsDone: f,
|
91
|
-
onNodeReattempt: u,
|
92
|
-
onNodeReview: C,
|
93
|
-
onNodeView: k
|
94
|
-
}
|
95
|
-
)
|
96
|
-
]
|
97
|
-
}
|
98
|
-
);
|
99
|
-
}), Q = P;
|
100
|
-
export {
|
101
|
-
Q as default
|
102
|
-
};
|
103
|
-
//# sourceMappingURL=chapter-details.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAttemptLocationChange,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n } = props;\n\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"80vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n />\n )}\n\n {chapterDetails && (\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAttemptLocationChange={onNodeAttemptLocationChange}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n />\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAttemptLocationChange","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAX,GAEE;AAAA,IACJ,KAAKY;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAsBC,EAAY,MAAM;AAC5C,IAAAP,EAAkBX,GAAe,QAAW,EAAE,WAAAC,EAAW,CAAA;AAAA,EACxD,GAAA,CAACU,GAAmBX,GAAeC,CAAS,CAAC;AAYhD,SAVAkB,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAExBE,EAAU,MAAM;AACV,IAAA,CAACN,KAAgBE,KACCE;EAErB,GAAA,CAACA,GAAqBJ,GAAcE,CAAO,CAAC,GAE3CD,IAEA,gBAAAM,EAACC,KAAS,WAAW,KAAK,SAAQ,SAAQ,iBAAgB,UAAS,aAAY,UAC7E,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,MAAK,UAAmD,uDAAA;AAAA,IACxE,gBAAAD;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASP;AAAA,MAAA;AAAA,IACX;AAAA,EACF,EAAA,CAAA,IAIA,CAACL,KAAkBC,IACd,gBAAAS,EAACG,GAAU,EAAA,QAAO,OAAO,CAAA,IAIhC,gBAAAL;AAAA,IAACM;AAAAA,IAAA;AAAA,MACC,SAAS;AAAA,MACT,uBAAuBb;AAAA,MACvB,iBAAgB;AAAA,MAChB,aAAY;AAAA,MAEX,UAAA;AAAA,QAAaX,MAAA,aACX,gBAAAoB,EAAAK,GAAA,EAA2B,SAAQ,QAClC,UAAA,gBAAAL,EAACM,GAAA,EACC,UAAA,gBAAAN;AAAA,UAACO;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,UAAS;AAAA,YACT,gBAAe;AAAA,YACf,MAAK;AAAA,YACL,SAASpB;AAAA,UAAA;AAAA,WAEb,EACF,CAAA;AAAA,QAGDG,KACC,gBAAAS,EAACS,GAAA,EACC,UAAA,gBAAAT,EAAC,OAAI,EAAA,KAAKU,EAAc,UAAU,KAAI,SAAA,CAAS,EACjD,CAAA;AAAA,QAGDpB,KACC,gBAAAU;AAAA,UAACW;AAAA,UAAA;AAAA,YACC,OAAOrB,EAAe;AAAA,YACtB,UAAUA,EAAe;AAAA,YACzB,UAAUA,EAAe;AAAA,YACzB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,UAAA;AAAA,QACjC;AAAA,QAGDA,KACC,gBAAAU;AAAA,UAACY;AAAA,UAAA;AAAA,YACC,UAAUtB,EAAe;AAAA,YACzB,UAAAV;AAAA,YACA,QAAQU,EAAe;AAAA,YACvB,mBAAAT;AAAA,YACA,eAAAC;AAAA,YACA,6BAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAED0B,IAAetC;"}
|
@@ -1,13 +0,0 @@
|
|
1
|
-
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
2
|
-
const o = () => /* @__PURE__ */ r("svg", { className: "node-card-border", viewBox: "0 0 170 56", preserveAspectRatio: "none", children: [
|
3
|
-
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ r("linearGradient", { id: "gradient", x1: "0%", y1: "0%", x2: "100%", y2: "0%", children: [
|
4
|
-
/* @__PURE__ */ e("stop", { offset: "0%", stopColor: "black" }),
|
5
|
-
/* @__PURE__ */ e("stop", { offset: "100%", stopColor: "gray" })
|
6
|
-
] }) }),
|
7
|
-
/* @__PURE__ */ e("rect", { className: "border-path", x: "0", y: "0", width: "100%", height: "100%" }),
|
8
|
-
/* @__PURE__ */ e("rect", { className: "border-path-animation", x: "0", y: "0", width: "100%", height: "100%" })
|
9
|
-
] });
|
10
|
-
export {
|
11
|
-
o as default
|
12
|
-
};
|
13
|
-
//# sourceMappingURL=border-path-animation.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"border-path-animation.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/border-path-animation.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nconst BorderPathAnimation: FC = () => {\n return (\n <svg className=\"node-card-border\" viewBox=\"0 0 170 56\" preserveAspectRatio=\"none\">\n <defs>\n <linearGradient id=\"gradient\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <stop offset=\"0%\" stopColor=\"black\" />\n <stop offset=\"100%\" stopColor=\"gray\" />\n </linearGradient>\n </defs>\n <rect className=\"border-path\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" />\n <rect className=\"border-path-animation\" x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" />\n </svg>\n );\n};\n\nexport default BorderPathAnimation;\n"],"names":["BorderPathAnimation","jsx","jsxs"],"mappings":";AAEA,MAAMA,IAA0B,wBAE3B,OAAI,EAAA,WAAU,oBAAmB,SAAQ,cAAa,qBAAoB,QACzE,UAAA;AAAA,EAAA,gBAAAC,EAAC,QACC,EAAA,UAAA,gBAAAC,EAAC,kBAAe,EAAA,IAAG,YAAW,IAAG,MAAK,IAAG,MAAK,IAAG,QAAO,IAAG,MACzD,UAAA;AAAA,IAAA,gBAAAD,EAAC,QAAK,EAAA,QAAO,MAAK,WAAU,SAAQ;AAAA,IACnC,gBAAAA,EAAA,QAAA,EAAK,QAAO,QAAO,WAAU,QAAO;AAAA,EAAA,EAAA,CACvC,EACF,CAAA;AAAA,EACA,gBAAAA,EAAC,QAAK,EAAA,WAAU,eAAc,GAAE,KAAI,GAAE,KAAI,OAAM,QAAO,QAAO,OAAO,CAAA;AAAA,EACrE,gBAAAA,EAAC,QAAK,EAAA,WAAU,yBAAwB,GAAE,KAAI,GAAE,KAAI,OAAM,QAAO,QAAO,OAAO,CAAA;AACjF,EAAA,CAAA;"}
|
@@ -1,153 +0,0 @@
|
|
1
|
-
import t from "styled-components";
|
2
|
-
import d from "../../../../assets/line-icons/icons/important.js";
|
3
|
-
import c from "../../../../assets/line-icons/icons/lock2.js";
|
4
|
-
import e from "../../../ui/layout/flex-view.js";
|
5
|
-
import l from "../../../ui/text/text.js";
|
6
|
-
const f = t(e)(({
|
7
|
-
$showOutline: o,
|
8
|
-
theme: r,
|
9
|
-
$disabled: n,
|
10
|
-
$isSheetLocked: s
|
11
|
-
}) => {
|
12
|
-
const { BLACK_1: p, BLACK: a, BLACK_T_15: i } = r.colors;
|
13
|
-
return `
|
14
|
-
cursor: ${n ? "not-allowed" : "pointer"};
|
15
|
-
${n ? "pointer-events: none;" : "pointer-events: auto;"};
|
16
|
-
position: relative;
|
17
|
-
border-image: linear-gradient(to right, ${i} 0%, ${i} 100%);
|
18
|
-
${o && `outline: 1px solid ${i};`};
|
19
|
-
|
20
|
-
.node-card-border {
|
21
|
-
position: absolute;
|
22
|
-
top: 0;
|
23
|
-
left: 0;
|
24
|
-
z-index: 2;
|
25
|
-
width: 100%;
|
26
|
-
height: 100%;
|
27
|
-
pointer-events: none;
|
28
|
-
background: transparent;
|
29
|
-
}
|
30
|
-
|
31
|
-
.node-card-border > .border-path {
|
32
|
-
fill: none;
|
33
|
-
stroke: ${i};
|
34
|
-
stroke-width: 1.5;
|
35
|
-
}
|
36
|
-
|
37
|
-
.node-card-border > .border-path-animation {
|
38
|
-
fill: none;
|
39
|
-
stroke: ${a};
|
40
|
-
stroke-width: 1.5;
|
41
|
-
//* view box size 170 + 56 + 170 + 56 = 452
|
42
|
-
//* 452 / 2 = 226
|
43
|
-
stroke-dasharray: 226 226;
|
44
|
-
stroke-dashoffset: 0;
|
45
|
-
|
46
|
-
animation: dashmove 6s linear infinite;
|
47
|
-
}
|
48
|
-
|
49
|
-
@keyframes dashmove {
|
50
|
-
to {
|
51
|
-
stroke-dashoffset: -900;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
|
55
|
-
&:hover {
|
56
|
-
${!n && `
|
57
|
-
.node-card-border > .border-path-animation {
|
58
|
-
stroke: ${p};
|
59
|
-
stroke-dasharray: 452;
|
60
|
-
animation: none;
|
61
|
-
}
|
62
|
-
`}
|
63
|
-
|
64
|
-
${o && !s && `outline: 1px solid ${a};`};
|
65
|
-
}
|
66
|
-
`;
|
67
|
-
}), g = t(d)(({ theme: o }) => {
|
68
|
-
const { layout: r } = o;
|
69
|
-
return `
|
70
|
-
width: ${r.gutter * 0.75}px;
|
71
|
-
height: ${r.gutter * 0.75}px;
|
72
|
-
position: absolute;
|
73
|
-
top: -2.5px;
|
74
|
-
right: -2.5px;
|
75
|
-
`;
|
76
|
-
}), k = t(e)(({ $bgImage: o }) => `
|
77
|
-
background-image: url(${o});
|
78
|
-
|
79
|
-
& .context-menu {
|
80
|
-
justify-self: flex-end;
|
81
|
-
margin-left: auto;
|
82
|
-
}
|
83
|
-
`), $ = t(e)`
|
84
|
-
border-radius: 50%;
|
85
|
-
`, v = t(e)(() => `
|
86
|
-
position: relative;
|
87
|
-
padding: 12px 8px 12px 12px;
|
88
|
-
`), w = t(e)(({ $top: o, $right: r }) => `
|
89
|
-
position: absolute;
|
90
|
-
top: ${o ?? 0}px;
|
91
|
-
right: ${r ?? 0}px;
|
92
|
-
z-index: 3;
|
93
|
-
`);
|
94
|
-
t(c)(({}) => `
|
95
|
-
width: 28px;
|
96
|
-
height: 28px;
|
97
|
-
`);
|
98
|
-
const I = t(e)(({ theme: o }) => {
|
99
|
-
const { BLACK_1: r, WHITE_1: n } = o.colors;
|
100
|
-
return `
|
101
|
-
position: absolute;
|
102
|
-
top: -10px;
|
103
|
-
right: -10px;
|
104
|
-
background: ${r};
|
105
|
-
|
106
|
-
path {
|
107
|
-
fill: ${n};
|
108
|
-
}
|
109
|
-
`;
|
110
|
-
}), y = t(l)(() => `
|
111
|
-
display: -webkit-box;
|
112
|
-
-webkit-box-orient: vertical;
|
113
|
-
-webkit-line-clamp: 2;
|
114
|
-
text-overflow: ellipsis;
|
115
|
-
overflow: hidden;
|
116
|
-
`), C = t(e)(({ theme: o }) => `
|
117
|
-
cursor: pointer;
|
118
|
-
|
119
|
-
&:hover {
|
120
|
-
border-radius: 50%;
|
121
|
-
background: ${o.colors.WHITE_5};
|
122
|
-
}
|
123
|
-
`), W = t(e)(({ theme: o, $visible: r }) => `
|
124
|
-
cursor: pointer;
|
125
|
-
|
126
|
-
position: absolute;
|
127
|
-
z-index: 6;
|
128
|
-
top: calc(100% + 4px);
|
129
|
-
left: 0;
|
130
|
-
|
131
|
-
transform-origin: top;
|
132
|
-
transform: scaleY(${r ? 1 : 0});
|
133
|
-
opacity: ${r ? 1 : 0};
|
134
|
-
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
135
|
-
|
136
|
-
&:hover {
|
137
|
-
border-radius: 50%;
|
138
|
-
background: ${o.colors.WHITE_5};
|
139
|
-
}
|
140
|
-
`);
|
141
|
-
export {
|
142
|
-
$ as IconWrapper,
|
143
|
-
I as InProgressIconWrapper,
|
144
|
-
f as NodeCardContainer,
|
145
|
-
v as NodeCardContentWrapper,
|
146
|
-
k as NodeCardInfoWrapper,
|
147
|
-
y as NodeCardTitle,
|
148
|
-
C as NodeKebabMenuWrapper,
|
149
|
-
W as NodeMenuOptionsWrapper,
|
150
|
-
w as SheetTagWrapper,
|
151
|
-
g as StyledImportantIcon
|
152
|
-
};
|
153
|
-
//# sourceMappingURL=node-card-styled.js.map
|