@cuemath/leap 2.9.7-rj-1 → 2.9.9-as1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +9 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/alarm.js +41 -0
- package/dist/assets/line-icons/icons/alarm.js.map +1 -0
- 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/dart.js +23 -0
- package/dist/assets/line-icons/icons/dart.js.map +1 -0
- 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/puzzle.js +25 -0
- package/dist/assets/line-icons/icons/puzzle.js.map +1 -0
- package/dist/assets/line-icons/icons/recap.js +32 -0
- package/dist/assets/line-icons/icons/recap.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/line-icons/icons/testtube.js +33 -0
- package/dist/assets/line-icons/icons/testtube.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 +26 -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 +90 -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 +130 -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-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 +31 -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 +180 -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 +192 -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 +41 -0
- package/dist/features/chapters-v2/utils/index.js.map +1 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js +177 -0
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -0
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +110 -121
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +106 -118
- package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/constants.js +2 -3
- package/dist/features/circle-games/games/tutorial/constants.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js +17 -21
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial.js +41 -47
- package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
- 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-options.js +38 -0
- package/dist/features/homework/card-menu-options.js.map +1 -0
- package/dist/features/homework/card-title.js +15 -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 +141 -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.js +185 -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-styled.js +12 -5
- 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/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.js +189 -0
- package/dist/features/journey/hooks/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/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 +137 -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 +156 -175
- 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 +19 -23
- 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 +86 -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/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/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/theme/button.js +22 -107
- package/dist/features/ui/theme/button.js.map +1 -1
- package/dist/index.d.ts +355 -45
- package/dist/index.js +503 -473
- 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/hooks/use-breakpoint/constants.js +0 -7
- package/dist/features/hooks/use-breakpoint/constants.js.map +0 -1
- package/dist/features/hooks/use-breakpoint/use-breakpoint.js +0 -16
- package/dist/features/hooks/use-breakpoint/use-breakpoint.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js +0 -92
- package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map +0 -1
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js +0 -25
- package/dist/features/milestone/create/comps/milestone-progress-v2/styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js +0 -13
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element-styled.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js +0 -38
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/context-menu-helper/menu-element.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js +0 -53
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-status.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js +0 -25
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/outcome/outcome-info.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +0 -71
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +0 -31
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +0 -38
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +0 -79
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +0 -18
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +0 -51
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +0 -11
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +0 -135
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +0 -1
@@ -0,0 +1,130 @@
|
|
1
|
+
import r from "styled-components";
|
2
|
+
import n from "../../assets/line-icons/icons/minus2.js";
|
3
|
+
import e from "../ui/layout/flex-view.js";
|
4
|
+
import i from "../ui/text/text.js";
|
5
|
+
const l = r(e)(({ theme: o }) => `
|
6
|
+
cursor: pointer;
|
7
|
+
width: 24px;
|
8
|
+
height: 24px;
|
9
|
+
|
10
|
+
|
11
|
+
&:hover {
|
12
|
+
border-radius: 50%;
|
13
|
+
background: ${o.colors.WHITE_5};
|
14
|
+
}
|
15
|
+
`), d = r(i)`
|
16
|
+
display: -webkit-box;
|
17
|
+
-webkit-line-clamp: 1;
|
18
|
+
-webkit-box-orient: vertical;
|
19
|
+
overflow: hidden;
|
20
|
+
text-overflow: ellipsis;
|
21
|
+
`, u = r(e)(({
|
22
|
+
$shouldopenonright: o,
|
23
|
+
$visible: t
|
24
|
+
}) => `
|
25
|
+
cursor: pointer;
|
26
|
+
position: absolute;
|
27
|
+
z-index: 6;
|
28
|
+
top: calc(100% + 4px);
|
29
|
+
right: ${o ? 0 : "auto"};
|
30
|
+
transform-origin: top;
|
31
|
+
transform: scaleY(${t ? 1 : 0});
|
32
|
+
opacity: ${t ? 1 : 0};
|
33
|
+
transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
|
34
|
+
box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);
|
35
|
+
z-index: 10;
|
36
|
+
`), x = r(e)`
|
37
|
+
border: 1px solid ${({ theme: o }) => o.colors.BLACK_T_15};
|
38
|
+
|
39
|
+
&:hover {
|
40
|
+
border: 1px solid ${({ theme: o }) => o.colors.BLACK};
|
41
|
+
}
|
42
|
+
`, b = r(e)(({ $bgImage: o }) => o ? `
|
43
|
+
background-image: url(${o});
|
44
|
+
background-repeat: no-repeat;
|
45
|
+
background-size: cover;
|
46
|
+
background-position: center;
|
47
|
+
overflow: hidden;
|
48
|
+
` : "overflow: hidden;"), h = r(e)`
|
49
|
+
display: flex;
|
50
|
+
align-items: center;
|
51
|
+
justify-content: center;
|
52
|
+
`, w = r(e)`
|
53
|
+
position: absolute;
|
54
|
+
right: -18px;
|
55
|
+
top: -4px;
|
56
|
+
`, f = r.img(({ theme: o }) => {
|
57
|
+
const { gutter: t } = o.layout;
|
58
|
+
return `
|
59
|
+
border: 1px solid ${o.colors.BLACK_T_15};
|
60
|
+
width: ${t * 4}px;
|
61
|
+
height: ${t * 4}px;
|
62
|
+
border-radius: 50%;
|
63
|
+
`;
|
64
|
+
}), g = r(n)`
|
65
|
+
path {
|
66
|
+
stroke: ${({ theme: o }) => o.colors.WHITE};
|
67
|
+
}
|
68
|
+
`, m = r(i)`
|
69
|
+
display: -webkit-box;
|
70
|
+
-webkit-line-clamp: 2;
|
71
|
+
-webkit-box-orient: vertical;
|
72
|
+
overflow: hidden;
|
73
|
+
text-overflow: ellipsis;
|
74
|
+
white-space: break-spaces;
|
75
|
+
`;
|
76
|
+
r(e)``;
|
77
|
+
const k = r(e)(({
|
78
|
+
theme: o,
|
79
|
+
$disabled: t
|
80
|
+
}) => `
|
81
|
+
cursor: ${t ? "not-allowed" : "pointer"};
|
82
|
+
|
83
|
+
&:hover {
|
84
|
+
background: ${t ? "transparent" : o.colors.BLACK};
|
85
|
+
};
|
86
|
+
|
87
|
+
path {
|
88
|
+
fill: ${o.colors.WHITE_1};
|
89
|
+
}
|
90
|
+
`), v = r(i)`
|
91
|
+
white-space: nowrap;
|
92
|
+
overflow: hidden;
|
93
|
+
text-overflow: ellipsis;
|
94
|
+
`, C = r(e)`
|
95
|
+
position: absolute;
|
96
|
+
z-index: 6;
|
97
|
+
top: calc(100% - 36px);
|
98
|
+
right: 12px;
|
99
|
+
transform-origin: top;
|
100
|
+
transform: scaleY(1);
|
101
|
+
`, $ = r(e)`
|
102
|
+
position: absolute;
|
103
|
+
top: 0;
|
104
|
+
left: 0;
|
105
|
+
width: 100%;
|
106
|
+
height: 100%;
|
107
|
+
opacity: 0.5;
|
108
|
+
`, y = r(e)`
|
109
|
+
position: absolute;
|
110
|
+
right: 42px;
|
111
|
+
top: 24px;
|
112
|
+
`;
|
113
|
+
export {
|
114
|
+
f as BannerImage,
|
115
|
+
w as BannerImageWrapper,
|
116
|
+
$ as BlurContainer,
|
117
|
+
y as BlurFlexView,
|
118
|
+
x as CardContainer,
|
119
|
+
l as CardKebabMenuWrapper,
|
120
|
+
u as CardMenuOptionsWrapper,
|
121
|
+
k as CardOptionWrapper,
|
122
|
+
b as CardWrapper,
|
123
|
+
m as HeaderText,
|
124
|
+
h as IconWrapper,
|
125
|
+
C as MenuWrapper,
|
126
|
+
v as OptionText,
|
127
|
+
g as StyledMinus2Icon,
|
128
|
+
d as SubHeaderText
|
129
|
+
};
|
130
|
+
//# sourceMappingURL=styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"styles.js","sources":["../../../src/features/homework/styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport Minus2Icon from '../../assets/line-icons/icons/minus2';\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\ninterface ICardWrapperProps {\n $bgImage: string;\n}\ninterface ICardOptionsMenuWrapperProps {\n $visible: boolean;\n $shouldopenonright: boolean;\n}\n\nexport const CardKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n width: 24px;\n height: 24px;\n \n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport const SubHeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 1;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const CardMenuOptionsWrapper = styled(FlexView)<ICardOptionsMenuWrapperProps>(({\n $shouldopenonright,\n $visible,\n}) => {\n return `\n cursor: pointer;\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n right: ${$shouldopenonright ? 0 : 'auto'};\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n box-shadow: 0px 6px 12px 0px rgba(0, 0, 0, 0.4);\n z-index: 10;\n `;\n});\n\nexport const CardContainer = styled(FlexView)`\n border: 1px solid ${({ theme }) => theme.colors.BLACK_T_15};\n\n &:hover {\n border: 1px solid ${({ theme }) => theme.colors.BLACK};\n }\n`;\n\nexport const CardWrapper = styled(FlexView)<ICardWrapperProps>(({ $bgImage }) => {\n if ($bgImage) {\n return `\n background-image: url(${$bgImage});\n background-repeat: no-repeat;\n background-size: cover;\n background-position: center;\n overflow: hidden;\n `;\n }\n\n return 'overflow: hidden;';\n});\n\nexport const IconWrapper = styled(FlexView)`\n display: flex;\n align-items: center;\n justify-content: center;\n`;\n\nexport const BannerImageWrapper = styled(FlexView)`\n position: absolute;\n right: -18px;\n top: -4px;\n`;\n\nexport const BannerImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n border: 1px solid ${theme.colors.BLACK_T_15};\n width: ${gutter * 4}px;\n height: ${gutter * 4}px;\n border-radius: 50%;\n `;\n});\n\nexport const StyledMinus2Icon = styled(Minus2Icon)`\n path {\n stroke: ${({ theme }) => theme.colors.WHITE};\n }\n`;\n\nexport const HeaderText = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n`;\n\ninterface ICardOptionWrapperProps {\n $disabled?: boolean;\n}\ninterface ICardOptionsProps {\n $top: number;\n $left: number;\n}\n\nexport const CardOptions = styled(FlexView)<ICardOptionsProps>``;\n\nexport const CardOptionWrapper = styled(FlexView)<ICardOptionWrapperProps>(({\n theme,\n $disabled,\n}) => {\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n \n &:hover {\n background: ${$disabled ? 'transparent' : theme.colors.BLACK};\n };\n \n path {\n fill: ${theme.colors.WHITE_1};\n }\n `;\n});\n\nexport const OptionText = styled(Text)`\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n\nexport const MenuWrapper = styled(FlexView)`\n position: absolute;\n z-index: 6;\n top: calc(100% - 36px);\n right: 12px;\n transform-origin: top;\n transform: scaleY(1);\n`;\n\nexport const BlurContainer = styled(FlexView)`\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n opacity: 0.5;\n`;\n\nexport const BlurFlexView = styled(FlexView)`\n position: absolute;\n right: 42px;\n top: 24px;\n`;\n"],"names":["CardKebabMenuWrapper","styled","FlexView","theme","SubHeaderText","Text","CardMenuOptionsWrapper","$shouldopenonright","$visible","CardContainer","CardWrapper","$bgImage","IconWrapper","BannerImageWrapper","BannerImage","gutter","StyledMinus2Icon","Minus2Icon","HeaderText","CardOptionWrapper","$disabled","OptionText","MenuWrapper","BlurContainer","BlurFlexView"],"mappings":";;;;AAcO,MAAMA,IAAuBC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAC/C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAQWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAEYC,IAAgBH,EAAOI,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQ3BC,IAAyBL,EAAOC,CAAQ,EAAgC,CAAC;AAAA,EACpF,oBAAAK;AAAA,EACA,UAAAC;AACF,MACS;AAAA;AAAA;AAAA;AAAA;AAAA,aAKID,IAAqB,IAAI,MAAM;AAAA;AAAA,wBAEpBC,IAAW,IAAI,CAAC;AAAA,eACzBA,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA,GAK9B,GAEYC,IAAgBR,EAAOC,CAAQ;AAAA,sBACtB,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA,wBAGpC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA,GAI5CO,IAAcT,EAAOC,CAAQ,EAAqB,CAAC,EAAE,UAAAS,QAC5DA,IACK;AAAA,8BACmBA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,QAQ7B,mBACR,GAEYC,IAAcX,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAM7BW,IAAqBZ,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMpCY,IAAcb,EAAO,IAAI,CAAC,EAAE,OAAAE,QAAY;AAC7C,QAAA,EAAE,QAAAY,EAAO,IAAIZ,EAAM;AAElB,SAAA;AAAA,wBACeA,EAAM,OAAO,UAAU;AAAA,aAClCY,IAAS,CAAC;AAAA,cACTA,IAAS,CAAC;AAAA;AAAA;AAGxB,CAAC,GAEYC,IAAmBf,EAAOgB,CAAU;AAAA;AAAA,cAEnC,CAAC,EAAE,OAAAd,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA,GAIlCe,IAAajB,EAAOI,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAiBVJ,EAAOC,CAAQ;AAEnC,MAAMiB,IAAoBlB,EAAOC,CAAQ,EAA2B,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,WAAAiB;AACF,MACS;AAAA,cACKA,IAAY,gBAAgB,SAAS;AAAA;AAAA;AAAA,oBAG/BA,IAAY,gBAAgBjB,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA,cAIpDA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGjC,GAEYkB,IAAapB,EAAOI,CAAI;AAAA;AAAA;AAAA;AAAA,GAMxBiB,IAAcrB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS7BqB,IAAgBtB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAS/BsB,IAAevB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import { TESTS_CREATION_ANALYTICS_EVENTS as l } from "../milestone/milestone-tests/tests-creation/tests-creation-analytics-events.js";
|
2
|
+
import { NODE_TYPE as E } from "../sheets/constants/sheet.js";
|
3
|
+
import { HOMEWORK_ANALYTICS_EVENTS as c } from "./homework-analytics-events.js";
|
4
|
+
const y = ({
|
5
|
+
canResume: a,
|
6
|
+
canStart: i,
|
7
|
+
homeworkId: e,
|
8
|
+
isHomeWork: _,
|
9
|
+
isStudent: o,
|
10
|
+
milestoneId: n,
|
11
|
+
nodeType: t,
|
12
|
+
studentId: r,
|
13
|
+
userNodeId: s
|
14
|
+
}) => {
|
15
|
+
if (o) {
|
16
|
+
if (_)
|
17
|
+
return i || a ? {
|
18
|
+
analyticsLabel: c.HOMEWORK_ATTEMPTED,
|
19
|
+
analyticsProps: { student_id: r, node_type: t, homework_id: e }
|
20
|
+
} : {
|
21
|
+
analyticsLabel: "homework-student-menu",
|
22
|
+
analyticsProps: { student_id: r, node_type: t, homework_id: e }
|
23
|
+
};
|
24
|
+
if (i || a)
|
25
|
+
return {
|
26
|
+
analyticsLabel: t === E.DYNAMIC ? l.CUSTOM_TEST_ATTEMPTED : "node-attempted",
|
27
|
+
analyticsProps: {
|
28
|
+
student_id: r,
|
29
|
+
node_type: t,
|
30
|
+
user_node_id: s,
|
31
|
+
milestone_id: n,
|
32
|
+
can_start: i,
|
33
|
+
can_resume: a
|
34
|
+
}
|
35
|
+
};
|
36
|
+
}
|
37
|
+
return _ ? {
|
38
|
+
analyticsLabel: "homework-card-teacher",
|
39
|
+
analyticsProps: { student_id: r, node_type: t }
|
40
|
+
} : {
|
41
|
+
analyticsLabel: "goals-card-teacher",
|
42
|
+
analyticsProps: { student_id: r, node_type: t }
|
43
|
+
};
|
44
|
+
};
|
45
|
+
export {
|
46
|
+
y as getCardAnalyticProps
|
47
|
+
};
|
48
|
+
//# sourceMappingURL=utils.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\n\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../milestone/milestone-tests/tests-creation/tests-creation-analytics-events';\nimport { NODE_TYPE } from '../sheets/constants/sheet';\nimport { HOMEWORK_ANALYTICS_EVENTS } from './homework-analytics-events';\n\ninterface IGetCardAnalyticProps {\n canResume: boolean;\n canStart: boolean;\n homeworkId?: string;\n isHomeWork: boolean;\n isStudent: boolean;\n milestoneId?: string;\n nodeType: TNodeTypes;\n studentId: string;\n userNodeId: string | null;\n}\n\nconst getCardAnalyticProps = ({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n}: IGetCardAnalyticProps) => {\n if (isStudent) {\n if (isHomeWork) {\n if (canStart || canResume) {\n return {\n analyticsLabel: HOMEWORK_ANALYTICS_EVENTS.HOMEWORK_ATTEMPTED,\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n return {\n analyticsLabel: 'homework-student-menu',\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n if (canStart || canResume) {\n return {\n analyticsLabel:\n nodeType === NODE_TYPE.DYNAMIC\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : 'node-attempted',\n analyticsProps: {\n student_id: studentId,\n node_type: nodeType,\n user_node_id: userNodeId,\n milestone_id: milestoneId,\n can_start: canStart,\n can_resume: canResume,\n },\n };\n }\n }\n\n if (isHomeWork) {\n return {\n analyticsLabel: 'homework-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n }\n\n return {\n analyticsLabel: 'goals-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n};\n\nexport { getCardAnalyticProps };\n"],"names":["getCardAnalyticProps","canResume","canStart","homeworkId","isHomeWork","isStudent","milestoneId","nodeType","studentId","userNodeId","HOMEWORK_ANALYTICS_EVENTS","NODE_TYPE","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;AAkBA,MAAMA,IAAuB,CAAC;AAAA,EAC5B,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAA6B;AAC3B,MAAIJ,GAAW;AACb,QAAID;AACF,aAAIF,KAAYD,IACP;AAAA,QACL,gBAAgBS,EAA0B;AAAA,QAC1C,gBAAgB,EAAE,YAAYF,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA,IAInF;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB,EAAE,YAAYK,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA;AAI1F,QAAID,KAAYD;AACP,aAAA;AAAA,QACL,gBACEM,MAAaI,EAAU,UACnBC,EAAgC,wBAChC;AAAA,QACN,gBAAgB;AAAA,UACd,YAAYJ;AAAA,UACZ,WAAWD;AAAA,UACX,cAAcE;AAAA,UACd,cAAcH;AAAA,UACd,WAAWJ;AAAA,UACX,YAAYD;AAAA,QACd;AAAA,MAAA;AAAA,EAGN;AAEA,SAAIG,IACK;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYI,GAAW,WAAWD,EAAS;AAAA,EAAA,IAI1D;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYC,GAAW,WAAWD,EAAS;AAAA,EAAA;AAEjE;"}
|
@@ -1,17 +1,24 @@
|
|
1
1
|
import e from "styled-components";
|
2
|
-
import
|
3
|
-
const d = e(
|
2
|
+
import r from "../../../ui/layout/flex-view.js";
|
3
|
+
const d = e(r)`
|
4
4
|
top: ${({ $top: t }) => t}px;
|
5
5
|
left: ${({ $left: t }) => t}px;
|
6
|
-
`,
|
6
|
+
`, a = e(r)(({ theme: t }) => {
|
7
7
|
const { gutter: o } = t.layout;
|
8
8
|
return `
|
9
9
|
width: 100%;
|
10
10
|
padding: ${o * 0.75}px ${o * 0.5}px;
|
11
11
|
`;
|
12
|
-
})
|
12
|
+
}), i = e.div`
|
13
|
+
pointer-events: none;
|
14
|
+
width: 720px;
|
15
|
+
overflow: hidden;
|
16
|
+
padding: 30px;
|
17
|
+
background-color: transparent;
|
18
|
+
`;
|
13
19
|
export {
|
14
20
|
d as ClonedElementWrapper,
|
15
|
-
|
21
|
+
a as CoachmarkBody,
|
22
|
+
i as ELementWrapper
|
16
23
|
};
|
17
24
|
//# sourceMappingURL=coachmark-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC;"}
|
1
|
+
{"version":3,"file":"coachmark-styled.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const ClonedElementWrapper = styled(FlexView)<{\n $top: number;\n $left: number;\n}>`\n top: ${({ $top }) => $top}px;\n left: ${({ $left }) => $left}px;\n`;\n\nexport const CoachmarkBody = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n width: 100%;\n padding: ${gutter * 0.75}px ${gutter * 0.5}px;\n `;\n});\n\nexport const ELementWrapper = styled.div`\n pointer-events: none;\n width: 720px;\n overflow: hidden;\n padding: 30px;\n background-color: transparent;\n`;\n"],"names":["ClonedElementWrapper","styled","FlexView","$top","$left","CoachmarkBody","theme","gutter","ELementWrapper"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA,SAI1C,CAAC,EAAE,MAAAC,EAAK,MAAMA,CAAI;AAAA,UACjB,CAAC,EAAE,OAAAC,EAAM,MAAMA,CAAK;AAAA,GAGjBC,IAAgBJ,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAI,QAAY;AACrD,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM;AAElB,SAAA;AAAA;AAAA,eAEMC,IAAS,IAAI,MAAMA,IAAS,GAAG;AAAA;AAE9C,CAAC,GAEYC,IAAiBP,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,43 +1,43 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { useMemo as
|
1
|
+
import { jsx as e, jsxs as g, Fragment as f } from "react/jsx-runtime";
|
2
|
+
import { useMemo as d } from "react";
|
3
3
|
import m from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
4
|
-
import
|
5
|
-
import { BLUR_OVERLAY_Z_INDEX as T, IndicatorType as
|
6
|
-
import { CoachmarkBody as
|
7
|
-
import { toolTipGetXCoordinates as
|
4
|
+
import b from "../../../ui/nudge/nudge.js";
|
5
|
+
import { BLUR_OVERLAY_Z_INDEX as T, IndicatorType as p } from "../../use-journey/constants.js";
|
6
|
+
import { CoachmarkBody as w, ClonedElementWrapper as s } from "./coachmark-styled.js";
|
7
|
+
import { toolTipGetXCoordinates as y } from "./coachmark-utils.js";
|
8
8
|
const H = ({ coachmark: t }) => {
|
9
|
-
const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: C = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, l =
|
10
|
-
const
|
9
|
+
const i = t.originalElementToHighlightRef.current, { top: r = 0, left: n = 0, height: h = 0, width: C = 0 } = (i == null ? void 0 : i.getBoundingClientRect()) || {}, l = d(() => () => i ? window.getComputedStyle(i).position === "absolute" : !1, [i]), u = d(() => {
|
10
|
+
const o = t.indicator;
|
11
11
|
return {
|
12
12
|
width: 264,
|
13
13
|
// Can be over ridden
|
14
|
-
tooltipXCoOrdinates:
|
14
|
+
tooltipXCoOrdinates: y(o.position) + (o.tooltipXCoOrdinates ?? 0),
|
15
15
|
// For absolutely positioned elements
|
16
16
|
zIndex: T + 1,
|
17
|
-
...
|
18
|
-
tooltipItem: /* @__PURE__ */
|
17
|
+
...o,
|
18
|
+
tooltipItem: /* @__PURE__ */ e(w, { children: o.tooltipItem }),
|
19
19
|
alwaysVisible: !0,
|
20
20
|
renderAs: "primary",
|
21
21
|
// Deprecate this
|
22
22
|
borderWidth: 1,
|
23
|
-
arrowColor: "WHITE",
|
24
|
-
borderColor: "WHITE",
|
25
|
-
type:
|
23
|
+
arrowColor: o.arrowColor || "WHITE",
|
24
|
+
borderColor: o.borderColor || "WHITE",
|
25
|
+
type: p.TOOLTIP,
|
26
26
|
isAnimated: !0
|
27
27
|
};
|
28
|
-
}, [t.indicator]), I =
|
29
|
-
const
|
28
|
+
}, [t.indicator]), I = d(() => {
|
29
|
+
const o = t.indicator;
|
30
30
|
return {
|
31
|
-
...
|
32
|
-
nudgePointerX: n + (
|
33
|
-
nudgePointerY: r + (
|
31
|
+
...o,
|
32
|
+
nudgePointerX: n + (o.nudgePointerX ?? 0),
|
33
|
+
nudgePointerY: r + (o.nudgePointerY ?? 0)
|
34
34
|
};
|
35
35
|
}, [t.indicator, n, r]);
|
36
|
-
return !i || !t.isActive ? null : t.type ===
|
36
|
+
return !i || !t.isActive ? null : t.type === p.TOOLTIP ? l() ? /* @__PURE__ */ g(f, { children: [
|
37
37
|
t.elementToHighlight,
|
38
|
-
/* @__PURE__ */
|
39
|
-
] }) : /* @__PURE__ */
|
40
|
-
/* @__PURE__ */
|
38
|
+
/* @__PURE__ */ e(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(m, { ...u, children: /* @__PURE__ */ e("div", { style: { height: h, width: C } }) }) })
|
39
|
+
] }) : /* @__PURE__ */ e(s, { $position: "absolute", $top: r, $left: n, children: /* @__PURE__ */ e(m, { ...u, children: t.elementToHighlight }) }) : t.type === p.NUDGE ? /* @__PURE__ */ g(f, { children: [
|
40
|
+
/* @__PURE__ */ e(
|
41
41
|
s,
|
42
42
|
{
|
43
43
|
$top: l() ? 0 : r,
|
@@ -46,7 +46,7 @@ const H = ({ coachmark: t }) => {
|
|
46
46
|
children: t.elementToHighlight
|
47
47
|
}
|
48
48
|
),
|
49
|
-
/* @__PURE__ */
|
49
|
+
/* @__PURE__ */ e(b, { zIndex: T + 1, ...I })
|
50
50
|
] }) : null;
|
51
51
|
};
|
52
52
|
export {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: 'WHITE',\n borderColor: 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [coachmark.indicator]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQE,IAAuB;AAAA,MAC/B,GAAGF;AAAA,MACH,aAAc,gBAAAG,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,
|
1
|
+
{"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: arrowToolTipProps.arrowColor || 'WHITE',\n borderColor: arrowToolTipProps.borderColor || 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [coachmark.indicator]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQE,IAAuB;AAAA,MAC/B,GAAGF;AAAA,MACH,aAAc,gBAAAG,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,YAAYJ,EAAkB,cAAc;AAAA,MAC5C,aAAaA,EAAkB,eAAe;AAAA,MAC9C,MAAMK,EAAc;AAAA,MACpB,YAAY;AAAA,IAAA;AAAA,EACd,GACC,CAACd,EAAU,SAAS,CAAC,GAElBe,IAAaR,EAAQ,MAAM;AAC/B,UAAMS,IAAqBhB,EAAU;AAE9B,WAAA;AAAA,MACL,GAAGgB;AAAA,MACH,eAAeb,KAAQa,EAAM,iBAAiB;AAAA,MAC9C,eAAed,KAAOc,EAAM,iBAAiB;AAAA,IAAA;AAAA,KAE9C,CAAChB,EAAU,WAAWG,GAAMD,CAAG,CAAC;AAEnC,SAAI,CAACD,KAAiB,CAACD,EAAU,WACxB,OAGLA,EAAU,SAASc,EAAc,UAC/BR,MAGG,gBAAAW,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAUlB,EAAA;AAAA,IACX,gBAAAY,EAACO,GAAA,EAAuB,WAAU,YAAW,MAAMjB,GAAK,OAAOC,GAC7D,UAAA,gBAAAS,EAACQ,KAAc,GAAGZ,GAChB,4BAAC,OAAI,EAAA,OAAO,EAAE,QAAAJ,GAAQ,OAAAC,EAAA,GAAS,EAAA,CACjC,EACF,CAAA;AAAA,EACF,EAAA,CAAA,sBAKDc,GAAA,EAAuB,WAAU,YAAW,MAAMjB,GAAK,OAAOC,GAC7D,4BAACiB,GAAc,EAAA,GAAGZ,GAAe,UAAAR,EAAU,oBAAmB,EAChE,CAAA,IAIAA,EAAU,SAASc,EAAc,QAG/B,gBAAAG,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAN;AAAA,MAACO;AAAAA,MAAA;AAAA,QACC,MAAMb,MAAe,IAAIJ;AAAA,QACzB,OAAOI,MAAe,IAAIH;AAAA,QAC1B,WAAWG,MAAe,aAAa;AAAA,QAEtC,UAAUN,EAAA;AAAA,MAAA;AAAA,IACb;AAAA,sBACCqB,GAAM,EAAA,QAAQV,IAAuB,GAAI,GAAGI,GAAY;AAAA,EAC3D,EAAA,CAAA,IAIG;AACT;"}
|
@@ -0,0 +1,194 @@
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
2
|
+
import { useRef as n, useCallback as B, useMemo as L, useEffect as N } from "react";
|
3
|
+
import y from "../../chapters-v2/chapter-details/chapter-banner/chapter-banner.js";
|
4
|
+
import I from "../../chapters-v2/chapter-details/chapter-details.js";
|
5
|
+
import c from "../../ui/buttons/button/button.js";
|
6
|
+
import d from "../../ui/layout/flex-view.js";
|
7
|
+
import m from "../../ui/text/text.js";
|
8
|
+
import { JOURNEY_ID_STUDENT as S } from "../journey-id/journey-id-student.js";
|
9
|
+
import { IndicatorType as p } from "../use-journey/constants.js";
|
10
|
+
import { useJourney as _ } from "../use-journey/use-journey.js";
|
11
|
+
const Y = () => {
|
12
|
+
const o = S.CHAPTER_PAGE_JOURNEY, t = n(null), r = n(null), u = n(null), s = n([]), { nextCoachmark: i, setJourney: h, endJourney: g } = _(), C = B(
|
13
|
+
({ chapterDetails: l, studentId: R, userType: E }) => {
|
14
|
+
const {
|
15
|
+
progress_stat: f,
|
16
|
+
name: A,
|
17
|
+
image_hue: T,
|
18
|
+
image_url: w
|
19
|
+
// blocks,
|
20
|
+
} = l;
|
21
|
+
if (!(t != null && t.current) || !(r != null && r.current) || !u.current)
|
22
|
+
return;
|
23
|
+
const k = t.current.getBoundingClientRect(), O = [
|
24
|
+
{
|
25
|
+
originalElementToHighlightRef: t,
|
26
|
+
isActive: !1,
|
27
|
+
type: p.TOOLTIP,
|
28
|
+
elementToHighlight: /* @__PURE__ */ e(
|
29
|
+
I,
|
30
|
+
{
|
31
|
+
userChapterId: l.id,
|
32
|
+
studentId: R,
|
33
|
+
userType: E,
|
34
|
+
onBlockSkipUnskip: () => null,
|
35
|
+
onNodeAttempt: () => null,
|
36
|
+
onNodeAttemptLocationChange: () => null,
|
37
|
+
onNodeMarkAsDone: () => null,
|
38
|
+
onNodeReattempt: () => null,
|
39
|
+
onNodeReview: () => null,
|
40
|
+
onNodeView: () => null,
|
41
|
+
onExit: () => null
|
42
|
+
}
|
43
|
+
),
|
44
|
+
indicator: {
|
45
|
+
position: "left",
|
46
|
+
tooltipYCoOrdinates: -(k.height / 2) + 178,
|
47
|
+
backgroundColor: "BLUE_4",
|
48
|
+
borderColor: "BLACK",
|
49
|
+
arrowColor: "BLACK",
|
50
|
+
arrowSize: 12,
|
51
|
+
width: 264,
|
52
|
+
tooltipItem: /* @__PURE__ */ a(d, { $flexRowGapX: 0.75, children: [
|
53
|
+
/* @__PURE__ */ e(m, { $renderAs: "ab2-bold", children: "Welcome to the all new chapter experience." }),
|
54
|
+
/* @__PURE__ */ e(
|
55
|
+
c,
|
56
|
+
{
|
57
|
+
label: "Next",
|
58
|
+
size: "xsmall",
|
59
|
+
widthX: 6,
|
60
|
+
renderAs: "secondary",
|
61
|
+
onClick: () => i(o, !1, 0, !0)
|
62
|
+
}
|
63
|
+
)
|
64
|
+
] })
|
65
|
+
}
|
66
|
+
},
|
67
|
+
{
|
68
|
+
originalElementToHighlightRef: r,
|
69
|
+
elementToHighlight: /* @__PURE__ */ e(
|
70
|
+
y,
|
71
|
+
{
|
72
|
+
title: A,
|
73
|
+
progressStats: f,
|
74
|
+
imageUrl: w,
|
75
|
+
imageHue: T
|
76
|
+
}
|
77
|
+
),
|
78
|
+
type: p.TOOLTIP,
|
79
|
+
indicator: {
|
80
|
+
position: "bottom",
|
81
|
+
tooltipXCoOrdinates: -45,
|
82
|
+
tooltipYCoOrdinates: -40,
|
83
|
+
backgroundColor: "ORANGE_4",
|
84
|
+
borderColor: "BLACK",
|
85
|
+
arrowColor: "BLACK",
|
86
|
+
width: 264,
|
87
|
+
arrowSize: 12,
|
88
|
+
tooltipItem: /* @__PURE__ */ a(d, { $flexRowGapX: 0.75, children: [
|
89
|
+
/* @__PURE__ */ e(m, { $renderAs: "ab2-bold", children: "A chapter is divided into *core sheets (compulsory), and supplementary sheets." }),
|
90
|
+
/* @__PURE__ */ e(
|
91
|
+
c,
|
92
|
+
{
|
93
|
+
label: "Next",
|
94
|
+
size: "xsmall",
|
95
|
+
widthX: 6,
|
96
|
+
renderAs: "secondary",
|
97
|
+
onClick: () => i(o, !1, 0, !0)
|
98
|
+
}
|
99
|
+
)
|
100
|
+
] })
|
101
|
+
},
|
102
|
+
isActive: !1
|
103
|
+
},
|
104
|
+
{
|
105
|
+
originalElementToHighlightRef: r,
|
106
|
+
elementToHighlight: /* @__PURE__ */ e(
|
107
|
+
y,
|
108
|
+
{
|
109
|
+
title: A,
|
110
|
+
progressStats: f,
|
111
|
+
imageUrl: w,
|
112
|
+
imageHue: T
|
113
|
+
}
|
114
|
+
),
|
115
|
+
type: p.TOOLTIP,
|
116
|
+
indicator: {
|
117
|
+
position: "bottom",
|
118
|
+
tooltipXCoOrdinates: -275,
|
119
|
+
tooltipYCoOrdinates: -15,
|
120
|
+
backgroundColor: "PURPLE_4",
|
121
|
+
borderColor: "BLACK",
|
122
|
+
arrowColor: "BLACK",
|
123
|
+
arrowSize: 12,
|
124
|
+
width: 264,
|
125
|
+
tooltipItem: /* @__PURE__ */ a(d, { $flexRowGapX: 0.75, children: [
|
126
|
+
/* @__PURE__ */ e(m, { $renderAs: "ab2-bold", children: "Easily track the progress of the core sheets." }),
|
127
|
+
/* @__PURE__ */ e(
|
128
|
+
c,
|
129
|
+
{
|
130
|
+
label: "Got it",
|
131
|
+
size: "xsmall",
|
132
|
+
widthX: 6,
|
133
|
+
renderAs: "secondary",
|
134
|
+
onClick: () => g(o)
|
135
|
+
}
|
136
|
+
)
|
137
|
+
] })
|
138
|
+
},
|
139
|
+
isActive: !1
|
140
|
+
}
|
141
|
+
// {
|
142
|
+
// originalElementToHighlightRef: coreBlocksRef,
|
143
|
+
// elementToHighlight: <BlockSections userType={userType} blocks={blocks} imageHue="BLUE" />,
|
144
|
+
// type: IndicatorType.TOOLTIP,
|
145
|
+
// indicator: {
|
146
|
+
// position: 'top',
|
147
|
+
// tooltipXCoOrdinates: -35,
|
148
|
+
// tooltipYCoOrdinates: -7,
|
149
|
+
// backgroundColor: 'PURPLE_4',
|
150
|
+
// borderColor: 'BLACK',
|
151
|
+
// arrowColor: 'BLACK',
|
152
|
+
// arrowXCoOrdinates: -97,
|
153
|
+
// arrowSize: 12,
|
154
|
+
// width: 264,
|
155
|
+
// tooltipItem: (
|
156
|
+
// <FlexView $flexRowGapX={0.75}>
|
157
|
+
// <Text $renderAs="ab2-bold">Easily track the progress of the core sheets.</Text>
|
158
|
+
// <Button
|
159
|
+
// label="Next"
|
160
|
+
// size="xsmall"
|
161
|
+
// widthX={6}
|
162
|
+
// renderAs="secondary"
|
163
|
+
// onClick={() => endJourney(journeyId)}
|
164
|
+
// />
|
165
|
+
// </FlexView>
|
166
|
+
// ),
|
167
|
+
// } as IArrowTooltipProps,
|
168
|
+
// isActive: false,
|
169
|
+
// },
|
170
|
+
];
|
171
|
+
h(o, O);
|
172
|
+
const b = setTimeout(() => {
|
173
|
+
clearTimeout(b), i(o, !1, 0, !0);
|
174
|
+
}, 200);
|
175
|
+
s.current.push(b);
|
176
|
+
},
|
177
|
+
[h, o, i, g]
|
178
|
+
), x = L(
|
179
|
+
() => ({
|
180
|
+
chapterPageRef: t,
|
181
|
+
bannerRef: r,
|
182
|
+
coreBlocksRef: u,
|
183
|
+
startJourney: C
|
184
|
+
}),
|
185
|
+
[C]
|
186
|
+
);
|
187
|
+
return N(() => () => {
|
188
|
+
s.current.forEach((l) => clearTimeout(l)), s.current = [];
|
189
|
+
}, []), x;
|
190
|
+
};
|
191
|
+
export {
|
192
|
+
Y as useChapterPageJourney
|
193
|
+
};
|
194
|
+
//# sourceMappingURL=use-chapter-journey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-chapter-journey.js","sources":["../../../../src/features/journey/hooks/use-chapter-journey.tsx"],"sourcesContent":["import type { IUserChapterData } from '../../chapters-v2/chapter-details/chapter-details-types';\nimport type { IArrowTooltipProps } from '../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../use-journey/journey-context-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport ChapterBanner from '../../chapters-v2/chapter-details/chapter-banner/chapter-banner';\nimport ChapterDetails from '../../chapters-v2/chapter-details/chapter-details';\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { JOURNEY_ID_STUDENT } from '../journey-id/journey-id-student';\nimport { IndicatorType } from '../use-journey/constants';\nimport { useJourney } from '../use-journey/use-journey';\n\ninterface IChapterStartJourneyProps {\n chapterDetails: IUserChapterData;\n studentId: string;\n userType: 'STUDENT' | 'TEACHER';\n}\n\nexport const useChapterPageJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.CHAPTER_PAGE_JOURNEY;\n\n const chapterPageRef = useRef<HTMLDivElement>(null);\n const bannerRef = useRef<HTMLDivElement>(null);\n const coreBlocksRef = useRef<HTMLDivElement>(null);\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const startJourney = useCallback(\n ({ chapterDetails, studentId, userType }: IChapterStartJourneyProps) => {\n // const isStudent = userType === 'STUDENT';\n\n const {\n progress_stat: progressStat,\n name,\n image_hue: imageHue,\n image_url: imageUrl,\n // blocks,\n } = chapterDetails;\n\n if (!chapterPageRef?.current || !bannerRef?.current || !coreBlocksRef.current) {\n return;\n }\n\n const chapterPageRect = chapterPageRef.current.getBoundingClientRect();\n\n const chapterPageSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: chapterPageRef,\n isActive: false,\n type: IndicatorType.TOOLTIP,\n elementToHighlight: (\n <ChapterDetails\n userChapterId={chapterDetails.id}\n studentId={studentId}\n userType={userType}\n onBlockSkipUnskip={() => null}\n onNodeAttempt={() => null}\n onNodeAttemptLocationChange={() => null}\n onNodeMarkAsDone={() => null}\n onNodeReattempt={() => null}\n onNodeReview={() => null}\n onNodeView={() => null}\n onExit={() => null}\n />\n ),\n indicator: {\n position: 'left',\n tooltipYCoOrdinates: -(chapterPageRect.height / 2) + 178,\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">Welcome to the all new chapter experience.</Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: bannerRef,\n elementToHighlight: (\n <ChapterBanner\n title={name}\n progressStats={progressStat}\n imageUrl={imageUrl}\n imageHue={imageHue}\n />\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipXCoOrdinates: -45,\n tooltipYCoOrdinates: -40,\n backgroundColor: 'ORANGE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n width: 264,\n arrowSize: 12,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">\n A chapter is divided into *core sheets (compulsory), and supplementary sheets.\n </Text>\n <Button\n label=\"Next\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => nextCoachmark(journeyId, false, 0, true)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n {\n originalElementToHighlightRef: bannerRef,\n elementToHighlight: (\n <ChapterBanner\n title={name}\n progressStats={progressStat}\n imageUrl={imageUrl}\n imageHue={imageHue}\n />\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipXCoOrdinates: -275,\n tooltipYCoOrdinates: -15,\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n width: 264,\n tooltipItem: (\n <FlexView $flexRowGapX={0.75}>\n <Text $renderAs=\"ab2-bold\">Easily track the progress of the core sheets.</Text>\n <Button\n label=\"Got it\"\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={() => endJourney(journeyId)}\n />\n </FlexView>\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n // {\n // originalElementToHighlightRef: coreBlocksRef,\n // elementToHighlight: <BlockSections userType={userType} blocks={blocks} imageHue=\"BLUE\" />,\n // type: IndicatorType.TOOLTIP,\n // indicator: {\n // position: 'top',\n // tooltipXCoOrdinates: -35,\n // tooltipYCoOrdinates: -7,\n // backgroundColor: 'PURPLE_4',\n // borderColor: 'BLACK',\n // arrowColor: 'BLACK',\n // arrowXCoOrdinates: -97,\n // arrowSize: 12,\n // width: 264,\n // tooltipItem: (\n // <FlexView $flexRowGapX={0.75}>\n // <Text $renderAs=\"ab2-bold\">Easily track the progress of the core sheets.</Text>\n // <Button\n // label=\"Next\"\n // size=\"xsmall\"\n // widthX={6}\n // renderAs=\"secondary\"\n // onClick={() => endJourney(journeyId)}\n // />\n // </FlexView>\n // ),\n // } as IArrowTooltipProps,\n // isActive: false,\n // },\n ];\n\n setJourney(journeyId, chapterPageSteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n nextCoachmark(journeyId, false, 0, true);\n }, 200);\n\n timerRefs.current.push(delayBeforeStart); // Store to cleanup later\n },\n [setJourney, journeyId, nextCoachmark, endJourney],\n );\n\n const data = useMemo(\n () => ({\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n startJourney,\n }),\n [startJourney],\n );\n\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useChapterPageJourney","journeyId","JOURNEY_ID_STUDENT","chapterPageRef","useRef","bannerRef","coreBlocksRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","startJourney","useCallback","chapterDetails","studentId","userType","progressStat","name","imageHue","imageUrl","chapterPageRect","chapterPageSteps","IndicatorType","jsx","ChapterDetails","jsxs","FlexView","Text","Button","ChapterBanner","delayBeforeStart","data","useMemo","useEffect","timer"],"mappings":"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"}
|