@cuemath/leap 2.9.9-as4 → 2.9.9
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/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 +11 -13
- package/dist/features/analytics-events/whitelist-events.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/circle-games/games/tutorial/constants.js +2 -2
- package/dist/features/circle-games/games/tutorial/constants.js.map +1 -1
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js +6 -6
- package/dist/features/circle-games/games/tutorial/tutorial-styled.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view.js +52 -45
- package/dist/features/circle-games/games/web-view/web-view.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +104 -74
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js +6 -6
- package/dist/features/circle-games/leaderboard/comps/banner/banner.js.map +1 -1
- package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js +1 -1
- package/dist/features/circle-games/leaderboard/comps/navigation-button/navigation-button-styled.js.map +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard-styled.js +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard-styled.js.map +1 -1
- package/dist/features/circle-games/leaderboard/leaderboard.js +9 -9
- package/dist/features/circle-games/leaderboard/leaderboard.js.map +1 -1
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js +8 -8
- package/dist/features/circle-games/sign-up/comp/circular-steps/circular-steps-styled.js.map +1 -1
- package/dist/features/circle-games/sign-up/constants.js +9 -9
- package/dist/features/circle-games/sign-up/constants.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +6 -12
- 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 +105 -138
- 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 +176 -157
- 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 +25 -17
- 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 +113 -110
- 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 +113 -116
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- 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 +50 -46
- 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 +38 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -0
- 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/ui/arc-button/constants.js +4 -4
- package/dist/features/ui/arc-button/constants.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/lottie-animation/lottie-animation.js +13 -19
- package/dist/features/ui/lottie-animation/lottie-animation.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/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +96 -78
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +79 -47
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +150 -147
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +325 -300
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/index.d.ts +46 -355
- package/dist/index.js +471 -503
- 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 -35
- 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 -83
- 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 -98
- 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 -51
- 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 -127
- 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 -159
- 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-option.js +0 -31
- package/dist/features/chapters-v2/comps/node-card/node-menu-options/node-menu-option.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 -9
- 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 -189
- 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 -194
- 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 -38
- package/dist/features/chapters-v2/utils/index.js.map +0 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +0 -177
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +0 -1
- package/dist/features/homework/card-menu-option.js +0 -28
- package/dist/features/homework/card-menu-option.js.map +0 -1
- package/dist/features/homework/card-menu-options.js +0 -22
- package/dist/features/homework/card-menu-options.js.map +0 -1
- package/dist/features/homework/card-title.js +0 -16
- package/dist/features/homework/card-title.js.map +0 -1
- package/dist/features/homework/homework-analytics-events.js +0 -10
- package/dist/features/homework/homework-analytics-events.js.map +0 -1
- package/dist/features/homework/homework-card-view.js +0 -143
- package/dist/features/homework/homework-card-view.js.map +0 -1
- package/dist/features/homework/homework-card.js +0 -245
- 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 -63
- 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 -191
- 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/homework/utils.js +0 -48
- package/dist/features/homework/utils.js.map +0 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +0 -194
- package/dist/features/journey/hooks/use-chapter-journey.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/journey/journey-id/journey-id-teacher.js +0 -5
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +0 -1
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +0 -587
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.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 -87
- 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 -45
- 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
package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapters-selection-step.js","sources":["../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.tsx"],"sourcesContent":["import type { IFormStepProps } from '../../milestone-create-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useContext, useMemo } from 'react';\n\nimport Bin2Icon from '../../../../../assets/line-icons/icons/bin2';\nimport PlusIcon from '../../../../../assets/line-icons/icons/plus';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../../ui/buttons/button/button';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { WARNING_MESSAGES } from '../../../constants';\nimport { GOAL_EDIT_FLOWS } from '../../milestone-create-constants';\nimport MilestoneCreateContext from '../../milestone-create-context';\nimport BodyLayout from '../body-layout/body-layout';\nimport ClassDetailsStep from '../class-details-step/class-details-step';\nimport ChapterSelection from './chapter-selection-step-v2/chapter-selection';\nimport * as Styled from './chapters-selection-step-styled';\nimport { useChapterListUpdate } from './use-chapter-list-update';\nimport { computeChangeDetection } from './utils';\n\nconst ChaptersSelectionStep: FC<IFormStepProps> = memo(props => {\n const {\n currentStep,\n onFormDataChange,\n onChapterExitWarning,\n formData,\n studentName,\n studentId,\n config,\n isGoalCreation,\n onPreSubmit,\n courseStream,\n classRatio,\n enrollmentType,\n canDeleteGoal,\n onDeleteGoal,\n } = props;\n const { flow } = useContext(MilestoneCreateContext);\n const { onEvent: trackEvent } = useUIContext();\n\n const {\n action_plan: {\n green: { share_message_template: submitBaseMessage },\n },\n } = config;\n const { buttonLabel, name, title } = currentStep;\n const analyticsProps = {\n step: name,\n };\n const { testType, primaryChaptersList, board, major, region, chapterGoalCategory } = formData;\n\n const { primaryGoalCategory } = chapterGoalCategory || {};\n\n const goalEditFlow = canDeleteGoal && (flow === 'DRAFT_EDIT' || flow === 'EDIT');\n\n //* Hook that handles making api call for cue_chapters updating primaryChapterList.\n const { isProcessing, isProcessed } = useChapterListUpdate({\n formData,\n onFormDataChange,\n studentId,\n });\n\n const isAtleastOneChapterAdded = useMemo(() => {\n if (primaryChaptersList) {\n return primaryChaptersList.some(chapter => chapter.added);\n }\n\n return false;\n }, [primaryChaptersList]);\n\n const handleNext = useCallback(() => {\n const selectedChaptersList = primaryChaptersList?.filter(chapter => {\n return Boolean(chapter.added);\n });\n\n const searchedAndAddedChapterLength =\n primaryChaptersList?.filter(\n chapter => chapter.program_id !== primaryGoalCategory?.program_code && chapter.added,\n ).length ?? 0;\n\n const suggestedChaptersLength =\n primaryChaptersList?.filter(chapter => chapter.program_id === primaryGoalCategory?.program_id)\n .length ?? 0;\n\n trackEvent('CHAPTER_DETAILS_ADDED', {\n total_chapter_added: selectedChaptersList?.length ?? 0,\n searched_chapter_added: searchedAndAddedChapterLength,\n suggested_chapter_added: suggestedChaptersLength,\n });\n\n if (isGoalCreation) {\n onFormDataChange({\n primaryChaptersList: primaryChaptersList,\n selectedChaptersList: selectedChaptersList,\n searchedChaptersList: [],\n chapterSubStages: 'date-selection',\n committed: {\n selectedChaptersList: true,\n chapterSubStages: true,\n grade: true,\n board: !!board,\n major: !!major,\n region: !!region,\n },\n });\n } else if (flow) {\n onPreSubmit?.({ isDraftPlan: false, flow, submitBaseMessage });\n }\n }, [\n primaryChaptersList,\n board,\n major,\n region,\n trackEvent,\n onFormDataChange,\n onPreSubmit,\n flow,\n isGoalCreation,\n submitBaseMessage,\n primaryGoalCategory,\n ]);\n\n const handleOnAddCustomChapter = useCallback(() => {\n onFormDataChange({\n chapterSubStages: 'custom-chapters',\n selectedChaptersList: undefined,\n committed: {\n chapterSubStages: true,\n selectedChaptersList: false,\n },\n });\n }, [onFormDataChange]);\n\n const handleOnBackButtonClick = useCallback(\n (handleBack: () => void) => {\n if (!flow) return null;\n\n const isChangeDetected = computeChangeDetection(primaryChaptersList, primaryGoalCategory);\n\n if (GOAL_EDIT_FLOWS.includes(flow) || !primaryChaptersList?.length || !isChangeDetected) {\n handleBack();\n } else {\n onChapterExitWarning?.({\n onSuccess: handleBack,\n description: WARNING_MESSAGES.CHAPTER_EXIT_WARNING,\n });\n }\n },\n [onChapterExitWarning, flow, primaryChaptersList, primaryGoalCategory],\n );\n\n return (\n <BodyLayout\n stepName={name}\n headerElement={\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={1} $width=\"100%\">\n <Text $renderAs=\"ab2\">{isGoalCreation ? title : 'Chapters'}</Text>\n\n {isGoalCreation && flow === 'CREATE' && (\n <ClassDetailsStep\n studentName={studentName}\n studentId={studentId}\n currentStep={currentStep}\n config={config}\n formData={formData}\n courseStream={courseStream}\n classRatio={classRatio}\n onFormDataChange={onFormDataChange}\n onChapterExitWarning={onChapterExitWarning}\n enrollmentType={enrollmentType}\n />\n )}\n\n {isGoalCreation && goalEditFlow && (\n <Styled.BinIconWrapper>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem=\"Delete goal\"\n zIndex={10}\n widthX={6}\n >\n <IconButton\n size=\"xsmall\"\n renderAs=\"tertiary\"\n Icon={Bin2Icon}\n analyticsLabel=\"delete_goal_plan\"\n onClick={onDeleteGoal}\n />\n </ArrowTooltip>\n </Styled.BinIconWrapper>\n )}\n </FlexView>\n }\n bodyHeight=\"100%\"\n onBackButtonClick={handleOnBackButtonClick}\n bodyElement={\n <ChapterSelection\n config={config}\n classRatio={classRatio}\n isGoalCreation={isGoalCreation}\n formData={formData}\n studentName={studentName}\n isProcessed={isProcessed}\n isProcessing={isProcessing}\n courseStream={courseStream}\n onFormDataChange={onFormDataChange}\n onChapterExitWarning={onChapterExitWarning}\n enrollmentType={enrollmentType}\n />\n }\n footerElement={\n <FlexView $flexDirection=\"row\" $flexGap={12} $alignItems=\"center\">\n {(!isGoalCreation || testType === 'no-test') && (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n widthX={6.5}\n zIndex={20}\n tooltipItem=\"Add a chapter\"\n >\n <Styled.ButtonWrapper $borderRadius={50}>\n <IconButton\n renderAs=\"secondary\"\n analyticsLabel=\"Add custom chapters\"\n Icon={PlusIcon}\n disabled={isProcessing}\n onClick={handleOnAddCustomChapter}\n />\n </Styled.ButtonWrapper>\n </ArrowTooltip>\n )}\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n widthX={11}\n zIndex={20}\n tooltipItem=\"Please select atleast one chapter\"\n hidden={isAtleastOneChapterAdded}\n >\n <Styled.ButtonWrapper>\n <Button\n renderAs=\"primary\"\n size=\"small\"\n shape=\"square\"\n widthX={9}\n label={buttonLabel}\n onClick={handleNext}\n iconPosition=\"right\"\n busy={isProcessing}\n disabled={!isAtleastOneChapterAdded}\n analyticsProps={analyticsProps}\n />\n </Styled.ButtonWrapper>\n </ArrowTooltip>\n </FlexView>\n }\n />\n );\n});\n\nexport default ChaptersSelectionStep;\n"],"names":["ChaptersSelectionStep","memo","props","currentStep","onFormDataChange","onChapterExitWarning","formData","studentName","studentId","config","isGoalCreation","onPreSubmit","courseStream","classRatio","enrollmentType","canDeleteGoal","onDeleteGoal","flow","useContext","MilestoneCreateContext","trackEvent","useUIContext","submitBaseMessage","buttonLabel","name","title","analyticsProps","testType","primaryChaptersList","board","major","region","chapterGoalCategory","primaryGoalCategory","goalEditFlow","isProcessing","isProcessed","useChapterListUpdate","isAtleastOneChapterAdded","useMemo","chapter","handleNext","useCallback","selectedChaptersList","searchedAndAddedChapterLength","suggestedChaptersLength","handleOnAddCustomChapter","handleOnBackButtonClick","handleBack","isChangeDetected","computeChangeDetection","GOAL_EDIT_FLOWS","WARNING_MESSAGES","jsx","BodyLayout","jsxs","FlexView","Text","ClassDetailsStep","Styled.BinIconWrapper","ArrowTooltip","IconButton","Bin2Icon","ChapterSelection","Styled.ButtonWrapper","PlusIcon","Button"],"mappings":";;;;;;;;;;;;;;;;;;;AAuBM,MAAAA,KAA4CC,EAAK,CAASC,MAAA;AACxD,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,EACE,IAAAd,GACE,EAAE,MAAAe,EAAA,IAASC,EAAWC,EAAsB,GAC5C,EAAE,SAASC,EAAW,IAAIC,EAAa,GAEvC;AAAA,IACJ,aAAa;AAAA,MACX,OAAO,EAAE,wBAAwBC,EAAkB;AAAA,IACrD;AAAA,EACE,IAAAb,GACE,EAAE,aAAAc,GAAa,MAAAC,GAAM,OAAAC,EAAA,IAAUtB,GAC/BuB,IAAiB;AAAA,IACrB,MAAMF;AAAA,EAAA,GAEF,EAAE,UAAAG,GAAU,qBAAAC,GAAqB,OAAAC,GAAO,OAAAC,GAAO,QAAAC,GAAQ,qBAAAC,EAAwB,IAAA1B,GAE/E,EAAE,qBAAA2B,EAAA,IAAwBD,KAAuB,IAEjDE,IAAenB,MAAkBE,MAAS,gBAAgBA,MAAS,SAGnE,EAAE,cAAAkB,GAAc,aAAAC,EAAY,IAAIC,GAAqB;AAAA,IACzD,UAAA/B;AAAA,IACA,kBAAAF;AAAA,IACA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AX;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,QAAQ;AAAA,gBACR,OAAO3C;AAAA,gBACP,SAASkB;AAAA,gBACT,cAAa;AAAA,gBACb,MAAMN;AAAA,gBACN,UAAU,CAACG;AAAA,gBACX,gBAAAZ;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
1
|
+
{"version":3,"file":"chapters-selection-step.js","sources":["../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapters-selection-step.tsx"],"sourcesContent":["import type { IFormStepProps } from '../../milestone-create-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useContext, useMemo } from 'react';\n\nimport PlusIcon from '../../../../../assets/line-icons/icons/plus';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../../../ui/buttons/button/button';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { WARNING_MESSAGES } from '../../../constants';\nimport { GOAL_EDIT_FLOWS } from '../../milestone-create-constants';\nimport MilestoneCreateContext from '../../milestone-create-context';\nimport BodyLayout from '../body-layout/body-layout';\nimport ClassDetailsStep from '../class-details-step/class-details-step';\nimport ChapterSelection from './chapter-selection-step-v2/chapter-selection';\nimport * as Styled from './chapters-selection-step-styled';\nimport { useChapterListUpdate } from './use-chapter-list-update';\nimport { computeChangeDetection } from './utils';\n\nconst ChaptersSelectionStep: FC<IFormStepProps> = memo(props => {\n const {\n currentStep,\n onFormDataChange,\n onChapterExitWarning,\n formData,\n studentName,\n studentId,\n config,\n isGoalCreation,\n onPreSubmit,\n courseStream,\n classRatio,\n enrollmentType,\n } = props;\n const { flow } = useContext(MilestoneCreateContext);\n const { onEvent: trackEvent } = useUIContext();\n\n const {\n action_plan: {\n green: { share_message_template: submitBaseMessage },\n },\n } = config;\n const { buttonLabel, name, title } = currentStep;\n const analyticsProps = {\n step: name,\n };\n const { testType, primaryChaptersList, board, major, region, chapterGoalCategory } = formData;\n\n const { primaryGoalCategory } = chapterGoalCategory || {};\n\n //* Hook that handles making api call for cue_chapters updating primaryChapterList.\n const { isProcessing, isProcessed } = useChapterListUpdate({\n formData,\n onFormDataChange,\n studentId,\n });\n\n const isAtleastOneChapterAdded = useMemo(() => {\n if (primaryChaptersList) {\n return primaryChaptersList.some(chapter => chapter.added);\n }\n\n return false;\n }, [primaryChaptersList]);\n\n const handleNext = useCallback(() => {\n const selectedChaptersList = primaryChaptersList?.filter(chapter => {\n return Boolean(chapter.added);\n });\n\n const searchedAndAddedChapterLength =\n primaryChaptersList?.filter(\n chapter => chapter.program_id !== primaryGoalCategory?.program_code && chapter.added,\n ).length ?? 0;\n\n const suggestedChaptersLength =\n primaryChaptersList?.filter(chapter => chapter.program_id === primaryGoalCategory?.program_id)\n .length ?? 0;\n\n trackEvent('CHAPTER_DETAILS_ADDED', {\n total_chapter_added: selectedChaptersList?.length ?? 0,\n searched_chapter_added: searchedAndAddedChapterLength,\n suggested_chapter_added: suggestedChaptersLength,\n });\n\n if (isGoalCreation) {\n onFormDataChange({\n primaryChaptersList: primaryChaptersList,\n selectedChaptersList: selectedChaptersList,\n searchedChaptersList: [],\n chapterSubStages: 'date-selection',\n committed: {\n selectedChaptersList: true,\n chapterSubStages: true,\n grade: true,\n board: !!board,\n major: !!major,\n region: !!region,\n },\n });\n } else if (flow) {\n onPreSubmit?.({ isDraftPlan: false, flow, submitBaseMessage });\n }\n }, [\n primaryChaptersList,\n board,\n major,\n region,\n trackEvent,\n onFormDataChange,\n onPreSubmit,\n flow,\n isGoalCreation,\n submitBaseMessage,\n primaryGoalCategory,\n ]);\n\n const handleOnAddCustomChapter = useCallback(() => {\n onFormDataChange({\n chapterSubStages: 'custom-chapters',\n selectedChaptersList: undefined,\n committed: {\n chapterSubStages: true,\n selectedChaptersList: false,\n },\n });\n }, [onFormDataChange]);\n\n const handleOnBackButtonClick = useCallback(\n (handleBack: () => void) => {\n if (!flow) return null;\n\n const isChangeDetected = computeChangeDetection(primaryChaptersList, primaryGoalCategory);\n\n if (GOAL_EDIT_FLOWS.includes(flow) || !primaryChaptersList?.length || !isChangeDetected) {\n handleBack();\n } else {\n onChapterExitWarning?.({\n onSuccess: handleBack,\n description: WARNING_MESSAGES.CHAPTER_EXIT_WARNING,\n });\n }\n },\n [onChapterExitWarning, flow, primaryChaptersList, primaryGoalCategory],\n );\n\n return (\n <BodyLayout\n stepName={name}\n headerElement={\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={1}>\n <Text $renderAs=\"ab2\">{isGoalCreation ? title : 'Chapters'}</Text>\n\n {isGoalCreation && flow === 'CREATE' && (\n <ClassDetailsStep\n studentName={studentName}\n studentId={studentId}\n currentStep={currentStep}\n config={config}\n formData={formData}\n courseStream={courseStream}\n classRatio={classRatio}\n onFormDataChange={onFormDataChange}\n onChapterExitWarning={onChapterExitWarning}\n enrollmentType={enrollmentType}\n />\n )}\n </FlexView>\n }\n bodyHeight=\"100%\"\n onBackButtonClick={handleOnBackButtonClick}\n bodyElement={\n <ChapterSelection\n config={config}\n classRatio={classRatio}\n isGoalCreation={isGoalCreation}\n formData={formData}\n studentName={studentName}\n isProcessed={isProcessed}\n isProcessing={isProcessing}\n courseStream={courseStream}\n onFormDataChange={onFormDataChange}\n onChapterExitWarning={onChapterExitWarning}\n enrollmentType={enrollmentType}\n />\n }\n footerElement={\n <FlexView $flexDirection=\"row\" $flexGap={12} $alignItems=\"center\">\n {(!isGoalCreation || testType === 'no-test') && (\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n widthX={6.5}\n zIndex={20}\n tooltipItem=\"Add a chapter\"\n >\n <Styled.ButtonWrapper $borderRadius={50}>\n <IconButton\n renderAs=\"secondary\"\n analyticsLabel=\"Add custom chapters\"\n Icon={PlusIcon}\n disabled={isProcessing}\n onClick={handleOnAddCustomChapter}\n />\n </Styled.ButtonWrapper>\n </ArrowTooltip>\n )}\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n widthX={11}\n zIndex={20}\n tooltipItem=\"Please select atleast one chapter\"\n hidden={isAtleastOneChapterAdded}\n >\n <Styled.ButtonWrapper>\n <Button\n renderAs=\"primary\"\n size=\"small\"\n shape=\"square\"\n widthX={9}\n label={buttonLabel}\n onClick={handleNext}\n iconPosition=\"right\"\n busy={isProcessing}\n disabled={!isAtleastOneChapterAdded}\n analyticsProps={analyticsProps}\n />\n </Styled.ButtonWrapper>\n </ArrowTooltip>\n </FlexView>\n }\n />\n );\n});\n\nexport default ChaptersSelectionStep;\n"],"names":["ChaptersSelectionStep","memo","props","currentStep","onFormDataChange","onChapterExitWarning","formData","studentName","studentId","config","isGoalCreation","onPreSubmit","courseStream","classRatio","enrollmentType","flow","useContext","MilestoneCreateContext","trackEvent","useUIContext","submitBaseMessage","buttonLabel","name","title","analyticsProps","testType","primaryChaptersList","board","major","region","chapterGoalCategory","primaryGoalCategory","isProcessing","isProcessed","useChapterListUpdate","isAtleastOneChapterAdded","useMemo","chapter","handleNext","useCallback","selectedChaptersList","searchedAndAddedChapterLength","suggestedChaptersLength","handleOnAddCustomChapter","handleOnBackButtonClick","handleBack","isChangeDetected","computeChangeDetection","GOAL_EDIT_FLOWS","WARNING_MESSAGES","jsx","BodyLayout","FlexView","Text","ClassDetailsStep","ChapterSelection","ArrowTooltip","Styled.ButtonWrapper","IconButton","PlusIcon","Button"],"mappings":";;;;;;;;;;;;;;;;;;AAsBM,MAAAA,KAA4CC,EAAK,CAASC,MAAA;AACxD,QAAA;AAAA,IACJ,aAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAA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,UAAA;AAAA,QACF;AAAA,QAEF,gBAAAO;AAAA,UAACM;AAAA,UAAA;AAAA,YACC,UAAS;AAAA,YACT,UAAS;AAAA,YACT,QAAQ;AAAA,YACR,QAAQ;AAAA,YACR,aAAY;AAAA,YACZ,QAAQrB;AAAA,YAER,UAAA,gBAAAe,EAACO,GAAA,EACC,UAAA,gBAAAP;AAAA,cAACU;AAAA,cAAA;AAAA,gBACC,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,OAAM;AAAA,gBACN,QAAQ;AAAA,gBACR,OAAOvC;AAAA,gBACP,SAASiB;AAAA,gBACT,cAAa;AAAA,gBACb,MAAMN;AAAA,gBACN,UAAU,CAACG;AAAA,gBACX,gBAAAX;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
@@ -0,0 +1,92 @@
|
|
1
|
+
import { jsx as t, jsxs as c } from "react/jsx-runtime";
|
2
|
+
import { memo as C, Fragment as D } from "react";
|
3
|
+
import { ILLUSTRATIONS as R } from "../../../../../assets/illustrations/illustrations.js";
|
4
|
+
import L from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
+
import $ from "../../../../ui/image/image.js";
|
6
|
+
import a from "../../../../ui/layout/flex-view.js";
|
7
|
+
import x from "../../../../ui/text/text.js";
|
8
|
+
import { getSheetCompletionPercentage as G } from "../milestone-progress/milestone-progress-utils.js";
|
9
|
+
import { Progress as u } from "./styled.js";
|
10
|
+
const {
|
11
|
+
PRACTICED_SHIELD_GREY: T,
|
12
|
+
PRACTICED_SHIELD_GREEN: b,
|
13
|
+
LEARNED_SHIELD_GRAY: N,
|
14
|
+
LEARNED_SHIELD_GREEN: H,
|
15
|
+
MASTERED_SHIELD_GRAY: k,
|
16
|
+
MASTERED_SHIELD_GREEN: y
|
17
|
+
} = R, B = C(
|
18
|
+
({ milestoneId: d, showProgress: e, progressInfo: p }) => {
|
19
|
+
const {
|
20
|
+
familiar_sheets: n = 0,
|
21
|
+
proficient_sheets: m = 0,
|
22
|
+
mastered_sheets: s = 0,
|
23
|
+
total_core_sheets: o = 0
|
24
|
+
} = p || {}, i = o > 0, h = i && n === o, E = i && m === o, S = i && s === o, l = e ? 40 : 20, f = [
|
25
|
+
{
|
26
|
+
imageUrl: h ? H : N,
|
27
|
+
completedSheetsCount: n,
|
28
|
+
key: "milestone-widget-learned-badge-data"
|
29
|
+
},
|
30
|
+
{
|
31
|
+
imageUrl: E ? b : T,
|
32
|
+
completedSheetsCount: m,
|
33
|
+
key: "milestone-widget-practiced-badge-data"
|
34
|
+
},
|
35
|
+
{
|
36
|
+
imageUrl: S ? y : k,
|
37
|
+
completedSheetsCount: s,
|
38
|
+
key: "milestone-widget-mastered-badge-data"
|
39
|
+
}
|
40
|
+
];
|
41
|
+
return /* @__PURE__ */ t(a, { $flexGapX: 2, id: `milestone-progress-${d}`, children: /* @__PURE__ */ t(
|
42
|
+
a,
|
43
|
+
{
|
44
|
+
$flexDirection: "row",
|
45
|
+
$flexGapX: e ? 1.5 : 0.75,
|
46
|
+
$flexWrap: !e,
|
47
|
+
children: f.map((_) => {
|
48
|
+
const { key: g, imageUrl: I, completedSheetsCount: A } = _, r = G(
|
49
|
+
A,
|
50
|
+
o
|
51
|
+
);
|
52
|
+
return /* @__PURE__ */ t(D, { children: /* @__PURE__ */ t(
|
53
|
+
L,
|
54
|
+
{
|
55
|
+
position: "bottom",
|
56
|
+
renderAs: "secondary",
|
57
|
+
tooltipItem: `${r}%`,
|
58
|
+
hidden: !e,
|
59
|
+
children: /* @__PURE__ */ c(
|
60
|
+
a,
|
61
|
+
{
|
62
|
+
$flexDirection: e ? "column" : "row",
|
63
|
+
$flexGapX: e ? 0.5 : 0.25,
|
64
|
+
$alignItems: "center",
|
65
|
+
$width: "100%",
|
66
|
+
children: [
|
67
|
+
/* @__PURE__ */ t($, { withLoader: !0, src: I, width: l, height: l }),
|
68
|
+
e ? /* @__PURE__ */ t(u, { $progress: r }) : /* @__PURE__ */ c(
|
69
|
+
x,
|
70
|
+
{
|
71
|
+
$renderAs: "ac4-black",
|
72
|
+
$color: r === 100 ? "GREEN_5" : "BLACK_T_60",
|
73
|
+
children: [
|
74
|
+
r,
|
75
|
+
"%"
|
76
|
+
]
|
77
|
+
}
|
78
|
+
)
|
79
|
+
]
|
80
|
+
}
|
81
|
+
)
|
82
|
+
}
|
83
|
+
) }, g);
|
84
|
+
})
|
85
|
+
}
|
86
|
+
) });
|
87
|
+
}
|
88
|
+
);
|
89
|
+
export {
|
90
|
+
B as default
|
91
|
+
};
|
92
|
+
//# sourceMappingURL=milestone-progress-v2.js.map
|
package/dist/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.js.map
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"milestone-progress-v2.js","sources":["../../../../../../src/features/milestone/create/comps/milestone-progress-v2/milestone-progress-v2.tsx"],"sourcesContent":["import type { IMileStoneProgressInfoV2Props } from './types';\nimport type { FC } from 'react';\n\nimport { Fragment, memo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { getSheetCompletionPercentage } from '../milestone-progress/milestone-progress-utils';\nimport * as Styled from './styled';\n\nconst {\n PRACTICED_SHIELD_GREY,\n PRACTICED_SHIELD_GREEN,\n LEARNED_SHIELD_GRAY,\n LEARNED_SHIELD_GREEN,\n MASTERED_SHIELD_GRAY,\n MASTERED_SHIELD_GREEN,\n} = ILLUSTRATIONS;\n\nconst MilestoneProgressInfoV2: FC<IMileStoneProgressInfoV2Props> = memo(\n ({ milestoneId, showProgress, progressInfo }) => {\n const {\n familiar_sheets: familiarSheets = 0,\n proficient_sheets: proficientSheets = 0,\n mastered_sheets: masteredSheets = 0,\n total_core_sheets: totalCoreSheets = 0,\n } = progressInfo || {};\n\n const hasCoreSheets = totalCoreSheets > 0;\n\n const hasCompletedLearningSheets = hasCoreSheets && familiarSheets === totalCoreSheets;\n const hasCompletedPracticeSheets = hasCoreSheets && proficientSheets === totalCoreSheets;\n const hasMasteredAllSheets = hasCoreSheets && masteredSheets === totalCoreSheets;\n\n const badgeSize = showProgress ? 40 : 20;\n const badgesInfo = [\n {\n imageUrl: hasCompletedLearningSheets ? LEARNED_SHIELD_GREEN : LEARNED_SHIELD_GRAY,\n completedSheetsCount: familiarSheets,\n key: 'milestone-widget-learned-badge-data',\n },\n {\n imageUrl: hasCompletedPracticeSheets ? PRACTICED_SHIELD_GREEN : PRACTICED_SHIELD_GREY,\n completedSheetsCount: proficientSheets,\n key: 'milestone-widget-practiced-badge-data',\n },\n {\n imageUrl: hasMasteredAllSheets ? MASTERED_SHIELD_GREEN : MASTERED_SHIELD_GRAY,\n completedSheetsCount: masteredSheets,\n key: 'milestone-widget-mastered-badge-data',\n },\n ];\n\n return (\n <FlexView $flexGapX={2} id={`milestone-progress-${milestoneId}`}>\n <FlexView\n $flexDirection=\"row\"\n $flexGapX={showProgress ? 1.5 : 0.75}\n $flexWrap={!showProgress}\n >\n {badgesInfo.map(badgeData => {\n const { key, imageUrl, completedSheetsCount } = badgeData;\n\n const progressPercentage = getSheetCompletionPercentage(\n completedSheetsCount,\n totalCoreSheets,\n );\n\n return (\n <Fragment key={key}>\n <ArrowTooltip\n position=\"bottom\"\n renderAs=\"secondary\"\n tooltipItem={`${progressPercentage}%`}\n hidden={!showProgress}\n >\n <FlexView\n $flexDirection={showProgress ? 'column' : 'row'}\n $flexGapX={showProgress ? 0.5 : 0.25}\n $alignItems=\"center\"\n $width=\"100%\"\n >\n <Image withLoader src={imageUrl} width={badgeSize} height={badgeSize} />\n\n {showProgress ? (\n <Styled.Progress $progress={progressPercentage} />\n ) : (\n <Text\n $renderAs=\"ac4-black\"\n $color={progressPercentage === 100 ? 'GREEN_5' : 'BLACK_T_60'}\n >\n {progressPercentage}%\n </Text>\n )}\n </FlexView>\n </ArrowTooltip>\n </Fragment>\n );\n })}\n </FlexView>\n </FlexView>\n );\n },\n);\n\nexport default MilestoneProgressInfoV2;\n"],"names":["PRACTICED_SHIELD_GREY","PRACTICED_SHIELD_GREEN","LEARNED_SHIELD_GRAY","LEARNED_SHIELD_GREEN","MASTERED_SHIELD_GRAY","MASTERED_SHIELD_GREEN","ILLUSTRATIONS","MilestoneProgressInfoV2","memo","milestoneId","showProgress","progressInfo","familiarSheets","proficientSheets","masteredSheets","totalCoreSheets","hasCoreSheets","hasCompletedLearningSheets","hasCompletedPracticeSheets","hasMasteredAllSheets","badgeSize","badgesInfo","FlexView","jsx","badgeData","key","imageUrl","completedSheetsCount","progressPercentage","getSheetCompletionPercentage","Fragment","ArrowTooltip","jsxs","Image","Styled.Progress","Text"],"mappings":";;;;;;;;;AAaA,MAAM;AAAA,EACJ,uBAAAA;AAAA,EACA,wBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,uBAAAC;AACF,IAAIC,GAEEC,IAA6DC;AAAA,EACjE,CAAC,EAAE,aAAAC,GAAa,cAAAC,GAAc,cAAAC,QAAmB;AACzC,UAAA;AAAA,MACJ,iBAAiBC,IAAiB;AAAA,MAClC,mBAAmBC,IAAmB;AAAA,MACtC,iBAAiBC,IAAiB;AAAA,MAClC,mBAAmBC,IAAkB;AAAA,IAAA,IACnCJ,KAAgB,CAAA,GAEdK,IAAgBD,IAAkB,GAElCE,IAA6BD,KAAiBJ,MAAmBG,GACjEG,IAA6BF,KAAiBH,MAAqBE,GACnEI,IAAuBH,KAAiBF,MAAmBC,GAE3DK,IAAYV,IAAe,KAAK,IAChCW,IAAa;AAAA,MACjB;AAAA,QACE,UAAUJ,IAA6Bd,IAAuBD;AAAA,QAC9D,sBAAsBU;AAAA,QACtB,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE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AA;AAAA,gBAAA;AAAA,cAEJ;AAAA,YAAA;AAAA,UAAA,KAzBWH,CA2Bf;AAAA,QAAA,CAEH;AAAA,MAAA;AAAA,IAEL,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import d from "styled-components";
|
2
|
+
const s = d.div(({ theme: r, $progress: o }) => {
|
3
|
+
const { BLACK_T_15: t, GREEN_5: i, BLACK_T_87: e } = r.colors;
|
4
|
+
return `
|
5
|
+
width: 100%;
|
6
|
+
height: 4px;
|
7
|
+
border-radius: 16px;
|
8
|
+
background-color: ${t};
|
9
|
+
position: relative;
|
10
|
+
|
11
|
+
&::after {
|
12
|
+
content: '';
|
13
|
+
position: absolute;
|
14
|
+
top: 0;
|
15
|
+
width: ${o}%;
|
16
|
+
height: 4px;
|
17
|
+
border-radius: 16px;
|
18
|
+
background-color: ${o === 100 ? i : e}
|
19
|
+
}
|
20
|
+
`;
|
21
|
+
});
|
22
|
+
export {
|
23
|
+
s as Progress
|
24
|
+
};
|
25
|
+
//# sourceMappingURL=styled.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"styled.js","sources":["../../../../../../src/features/milestone/create/comps/milestone-progress-v2/styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\ntype TProgressProps = {\n $progress?: number;\n};\n\nconst Progress = styled.div<TProgressProps>(({ theme, $progress }) => {\n const { BLACK_T_15, GREEN_5, BLACK_T_87 } = theme.colors;\n\n return `\n width: 100%;\n height: 4px;\n border-radius: 16px;\n background-color: ${BLACK_T_15};\n position: relative;\n \n &::after {\n content: '';\n position: absolute;\n top: 0;\n width: ${$progress}%;\n height: 4px;\n border-radius: 16px;\n background-color: ${$progress === 100 ? GREEN_5 : BLACK_T_87}\n }\n `;\n});\n\nexport { Progress };\n"],"names":["Progress","styled","theme","$progress","BLACK_T_15","GREEN_5","BLACK_T_87"],"mappings":";AAMA,MAAMA,IAAWC,EAAO,IAAoB,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgB;AACpE,QAAM,EAAE,YAAAC,GAAY,SAAAC,GAAS,YAAAC,EAAA,IAAeJ,EAAM;AAE3C,SAAA;AAAA;AAAA;AAAA;AAAA,0BAIiBE,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAOnBD,CAAS;AAAA;AAAA;AAAA,4BAGEA,MAAc,MAAME,IAAUC,CAAU;AAAA;AAAA;AAGpE,CAAC;"}
|
@@ -1,23 +1,27 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
const
|
6
|
-
const { layout:
|
1
|
+
import r from "styled-components";
|
2
|
+
import n from "../../../../../assets/line-icons/icons/chevron-right.js";
|
3
|
+
import t from "../../../../ui/layout/flex-view.js";
|
4
|
+
import l from "../../../../ui/text/text.js";
|
5
|
+
const h = r(t)(({ theme: o }) => {
|
6
|
+
const { layout: e, colors: i } = o, { BLACK_T_38: p } = i;
|
7
7
|
return `
|
8
|
-
max-height: ${
|
9
|
-
box-shadow: 0px 6px 12px 0px ${
|
8
|
+
max-height: ${e.gutter * 15.75}px;
|
9
|
+
box-shadow: 0px 6px 12px 0px ${p};
|
10
10
|
overflow-y: auto;
|
11
11
|
`;
|
12
|
-
})
|
13
|
-
|
12
|
+
}), m = r(t)(({ theme: o }) => `
|
13
|
+
cursor: pointer;
|
14
|
+
|
15
|
+
&:hover {
|
16
|
+
background: ${o.colors.BLACK_4};
|
17
|
+
}
|
18
|
+
`), u = r(n)(({ theme: o }) => `
|
14
19
|
cursor: pointer;
|
15
20
|
|
16
21
|
path {
|
17
22
|
stroke: ${o.colors.WHITE_T_87};
|
18
23
|
}
|
19
|
-
`)
|
20
|
-
const w = t(x)(() => `
|
24
|
+
`), d = r(l)(() => `
|
21
25
|
display: -webkit-box;
|
22
26
|
-webkit-box-orient: vertical;
|
23
27
|
-webkit-line-clamp: 2;
|
@@ -25,7 +29,9 @@ const w = t(x)(() => `
|
|
25
29
|
overflow: hidden;
|
26
30
|
`);
|
27
31
|
export {
|
28
|
-
|
29
|
-
|
32
|
+
m as SheetCardWrapper,
|
33
|
+
u as StyledChevronRight,
|
34
|
+
d as StyledText,
|
35
|
+
h as Wrapper
|
30
36
|
};
|
31
37
|
//# sourceMappingURL=sheets-list-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sheets-list-styled.js","sources":["../../../../../../src/features/milestone/create/comps/sheets-list/sheets-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ChevronRight from '../../../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nconst Wrapper = styled(FlexView)(({ theme }) => {\n const { layout, colors } = theme;\n const { BLACK_T_38 } = colors;\n\n return `\n max-height: ${layout.gutter * 15.75}px;\n box-shadow: 0px 6px 12px 0px ${BLACK_T_38};\n overflow-y: auto;\n `;\n});\n\nconst StyledChevronRight = styled(ChevronRight)(({ theme }) => {\n return `\n cursor: pointer;\n\n path {\n stroke: ${theme.colors.WHITE_T_87};\n }\n `;\n});\n\nconst StyledText = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nexport { Wrapper, StyledChevronRight, StyledText };\n"],"names":["Wrapper","styled","FlexView","theme","layout","colors","BLACK_T_38","ChevronRight","StyledText","Text"],"mappings":";;;;AAMA,MAAMA,IAAUC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AACxC,QAAA,EAAE,QAAAC,GAAQ,QAAAC,EAAW,IAAAF,GACrB,EAAE,YAAAG,EAAe,IAAAD;AAEhB,SAAA;AAAA,kBACSD,EAAO,SAAS,KAAK;AAAA,mCACJE,CAAU;AAAA;AAAA;AAG7C,CAAC;
|
1
|
+
{"version":3,"file":"sheets-list-styled.js","sources":["../../../../../../src/features/milestone/create/comps/sheets-list/sheets-list-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ChevronRight from '../../../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nconst Wrapper = styled(FlexView)(({ theme }) => {\n const { layout, colors } = theme;\n const { BLACK_T_38 } = colors;\n\n return `\n max-height: ${layout.gutter * 15.75}px;\n box-shadow: 0px 6px 12px 0px ${BLACK_T_38};\n overflow-y: auto;\n `;\n});\n\nconst SheetCardWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n \n &:hover {\n background: ${theme.colors.BLACK_4};\n }\n `;\n});\n\nconst StyledChevronRight = styled(ChevronRight)(({ theme }) => {\n return `\n cursor: pointer;\n\n path {\n stroke: ${theme.colors.WHITE_T_87};\n }\n `;\n});\n\nconst StyledText = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nexport { Wrapper, StyledChevronRight, StyledText, SheetCardWrapper };\n"],"names":["Wrapper","styled","FlexView","theme","layout","colors","BLACK_T_38","SheetCardWrapper","StyledChevronRight","ChevronRight","StyledText","Text"],"mappings":";;;;AAMA,MAAMA,IAAUC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AACxC,QAAA,EAAE,QAAAC,GAAQ,QAAAC,EAAW,IAAAF,GACrB,EAAE,YAAAG,EAAe,IAAAD;AAEhB,SAAA;AAAA,kBACSD,EAAO,SAAS,KAAK;AAAA,mCACJE,CAAU;AAAA;AAAA;AAG7C,CAAC,GAEKC,IAAmBN,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QACpC;AAAA;AAAA;AAAA;AAAA,oBAIWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAEKK,IAAqBP,EAAOQ,CAAY,EAAE,CAAC,EAAE,OAAAN,QAC1C;AAAA;AAAA;AAAA;AAAA,gBAIOA,EAAM,OAAO,UAAU;AAAA;AAAA,GAGtC,GAEKO,IAAaT,EAAOU,CAAI,EAAE,MACvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOR;"}
|
@@ -1,31 +1,55 @@
|
|
1
|
-
import {
|
2
|
-
import {
|
3
|
-
import
|
4
|
-
import
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
$
|
11
|
-
|
12
|
-
$gutterX: 1,
|
13
|
-
$gapX: 0.5,
|
14
|
-
$flexGap: 8,
|
15
|
-
$width: "100%",
|
16
|
-
$justifyContent: "space-between",
|
17
|
-
children: /* @__PURE__ */ o(n, { $flexDirection: "row", $flexColumnGap: 4, $widthX: 14.25, children: [
|
18
|
-
/* @__PURE__ */ o($, { $renderAs: "ub3", $color: "WHITE_T_87", children: [
|
19
|
-
r + 1,
|
20
|
-
"."
|
21
|
-
] }),
|
22
|
-
/* @__PURE__ */ e($, { $renderAs: "ub3", $color: "WHITE_T_87", children: t })
|
23
|
-
] })
|
1
|
+
import { jsxs as r, jsx as $ } from "react/jsx-runtime";
|
2
|
+
import { h as p } from "../../../../../node_modules/humanize-plus/dist/humanize.js";
|
3
|
+
import { memo as m, useCallback as w } from "react";
|
4
|
+
import c from "../../../../ui/layout/flex-view.js";
|
5
|
+
import { Wrapper as u, SheetCardWrapper as f, StyledText as a, StyledChevronRight as _ } from "./sheets-list-styled.js";
|
6
|
+
const C = m(({ learningSheetData: s, supplementarySheetsCount: i }) => {
|
7
|
+
const d = w(
|
8
|
+
(l, o, e) => {
|
9
|
+
l.stopPropagation();
|
10
|
+
const t = window.location.hostname, n = window.location.port, h = `https://${t}${n ? `:${n}` : ""}/questions/learnosity-reference/${o}/?worksheetName=${e}`;
|
11
|
+
window.open(h, "_blank");
|
24
12
|
},
|
25
|
-
|
13
|
+
[]
|
26
14
|
);
|
27
|
-
|
15
|
+
return /* @__PURE__ */ r(u, { $widthX: 18, $background: "BLACK_2", $borderColor: "WHITE_T_38", $gapX: 0.5, children: [
|
16
|
+
s.map((l, o) => {
|
17
|
+
const { title: e, learnosityRef: t } = l;
|
18
|
+
return /* @__PURE__ */ r(
|
19
|
+
f,
|
20
|
+
{
|
21
|
+
$flexDirection: "row",
|
22
|
+
$alignItems: "center",
|
23
|
+
$gutterX: 1,
|
24
|
+
$gapX: 0.5,
|
25
|
+
$flexGap: 8,
|
26
|
+
$width: "100%",
|
27
|
+
$justifyContent: "space-between",
|
28
|
+
onClick: (n) => d(n, t, e),
|
29
|
+
children: [
|
30
|
+
/* @__PURE__ */ r(c, { $flexDirection: "row", $flexColumnGap: 4, $widthX: 14.25, children: [
|
31
|
+
/* @__PURE__ */ r(a, { $renderAs: "ub3", $color: "WHITE_T_87", children: [
|
32
|
+
o + 1,
|
33
|
+
"."
|
34
|
+
] }),
|
35
|
+
/* @__PURE__ */ $(a, { $renderAs: "ub3", $color: "WHITE_T_87", children: e })
|
36
|
+
] }),
|
37
|
+
t && /* @__PURE__ */ $(_, { width: 20, height: 20 })
|
38
|
+
]
|
39
|
+
},
|
40
|
+
`${e}_${o}`
|
41
|
+
);
|
42
|
+
}),
|
43
|
+
i > 0 && /* @__PURE__ */ $(c, { $flexDirection: "row", $gutterX: 1, $gapX: 0.5, $widthX: 14.25, children: /* @__PURE__ */ r(a, { $renderAs: "ub3", $color: "WHITE_T_60", children: [
|
44
|
+
"+",
|
45
|
+
i,
|
46
|
+
" supplementary",
|
47
|
+
" ",
|
48
|
+
p.pluralize(i, "resource")
|
49
|
+
] }) })
|
50
|
+
] });
|
51
|
+
});
|
28
52
|
export {
|
29
|
-
|
53
|
+
C as default
|
30
54
|
};
|
31
55
|
//# sourceMappingURL=sheets-list.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"sheets-list.js","sources":["../../../../../../src/features/milestone/create/comps/sheets-list/sheets-list.tsx"],"sourcesContent":["import type { ISheetsListProps } from './sheets-list-type';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport * as Styled from './sheets-list-styled';\n\nconst SheetsList: FC<ISheetsListProps> = memo(({ learningSheetData }) => {\n return (\n <Styled.Wrapper $widthX={18} $background=\"BLACK_2\" $borderColor=\"WHITE_T_38\" $gapX={0.5}>\n {learningSheetData.map((sheetData, idx) => {\n const {
|
1
|
+
{"version":3,"file":"sheets-list.js","sources":["../../../../../../src/features/milestone/create/comps/sheets-list/sheets-list.tsx"],"sourcesContent":["import type { ISheetsListProps } from './sheets-list-type';\nimport type { FC } from 'react';\n\nimport { pluralize } from 'humanize-plus';\nimport React, { memo, useCallback } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport * as Styled from './sheets-list-styled';\n\nconst SheetsList: FC<ISheetsListProps> = memo(({ learningSheetData, supplementarySheetsCount }) => {\n const handleSheetView = useCallback(\n (e: React.MouseEvent<HTMLDivElement, MouseEvent>, learnosityRef: string, title: string) => {\n e.stopPropagation();\n\n const currentDomain = window.location.hostname;\n const port = window.location.port;\n\n const url = `https://${currentDomain}${\n port ? `:${port}` : ''\n }/questions/learnosity-reference/${learnosityRef}/?worksheetName=${title}`;\n\n window.open(url, '_blank');\n },\n [],\n );\n\n return (\n <Styled.Wrapper $widthX={18} $background=\"BLACK_2\" $borderColor=\"WHITE_T_38\" $gapX={0.5}>\n {learningSheetData.map((sheetData, idx) => {\n const { title, learnosityRef } = sheetData;\n\n return (\n <Styled.SheetCardWrapper\n key={`${title}_${idx}`}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $gutterX={1}\n $gapX={0.5}\n $flexGap={8}\n $width=\"100%\"\n $justifyContent=\"space-between\"\n onClick={e => handleSheetView(e, learnosityRef, title)}\n >\n <FlexView $flexDirection=\"row\" $flexColumnGap={4} $widthX={14.25}>\n <Styled.StyledText $renderAs=\"ub3\" $color=\"WHITE_T_87\">\n {idx + 1}.\n </Styled.StyledText>\n <Styled.StyledText $renderAs=\"ub3\" $color=\"WHITE_T_87\">\n {title}\n </Styled.StyledText>\n </FlexView>\n\n {learnosityRef && <Styled.StyledChevronRight width={20} height={20} />}\n </Styled.SheetCardWrapper>\n );\n })}\n\n {supplementarySheetsCount > 0 && (\n <FlexView $flexDirection=\"row\" $gutterX={1} $gapX={0.5} $widthX={14.25}>\n <Styled.StyledText $renderAs=\"ub3\" $color=\"WHITE_T_60\">\n +{supplementarySheetsCount} supplementary{' '}\n {pluralize(supplementarySheetsCount, 'resource')}\n </Styled.StyledText>\n </FlexView>\n )}\n </Styled.Wrapper>\n );\n});\n\nexport default SheetsList;\n"],"names":["SheetsList","memo","learningSheetData","supplementarySheetsCount","handleSheetView","useCallback","e","learnosityRef","title","currentDomain","port","url","jsxs","Styled.Wrapper","sheetData","idx","Styled.SheetCardWrapper","FlexView","Styled.StyledText","jsx","Styled.StyledChevronRight","pluralize"],"mappings":";;;;;AASA,MAAMA,IAAmCC,EAAK,CAAC,EAAE,mBAAAC,GAAmB,0BAAAC,QAA+B;AACjG,QAAMC,IAAkBC;AAAA,IACtB,CAACC,GAAiDC,GAAuBC,MAAkB;AACzF,MAAAF,EAAE,gBAAgB;AAEZ,YAAAG,IAAgB,OAAO,SAAS,UAChCC,IAAO,OAAO,SAAS,MAEvBC,IAAM,WAAWF,CAAa,GAClCC,IAAO,IAAIA,CAAI,KAAK,EACtB,mCAAmCH,CAAa,mBAAmBC,CAAK;AAEjE,aAAA,KAAKG,GAAK,QAAQ;AAAA,IAC3B;AAAA,IACA,CAAC;AAAA,EAAA;AAID,SAAA,gBAAAC,EAACC,GAAA,EAAe,SAAS,IAAI,aAAY,WAAU,cAAa,cAAa,OAAO,KACjF,UAAA;AAAA,IAAkBX,EAAA,IAAI,CAACY,GAAWC,MAAQ;AACnC,YAAA,EAAE,OAAAP,GAAO,eAAAD,EAAkB,IAAAO;AAG/B,aAAA,gBAAAF;AAAA,QAACI;AAAAA,QAAA;AAAA,UAEC,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,UAAU;AAAA,UACV,OAAO;AAAA,UACP,UAAU;AAAA,UACV,QAAO;AAAA,UACP,iBAAgB;AAAA,UAChB,SAAS,CAAAV,MAAKF,EAAgBE,GAAGC,GAAeC,CAAK;AAAA,UAErD,UAAA;AAAA,YAAA,gBAAAI,EAACK,KAAS,gBAAe,OAAM,gBAAgB,GAAG,SAAS,OACzD,UAAA;AAAA,cAAA,gBAAAL,EAACM,GAAA,EAAkB,WAAU,OAAM,QAAO,cACvC,UAAA;AAAA,gBAAMH,IAAA;AAAA,gBAAE;AAAA,cAAA,GACX;AAAA,cACA,gBAAAI,EAACD,GAAA,EAAkB,WAAU,OAAM,QAAO,cACvC,UACHV,GAAA;AAAA,YAAA,GACF;AAAA,YAECD,uBAAkBa,GAAA,EAA0B,OAAO,IAAI,QAAQ,IAAI;AAAA,UAAA;AAAA,QAAA;AAAA,QAnB/D,GAAGZ,CAAK,IAAIO,CAAG;AAAA,MAAA;AAAA,IAoBtB,CAEH;AAAA,IAEAZ,IAA2B,KAC1B,gBAAAgB,EAACF,KAAS,gBAAe,OAAM,UAAU,GAAG,OAAO,KAAK,SAAS,OAC/D,4BAACC,GAAA,EAAkB,WAAU,OAAM,QAAO,cAAa,UAAA;AAAA,MAAA;AAAA,MACnDf;AAAA,MAAyB;AAAA,MAAe;AAAA,MACzCkB,EAAA,UAAUlB,GAA0B,UAAU;AAAA,IAAA,EAAA,CACjD,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,80 +1,74 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import { useFormDataPrefiller as
|
6
|
-
import { Container as
|
7
|
-
const
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import { memo as H, useMemo as R, useEffect as q } from "react";
|
3
|
+
import y from "./milestone-create-components-map.js";
|
4
|
+
import z from "./milestone-create-context.js";
|
5
|
+
import { useFormDataPrefiller as A, useMilestoneFormTree as I, useFormTreeTraversal as J } from "./milestone-create-hooks.js";
|
6
|
+
import { Container as K, BodyContainer as L } from "./milestone-create-styled.js";
|
7
|
+
const Y = H(
|
8
8
|
({
|
9
|
-
studentName:
|
10
|
-
studentId:
|
11
|
-
height:
|
12
|
-
minHeight:
|
13
|
-
formData:
|
9
|
+
studentName: M,
|
10
|
+
studentId: l,
|
11
|
+
height: x,
|
12
|
+
minHeight: S,
|
13
|
+
formData: n,
|
14
14
|
config: a,
|
15
|
-
onChapterExitWarning:
|
15
|
+
onChapterExitWarning: h,
|
16
16
|
onFormDataChange: e,
|
17
17
|
onPreSubmit: $,
|
18
|
-
onExit:
|
18
|
+
onExit: C,
|
19
19
|
board: F,
|
20
20
|
schoolData: P,
|
21
21
|
grade: T,
|
22
22
|
flow: t,
|
23
|
-
milestoneId:
|
23
|
+
milestoneId: b,
|
24
24
|
currentCountryCode: B,
|
25
|
-
isGoalCreation:
|
26
|
-
courseStream:
|
27
|
-
classRatio:
|
28
|
-
enrollmentType:
|
29
|
-
canDeleteGoal: j,
|
30
|
-
onDeleteGoal: r
|
25
|
+
isGoalCreation: c,
|
26
|
+
courseStream: D,
|
27
|
+
classRatio: E,
|
28
|
+
enrollmentType: d
|
31
29
|
}) => {
|
32
|
-
const { formDataState:
|
30
|
+
const { formDataState: i, setFormData: V } = A(n, {
|
33
31
|
schoolData: P,
|
34
32
|
board: F,
|
35
33
|
grade: T,
|
36
34
|
config: a,
|
37
35
|
flow: t,
|
38
36
|
currentCountryCode: B
|
39
|
-
}),
|
37
|
+
}), j = I({
|
40
38
|
flow: t,
|
41
|
-
formDataState:
|
42
|
-
isGoalCreation:
|
43
|
-
}), o = e ?
|
39
|
+
formDataState: i,
|
40
|
+
isGoalCreation: c
|
41
|
+
}), o = e ? i : n, m = e ? "edit" : "view", u = m === "view", { currentStep: s, updateFormData: k, handleBack: p } = J({
|
44
42
|
flow: t,
|
45
|
-
updatedFormTree:
|
43
|
+
updatedFormTree: j,
|
46
44
|
formData: o,
|
47
|
-
formDataState:
|
48
|
-
setFormData:
|
49
|
-
handleExit:
|
50
|
-
}), { name:
|
51
|
-
|
52
|
-
}, [r]);
|
53
|
-
return I(() => {
|
45
|
+
formDataState: i,
|
46
|
+
setFormData: V,
|
47
|
+
handleExit: C
|
48
|
+
}), { name: v } = s || {}, f = v ? y[v] : void 0, w = R(() => ({ handleBack: p, mode: m, flow: t }), [p, m, t]);
|
49
|
+
return q(() => {
|
54
50
|
e && e(o);
|
55
|
-
}, [o, e]), /* @__PURE__ */
|
56
|
-
|
51
|
+
}, [o, e]), /* @__PURE__ */ r(z.Provider, { value: w, children: /* @__PURE__ */ r(K, { $height: x, $minHeight: S, $viewMode: u, children: /* @__PURE__ */ r(L, { $viewMode: u, children: f && s && d ? /* @__PURE__ */ r(
|
52
|
+
f,
|
57
53
|
{
|
58
|
-
studentName:
|
59
|
-
currentStep:
|
60
|
-
isGoalCreation:
|
54
|
+
studentName: M,
|
55
|
+
currentStep: s,
|
56
|
+
isGoalCreation: c,
|
61
57
|
config: a,
|
62
58
|
formData: o,
|
63
|
-
onFormDataChange:
|
64
|
-
onChapterExitWarning:
|
65
|
-
studentId:
|
59
|
+
onFormDataChange: k,
|
60
|
+
onChapterExitWarning: h,
|
61
|
+
studentId: l,
|
66
62
|
onPreSubmit: $,
|
67
|
-
milestoneId:
|
68
|
-
courseStream:
|
69
|
-
classRatio:
|
70
|
-
enrollmentType:
|
71
|
-
canDeleteGoal: j,
|
72
|
-
onDeleteGoal: q
|
63
|
+
milestoneId: b,
|
64
|
+
courseStream: D,
|
65
|
+
classRatio: E || 0,
|
66
|
+
enrollmentType: d
|
73
67
|
}
|
74
68
|
) : void 0 }) }) });
|
75
69
|
}
|
76
70
|
);
|
77
71
|
export {
|
78
|
-
|
72
|
+
Y as default
|
79
73
|
};
|
80
74
|
//# sourceMappingURL=milestone-create.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"milestone-create.js","sources":["../../../../src/features/milestone/create/milestone-create.tsx"],"sourcesContent":["import type { MileStoneJourneyMode } from './milestone-create-context';\nimport type { IMileStoneCreateProps, IMilestoneFormData } from './milestone-create-types';\n\nimport React, { memo,
|
1
|
+
{"version":3,"file":"milestone-create.js","sources":["../../../../src/features/milestone/create/milestone-create.tsx"],"sourcesContent":["import type { MileStoneJourneyMode } from './milestone-create-context';\nimport type { IMileStoneCreateProps, IMilestoneFormData } from './milestone-create-types';\n\nimport React, { memo, useEffect, useMemo } from 'react';\n\nimport ComponentsMap from './milestone-create-components-map';\nimport MilestoneCreateContext from './milestone-create-context';\nimport {\n useFormDataPrefiller,\n useFormTreeTraversal,\n useMilestoneFormTree,\n} from './milestone-create-hooks';\nimport { BodyContainer, Container } from './milestone-create-styled';\n\nconst MilestoneCreate: React.FC<IMileStoneCreateProps> = memo(\n ({\n studentName,\n studentId,\n height,\n minHeight,\n formData: formDataProp,\n config,\n onChapterExitWarning,\n onFormDataChange,\n onPreSubmit: handlePreSubmit,\n onExit: handleExit,\n board,\n schoolData,\n grade,\n flow,\n milestoneId,\n currentCountryCode,\n isGoalCreation,\n courseStream,\n classRatio,\n enrollmentType,\n }) => {\n const { formDataState, setFormData } = useFormDataPrefiller(formDataProp, {\n schoolData,\n board,\n grade,\n config,\n flow,\n currentCountryCode,\n });\n\n const updatedFormTree = useMilestoneFormTree({\n flow,\n formDataState,\n isGoalCreation,\n });\n\n const formData = (onFormDataChange ? formDataState : formDataProp) as IMilestoneFormData; //TODO: make better\n\n const mode: MileStoneJourneyMode = onFormDataChange ? 'edit' : 'view';\n const isViewMode = mode === 'view';\n\n const { currentStep, updateFormData, handleBack } = useFormTreeTraversal({\n flow,\n updatedFormTree,\n formData,\n formDataState,\n setFormData,\n handleExit,\n });\n\n const { name } = currentStep || {};\n const StepComponent = name ? ComponentsMap[name] : undefined;\n\n const contextValue = useMemo(() => ({ handleBack, mode, flow }), [handleBack, mode, flow]);\n\n useEffect(() => {\n if (onFormDataChange) {\n onFormDataChange(formData);\n }\n }, [formData, onFormDataChange]);\n\n return (\n <MilestoneCreateContext.Provider value={contextValue}>\n <Container $height={height} $minHeight={minHeight} $viewMode={isViewMode}>\n <BodyContainer $viewMode={isViewMode}>\n {StepComponent && currentStep && enrollmentType ? (\n <StepComponent\n studentName={studentName}\n currentStep={currentStep}\n isGoalCreation={isGoalCreation}\n config={config}\n formData={formData}\n onFormDataChange={updateFormData}\n onChapterExitWarning={onChapterExitWarning}\n studentId={studentId}\n onPreSubmit={handlePreSubmit}\n milestoneId={milestoneId}\n courseStream={courseStream}\n classRatio={classRatio || 0}\n enrollmentType={enrollmentType}\n />\n ) : undefined}\n </BodyContainer>\n </Container>\n </MilestoneCreateContext.Provider>\n );\n },\n);\n\nexport default MilestoneCreate;\n"],"names":["MilestoneCreate","memo","studentName","studentId","height","minHeight","formDataProp","config","onChapterExitWarning","onFormDataChange","handlePreSubmit","handleExit","board","schoolData","grade","flow","milestoneId","currentCountryCode","isGoalCreation","courseStream","classRatio","enrollmentType","formDataState","setFormData","useFormDataPrefiller","updatedFormTree","useMilestoneFormTree","formData","mode","isViewMode","currentStep","updateFormData","handleBack","useFormTreeTraversal","name","StepComponent","ComponentsMap","contextValue","useMemo","useEffect","jsx","MilestoneCreateContext","Container","BodyContainer"],"mappings":";;;;;;AAcA,MAAMA,IAAmDC;AAAA,EACvD,CAAC;AAAA,IACC,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAUC;AAAA,IACV,QAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,aAAaC;AAAA,IACb,QAAQC;AAAA,IACR,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,eAAAC,GAAe,aA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