@cuemath/leap 2.9.8-as3 → 2.9.8
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/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 -289
- 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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor:
|
1
|
+
{"version":3,"file":"coachmark.js","sources":["../../../../../src/features/journey/comps/coachmark/coachmark.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { INudgeProps } from '../../../ui/nudge/nudge-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport React, { useMemo } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport Nudge from '../../../ui/nudge/nudge';\nimport { BLUR_OVERLAY_Z_INDEX, IndicatorType } from '../../use-journey/constants';\nimport * as S from './coachmark-styled';\nimport { toolTipGetXCoordinates } from './coachmark-utils';\n\nexport const Coachmark: React.FC<{ coachmark: ICoachmarkProps }> = ({ coachmark }) => {\n const targetElement = coachmark.originalElementToHighlightRef.current;\n const { top = 0, left = 0, height = 0, width = 0 } = targetElement?.getBoundingClientRect() || {};\n\n const isAbsolute = useMemo(() => {\n return () => {\n if (!targetElement) return false;\n\n return window.getComputedStyle(targetElement).position === 'absolute';\n };\n }, [targetElement]);\n\n const tooltipProps = useMemo(() => {\n const arrowToolTipProps = coachmark.indicator as IArrowTooltipProps;\n\n return {\n width: 264, // Can be over ridden\n tooltipXCoOrdinates:\n toolTipGetXCoordinates(arrowToolTipProps.position) +\n (arrowToolTipProps.tooltipXCoOrdinates ?? 0), // For absolutely positioned elements\n zIndex: BLUR_OVERLAY_Z_INDEX + 1,\n ...arrowToolTipProps,\n tooltipItem: <S.CoachmarkBody>{arrowToolTipProps.tooltipItem}</S.CoachmarkBody>,\n alwaysVisible: true,\n renderAs: 'primary', // Deprecate this\n borderWidth: 1,\n arrowColor: 'WHITE',\n borderColor: 'WHITE',\n type: IndicatorType.TOOLTIP,\n isAnimated: true,\n } as IArrowTooltipProps;\n }, [coachmark.indicator]);\n\n const nudgeProps = useMemo(() => {\n const props: INudgeProps = coachmark.indicator as INudgeProps;\n\n return {\n ...props,\n nudgePointerX: left + (props.nudgePointerX ?? 0),\n nudgePointerY: top + (props.nudgePointerY ?? 0),\n };\n }, [coachmark.indicator, left, top]);\n\n if (!targetElement || !coachmark.isActive) {\n return null;\n }\n\n if (coachmark.type === IndicatorType.TOOLTIP) {\n if (isAbsolute()) {\n return (\n <>\n {coachmark.elementToHighlight}\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>\n <div style={{ height, width }} />\n </ArrowTooltip>\n </S.ClonedElementWrapper>\n </>\n );\n }\n\n return (\n <S.ClonedElementWrapper $position=\"absolute\" $top={top} $left={left}>\n <ArrowTooltip {...tooltipProps}>{coachmark.elementToHighlight}</ArrowTooltip>\n </S.ClonedElementWrapper>\n );\n }\n\n if (coachmark.type === IndicatorType.NUDGE) {\n return (\n <>\n <S.ClonedElementWrapper\n $top={isAbsolute() ? 0 : top}\n $left={isAbsolute() ? 0 : left}\n $position={isAbsolute() ? 'relative' : 'absolute'}\n >\n {coachmark.elementToHighlight}\n </S.ClonedElementWrapper>\n <Nudge zIndex={BLUR_OVERLAY_Z_INDEX + 1} {...nudgeProps} />\n </>\n );\n }\n\n return null;\n};\n"],"names":["Coachmark","coachmark","targetElement","top","left","height","width","isAbsolute","useMemo","tooltipProps","arrowToolTipProps","toolTipGetXCoordinates","BLUR_OVERLAY_Z_INDEX","jsx","S.CoachmarkBody","IndicatorType","nudgeProps","props","jsxs","Fragment","S.ClonedElementWrapper","ArrowTooltip","Nudge"],"mappings":";;;;;;;AAYO,MAAMA,IAAsD,CAAC,EAAE,WAAAC,QAAgB;AAC9E,QAAAC,IAAgBD,EAAU,8BAA8B,SACxD,EAAE,KAAAE,IAAM,GAAG,MAAAC,IAAO,GAAG,QAAAC,IAAS,GAAG,OAAAC,IAAQ,EAAE,KAAIJ,KAAA,gBAAAA,EAAe,4BAA2B,CAAA,GAEzFK,IAAaC,EAAQ,MAClB,MACAN,IAEE,OAAO,iBAAiBA,CAAa,EAAE,aAAa,aAFhC,IAI5B,CAACA,CAAa,CAAC,GAEZO,IAAeD,EAAQ,MAAM;AACjC,UAAME,IAAoBT,EAAU;AAE7B,WAAA;AAAA,MACL,OAAO;AAAA;AAAA,MACP,qBACEU,EAAuBD,EAAkB,QAAQ,KAChDA,EAAkB,uBAAuB;AAAA;AAAA,MAC5C,QAAQE,IAAuB;AAAA,MAC/B,GAAGF;AAAA,MACH,aAAc,gBAAAG,EAAAC,GAAA,EAAiB,YAAkB,aAAY;AAAA,MAC7D,eAAe;AAAA,MACf,UAAU;AAAA;AAAA,MACV,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,aAAa;AAAA,MACb,MAAMC,EAAc;AAAA,MACpB,YAAY;AAAA,IAAA;AAAA,EACd,GACC,CAACd,EAAU,SAAS,CAAC,GAElBe,IAAaR,EAAQ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O_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R
|
1
|
+
var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R))(E || {});
|
2
2
|
export {
|
3
3
|
E as JOURNEY_ID_STUDENT
|
4
4
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n
|
1
|
+
{"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAG9BA,EAAA,kCAAkC,mCATxBA,IAAAA,KAAA,CAAA,CAAA;"}
|
@@ -1,10 +1,10 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { createContext as
|
3
|
-
import { Coachmark as
|
4
|
-
import { usePostUserJourney as
|
5
|
-
import { Overlay as
|
6
|
-
const
|
7
|
-
const [
|
1
|
+
import { jsxs as O, jsx as w } from "react/jsx-runtime";
|
2
|
+
import { createContext as U, useState as h, useRef as k, useCallback as l, useMemo as q, useEffect as R } from "react";
|
3
|
+
import { Coachmark as D } from "../comps/coachmark/coachmark.js";
|
4
|
+
import { usePostUserJourney as L, useGetUserJourney as N } from "../user-journey-api/user-journey-api.js";
|
5
|
+
import { Overlay as M } from "./journey-styled.js";
|
6
|
+
const z = U(null), H = ({ children: T, appId: s, userId: o }) => {
|
7
|
+
const [x, p] = h(null), [c, a] = h([]), [J, v] = h(!1), m = k(-1), t = k(), d = k([]), { post: _ } = L(), { data: f = null, get: g } = N(), A = l(
|
8
8
|
(e, r) => {
|
9
9
|
if (c.length > 0) {
|
10
10
|
console.error(
|
@@ -12,13 +12,13 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
|
|
12
12
|
);
|
13
13
|
return;
|
14
14
|
}
|
15
|
-
v(!0), t.current = e,
|
15
|
+
v(!0), t.current = e, m.current = -1, a([...r]);
|
16
16
|
},
|
17
17
|
[c.length]
|
18
18
|
), u = l(() => {
|
19
|
-
|
19
|
+
d.current.forEach((e) => {
|
20
20
|
clearTimeout(e);
|
21
|
-
}),
|
21
|
+
}), d.current = [], t.current = void 0, m.current = -1, a([]), v(!1);
|
22
22
|
}, []), $ = l(
|
23
23
|
(e) => {
|
24
24
|
u(), p((r) => r && !r.includes(e) ? [...r, e] : r), _({
|
@@ -36,31 +36,31 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
|
|
36
36
|
);
|
37
37
|
return;
|
38
38
|
}
|
39
|
-
a((
|
39
|
+
a((y) => [...y, r]);
|
40
40
|
}, []), P = l(
|
41
|
-
(e, r = !1,
|
41
|
+
(e, r = !1, y = 0) => {
|
42
42
|
if (!t.current || e !== t.current) {
|
43
43
|
console.error(
|
44
44
|
t.current ? "nextCoachmark was called before setJourney" : `A Journey is already active, Current Journey: ${t.current}, New Journey Request: ${e}`
|
45
45
|
);
|
46
46
|
return;
|
47
47
|
}
|
48
|
-
|
48
|
+
y !== 0 && a((n) => n.map((i) => ({ ...i, isActive: !1 })));
|
49
49
|
const j = setTimeout(() => {
|
50
50
|
clearTimeout(j);
|
51
|
-
const n =
|
51
|
+
const n = m.current + 1;
|
52
52
|
a((i) => {
|
53
53
|
if (n >= i.length || i.length === 0)
|
54
54
|
return u(), [];
|
55
|
-
|
56
|
-
const
|
57
|
-
return
|
55
|
+
m.current = n;
|
56
|
+
const C = [...i];
|
57
|
+
return C[n].isActive = !0, n > 0 && (C[n - 1].isActive = r), C;
|
58
58
|
});
|
59
|
-
},
|
60
|
-
|
59
|
+
}, y);
|
60
|
+
d.current.push(j);
|
61
61
|
},
|
62
62
|
[u]
|
63
|
-
),
|
63
|
+
), b = q(
|
64
64
|
() => ({
|
65
65
|
nextCoachmark: P,
|
66
66
|
setJourney: A,
|
@@ -69,7 +69,7 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
|
|
69
69
|
endJourney: $,
|
70
70
|
coachmarks: c,
|
71
71
|
userCompletedJourneyIds: x,
|
72
|
-
isJourneyActive:
|
72
|
+
isJourneyActive: J
|
73
73
|
}),
|
74
74
|
[
|
75
75
|
P,
|
@@ -79,7 +79,7 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
|
|
79
79
|
$,
|
80
80
|
c,
|
81
81
|
x,
|
82
|
-
|
82
|
+
J
|
83
83
|
]
|
84
84
|
);
|
85
85
|
return R(() => {
|
@@ -89,25 +89,17 @@ const S = L(null), W = ({ children: T, appId: s, userId: o }) => {
|
|
89
89
|
journey_status: "COMPLETED"
|
90
90
|
});
|
91
91
|
}, [s, g, o]), R(() => {
|
92
|
-
if (
|
93
|
-
const e =
|
92
|
+
if (f) {
|
93
|
+
const e = f.map((r) => r.journey_id);
|
94
94
|
p(e);
|
95
95
|
}
|
96
|
-
}, [
|
97
|
-
|
98
|
-
G,
|
99
|
-
{
|
100
|
-
about: "journey-overlay",
|
101
|
-
isJourneyBlurred: b,
|
102
|
-
"data-testid": t.current,
|
103
|
-
children: c.map((e, r) => /* @__PURE__ */ w(B, { coachmark: e }, `coachmark-${r}`))
|
104
|
-
}
|
105
|
-
),
|
96
|
+
}, [f]), /* @__PURE__ */ O(z.Provider, { value: b, children: [
|
97
|
+
J && /* @__PURE__ */ w(M, { about: "journey-overlay", "data-testid": t.current, children: c.map((e, r) => /* @__PURE__ */ w(D, { coachmark: e }, `coachmark-${r}`)) }),
|
106
98
|
T
|
107
99
|
] });
|
108
100
|
};
|
109
101
|
export {
|
110
|
-
|
111
|
-
|
102
|
+
z as JourneyContext,
|
103
|
+
H as JourneyProvider
|
112
104
|
};
|
113
105
|
//# sourceMappingURL=journey-context-provider.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [isJourneyBlurred, setIsJourneyBlurred] = useState<boolean>(false);\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (\n id: TJourneyId,\n keepPrevActive: boolean = false,\n delayInMs: number = 0,\n shouldBlurNextJourney: boolean = false,\n ) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n setIsJourneyBlurred(shouldBlurNextJourney);\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay\n about=\"journey-overlay\"\n isJourneyBlurred={isJourneyBlurred}\n data-testid={currentJourneyId.current}\n >\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","isJourneyBlurred","setIsJourneyBlurred","useState","userCompletedJourneyIds","setUserCompletedJourneyIds","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","shouldBlurNextJourney","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAkBC,CAAmB,IAAIC,EAAkB,EAAK,GACjE,CAACC,GAAyBC,CAA0B,IAAIF,EAA8B,IAAI,GAC1F,CAACG,GAAeC,CAAgB,IAAIJ,EAA4B,CAAE,CAAA,GAClE,CAACK,GAAiBC,CAAkB,IAAIN,EAAS,EAAK,GACtDO,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,MAAkC;AAC7C,UAAAhB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BS,CAAE;AAAA,QAAA;AAGvH;AA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B,CAAM,CAAC,GAGtCwC,EAAU,MAAM;AACd,QAAIxB,GAAuB;AACzB,YAAMyB,IAA2BzB,EAAsB,IAAI,CAAA0B,MAAWA,EAAQ,UAAU;AAExF,MAAArC,EAA2BoC,CAAwB;AAAA,IACrD;AAAA,EAAA,GACC,CAACzB,CAAqB,CAAC,GAGvB,gBAAA2B,EAAAhD,EAAe,UAAf,EAAwB,OAAO2C,GAC7B,UAAA;AAAA,IACC9B,KAAA,gBAAAoC;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,kBAAA5C;AAAA,QACA,eAAaW,EAAiB;AAAA,QAE7B,UAAAN,EAAc,IAAI,CAACuB,GAAWiB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAlB,EAAtB,GAAA,aAAaiB,CAAK,EAA0B,CAC7D;AAAA,MAAA;AAAA,IACH;AAAA,IAEDhD;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
1
|
+
{"version":3,"file":"journey-context-provider.js","sources":["../../../../src/features/journey/use-journey/journey-context-provider.tsx"],"sourcesContent":["/* eslint-disable no-console */\nimport type { TJourneyId } from '../journey-id/journey-id-types';\nimport type {\n ICoachmarkProps,\n IJourneyContext,\n IJourneyProviderProps,\n} from './journey-context-types';\nimport type { FC } from 'react';\n\nimport { createContext, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { Coachmark } from '../comps/coachmark/coachmark';\nimport { useGetUserJourney, usePostUserJourney } from '../user-journey-api/user-journey-api';\nimport * as S from './journey-styled';\n\nexport const JourneyContext = createContext<IJourneyContext | null>(null);\n\nexport const JourneyProvider: FC<IJourneyProviderProps> = ({ children, appId, userId }) => {\n const [userCompletedJourneyIds, setUserCompletedJourneyIds] = useState<TJourneyId[] | null>(null);\n const [coachmarkList, setCoachmarkList] = useState<ICoachmarkProps[]>([]);\n const [isJourneyActive, setIsJourneyActive] = useState(false);\n const currentIndex = useRef(-1);\n const currentJourneyId = useRef<TJourneyId | undefined>();\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { post: postJourneyCompletion } = usePostUserJourney();\n const { data: userCompletedJourneys = null, get: getJourneyProgress } = useGetUserJourney();\n\n const setJourney = useCallback(\n (id: TJourneyId, coachmarks: ICoachmarkProps[]) => {\n if (coachmarkList.length > 0) {\n console.error(\n `setJourney: Other Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n setIsJourneyActive(true);\n currentJourneyId.current = id;\n currentIndex.current = -1;\n setCoachmarkList([...coachmarks]);\n },\n [coachmarkList.length],\n );\n\n const clearJourney = useCallback(() => {\n // Clear all timers\n timerRefs.current.forEach(timer => {\n clearTimeout(timer);\n });\n timerRefs.current = [];\n currentJourneyId.current = undefined;\n currentIndex.current = -1;\n setCoachmarkList([]);\n setIsJourneyActive(false);\n }, []);\n\n const endJourney = useCallback(\n (journeyId: TJourneyId) => {\n clearJourney();\n setUserCompletedJourneyIds(prev => {\n if (prev && !prev.includes(journeyId)) {\n return [...prev, journeyId];\n }\n\n return prev;\n });\n // fire the API (doesn’t block the UI)\n postJourneyCompletion({\n app_id: appId,\n user_id: userId,\n journey_id: journeyId,\n journey_status: 'COMPLETED',\n });\n },\n [appId, clearJourney, postJourneyCompletion, userId],\n );\n\n const addCoachmark = useCallback((id: TJourneyId, coachmark: ICoachmarkProps) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`\n : `addCoachmark was called before setJourney and Journey ID is undefined`,\n );\n\n return;\n }\n\n setCoachmarkList(prev => [...prev, coachmark]);\n }, []);\n\n const nextCoachmark = useCallback(\n (id: TJourneyId, keepPrevActive: boolean = false, delayInMs: number = 0) => {\n if (!currentJourneyId.current || id !== currentJourneyId.current) {\n console.error(\n currentJourneyId.current\n ? `nextCoachmark was called before setJourney`\n : `A Journey is already active, Current Journey: ${currentJourneyId.current}, New Journey Request: ${id}`,\n );\n\n return;\n }\n\n if (delayInMs !== 0) {\n // If delay is not 0, we will hide all them coachmarks and reveal only after the delay\n setCoachmarkList(prevList => {\n return prevList.map((item: ICoachmarkProps) => {\n return { ...item, isActive: false };\n });\n });\n }\n\n const timer = setTimeout(() => {\n clearTimeout(timer);\n const currIndex = currentIndex.current + 1;\n\n setCoachmarkList(prevList => {\n // Finish onboarding\n if (currIndex >= prevList.length || prevList.length === 0) {\n clearJourney();\n\n return [];\n }\n\n currentIndex.current = currIndex;\n const updatedCoachmarkList = [...prevList];\n\n (updatedCoachmarkList[currIndex] as ICoachmarkProps).isActive = true;\n\n if (currIndex > 0) {\n (updatedCoachmarkList[currIndex - 1] as ICoachmarkProps).isActive = keepPrevActive;\n }\n\n return updatedCoachmarkList;\n });\n }, delayInMs);\n\n timerRefs.current.push(timer);\n },\n [clearJourney],\n );\n\n const memoizedContextValue: IJourneyContext = useMemo(\n () => ({\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarks: coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n }),\n [\n nextCoachmark,\n setJourney,\n addCoachmark,\n clearJourney,\n endJourney,\n coachmarkList,\n userCompletedJourneyIds,\n isJourneyActive,\n ],\n );\n\n // Get the initial state of incompleteJourneys\n useEffect(() => {\n if (appId && userId) {\n getJourneyProgress(userId, {\n app_id: appId,\n user_id: userId,\n journey_status: 'COMPLETED',\n });\n }\n }, [appId, getJourneyProgress, userId]);\n\n // Set the data to context state initially\n useEffect(() => {\n if (userCompletedJourneys) {\n const completedUserJourneysIds = userCompletedJourneys.map(journey => journey.journey_id);\n\n setUserCompletedJourneyIds(completedUserJourneysIds);\n }\n }, [userCompletedJourneys]);\n\n return (\n <JourneyContext.Provider value={memoizedContextValue}>\n {isJourneyActive && (\n <S.Overlay about=\"journey-overlay\" data-testid={currentJourneyId.current}>\n {coachmarkList.map((coachmark, index) => (\n <Coachmark key={`coachmark-${index}`} coachmark={coachmark} />\n ))}\n </S.Overlay>\n )}\n {children}\n </JourneyContext.Provider>\n );\n};\n"],"names":["JourneyContext","createContext","JourneyProvider","children","appId","userId","userCompletedJourneyIds","setUserCompletedJourneyIds","useState","coachmarkList","setCoachmarkList","isJourneyActive","setIsJourneyActive","currentIndex","useRef","currentJourneyId","timerRefs","postJourneyCompletion","usePostUserJourney","userCompletedJourneys","getJourneyProgress","useGetUserJourney","setJourney","useCallback","id","coachmarks","clearJourney","timer","endJourney","journeyId","prev","addCoachmark","coachmark","nextCoachmark","keepPrevActive","delayInMs","prevList","item","currIndex","updatedCoachmarkList","memoizedContextValue","useMemo","useEffect","completedUserJourneysIds","journey","jsxs","jsx","S.Overlay","index","Coachmark"],"mappings":";;;;;AAea,MAAAA,IAAiBC,EAAsC,IAAI,GAE3DC,IAA6C,CAAC,EAAE,UAAAC,GAAU,OAAAC,GAAO,QAAAC,QAAa;AACzF,QAAM,CAACC,GAAyBC,CAA0B,IAAIC,EAA8B,IAAI,GAC1F,CAACC,GAAeC,CAAgB,IAAIF,EAA4B,CAAE,CAAA,GAClE,CAACG,GAAiBC,CAAkB,IAAIJ,EAAS,EAAK,GACtDK,IAAeC,EAAO,EAAE,GACxBC,IAAmBD,KACnBE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,MAAMG,EAAsB,IAAIC,EAAmB,GACrD,EAAE,MAAMC,IAAwB,MAAM,KAAKC,EAAA,IAAuBC,KAElEC,IAAaC;AAAA,IACjB,CAACC,GAAgBC,MAAkC;AAC7C,UAAAhB,EAAc,SAAS,GAAG;AACpB,gBAAA;AAAA,UACN,iEAAiEM,EAAiB,OAAO,0BAA0BS,CAAE;AAAA,QAAA;AAGvH;AAAA,MACF;AACA,MAAAZ,EAAmB,EAAI,GACvBG,EAAiB,UAAUS,GAC3BX,EAAa,UAAU,IACNH,EAAA,CAAC,GAAGe,CAAU,CAAC;AAAA,IAClC;AAAA,IACA,CAAChB,EAAc,MAAM;AAAA,EAAA,GAGjBiB,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B,EAAA7C,EAAe,UAAf,EAAwB,OAAOwC,GAC7B,UAAA;AAAA,IACC7B,KAAA,gBAAAmC,EAACC,GAAA,EAAU,OAAM,mBAAkB,eAAahC,EAAiB,SAC9D,UAAAN,EAAc,IAAI,CAACuB,GAAWgB,MAC5B,gBAAAF,EAAAG,GAAA,EAAqC,WAAAjB,KAAtB,aAAagB,CAAK,EAA0B,CAC7D,EACH,CAAA;AAAA,IAED7C;AAAA,EACH,EAAA,CAAA;AAEJ;"}
|
@@ -1,19 +1,14 @@
|
|
1
|
-
import
|
2
|
-
import { BLUR_OVERLAY_Z_INDEX as
|
3
|
-
const
|
1
|
+
import o from "styled-components";
|
2
|
+
import { BLUR_OVERLAY_Z_INDEX as t } from "./constants.js";
|
3
|
+
const e = o.div`
|
4
4
|
position: fixed;
|
5
5
|
top: 0;
|
6
6
|
right: 0;
|
7
7
|
bottom: 0;
|
8
8
|
left: 0;
|
9
|
-
z-index: ${
|
10
|
-
${({ isJourneyBlurred: o, theme: r }) => o && i`
|
11
|
-
background: ${r.colors.BLACK_T_38};
|
12
|
-
backdrop-filter: blur(80px);
|
13
|
-
-webkit-backdrop-filter: blur(80px);
|
14
|
-
`}
|
9
|
+
z-index: ${t};
|
15
10
|
`;
|
16
11
|
export {
|
17
|
-
|
12
|
+
e as Overlay
|
18
13
|
};
|
19
14
|
//# sourceMappingURL=journey-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\
|
1
|
+
{"version":3,"file":"journey-styled.js","sources":["../../../../src/features/journey/use-journey/journey-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport { BLUR_OVERLAY_Z_INDEX } from './constants';\n\nexport const Overlay = styled.div`\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: ${BLUR_OVERLAY_Z_INDEX};\n`;\n"],"names":["Overlay","styled","BLUR_OVERLAY_Z_INDEX"],"mappings":";;AAIO,MAAMA,IAAUC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMjBC,CAAoB;AAAA;"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { createPostAPI as t } from "@cuemath/rest-api";
|
2
|
-
import {
|
2
|
+
import { BASE_URL_V3_1 as e } from "../../../../constants/api.js";
|
3
3
|
const { usePost: i } = t({
|
4
4
|
getURL: (s, { studentId: o }) => `${e}/users/${o}/milestones/`
|
5
5
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"goal-submit.js","sources":["../../../../../src/features/milestone/create/api/goal-submit.ts"],"sourcesContent":["import type { TMilestonePayload } from '../milestone-create-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport {
|
1
|
+
{"version":3,"file":"goal-submit.js","sources":["../../../../../src/features/milestone/create/api/goal-submit.ts"],"sourcesContent":["import type { TMilestonePayload } from '../milestone-create-types';\n\nimport { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3_1 } from '../../../../constants/api';\n\nconst { usePost: useGoalCreationPost } = createPostAPI<\n { id: string },\n TMilestonePayload,\n { studentId: string }\n>({\n getURL: (_, { studentId }) => `${BASE_URL_V3_1}/users/${studentId}/milestones/`,\n});\n\nexport { useGoalCreationPost };\n"],"names":["useGoalCreationPost","createPostAPI","_","studentId","BASE_URL_V3_1"],"mappings":";;AAMA,MAAM,EAAE,SAASA,EAAoB,IAAIC,EAIvC;AAAA,EACA,QAAQ,CAACC,GAAG,EAAE,WAAAC,EAAgB,MAAA,GAAGC,CAAa,UAAUD,CAAS;AACnE,CAAC;"}
|
@@ -1,68 +1,75 @@
|
|
1
1
|
import { jsxs as n, jsx as t } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import { SHEET_STATE as
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
2
|
+
import { memo as G, useState as L, useRef as N, useCallback as p } from "react";
|
3
|
+
import { SHEET_STATE as c } from "../../../../sheets/constants/sheet.js";
|
4
|
+
import O from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
+
import X from "../../../../ui/hooks/use-context-menu-click-handler.js";
|
6
|
+
import j from "../../../../ui/image/image.js";
|
7
7
|
import w from "../../../../ui/layout/flex-view.js";
|
8
|
-
import
|
9
|
-
import { ChapterInfoWrapper as
|
10
|
-
const
|
8
|
+
import F from "../sheets-list/sheets-list.js";
|
9
|
+
import { ChapterInfoWrapper as K, ChapterInfoIcon as P, SheetsListWrapper as U, ChapterListWrapper as q, ChapterProgressSVG as z, ChapterProgressSVGCircle as _, StyledText as A } from "./chapter-item-styled.js";
|
10
|
+
const J = [
|
11
11
|
"STARTED",
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
],
|
16
|
-
const { chapterData: x, onChapterItemClick: h, isThisPrimaryChapter: R, showChapterTags: k, canAddChapter: l } =
|
12
|
+
c.FAMILIAR,
|
13
|
+
c.PROFICIENT,
|
14
|
+
c.MASTERED
|
15
|
+
], le = G((E) => {
|
16
|
+
const { chapterData: x, onChapterItemClick: h, isThisPrimaryChapter: R, showChapterTags: k, canAddChapter: l } = E, {
|
17
17
|
name: d,
|
18
|
-
image_url:
|
18
|
+
image_url: y,
|
19
19
|
added: m,
|
20
20
|
learning_sheet_data: g,
|
21
|
+
total_supplementary_sheets: W,
|
21
22
|
id: f,
|
22
23
|
chapter_tags: H,
|
23
24
|
state: a
|
24
|
-
} = x, M = a &&
|
25
|
-
var
|
26
|
-
const { current:
|
27
|
-
if (
|
28
|
-
const r = (
|
25
|
+
} = x, M = a && J.includes(a) && g.length > 0, u = a === "MASTERED", [e, C] = L(null), i = N(null), V = p(() => {
|
26
|
+
var I;
|
27
|
+
const { current: T } = i;
|
28
|
+
if (T) {
|
29
|
+
const r = (I = T.children[0]) == null ? void 0 : I.getBoundingClientRect();
|
29
30
|
if (r) {
|
30
|
-
const
|
31
|
-
r.left + 296 <
|
31
|
+
const B = window.innerWidth, b = window.innerHeight, o = {};
|
32
|
+
r.left + 296 < B ? o.left = r.left : o.left = r.left + 20 - 296, r.top + 252 < b ? o.top = r.top + 20 : o.bottom = b - r.top + 8, Object.keys(o).length && C({ ...o });
|
32
33
|
}
|
33
34
|
}
|
34
35
|
}, [C, i]), {
|
35
|
-
menuVisible:
|
36
|
+
menuVisible: s,
|
36
37
|
onMenuClick: $,
|
37
|
-
hideMenu:
|
38
|
-
} =
|
39
|
-
|
40
|
-
}, [$,
|
38
|
+
hideMenu: S
|
39
|
+
} = X(i, V), D = p(() => {
|
40
|
+
s ? S() : $();
|
41
|
+
}, [$, S, s]), v = p(() => {
|
41
42
|
if (!l) return null;
|
42
43
|
h(f);
|
43
44
|
}, [l, f, h]);
|
44
45
|
return /* @__PURE__ */ n(w, { $flexGap: 4, $position: "relative", children: [
|
45
|
-
/* @__PURE__ */ n(
|
46
|
-
/* @__PURE__ */ t(
|
47
|
-
|
48
|
-
|
46
|
+
/* @__PURE__ */ n(K, { ref: i, onClick: D, children: [
|
47
|
+
/* @__PURE__ */ t(P, { className: "goal-chapter-info-icon" }),
|
48
|
+
s && /* @__PURE__ */ t(
|
49
|
+
U,
|
49
50
|
{
|
50
51
|
$top: e == null ? void 0 : e.top,
|
51
52
|
$left: e == null ? void 0 : e.left,
|
52
53
|
$bottom: e == null ? void 0 : e.bottom,
|
53
|
-
children: /* @__PURE__ */ t(
|
54
|
+
children: /* @__PURE__ */ t(
|
55
|
+
F,
|
56
|
+
{
|
57
|
+
learningSheetData: g,
|
58
|
+
supplementarySheetsCount: W
|
59
|
+
}
|
60
|
+
)
|
54
61
|
}
|
55
62
|
)
|
56
63
|
] }),
|
57
64
|
/* @__PURE__ */ t(
|
58
|
-
|
65
|
+
O,
|
59
66
|
{
|
60
67
|
position: "bottom",
|
61
68
|
renderAs: "primary",
|
62
69
|
tooltipItem: "Duplicates can’t be added",
|
63
70
|
hidden: !R,
|
64
71
|
children: /* @__PURE__ */ n(
|
65
|
-
|
72
|
+
q,
|
66
73
|
{
|
67
74
|
$widthX: 9.5,
|
68
75
|
$heightX: 8.875,
|
@@ -74,13 +81,13 @@ const z = [
|
|
74
81
|
$selectable: l,
|
75
82
|
$borderColor: m ? "BLACK_T_87" : "WHITE_5",
|
76
83
|
$background: m ? "WHITE_3" : "WHITE_1",
|
77
|
-
onClick:
|
84
|
+
onClick: v,
|
78
85
|
children: [
|
79
86
|
/* @__PURE__ */ n(w, { $position: "relative", children: [
|
80
|
-
M && /* @__PURE__ */ n(
|
81
|
-
/* @__PURE__ */ t(
|
87
|
+
M && /* @__PURE__ */ n(z, { width: "62px", height: "62px", children: [
|
88
|
+
/* @__PURE__ */ t(_, { $progress: 0, r: "30", cx: "31", cy: "31" }),
|
82
89
|
/* @__PURE__ */ t(
|
83
|
-
|
90
|
+
_,
|
84
91
|
{
|
85
92
|
$progressCircle: !0,
|
86
93
|
$progressBackground: u ? "GREEN_5" : "BLACK",
|
@@ -92,9 +99,9 @@ const z = [
|
|
92
99
|
)
|
93
100
|
] }),
|
94
101
|
/* @__PURE__ */ t(
|
95
|
-
|
102
|
+
j,
|
96
103
|
{
|
97
|
-
src:
|
104
|
+
src: y || "",
|
98
105
|
alt: d,
|
99
106
|
withLoader: !0,
|
100
107
|
width: 56,
|
@@ -103,16 +110,16 @@ const z = [
|
|
103
110
|
}
|
104
111
|
)
|
105
112
|
] }),
|
106
|
-
/* @__PURE__ */ t(
|
113
|
+
/* @__PURE__ */ t(A, { $renderAs: "ab3", $align: "center", children: d })
|
107
114
|
]
|
108
115
|
}
|
109
116
|
)
|
110
117
|
}
|
111
118
|
),
|
112
|
-
k && /* @__PURE__ */ t(
|
119
|
+
k && /* @__PURE__ */ t(A, { $renderAs: "ab3", $lineClampNo: 1, $color: "BLACK_T_60", children: H })
|
113
120
|
] });
|
114
121
|
});
|
115
122
|
export {
|
116
|
-
|
123
|
+
le as default
|
117
124
|
};
|
118
125
|
//# sourceMappingURL=chapter-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item.js","sources":["../../../../../../src/features/milestone/create/comps/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItem, ISheetsListPosition } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef, useState } from 'react';\n\nimport { SHEET_STATE } from '../../../../sheets/constants/sheet';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SheetsList from '../sheets-list/sheets-list';\nimport * as Styled from './chapter-item-styled';\n\nconst progressVisibleStates = [\n 'STARTED',\n SHEET_STATE.FAMILIAR,\n SHEET_STATE.PROFICIENT,\n SHEET_STATE.MASTERED,\n];\n\nconst ChapterItemV2: FC<IChapterItem> = memo(props => {\n const { chapterData, onChapterItemClick, isThisPrimaryChapter, showChapterTags, canAddChapter } =\n props;\n const {\n name,\n image_url: imageUrl,\n added,\n learning_sheet_data: learningSheetData,\n id: chapterId,\n chapter_tags: chapterTags,\n state,\n } = chapterData;\n\n const showProgress =\n state && progressVisibleStates.includes(state) && learningSheetData.length > 0;\n const isMastered = state === 'MASTERED';\n\n const [sheetsListPositionCoordinates, setSheetsListPositionCoordinates] =\n useState<ISheetsListPosition | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const handleSetCoordinates = useCallback(() => {\n const { current } = containerRef;\n\n if (current) {\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n\n if (boundingClientRect) {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n const positions: ISheetsListPosition = {};\n\n //* 288 (Width of card) + 8 (left position) = 296\n if (boundingClientRect.left + 296 < viewportWidth) {\n positions.left = boundingClientRect.left;\n } else {\n positions.left = boundingClientRect.left + 20 - 296;\n }\n\n //* 252 (Max height of card)\n if (boundingClientRect.top + 252 < viewportHeight) {\n positions.top = boundingClientRect.top + 20;\n } else {\n positions.bottom = viewportHeight - boundingClientRect.top + 8;\n }\n\n if (Object.keys(positions).length) {\n setSheetsListPositionCoordinates({ ...positions });\n }\n }\n }\n }, [setSheetsListPositionCoordinates, containerRef]);\n\n const {\n menuVisible,\n onMenuClick: onMenuClick,\n hideMenu,\n } = useContextMenuClickHandler(containerRef, handleSetCoordinates);\n\n const handleOnSheetsView = useCallback(() => {\n if (!menuVisible) {\n onMenuClick();\n } else {\n hideMenu();\n }\n }, [onMenuClick, hideMenu, menuVisible]);\n\n const handleOnChapterItemClick = useCallback(() => {\n if (!canAddChapter) return null;\n\n onChapterItemClick(chapterId);\n }, [canAddChapter, chapterId, onChapterItemClick]);\n\n return (\n <FlexView $flexGap={4} $position=\"relative\">\n <Styled.ChapterInfoWrapper ref={containerRef} onClick={handleOnSheetsView}>\n <Styled.ChapterInfoIcon className=\"goal-chapter-info-icon\" />\n {menuVisible && (\n <Styled.SheetsListWrapper\n $top={sheetsListPositionCoordinates?.top}\n $left={sheetsListPositionCoordinates?.left}\n $bottom={sheetsListPositionCoordinates?.bottom}\n >\n <SheetsList
|
1
|
+
{"version":3,"file":"chapter-item.js","sources":["../../../../../../src/features/milestone/create/comps/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItem, ISheetsListPosition } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef, useState } from 'react';\n\nimport { SHEET_STATE } from '../../../../sheets/constants/sheet';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SheetsList from '../sheets-list/sheets-list';\nimport * as Styled from './chapter-item-styled';\n\nconst progressVisibleStates = [\n 'STARTED',\n SHEET_STATE.FAMILIAR,\n SHEET_STATE.PROFICIENT,\n SHEET_STATE.MASTERED,\n];\n\nconst ChapterItemV2: FC<IChapterItem> = memo(props => {\n const { chapterData, onChapterItemClick, isThisPrimaryChapter, showChapterTags, canAddChapter } =\n props;\n const {\n name,\n image_url: imageUrl,\n added,\n learning_sheet_data: learningSheetData,\n total_supplementary_sheets: totalSupplementarySheets,\n id: chapterId,\n chapter_tags: chapterTags,\n state,\n } = chapterData;\n\n const showProgress =\n state && progressVisibleStates.includes(state) && learningSheetData.length > 0;\n const isMastered = state === 'MASTERED';\n\n const [sheetsListPositionCoordinates, setSheetsListPositionCoordinates] =\n useState<ISheetsListPosition | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n\n const handleSetCoordinates = useCallback(() => {\n const { current } = containerRef;\n\n if (current) {\n const boundingClientRect = current.children[0]?.getBoundingClientRect();\n\n if (boundingClientRect) {\n const viewportWidth = window.innerWidth;\n const viewportHeight = window.innerHeight;\n\n const positions: ISheetsListPosition = {};\n\n //* 288 (Width of card) + 8 (left position) = 296\n if (boundingClientRect.left + 296 < viewportWidth) {\n positions.left = boundingClientRect.left;\n } else {\n positions.left = boundingClientRect.left + 20 - 296;\n }\n\n //* 252 (Max height of card)\n if (boundingClientRect.top + 252 < viewportHeight) {\n positions.top = boundingClientRect.top + 20;\n } else {\n positions.bottom = viewportHeight - boundingClientRect.top + 8;\n }\n\n if (Object.keys(positions).length) {\n setSheetsListPositionCoordinates({ ...positions });\n }\n }\n }\n }, [setSheetsListPositionCoordinates, containerRef]);\n\n const {\n menuVisible,\n onMenuClick: onMenuClick,\n hideMenu,\n } = useContextMenuClickHandler(containerRef, handleSetCoordinates);\n\n const handleOnSheetsView = useCallback(() => {\n if (!menuVisible) {\n onMenuClick();\n } else {\n hideMenu();\n }\n }, [onMenuClick, hideMenu, menuVisible]);\n\n const handleOnChapterItemClick = useCallback(() => {\n if (!canAddChapter) return null;\n\n onChapterItemClick(chapterId);\n }, [canAddChapter, chapterId, onChapterItemClick]);\n\n return (\n <FlexView $flexGap={4} $position=\"relative\">\n <Styled.ChapterInfoWrapper ref={containerRef} onClick={handleOnSheetsView}>\n <Styled.ChapterInfoIcon className=\"goal-chapter-info-icon\" />\n {menuVisible && (\n <Styled.SheetsListWrapper\n $top={sheetsListPositionCoordinates?.top}\n $left={sheetsListPositionCoordinates?.left}\n $bottom={sheetsListPositionCoordinates?.bottom}\n >\n <SheetsList\n learningSheetData={learningSheetData}\n supplementarySheetsCount={totalSupplementarySheets}\n />\n </Styled.SheetsListWrapper>\n )}\n </Styled.ChapterInfoWrapper>\n\n <ArrowTooltip\n position=\"bottom\"\n renderAs=\"primary\"\n tooltipItem=\"Duplicates can’t be added\"\n hidden={!isThisPrimaryChapter}\n >\n <Styled.ChapterListWrapper\n $widthX={9.5}\n $heightX={8.875}\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n $position=\"relative\"\n $alignItems=\"center\"\n $selectable={canAddChapter}\n $borderColor={added ? 'BLACK_T_87' : 'WHITE_5'}\n $background={added ? 'WHITE_3' : 'WHITE_1'}\n onClick={handleOnChapterItemClick}\n >\n <FlexView $position=\"relative\">\n {showProgress && (\n <Styled.ChapterProgressSVG width=\"62px\" height=\"62px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"30\" cx=\"31\" cy=\"31\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={isMastered ? 'GREEN_5' : 'BLACK'}\n $progress={isMastered ? 360 : 95}\n r=\"30\"\n cx=\"31\"\n cy=\"31\"\n />\n </Styled.ChapterProgressSVG>\n )}\n <Image\n src={imageUrl || ''}\n alt={name}\n withLoader\n width={56}\n height={56}\n borderRadius={50}\n />\n </FlexView>\n\n <Styled.StyledText $renderAs=\"ab3\" $align=\"center\">\n {name}\n </Styled.StyledText>\n </Styled.ChapterListWrapper>\n </ArrowTooltip>\n\n {showChapterTags && (\n <Styled.StyledText $renderAs=\"ab3\" $lineClampNo={1} $color=\"BLACK_T_60\">\n {chapterTags}\n </Styled.StyledText>\n )}\n </FlexView>\n );\n});\n\nexport default ChapterItemV2;\n"],"names":["progressVisibleStates","SHEET_STATE","ChapterItemV2","memo","props","chapterData","onChapterItemClick","isThisPrimaryChapter","showChapterTags","canAddChapter","name","imageUrl","added","learningSheetData","totalSupplementarySheets","chapterId","chapterTags","state","showProgress","isMastered","sheetsListPositionCoordinates","setSheetsListPositionCoordinates","useState","containerRef","useRef","handleSetCoordinates","useCallback","current","boundingClientRect","_a","viewportWidth","viewportHeight","positions","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","handleOnSheetsView","handleOnChapterItemClick","jsxs","FlexView","Styled.ChapterInfoWrapper","jsx","Styled.ChapterInfoIcon","Styled.SheetsListWrapper","SheetsList","ArrowTooltip","Styled.ChapterListWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Image","Styled.StyledText"],"mappings":";;;;;;;;;AAaA,MAAMA,IAAwB;AAAA,EAC5B;AAAA,EACAC,EAAY;AAAA,EACZA,EAAY;AAAA,EACZA,EAAY;AACd,GAEMC,KAAkCC,EAAK,CAASC,MAAA;AACpD,QAAM,EAAE,aAAAC,GAAa,oBAAAC,GAAoB,sBAAAC,GAAsB,iBAAAC,GAAiB,eAAAC,EAC9E,IAAAL,GACI;AAAA,IACJ,MAAAM;AAAA,IACA,WAAWC;AAAA,IACX,OAAAC;AAAA,IACA,qBAAqBC;AAAA,IACrB,4BAA4BC;AAAA,IAC5B,IAAIC;AAAA,IACJ,cAAcC;AAAA,IACd,OAAAC;AAAA,EACE,IAAAZ,GAEEa,IACJD,KAASjB,EAAsB,SAASiB,CAAK,KAAKJ,EAAkB,SAAS,GACzEM,IAAaF,MAAU,YAEvB,CAACG,GAA+BC,CAAgC,IACpEC,EAAqC,IAAI,GACrCC,IAAeC,EAAuB,IAAI,GAE1CC,IAAuBC,EAAY,MAAM;;AACvC,UAAA,EAAE,SAAAC,EAAY,IAAAJ;AAEpB,QAAII,GAAS;AACX,YAAMC,KAAqBC,IAAAF,EAAQ,SAAS,CAAC,MAAlB,gBAAAE,EAAqB;AAEhD,UAAID,GAAoB;AACtB,cA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AA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,IAECF,KACE,gBAAAkC,EAAAS,GAAA,EAAkB,WAAU,OAAM,cAAc,GAAG,QAAO,cACxD,UACHnC,EAAA,CAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,17 +1,9 @@
|
|
1
1
|
import r from "styled-components";
|
2
|
-
import
|
3
|
-
const
|
4
|
-
box-shadow: 0px 10px 20px 0px ${
|
5
|
-
`), n = r(o)(() => `
|
6
|
-
margin-left: auto;
|
7
|
-
|
8
|
-
svg {
|
9
|
-
width: 24px;
|
10
|
-
height: 24px;
|
11
|
-
}
|
2
|
+
import p from "../../../../ui/layout/flex-view.js";
|
3
|
+
const e = r(p)(({ theme: o }) => `
|
4
|
+
box-shadow: 0px 10px 20px 0px ${o.colors.BLACK_T_20};
|
12
5
|
`);
|
13
6
|
export {
|
14
|
-
|
15
|
-
x as ButtonWrapper
|
7
|
+
e as ButtonWrapper
|
16
8
|
};
|
17
9
|
//# sourceMappingURL=chapters-selection-step-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapters-selection-step-styled.js","sources":["../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n `;\n});\n\
|
1
|
+
{"version":3,"file":"chapters-selection-step-styled.js","sources":["../../../../../../src/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n box-shadow: 0px 10px 20px 0px ${theme.colors.BLACK_T_20};\n `;\n});\n\nexport { ButtonWrapper };\n"],"names":["ButtonWrapper","styled","FlexView","theme"],"mappings":";;AAIA,MAAMA,IAAgBC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QACjC;AAAA,oCAC2BA,EAAM,OAAO,UAAU;AAAA,GAE1D;"}
|