@cuemath/leap 2.9.9-as6 → 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/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/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 +8 -26
- 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/test-stages/chapter-selection/chapter-item/chapter-item.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/trial-session/comps/learning-plan/index.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 -351
- 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 -129
- 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 -30
- 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-view.js +0 -157
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +0 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +0 -67
- 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 -279
- 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/journey/mocks/home-page-homwworks-mock.js +0 -268
- package/dist/features/journey/mocks/home-page-homwworks-mock.js.map +0 -1
- package/dist/features/journey/mocks/recent-chapters-mock.js +0 -531
- package/dist/features/journey/mocks/recent-chapters-mock.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
@@ -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,UAAUM,IAA6BjB,IAAyBD;AAAA,QAChE,sBAAsBa;AAAA,QACtB,KAAK;AAAA,MACP;AAAA,MACA;AAAA,QACE,UAAUM,IAAuBd,IAAwBD;AAAA,QACzD,sBAAsBU;AAAA,QACtB,KAAK;AAAA,MACP;AAAA,IAAA;AAGF,6BACGQ,GAAS,EAAA,WAAW,GAAG,IAAI,sBAAsBb,CAAW,IAC3D,UAAA,gBAAAc;AAAA,MAACD;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,WAAWZ,IAAe,MAAM;AAAA,QAChC,WAAW,CAACA;AAAA,QAEX,UAAAW,EAAW,IAAI,CAAaG,MAAA;AAC3B,gBAAM,EAAE,KAAAC,GAAK,UAAAC,GAAU,sBAAAC,EAAA,IAAyBH,GAE1CI,IAAqBC;AAAA,YACzBF;AAAA,YACAZ;AAAA,UAAA;AAGF,mCACGe,GACC,EAAA,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,aAAa,GAAGH,CAAkB;AAAA,cAClC,QAAQ,CAAClB;AAAA,cAET,UAAA,gBAAAsB;AAAA,gBAACV;AAAA,gBAAA;AAAA,kBACC,gBAAgBZ,IAAe,WAAW;AAAA,kBAC1C,WAAWA,IAAe,MAAM;AAAA,kBAChC,aAAY;AAAA,kBACZ,QAAO;AAAA,kBAEP,UAAA;AAAA,oBAAC,gBAAAa,EAAAU,GAAA,EAAM,YAAU,IAAC,KAAKP,GAAU,OAAON,GAAW,QAAQA,EAAW,CAAA;AAAA,oBAErEV,IACE,gBAAAa,EAAAW,GAAA,EAAgB,WAAWN,EAAoB,CAAA,IAEhD,gBAAAI;AAAA,sBAACG;AAAA,sBAAA;AAAA,wBACC,WAAU;AAAA,wBACV,QAAQP,MAAuB,MAAM,YAAY;AAAA,wBAEhD,UAAA;AAAA,0BAAAA;AAAA,0BAAmB;AAAA,wBAAA;AAAA,sBAAA;AAAA,oBACtB;AAAA,kBAAA;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,aAAAC,MAAgBC,EAAqBlB,GAAc;AAAA,MACxE,YAAAO;AAAA,MACA,OAAAD;AAAA,MACA,OAAAE;AAAA,MACA,QAAAP;AAAA,MACA,MAAAQ;AAAA,MACA,oBAAAE;AAAA,IAAA,CACD,GAEKQ,IAAkBC,EAAqB;AAAA,MAC3C,MAAAX;AAAA,MACA,eAAAO;AAAA,MACA,gBAAAJ;AAAA,IAAA,CACD,GAEKS,IAAYlB,IAAmBa,IAAgBhB,GAE/CsB,IAA6BnB,IAAmB,SAAS,QACzDoB,IAAaD,MAAS,QAEtB,EAAE,aAAAE,GAAa,gBAAAC,GAAgB,YAAAC,EAAA,IAAeC,EAAqB;AAAA,MACvE,MAAAlB;AAAA,MACA,iBAAAU;AAAA,MACA,UAAAE;AAAA,MACA,eAAAL;AAAA,MACA,aAAAC;AAAA,MACA,YAAAZ;AAAA,IAAA,CACD,GAEK,EAAE,MAAAuB,EAAA,IAASJ,KAAe,IAC1BK,IAAgBD,IAAOE,EAAcF,CAAI,IAAI,QAE7CG,IAAeC,EAAQ,OAAO,EAAE,YAAAN,GAAY,MAAAJ,GAAM,MAAAb,EAAK,IAAI,CAACiB,GAAYJ,GAAMb,CAAI,CAAC;AAEzF,WAAAwB,EAAU,MAAM;AACd,MAAI9B,KACFA,EAAiBkB,CAAQ;AAAA,IAC3B,GACC,CAACA,GAAUlB,CAAgB,CAAC,GAG7B,gBAAA+B,EAACC,EAAuB,UAAvB,EAAgC,OAAOJ,GACtC,UAAA,gBAAAG,EAACE,KAAU,SAAStC,GAAQ,YAAYC,GAAW,WAAWwB,GAC5D,UAAC,gBAAAW,EAAAG,GAAA,EAAc,WAAWd,GACvB,UAAAM,KAAiBL,KAAeT,IAC/B,gBAAAmB;AAAA,MAACL;AAAA,MAAA;AAAA,QACC,aAAAjC;AAAA,QACA,aAAA4B;AAAA,QACA,gBAAAZ;AAAA,QACA,QAAAX;AAAA,QACA,UAAAoB;AAAA,QACA,kBAAkBI;AAAA,QAClB,sBAAAvB;AAAA,QACA,WAAAL;AAAA,QACA,aAAaO;AAAA,QACb,aAAAM;AAAA,QACA,cAAAG;AAAA,QACA,YAAYC,KAAc;AAAA,QAC1B,gBAAAC;AAAA,MAAA;AAAA,IACF,IACE,OACN,CAAA,EACF,CAAA,EACF,CAAA;AAAA,EAEJ;AACF;"}
|
@@ -1,52 +1,57 @@
|
|
1
|
-
const h = (
|
2
|
-
|
3
|
-
|
1
|
+
const h = (t) => Object.values(t).reduce((e, n) => e += n.length, 0), _ = (t) => t.map(({ title: a, learnosity_activity_ref: e }) => ({
|
2
|
+
title: a,
|
3
|
+
learnosityRef: e
|
4
|
+
})), f = (t, a = !1) => t.map((e) => {
|
4
5
|
const {
|
5
6
|
id: n,
|
6
7
|
code: o,
|
7
|
-
chapter_code:
|
8
|
+
chapter_code: r,
|
8
9
|
image_url: s,
|
9
10
|
name: i,
|
10
11
|
chapter_tags: d,
|
11
|
-
state:
|
12
|
-
recommended:
|
13
|
-
is_puzzle_chapter:
|
14
|
-
|
15
|
-
|
16
|
-
} =
|
12
|
+
state: p,
|
13
|
+
recommended: c,
|
14
|
+
is_puzzle_chapter: g,
|
15
|
+
sheets_data: l,
|
16
|
+
program_id: u
|
17
|
+
} = e;
|
17
18
|
return {
|
18
19
|
id: n,
|
19
|
-
code: o ||
|
20
|
-
chapter_code:
|
20
|
+
code: o || r,
|
21
|
+
chapter_code: r,
|
21
22
|
image_url: s,
|
22
23
|
name: i,
|
23
24
|
chapter_tags: d,
|
24
|
-
state:
|
25
|
-
recommended:
|
26
|
-
added: !
|
27
|
-
program_id:
|
28
|
-
is_puzzle_chapter:
|
29
|
-
learning_sheet_data:
|
25
|
+
state: p,
|
26
|
+
recommended: c,
|
27
|
+
added: !a,
|
28
|
+
program_id: u,
|
29
|
+
is_puzzle_chapter: g,
|
30
|
+
learning_sheet_data: _(l.lessons),
|
31
|
+
total_supplementary_sheets: h(
|
32
|
+
l.supplementary_sheets_grouped
|
33
|
+
)
|
30
34
|
};
|
31
|
-
}),
|
32
|
-
const
|
33
|
-
|
34
|
-
|
35
|
+
}), m = (t) => {
|
36
|
+
const a = /* @__PURE__ */ new Set(), e = /* @__PURE__ */ new Set();
|
37
|
+
t && t.forEach(({ board: r, grade: s }) => {
|
38
|
+
a.add(r), e.add(s);
|
35
39
|
});
|
36
|
-
const n = Array.from(
|
37
|
-
id:
|
38
|
-
label:
|
39
|
-
})), o = Array.from(
|
40
|
-
id:
|
41
|
-
label:
|
40
|
+
const n = Array.from(a, (r) => ({
|
41
|
+
id: r,
|
42
|
+
label: r
|
43
|
+
})), o = Array.from(e, (r) => ({
|
44
|
+
id: r,
|
45
|
+
label: r
|
42
46
|
}));
|
43
47
|
return { boardOptions: n, gradeOptions: o };
|
44
|
-
},
|
45
|
-
to create your personalized learning plan!` :
|
48
|
+
}, y = (t, a, e, n) => t ? "No results. Please clear the filters" : n === "STUDENT" ? `Waiting for your teacher
|
49
|
+
to create your personalized learning plan!` : a ? `Publish ${e}'s draft goals or set new ones to build their learning plan.` : `Create ${e}'s learning plan by adding a goal`;
|
46
50
|
export {
|
47
|
-
|
51
|
+
m as getFilterOptions,
|
48
52
|
f as getFormChapters,
|
49
|
-
|
50
|
-
|
53
|
+
_ as getLearningSheetData,
|
54
|
+
y as getNoMilestoneTitle,
|
55
|
+
h as getTotalSupplementarySheetCount
|
51
56
|
};
|
52
57
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../../src/features/milestone/create/utils/index.ts"],"sourcesContent":["import type { IMilestoneData } from '../../milestone-list-container/milestone-list/milestone-list-types';\nimport type { IChapter, IChapterModel } from '../comps/chapter-item/chapter-item-types';\nimport type { IMilestoneFormData } from '../milestone-create-types';\nimport type { TRecommendedChaptersQuery } from '../types';\n\n//TODO: refactor conditions when all are clear\nconst createChaptersListQueryParams = (formData: IMilestoneFormData): TRecommendedChaptersQuery => {\n const { chapterGoalCategory } = formData;\n const { program_code: programCode } = chapterGoalCategory?.primaryGoalCategory || {};\n\n const queryParams: TRecommendedChaptersQuery = {\n filter_type: 'PROGRAM_CODE',\n program_code: programCode,\n };\n\n return queryParams;\n};\n\nconst getLearningSheetData = (
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/features/milestone/create/utils/index.ts"],"sourcesContent":["import type { IMilestoneData } from '../../milestone-list-container/milestone-list/milestone-list-types';\nimport type { IChapter, IChapterModel } from '../comps/chapter-item/chapter-item-types';\nimport type { IMilestoneFormData } from '../milestone-create-types';\nimport type { TRecommendedChaptersQuery } from '../types';\n\n//TODO: refactor conditions when all are clear\nconst createChaptersListQueryParams = (formData: IMilestoneFormData): TRecommendedChaptersQuery => {\n const { chapterGoalCategory } = formData;\n const { program_code: programCode } = chapterGoalCategory?.primaryGoalCategory || {};\n\n const queryParams: TRecommendedChaptersQuery = {\n filter_type: 'PROGRAM_CODE',\n program_code: programCode,\n };\n\n return queryParams;\n};\n\nconst getTotalSupplementarySheetCount = (\n sheets: IChapterModel['sheets_data']['supplementary_sheets_grouped'],\n) => {\n const totalSheets = Object.values(sheets).reduce((acc, sheet) => (acc += sheet.length), 0);\n\n return totalSheets;\n};\n\nconst getLearningSheetData = (lessons: IChapterModel['sheets_data']['lessons']) => {\n return lessons.map(({ title, learnosity_activity_ref: learnosityRef }) => ({\n title,\n learnosityRef,\n }));\n};\n\nconst getFormChapters = (chapters: IChapterModel[], editMode = false): IChapter[] => {\n return chapters.map(chapter => {\n const {\n id,\n code,\n chapter_code,\n image_url,\n name,\n chapter_tags,\n state,\n recommended,\n is_puzzle_chapter: isPuzzleChapter,\n sheets_data: sheetsData,\n program_id: programId,\n } = chapter;\n\n return {\n id,\n code: code || chapter_code,\n chapter_code,\n image_url,\n name,\n chapter_tags,\n state,\n recommended,\n added: !editMode,\n program_id: programId,\n is_puzzle_chapter: isPuzzleChapter,\n learning_sheet_data: getLearningSheetData(sheetsData.lessons),\n total_supplementary_sheets: getTotalSupplementarySheetCount(\n sheetsData.supplementary_sheets_grouped,\n ),\n };\n });\n};\n\nconst getFilterOptions = (milestones: IMilestoneData[] | undefined) => {\n const boardSet = new Set<string>();\n const gradeSet = new Set<string>();\n\n if (milestones) {\n milestones.forEach(({ board, grade }) => {\n boardSet.add(board);\n gradeSet.add(grade);\n });\n }\n\n const bdOptions: { id: string; label: string }[] = Array.from(boardSet, item => ({\n id: item,\n label: item,\n }));\n\n const grOptions: { id: string; label: string }[] = Array.from(gradeSet, item => ({\n id: item,\n label: item,\n }));\n\n return { boardOptions: bdOptions, gradeOptions: grOptions };\n};\n\nconst getNoMilestoneTitle = (\n isFiltersAdded: boolean,\n isDraftMilestonePresent: boolean,\n studentName: string,\n userType: string,\n) => {\n if (isFiltersAdded) {\n return 'No results. Please clear the filters';\n }\n\n if (userType === 'STUDENT') {\n return `Waiting for your teacher \\n to create your personalized learning plan!`;\n }\n\n if (isDraftMilestonePresent) {\n return `Publish ${studentName}'s draft goals or set new ones to build their learning plan.`;\n }\n\n return `Create ${studentName}'s learning plan by adding a goal`;\n};\n\nexport {\n createChaptersListQueryParams,\n getFormChapters,\n getFilterOptions,\n getNoMilestoneTitle,\n getLearningSheetData,\n getTotalSupplementarySheetCount,\n};\n"],"names":["getTotalSupplementarySheetCount","sheets","acc","sheet","getLearningSheetData","lessons","title","learnosityRef","getFormChapters","chapters","editMode","chapter","id","code","chapter_code","image_url","name","chapter_tags","state","recommended","isPuzzleChapter","sheetsData","programId","getFilterOptions","milestones","boardSet","gradeSet","board","grade","bdOptions","item","grOptions","getNoMilestoneTitle","isFiltersAdded","isDraftMilestonePresent","studentName","userType"],"mappings":"AAkBM,MAAAA,IAAkC,CACtCC,MAEoB,OAAO,OAAOA,CAAM,EAAE,OAAO,CAACC,GAAKC,MAAWD,KAAOC,EAAM,QAAS,CAAC,GAKrFC,IAAuB,CAACC,MACrBA,EAAQ,IAAI,CAAC,EAAE,OAAAC,GAAO,yBAAyBC,SAAqB;AAAA,EACzE,OAAAD;AAAA,EACA,eAAAC;AACA,EAAA,GAGEC,IAAkB,CAACC,GAA2BC,IAAW,OACtDD,EAAS,IAAI,CAAWE,MAAA;AACvB,QAAA;AAAA,IACJ,IAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,mBAAmBC;AAAA,IACnB,aAAaC;AAAA,IACb,YAAYC;AAAA,EACV,IAAAX;AAEG,SAAA;AAAA,IACL,IAAAC;AAAA,IACA,MAAMC,KAAQC;AAAA,IACd,cAAAA;AAAA,IACA,WAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAO,CAACT;AAAA,IACR,YAAYY;AAAA,IACZ,mBAAmBF;AAAA,IACnB,qBAAqBhB,EAAqBiB,EAAW,OAAO;AAAA,IAC5D,4BAA4BrB;AAAA,MAC1BqB,EAAW;AAAA,IACb;AAAA,EAAA;AACF,CACD,GAGGE,IAAmB,CAACC,MAA6C;AAC/D,QAAAC,wBAAe,OACfC,wBAAe;AAErB,EAAIF,KACFA,EAAW,QAAQ,CAAC,EAAE,OAAAG,GAAO,OAAAC,QAAY;AACvC,IAAAH,EAAS,IAAIE,CAAK,GAClBD,EAAS,IAAIE,CAAK;AAAA,EAAA,CACnB;AAGH,QAAMC,IAA6C,MAAM,KAAKJ,GAAU,CAASK,OAAA;AAAA,IAC/E,IAAIA;AAAA,IACJ,OAAOA;AAAA,EACP,EAAA,GAEIC,IAA6C,MAAM,KAAKL,GAAU,CAASI,OAAA;AAAA,IAC/E,IAAIA;AAAA,IACJ,OAAOA;AAAA,EACP,EAAA;AAEF,SAAO,EAAE,cAAcD,GAAW,cAAcE,EAAU;AAC5D,GAEMC,IAAsB,CAC1BC,GACAC,GACAC,GACAC,MAEIH,IACK,yCAGLG,MAAa,YACR;AAAA,+CAGLF,IACK,WAAWC,CAAW,iEAGxB,UAAUA,CAAW;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createGetAPI as i } from "@cuemath/rest-api";
|
2
|
-
import {
|
2
|
+
import { BASE_URL_V3 as o } from "../../../../../../constants/api.js";
|
3
3
|
import { stringify as r } from "../../../../../../helpers/query-string.js";
|
4
4
|
const { useGet: n, invalidate: l } = i({
|
5
5
|
getURL: (e, t) => `${o}/user-milestone/${e}/?${r(t)}`
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-milestone.js","sources":["../../../../../../../src/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.ts"],"sourcesContent":["import type { IMilestoneData } from '../../../../milestone-list-container/milestone-list/milestone-list-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport {
|
1
|
+
{"version":3,"file":"get-milestone.js","sources":["../../../../../../../src/features/milestone/edit/comps/edit-milestone-modal/api/get-milestone.ts"],"sourcesContent":["import type { IMilestoneData } from '../../../../milestone-list-container/milestone-list/milestone-list-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../../../constants/api';\nimport { stringify } from '../../../../../../helpers/query-string';\n\ntype TQuery = {\n with_plan: boolean;\n with_sheets: boolean;\n with_recommended_chapters?: boolean;\n};\n\nconst { useGet: useMilestoneGet, invalidate: invalidateMilestoneGetData } = createGetAPI<\n IMilestoneData,\n TQuery\n>({\n getURL: (milestoneId, query) =>\n `${BASE_URL_V3}/user-milestone/${milestoneId}/?${stringify(query)}`,\n});\n\nexport { useMilestoneGet, invalidateMilestoneGetData };\n"],"names":["useMilestoneGet","invalidateMilestoneGetData","createGetAPI","milestoneId","query","BASE_URL_V3","stringify"],"mappings":";;;AAaA,MAAM,EAAE,QAAQA,GAAiB,YAAYC,EAAA,IAA+BC,EAG1E;AAAA,EACA,QAAQ,CAACC,GAAaC,MACpB,GAAGC,CAAW,mBAAmBF,CAAW,KAAKG,EAAUF,CAAK,CAAC;AACrE,CAAC;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createPatchAPI as e } from "@cuemath/rest-api";
|
2
|
-
import {
|
2
|
+
import { BASE_URL_V3_1 as o } from "../../../../../../constants/api.js";
|
3
3
|
const { usePatch: c } = e({
|
4
4
|
getURL: (t) => `${o}/user-milestone/${t}`
|
5
5
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"patch-goal-plan.js","sources":["../../../../../../../src/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.ts"],"sourcesContent":["import { createPatchAPI } from '@cuemath/rest-api';\n\nimport {
|
1
|
+
{"version":3,"file":"patch-goal-plan.js","sources":["../../../../../../../src/features/milestone/edit/comps/edit-milestone-modal/api/patch-goal-plan.ts"],"sourcesContent":["import { createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../../../constants/api';\n\nconst { usePatch: useGoalPlanPatch } = createPatchAPI<{ id: string }, Record<string, unknown>>({\n getURL: milestoneId => `${BASE_URL_V3_1}/user-milestone/${milestoneId}`,\n});\n\nexport { useGoalPlanPatch };\n"],"names":["useGoalPlanPatch","createPatchAPI","milestoneId","BASE_URL_V3_1"],"mappings":";;AAIA,MAAM,EAAE,UAAUA,EAAiB,IAAIC,EAAwD;AAAA,EAC7F,QAAQ,CAAAC,MAAe,GAAGC,CAAa,mBAAmBD,CAAW;AACvE,CAAC;"}
|