@cuemath/leap 3.5.30-gg4 → 3.5.30-j1
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 +12 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/images/images.js +8 -0
- package/dist/assets/images/images.js.map +1 -1
- package/dist/assets/line-icons/icons/carat-right.js +26 -0
- package/dist/assets/line-icons/icons/carat-right.js.map +1 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js +3 -3
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js +16 -32
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel-styled.js.map +1 -1
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js +88 -87
- package/dist/features/circle-games/game-launcher/comps/carousel/carousel.js.map +1 -1
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +35 -35
- package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
- package/dist/features/stickers/hooks/use-handle-sticker-send/use-handle-sticker-send.js +0 -1
- package/dist/features/stickers/hooks/use-handle-sticker-send/use-handle-sticker-send.js.map +1 -1
- package/dist/features/timeline/daily-timeline-styled.js +13 -9
- package/dist/features/timeline/daily-timeline-styled.js.map +1 -1
- package/dist/features/timeline/daily-timeline-view.js +9 -10
- package/dist/features/timeline/daily-timeline-view.js.map +1 -1
- package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js +13 -0
- package/dist/features/timeline/monthly-report/api/use-monthly-report-get.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.js +68 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js +15 -0
- package/dist/features/timeline/monthly-report/comps/achievements/achievements.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js +128 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js +53 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +121 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +58 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities.js +27 -0
- package/dist/features/timeline/monthly-report/comps/activities/activities.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/constants.js +95 -0
- package/dist/features/timeline/monthly-report/comps/activities/constants.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/activities/utils.js +15 -0
- package/dist/features/timeline/monthly-report/comps/activities/utils.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js +29 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-constants.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js +92 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance-utils.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.js +44 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js +39 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendance.styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js +52 -0
- package/dist/features/timeline/monthly-report/comps/attendance/attendence-view.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js +9 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback-styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback.js +94 -0
- package/dist/features/timeline/monthly-report/comps/feedback/feedback.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js +48 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js +28 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js +113 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js +30 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals-constants.js.map +1 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals.js +22 -0
- package/dist/features/timeline/monthly-report/comps/goals/goals.js.map +1 -0
- package/dist/features/timeline/monthly-report/monthly-report-styled.js +14 -0
- package/dist/features/timeline/monthly-report/monthly-report-styled.js.map +1 -0
- package/dist/features/timeline/monthly-report/monthly-report-types.js +5 -0
- package/dist/features/timeline/monthly-report/monthly-report-types.js.map +1 -0
- package/dist/features/timeline/monthly-report/monthly-report.js +69 -0
- package/dist/features/timeline/monthly-report/monthly-report.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +10 -0
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +87 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/constants.js +41 -0
- package/dist/features/timeline/monthly-timeline/constants.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js +13 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js +6 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-types.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js +28 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline-view.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js +62 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -0
- package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js +9 -0
- package/dist/features/timeline/ptm-report/api/use-ptm-report-get.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need.js +35 -0
- package/dist/features/timeline/ptm-report/comps/key-need/key-need.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js +53 -0
- package/dist/features/timeline/ptm-report/comps/parent-support/parent-support.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js +19 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js +50 -0
- package/dist/features/timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card.js +22 -0
- package/dist/features/timeline/ptm-report/comps/report-card/report-card.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support.js +84 -0
- package/dist/features/timeline/ptm-report/comps/school-support/school-support.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js +11 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies-constant.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies.js +36 -0
- package/dist/features/timeline/ptm-report/comps/strategies/strategies.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js +55 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js +35 -0
- package/dist/features/timeline/ptm-report/comps/strategy-card/strategy-card.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js +21 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info.js +21 -0
- package/dist/features/timeline/ptm-report/comps/student-info/student-info.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js +9 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card.js +30 -0
- package/dist/features/timeline/ptm-report/comps/support-card/support-card.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js +9 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js +56 -0
- package/dist/features/timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +1 -0
- package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js +15 -0
- package/dist/features/timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-constants.js +16 -0
- package/dist/features/timeline/ptm-report/ptm-report-constants.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-helpers.js +8 -0
- package/dist/features/timeline/ptm-report/ptm-report-helpers.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-styled.js +11 -0
- package/dist/features/timeline/ptm-report/ptm-report-styled.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report-types.js +5 -0
- package/dist/features/timeline/ptm-report/ptm-report-types.js.map +1 -0
- package/dist/features/timeline/ptm-report/ptm-report.js +113 -0
- package/dist/features/timeline/ptm-report/ptm-report.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js +5 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs-types.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js +42 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js +37 -0
- package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js.map +1 -0
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body-styled.js.map +1 -1
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js +11 -11
- package/dist/features/ui/arrow-tooltip/comps/tooltip-body.js.map +1 -1
- package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js +57 -0
- package/dist/features/ui/swipable-carousel/swipable-carousel-styled.js.map +1 -0
- package/dist/features/ui/swipable-carousel/swipable-carousel.js +132 -0
- package/dist/features/ui/swipable-carousel/swipable-carousel.js.map +1 -0
- package/dist/features/ui/swipeable-component/swipeable-component-styled.js.map +1 -0
- package/dist/features/ui/swipeable-component/swipeable-component.js +27 -0
- package/dist/features/ui/swipeable-component/swipeable-component.js.map +1 -0
- package/dist/features/worksheet/user-pointer-pin/hooks/use-user-location.js +20 -21
- package/dist/features/worksheet/user-pointer-pin/hooks/use-user-location.js.map +1 -1
- package/dist/features/worksheet/user-pointer-pin/user-pin.js +35 -37
- package/dist/features/worksheet/user-pointer-pin/user-pin.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js +132 -132
- package/dist/features/worksheet/worksheet/hooks/use-create-imperative-handle.js.map +1 -1
- package/dist/features/worksheet/worksheet/hooks/use-get-active-question-id.js +62 -0
- package/dist/features/worksheet/worksheet/hooks/use-get-active-question-id.js.map +1 -0
- package/dist/features/worksheet/worksheet/hooks/use-time-on-questions.js +19 -24
- package/dist/features/worksheet/worksheet/hooks/use-time-on-questions.js.map +1 -1
- package/dist/features/worksheet/worksheet/question-tips.js +47 -48
- package/dist/features/worksheet/worksheet/question-tips.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js +132 -88
- package/dist/features/worksheet/worksheet/worksheet-action-bar/worksheet-action-bar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker.js +55 -44
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-container.js +87 -0
- package/dist/features/worksheet/worksheet/worksheet-container.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +112 -109
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-navigation/worksheet-item-navigation.js +27 -25
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-navigation/worksheet-item-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js +47 -47
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-item-number/worksheet-item-number.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js +64 -66
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-section-navigation/worksheet-section-navigation.js +40 -38
- package/dist/features/worksheet/worksheet/worksheet-navigation/worksheet-section-navigation/worksheet-section-navigation.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-permissions/error.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/header/header.js +71 -73
- package/dist/features/worksheet/worksheet/worksheet-question/header/header.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +59 -61
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js +18 -21
- package/dist/features/worksheet/worksheet/worksheet-question/subjective-review.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +272 -269
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js +31 -32
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/scribble-switch.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js +149 -147
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/use-handler-callbacks.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +223 -212
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js +20 -22
- package/dist/features/worksheet/worksheet/worksheet-questions-summary/worksheet-questions-summary.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js +55 -57
- package/dist/features/worksheet/worksheet/worksheet-sidebar/question-guide.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js +42 -47
- package/dist/features/worksheet/worksheet/worksheet-sidebar/sidebar.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +34 -24
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary/worksheet-summary.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-summary/worksheet-summary.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js +7 -8
- package/dist/features/worksheet/worksheet/worksheet-summary-controller/worksheet-summary-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +441 -203
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
- package/dist/index.d.ts +276 -31
- package/dist/index.js +465 -451
- package/dist/index.js.map +1 -1
- package/dist/static/2021.0683b580.png +0 -0
- package/dist/static/2022.d34ad7a5.png +0 -0
- package/dist/static/2023.fce87149.png +0 -0
- package/dist/static/2024.a275ee85.png +0 -0
- package/dist/static/2025.677cc187.png +0 -0
- package/dist/static/2026.63763214.png +0 -0
- package/dist/static/2027.b82dc039.png +0 -0
- package/dist/static/2028.580b8cc0.png +0 -0
- package/dist/static/coding-report-icon.91a1e900.svg +1 -0
- package/dist/static/elp-icon.d45b457d.svg +1 -0
- package/dist/static/empty-reports.fe92faad.svg +1 -0
- package/dist/static/english-icon.50c2e005.svg +1 -0
- package/dist/static/full-report.00112c74.svg +1 -0
- package/dist/static/math-fit-grey.c32f37b3.svg +1 -0
- package/dist/static/no-report.4158fad3.svg +1 -0
- package/dist/static/ptm-report-icon.5089218f.svg +1 -0
- package/dist/static/sat-report-icon.4331be86.svg +1 -0
- package/dist/static/science-report-icon.a0014c40.svg +1 -0
- package/dist/static/thumps-down.a1192a62.svg +1 -0
- package/dist/static/thumps-up.caa35a98.svg +1 -0
- package/package.json +3 -4
- package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component-styled.js.map +0 -1
- package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js +0 -26
- package/dist/features/circle-games/game-launcher/comps/swipable-component/swipeable-component.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-active-question-observer.js +0 -59
- package/dist/features/worksheet/worksheet/hooks/use-active-question-observer.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js +0 -13
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-store.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker-view.js +0 -68
- package/dist/features/worksheet/worksheet/worksheet-blocker/worksheet-blocker-view.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js +0 -17
- package/dist/features/worksheet/worksheet/worksheet-calculator/worksheet-calculator.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner-styled.js +0 -20
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner.js +0 -49
- package/dist/features/worksheet/worksheet/worksheet-nudge-banner/worksheet-nudge-banner.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-provider.js +0 -21
- package/dist/features/worksheet/worksheet/worksheet-provider.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions-styled.js +0 -16
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions-styled.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions.js +0 -73
- package/dist/features/worksheet/worksheet/worksheet-questions/worksheet-questions.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-store.js +0 -301
- package/dist/features/worksheet/worksheet/worksheet-store.js.map +0 -1
- package/dist/features/worksheet/worksheet/worksheet-view.js +0 -141
- package/dist/features/worksheet/worksheet/worksheet-view.js.map +0 -1
- package/dist/node_modules/zustand/esm/middleware.js +0 -22
- package/dist/node_modules/zustand/esm/middleware.js.map +0 -1
- package/dist/node_modules/zustand/esm/react/shallow.js +0 -13
- package/dist/node_modules/zustand/esm/react/shallow.js.map +0 -1
- package/dist/node_modules/zustand/esm/vanilla/shallow.js +0 -31
- package/dist/node_modules/zustand/esm/vanilla/shallow.js.map +0 -1
- /package/dist/features/{circle-games/game-launcher/comps/swipable-component → ui/swipeable-component}/swipeable-component-styled.js +0 -0
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import S from "../../../../../assets/line-icons/icons/check2.js";
|
|
3
|
+
import f from "../../../../../assets/line-icons/icons/cross.js";
|
|
4
|
+
import _ from "../../../../../assets/line-icons/icons/dots-icon.js";
|
|
5
|
+
import D from "../../../../../assets/line-icons/icons/pause-icon.js";
|
|
6
|
+
import { ATTENDANCE_STATUS as n } from "./attendance-constants.js";
|
|
7
|
+
import { StatusSymbol as C } from "./attendance.styled.js";
|
|
8
|
+
import T from "../../../../ui/theme/clrs.js";
|
|
9
|
+
const l = T(), w = (t, e) => [e, ...(t == null ? void 0 : t.map((o) => A(o))) || []].join("/n"), b = (t) => t.is_present ? n.ATTENDED : t.is_paused ? n.PAUSED : n.MISSED, x = (t) => {
|
|
10
|
+
let e = 0, o = 0, r = 0;
|
|
11
|
+
Object.values(t).forEach((i) => {
|
|
12
|
+
i.forEach((a) => {
|
|
13
|
+
switch (b(a)) {
|
|
14
|
+
case n.ATTENDED:
|
|
15
|
+
e++;
|
|
16
|
+
break;
|
|
17
|
+
case n.PAUSED:
|
|
18
|
+
r++;
|
|
19
|
+
break;
|
|
20
|
+
default:
|
|
21
|
+
o++;
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
});
|
|
26
|
+
const s = [];
|
|
27
|
+
return e > 0 && s.push(`${e} attended`), o > 0 && s.push(`${o} missed`), r > 0 && s.push(`${r} paused`), `${s.join(", ")}.`;
|
|
28
|
+
}, y = (t) => {
|
|
29
|
+
if (t.length === 0)
|
|
30
|
+
return {
|
|
31
|
+
status: null,
|
|
32
|
+
themeColor: null,
|
|
33
|
+
statusSymbol: ""
|
|
34
|
+
};
|
|
35
|
+
const e = t.every((s) => s.is_present), o = t.every((s) => s.is_paused), r = t.every((s) => !s.is_present && !s.is_paused);
|
|
36
|
+
return e ? {
|
|
37
|
+
status: n.ATTENDED,
|
|
38
|
+
themeColor: "GREEN_1",
|
|
39
|
+
statusSymbol: /* @__PURE__ */ u(S, { color: "GREEN_6", width: 14, height: 14 }),
|
|
40
|
+
tooltipBgColor: "GREEN_2",
|
|
41
|
+
snackbarBg: l.GREEN_2
|
|
42
|
+
} : o ? {
|
|
43
|
+
status: n.PAUSED,
|
|
44
|
+
themeColor: "WHITE_4",
|
|
45
|
+
statusSymbol: /* @__PURE__ */ u(D, { color: "BLACK_T_60", width: 8, height: 8 }),
|
|
46
|
+
tooltipBgColor: "WHITE_5",
|
|
47
|
+
snackbarBg: l.WHITE_5
|
|
48
|
+
} : r ? {
|
|
49
|
+
status: n.MISSED,
|
|
50
|
+
themeColor: "ORANGE_1",
|
|
51
|
+
statusSymbol: /* @__PURE__ */ u(f, { color: "RED", width: 12, height: 12 }),
|
|
52
|
+
tooltipBgColor: "ORANGE_2",
|
|
53
|
+
snackbarBg: l.ORANGE_2
|
|
54
|
+
} : {
|
|
55
|
+
status: n.PAUSED,
|
|
56
|
+
themeColor: "WHITE_4",
|
|
57
|
+
statusSymbol: /* @__PURE__ */ u(C, { $top: "2px", $right: "2px", children: /* @__PURE__ */ u(_, { color: "GREEN_6", width: 8, height: 8 }) }),
|
|
58
|
+
tooltipBgColor: "WHITE_5",
|
|
59
|
+
snackbarBg: l.WHITE_5
|
|
60
|
+
};
|
|
61
|
+
}, P = (t, e, o) => {
|
|
62
|
+
const r = new Date(o, e - 1, 1).getDay(), s = new Date(o, e, 0).getDate(), i = [];
|
|
63
|
+
for (let a = 0; a < r; a++)
|
|
64
|
+
i.push(null);
|
|
65
|
+
for (let a = 1; a <= s; a++) {
|
|
66
|
+
const m = `${o}-${e.toString().padStart(2, "0")}-${a.toString().padStart(2, "0")}`, c = t[m] || [], { status: p, themeColor: d, statusSymbol: E, tooltipBgColor: h, snackbarBg: g } = y(c);
|
|
67
|
+
i.push({
|
|
68
|
+
date: a,
|
|
69
|
+
status: p,
|
|
70
|
+
hasClasses: c.length > 0,
|
|
71
|
+
classes: c,
|
|
72
|
+
themeColor: d,
|
|
73
|
+
statusSymbol: E,
|
|
74
|
+
tooltipBgColor: h,
|
|
75
|
+
snackbarBg: g
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
return i;
|
|
79
|
+
}, A = (t) => {
|
|
80
|
+
if (!t.status) return "";
|
|
81
|
+
const o = new Date(t.time * 1e3).getHours(), r = o >= 12 ? "PM" : "AM";
|
|
82
|
+
return `${`${o % 12 || 12} ${r}`}: ${t.status}`;
|
|
83
|
+
};
|
|
84
|
+
export {
|
|
85
|
+
x as attendanceStatsText,
|
|
86
|
+
P as generateCalendarGrid,
|
|
87
|
+
b as getClassStatus,
|
|
88
|
+
y as getDayStatusInfo,
|
|
89
|
+
w as getSnackbarMsg,
|
|
90
|
+
A as getStatusText
|
|
91
|
+
};
|
|
92
|
+
//# sourceMappingURL=attendance-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance-utils.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/attendance/attendance-utils.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport CrossIcon from '../../../../../assets/line-icons/icons/cross';\nimport DotIcon from '../../../../../assets/line-icons/icons/dots-icon';\nimport PauseIcon from '../../../../../assets/line-icons/icons/pause-icon';\nimport type { TColorNames } from '../../../../ui/types';\nimport type { IClassEvent, TCalendarData } from '../../monthly-report-types';\nimport { ATTENDANCE_STATUS } from './attendance-constants';\nimport type { ICalendarDay, TAttendanceStatus } from './attendance-types';\nimport * as Styled from './attendance.styled';\nimport getColors from '../../../../ui/theme/clrs';\n\nconst colors = getColors();\n\nexport const getSnackbarMsg = (classes: IClassEvent[] | undefined, date: string) => {\n return [date, ...(classes?.map(item => getStatusText(item)) || [])].join('/n');\n};\n\nexport const getClassStatus = (classEvent: IClassEvent): TAttendanceStatus => {\n if (classEvent.is_present) {\n return ATTENDANCE_STATUS.ATTENDED;\n }\n\n if (classEvent.is_paused) {\n return ATTENDANCE_STATUS.PAUSED;\n }\n\n return ATTENDANCE_STATUS.MISSED;\n};\n\nexport const attendanceStatsText = (calendarData: TCalendarData) => {\n let attended = 0;\n let missed = 0;\n let paused = 0;\n\n Object.values(calendarData).forEach(dayClasses => {\n dayClasses.forEach(classEvent => {\n const status = getClassStatus(classEvent);\n\n switch (status) {\n case ATTENDANCE_STATUS.ATTENDED:\n attended++;\n break;\n case ATTENDANCE_STATUS.PAUSED:\n paused++;\n break;\n default:\n missed++;\n break;\n }\n });\n });\n\n const parts: string[] = [];\n\n if (attended > 0) parts.push(`${attended} attended`);\n\n if (missed > 0) parts.push(`${missed} missed`);\n\n if (paused > 0) parts.push(`${paused} paused`);\n\n return `${parts.join(', ')}.`;\n};\n\nexport const getDayStatusInfo = (dayClasses: IClassEvent[]) => {\n if (dayClasses.length === 0) {\n return {\n status: null,\n themeColor: null,\n statusSymbol: '',\n };\n }\n\n const attendedClass = dayClasses.every(cls => cls.is_present);\n const pausedClass = dayClasses.every(cls => cls.is_paused);\n const missedClass = dayClasses.every(cls => !cls.is_present && !cls.is_paused);\n\n if (attendedClass) {\n return {\n status: ATTENDANCE_STATUS.ATTENDED,\n themeColor: 'GREEN_1',\n statusSymbol: <Check2Icon color=\"GREEN_6\" width={14} height={14} />,\n tooltipBgColor: 'GREEN_2',\n snackbarBg: colors.GREEN_2,\n };\n }\n\n if (pausedClass) {\n return {\n status: ATTENDANCE_STATUS.PAUSED,\n themeColor: 'WHITE_4',\n statusSymbol: <PauseIcon color=\"BLACK_T_60\" width={8} height={8} />,\n tooltipBgColor: 'WHITE_5',\n snackbarBg: colors.WHITE_5,\n };\n }\n\n if (missedClass) {\n return {\n status: ATTENDANCE_STATUS.MISSED,\n themeColor: 'ORANGE_1',\n statusSymbol: <CrossIcon color=\"RED\" width={12} height={12} />,\n tooltipBgColor: 'ORANGE_2',\n snackbarBg: colors.ORANGE_2,\n };\n }\n\n return {\n status: ATTENDANCE_STATUS.PAUSED,\n themeColor: 'WHITE_4',\n statusSymbol: (\n <Styled.StatusSymbol $top=\"2px\" $right=\"2px\">\n <DotIcon color=\"GREEN_6\" width={8} height={8} />\n </Styled.StatusSymbol>\n ),\n tooltipBgColor: 'WHITE_5',\n snackbarBg: colors.WHITE_5,\n };\n};\n\nexport const generateCalendarGrid = (\n calendarData: TCalendarData,\n reportMonth: number,\n reportYear: number,\n): (ICalendarDay | null)[] => {\n const firstDay = new Date(reportYear, reportMonth - 1, 1).getDay();\n const daysInMonth = new Date(reportYear, reportMonth, 0).getDate();\n const grid: (ICalendarDay | null)[] = [];\n\n // Add empty cells for days before the first day of the month\n for (let i = 0; i < firstDay; i++) {\n grid.push(null);\n }\n\n // Add all days of the month\n for (let day = 1; day <= daysInMonth; day++) {\n const dateString = `${reportYear}-${reportMonth.toString().padStart(2, '0')}-${day\n .toString()\n .padStart(2, '0')}`;\n const dayClasses = calendarData[dateString] || [];\n const { status, themeColor, statusSymbol, tooltipBgColor, snackbarBg } =\n getDayStatusInfo(dayClasses);\n\n grid.push({\n date: day,\n status,\n hasClasses: dayClasses.length > 0,\n classes: dayClasses,\n themeColor: themeColor as TColorNames | null,\n statusSymbol: statusSymbol as JSX.Element,\n tooltipBgColor: tooltipBgColor as TColorNames | null,\n snackbarBg,\n });\n }\n\n return grid;\n};\n\nexport const getStatusText = (classEvent: IClassEvent) => {\n if (!classEvent.status) return '';\n\n const date = new Date(classEvent.time * 1000);\n const hours = date.getHours();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n const displayHours = hours % 12 || 12;\n\n const timeStr = `${displayHours} ${ampm}`;\n\n return `${timeStr}: ${classEvent.status}`;\n};\n"],"names":["colors","getColors","getSnackbarMsg","classes","date","item","getStatusText","getClassStatus","classEvent","ATTENDANCE_STATUS","attendanceStatsText","calendarData","attended","missed","paused","dayClasses","parts","getDayStatusInfo","attendedClass","cls","pausedClass","missedClass","Check2Icon","PauseIcon","CrossIcon","jsx","Styled.StatusSymbol","DotIcon","generateCalendarGrid","reportMonth","reportYear","firstDay","daysInMonth","grid","i","day","dateString","status","themeColor","statusSymbol","tooltipBgColor","snackbarBg","hours","ampm"],"mappings":";;;;;;;;AAaA,MAAMA,IAASC,EAAU,GAEZC,IAAiB,CAACC,GAAoCC,MAC1D,CAACA,GAAM,IAAID,KAAA,gBAAAA,EAAS,IAAI,CAAQE,MAAAC,EAAcD,CAAI,OAAM,CAAA,CAAG,EAAE,KAAK,IAAI,GAGlEE,IAAiB,CAACC,MACzBA,EAAW,aACNC,EAAkB,WAGvBD,EAAW,YACNC,EAAkB,SAGpBA,EAAkB,QAGdC,IAAsB,CAACC,MAAgC;AAClE,MAAIC,IAAW,GACXC,IAAS,GACTC,IAAS;AAEb,SAAO,OAAOH,CAAY,EAAE,QAAQ,CAAcI,MAAA;AAChD,IAAAA,EAAW,QAAQ,CAAcP,MAAA;AAG/B,cAFeD,EAAeC,CAAU,GAExB;AAAA,QACd,KAAKC,EAAkB;AACrB,UAAAG;AACA;AAAA,QACF,KAAKH,EAAkB;AACrB,UAAAK;AACA;AAAA,QACF;AACE,UAAAD;AACA;AAAA,MACJ;AAAA,IAAA,CACD;AAAA,EAAA,CACF;AAED,QAAMG,IAAkB,CAAA;AAExB,SAAIJ,IAAW,KAAGI,EAAM,KAAK,GAAGJ,CAAQ,WAAW,GAE/CC,IAAS,KAAGG,EAAM,KAAK,GAAGH,CAAM,SAAS,GAEzCC,IAAS,KAAGE,EAAM,KAAK,GAAGF,CAAM,SAAS,GAEtC,GAAGE,EAAM,KAAK,IAAI,CAAC;AAC5B,GAEaC,IAAmB,CAACF,MAA8B;AACzD,MAAAA,EAAW,WAAW;AACjB,WAAA;AAAA,MACL,QAAQ;AAAA,MACR,YAAY;AAAA,MACZ,cAAc;AAAA,IAAA;AAIlB,QAAMG,IAAgBH,EAAW,MAAM,CAAAI,MAAOA,EAAI,UAAU,GACtDC,IAAcL,EAAW,MAAM,CAAAI,MAAOA,EAAI,SAAS,GACnDE,IAAcN,EAAW,MAAM,CAAAI,MAAO,CAACA,EAAI,cAAc,CAACA,EAAI,SAAS;AAE7E,SAAID,IACK;AAAA,IACL,QAAQT,EAAkB;AAAA,IAC1B,YAAY;AAAA,IACZ,gCAAea,GAAW,EAAA,OAAM,WAAU,OAAO,IAAI,QAAQ,IAAI;AAAA,IACjE,gBAAgB;AAAA,IAChB,YAAYtB,EAAO;AAAA,EAAA,IAInBoB,IACK;AAAA,IACL,QAAQX,EAAkB;AAAA,IAC1B,YAAY;AAAA,IACZ,gCAAec,GAAU,EAAA,OAAM,cAAa,OAAO,GAAG,QAAQ,GAAG;AAAA,IACjE,gBAAgB;AAAA,IAChB,YAAYvB,EAAO;AAAA,EAAA,IAInBqB,IACK;AAAA,IACL,QAAQZ,EAAkB;AAAA,IAC1B,YAAY;AAAA,IACZ,gCAAee,GAAU,EAAA,OAAM,OAAM,OAAO,IAAI,QAAQ,IAAI;AAAA,IAC5D,gBAAgB;AAAA,IAChB,YAAYxB,EAAO;AAAA,EAAA,IAIhB;AAAA,IACL,QAAQS,EAAkB;AAAA,IAC1B,YAAY;AAAA,IACZ,cACG,gBAAAgB,EAAAC,GAAA,EAAoB,MAAK,OAAM,QAAO,OACrC,UAAA,gBAAAD,EAACE,KAAQ,OAAM,WAAU,OAAO,GAAG,QAAQ,EAAG,CAAA,GAChD;AAAA,IAEF,gBAAgB;AAAA,IAChB,YAAY3B,EAAO;AAAA,EAAA;AAEvB,GAEa4B,IAAuB,CAClCjB,GACAkB,GACAC,MAC4B;AACtB,QAAAC,IAAW,IAAI,KAAKD,GAAYD,IAAc,GAAG,CAAC,EAAE,UACpDG,IAAc,IAAI,KAAKF,GAAYD,GAAa,CAAC,EAAE,WACnDI,IAAgC,CAAA;AAGtC,WAASC,IAAI,GAAGA,IAAIH,GAAUG;AAC5B,IAAAD,EAAK,KAAK,IAAI;AAIhB,WAASE,IAAM,GAAGA,KAAOH,GAAaG,KAAO;AAC3C,UAAMC,IAAa,GAAGN,CAAU,IAAID,EAAY,SAAA,EAAW,SAAS,GAAG,GAAG,CAAC,IAAIM,EAC5E,WACA,SAAS,GAAG,GAAG,CAAC,IACbpB,IAAaJ,EAAayB,CAAU,KAAK,CAAA,GACzC,EAAE,QAAAC,GAAQ,YAAAC,GAAY,cAAAC,GAAc,gBAAAC,GAAgB,YAAAC,EAAW,IACnExB,EAAiBF,CAAU;AAE7B,IAAAkB,EAAK,KAAK;AAAA,MACR,MAAME;AAAA,MACN,QAAAE;AAAA,MACA,YAAYtB,EAAW,SAAS;AAAA,MAChC,SAASA;AAAA,MACT,YAAAuB;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,YAAAC;AAAA,IAAA,CACD;AAAA,EACH;AAEO,SAAAR;AACT,GAEa3B,IAAgB,CAACE,MAA4B;AACpD,MAAA,CAACA,EAAW,OAAe,QAAA;AAGzB,QAAAkC,IADO,IAAI,KAAKlC,EAAW,OAAO,GAAI,EACzB,YACbmC,IAAOD,KAAS,KAAK,OAAO;AAKlC,SAAO,GAFS,GAFKA,IAAQ,MAAM,EAEJ,IAAIC,CAAI,EAEtB,KAAKnC,EAAW,MAAM;AACzC;"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { jsxs as d, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as $, useMemo as n } from "react";
|
|
3
|
+
import l from "../../../../ui/layout/flex-view.js";
|
|
4
|
+
import h from "../../../../ui/separator/separator.js";
|
|
5
|
+
import m from "../../../../ui/text/text.js";
|
|
6
|
+
import { CALENDAR_CONFIG as u } from "./attendance-constants.js";
|
|
7
|
+
import { attendanceStatsText as C, generateCalendarGrid as b } from "./attendance-utils.js";
|
|
8
|
+
import { CalendarHeader as _, CalendarBody as x } from "./attendance.styled.js";
|
|
9
|
+
import g from "./attendence-view.js";
|
|
10
|
+
const T = ({
|
|
11
|
+
calendarData: e,
|
|
12
|
+
reportMonth: t,
|
|
13
|
+
reportYear: i,
|
|
14
|
+
onDateClick: c
|
|
15
|
+
}) => {
|
|
16
|
+
const A = n(
|
|
17
|
+
() => !!e && C(e),
|
|
18
|
+
[e]
|
|
19
|
+
), s = n(
|
|
20
|
+
() => !!e && b(e, t, i),
|
|
21
|
+
[e, t, i]
|
|
22
|
+
), f = n(() => e ? Object.values(e).some((r) => r.length > 0) : !1, [e]);
|
|
23
|
+
return !e || Object.keys(e).length === 0 || !f || !s ? null : /* @__PURE__ */ d(l, { children: [
|
|
24
|
+
/* @__PURE__ */ o(m, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Attendance" }),
|
|
25
|
+
/* @__PURE__ */ o(m, { $renderAs: "ub2-bold", $color: "BLACK_T_60", children: A }),
|
|
26
|
+
/* @__PURE__ */ o(h, { heightX: 1 }),
|
|
27
|
+
/* @__PURE__ */ d(l, { $borderColor: "WHITE_5", children: [
|
|
28
|
+
/* @__PURE__ */ o(_, { children: u.DAY_HEADERS.map((r) => /* @__PURE__ */ o(m, { $align: "center", $renderAs: "ub3", $color: "BLACK_T_60", children: r }, r)) }),
|
|
29
|
+
/* @__PURE__ */ o(x, { children: s.map((r, p) => /* @__PURE__ */ o(
|
|
30
|
+
g,
|
|
31
|
+
{
|
|
32
|
+
day: r,
|
|
33
|
+
reportMonth: t,
|
|
34
|
+
onDateClick: c
|
|
35
|
+
},
|
|
36
|
+
r ? `day-${r.date}` : `empty-${p}`
|
|
37
|
+
)) })
|
|
38
|
+
] })
|
|
39
|
+
] });
|
|
40
|
+
}, w = $(T);
|
|
41
|
+
export {
|
|
42
|
+
w as default
|
|
43
|
+
};
|
|
44
|
+
//# sourceMappingURL=attendance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/attendance/attendance.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { CALENDAR_CONFIG } from './attendance-constants';\nimport type { IAttendanceProps } from './attendance-types';\nimport { attendanceStatsText, generateCalendarGrid } from './attendance-utils';\nimport * as Styled from './attendance.styled';\nimport AttendenceView from './attendence-view';\n\nconst Attendance: FC<IAttendanceProps> = ({\n calendarData,\n reportMonth,\n reportYear,\n onDateClick,\n}) => {\n const attendanceStats = useMemo(\n () => !!calendarData && attendanceStatsText(calendarData),\n [calendarData],\n );\n const calendarGrid = useMemo(\n () => !!calendarData && generateCalendarGrid(calendarData, reportMonth, reportYear),\n [calendarData, reportMonth, reportYear],\n );\n\n const hasClasses = useMemo(() => {\n if (!calendarData) return false;\n\n return Object.values(calendarData).some(dayClasses => dayClasses.length > 0);\n }, [calendarData]);\n\n if (!calendarData || Object.keys(calendarData).length === 0 || !hasClasses || !calendarGrid) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Attendance\n </Text>\n <Text $renderAs=\"ub2-bold\" $color=\"BLACK_T_60\">\n {attendanceStats}\n </Text>\n <Separator heightX={1} />\n <FlexView $borderColor=\"WHITE_5\">\n <Styled.CalendarHeader>\n {CALENDAR_CONFIG.DAY_HEADERS.map(dayLetter => (\n <Text $align=\"center\" $renderAs=\"ub3\" $color=\"BLACK_T_60\" key={dayLetter}>\n {dayLetter}\n </Text>\n ))}\n </Styled.CalendarHeader>\n <Styled.CalendarBody>\n {calendarGrid.map((day, index) => (\n <AttendenceView\n day={day}\n key={day ? `day-${day.date}` : `empty-${index}`}\n reportMonth={reportMonth}\n onDateClick={onDateClick}\n />\n ))}\n </Styled.CalendarBody>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(Attendance);\n"],"names":["Attendance","calendarData","reportMonth","reportYear","onDateClick","attendanceStats","useMemo","attendanceStatsText","calendarGrid","generateCalendarGrid","hasClasses","dayClasses","FlexView","jsx","Text","Separator","jsxs","Styled.CalendarHeader","dayLetter","Styled.CalendarBody","day","index","AttendenceView","Attendance$1","memo"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAmC,CAAC;AAAA,EACxC,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AACF,MAAM;AACJ,QAAMC,IAAkBC;AAAA,IACtB,MAAM,CAAC,CAACL,KAAgBM,EAAoBN,CAAY;AAAA,IACxD,CAACA,CAAY;AAAA,EAAA,GAETO,IAAeF;AAAA,IACnB,MAAM,CAAC,CAACL,KAAgBQ,EAAqBR,GAAcC,GAAaC,CAAU;AAAA,IAClF,CAACF,GAAcC,GAAaC,CAAU;AAAA,EAAA,GAGlCO,IAAaJ,EAAQ,MACpBL,IAEE,OAAO,OAAOA,CAAY,EAAE,KAAK,CAAcU,MAAAA,EAAW,SAAS,CAAC,IAFjD,IAGzB,CAACV,CAAY,CAAC;AAEb,SAAA,CAACA,KAAgB,OAAO,KAAKA,CAAY,EAAE,WAAW,KAAK,CAACS,KAAc,CAACF,IACtE,yBAINI,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,cAAA;AAAA,sBACCA,GAAK,EAAA,WAAU,YAAW,QAAO,cAC/B,UACHT,GAAA;AAAA,IACA,gBAAAQ,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,IACvB,gBAAAC,EAACJ,GAAS,EAAA,cAAa,WACrB,UAAA;AAAA,MAAA,gBAAAC,EAACI,GAAA,EACE,YAAgB,YAAY,IAAI,OAC9B,gBAAAJ,EAAAC,GAAA,EAAK,QAAO,UAAS,WAAU,OAAM,QAAO,cAC1C,UAD4DI,EAAA,GAAAA,CAE/D,CACD,GACH;AAAA,MACA,gBAAAL,EAACM,GAAA,EACE,YAAa,IAAI,CAACC,GAAKC,MACtB,gBAAAR;AAAA,QAACS;AAAA,QAAA;AAAA,UACC,KAAAF;AAAA,UAEA,aAAAlB;AAAA,UACA,aAAAE;AAAA,QAAA;AAAA,QAFKgB,IAAM,OAAOA,EAAI,IAAI,KAAK,SAASC,CAAK;AAAA,MAIhD,CAAA,GACH;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeE,IAAAC,EAAKxB,CAAU;"}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import r from "styled-components";
|
|
2
|
+
import t from "../../../../ui/layout/flex-view.js";
|
|
3
|
+
const e = r.div`
|
|
4
|
+
display: grid;
|
|
5
|
+
grid-template-columns: repeat(7, 1fr);
|
|
6
|
+
padding: 4px 0;
|
|
7
|
+
background-color: ${({ theme: o }) => o.colors.WHITE_2};
|
|
8
|
+
border-bottom: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
|
|
9
|
+
`, l = r.div`
|
|
10
|
+
display: grid;
|
|
11
|
+
grid-template-columns: repeat(7, 1fr);
|
|
12
|
+
gap: 0;
|
|
13
|
+
`, p = r(t)`
|
|
14
|
+
position: relative;
|
|
15
|
+
aspect-ratio: 3/2;
|
|
16
|
+
border-right: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
|
|
17
|
+
border-bottom: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
|
|
18
|
+
|
|
19
|
+
&:nth-child(7n) {
|
|
20
|
+
border-right: none;
|
|
21
|
+
}
|
|
22
|
+
`, a = r.div`
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: ${({ $top: o }) => o || "2px"};
|
|
25
|
+
right: ${({ $right: o }) => o || "2px"};
|
|
26
|
+
`, s = r.div`
|
|
27
|
+
> div {
|
|
28
|
+
width: 100%;
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
`;
|
|
32
|
+
export {
|
|
33
|
+
l as CalendarBody,
|
|
34
|
+
p as CalendarDay,
|
|
35
|
+
e as CalendarHeader,
|
|
36
|
+
a as StatusSymbol,
|
|
37
|
+
s as TooltipWrapper
|
|
38
|
+
};
|
|
39
|
+
//# sourceMappingURL=attendance.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendance.styled.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/attendance/attendance.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const CalendarHeader = styled.div`\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n padding: 4px 0;\n background-color: ${({ theme }) => theme.colors.WHITE_2};\n border-bottom: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n`;\n\nexport const CalendarBody = styled.div`\n display: grid;\n grid-template-columns: repeat(7, 1fr);\n gap: 0;\n`;\n\nexport const CalendarDay = styled(FlexView)`\n position: relative;\n aspect-ratio: 3/2;\n border-right: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n border-bottom: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n\n &:nth-child(7n) {\n border-right: none;\n }\n`;\n\nexport const StatusSymbol = styled.div<{ $top?: string; $right?: string }>`\n position: absolute;\n top: ${({ $top }) => $top || '2px'};\n right: ${({ $right }) => $right || '2px'};\n`;\n\nexport const TooltipWrapper = styled.div`\n > div {\n width: 100%;\n height: 100%;\n }\n`;\n"],"names":["CalendarHeader","styled","theme","CalendarBody","CalendarDay","FlexView","StatusSymbol","$top","$right","TooltipWrapper"],"mappings":";;AAIO,MAAMA,IAAiBC,EAAO;AAAA;AAAA;AAAA;AAAA,sBAIf,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,6BAC5B,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,GAGnDC,IAAeF,EAAO;AAAA;AAAA;AAAA;AAAA,GAMtBG,IAAcH,EAAOI,CAAQ;AAAA;AAAA;AAAA,4BAGd,CAAC,EAAE,OAAAH,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA,6BAClC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA,GAOnDI,IAAeL,EAAO;AAAA;AAAA,SAE1B,CAAC,EAAE,MAAAM,QAAWA,KAAQ,KAAK;AAAA,WACzB,CAAC,EAAE,QAAAC,QAAaA,KAAU,KAAK;AAAA,GAG7BC,IAAiBR,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsx as r, jsxs as s, Fragment as c } from "react/jsx-runtime";
|
|
2
|
+
import { memo as p, useCallback as g } from "react";
|
|
3
|
+
import { IS_APP_RUNNING_IN_RN as b } from "../../../../../constants/app-config.js";
|
|
4
|
+
import f from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
|
5
|
+
import $ from "../../../../ui/layout/flex-view.js";
|
|
6
|
+
import n from "../../../../ui/text/text.js";
|
|
7
|
+
import { MONTH_NAMES as l } from "./attendance-constants.js";
|
|
8
|
+
import { getSnackbarMsg as h, getStatusText as u } from "./attendance-utils.js";
|
|
9
|
+
import { TooltipWrapper as A, CalendarDay as _, StatusSymbol as T } from "./attendance.styled.js";
|
|
10
|
+
function I({ day: e, reportMonth: t, onDateClick: o }) {
|
|
11
|
+
const m = g(() => {
|
|
12
|
+
o == null || o({
|
|
13
|
+
type: "info",
|
|
14
|
+
message: h((e == null ? void 0 : e.classes) || [], `${l[t]} ${(e == null ? void 0 : e.date) ?? ""}`) ?? "",
|
|
15
|
+
bgColor: (e == null ? void 0 : e.snackbarBg) || "WHITE_5"
|
|
16
|
+
});
|
|
17
|
+
}, [e == null ? void 0 : e.classes, e == null ? void 0 : e.date, e == null ? void 0 : e.snackbarBg, o, t]);
|
|
18
|
+
return /* @__PURE__ */ r(A, { onClick: m, children: /* @__PURE__ */ r(
|
|
19
|
+
f,
|
|
20
|
+
{
|
|
21
|
+
renderAs: "primary",
|
|
22
|
+
position: "top",
|
|
23
|
+
hidden: b || !(e != null && e.hasClasses),
|
|
24
|
+
backgroundColor: (e == null ? void 0 : e.tooltipBgColor) || "WHITE_5",
|
|
25
|
+
tooltipItem: e != null && e.classes ? /* @__PURE__ */ s($, { children: [
|
|
26
|
+
/* @__PURE__ */ s(n, { $align: "center", $renderAs: "ab3", $color: "BLACK_1", children: [
|
|
27
|
+
l[t - 1],
|
|
28
|
+
" ",
|
|
29
|
+
e.date
|
|
30
|
+
] }),
|
|
31
|
+
e.classes.map((i) => /* @__PURE__ */ r(n, { $align: "center", $renderAs: "ab3", children: u(i) }, i.time))
|
|
32
|
+
] }) : "",
|
|
33
|
+
children: /* @__PURE__ */ r(
|
|
34
|
+
_,
|
|
35
|
+
{
|
|
36
|
+
$background: (e == null ? void 0 : e.themeColor) || "WHITE_1",
|
|
37
|
+
$justifyContent: "center",
|
|
38
|
+
$alignItems: "center",
|
|
39
|
+
children: e && /* @__PURE__ */ s(c, { children: [
|
|
40
|
+
/* @__PURE__ */ r(n, { $renderAs: "ab2", $color: "BLACK_T_38", children: e.date }),
|
|
41
|
+
/* @__PURE__ */ r(T, { children: !!e.statusSymbol && e.statusSymbol })
|
|
42
|
+
] })
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
}
|
|
46
|
+
) });
|
|
47
|
+
}
|
|
48
|
+
const k = p(I);
|
|
49
|
+
export {
|
|
50
|
+
k as default
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=attendence-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"attendence-view.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/attendance/attendence-view.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../constants/app-config';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport { MONTH_NAMES } from './attendance-constants';\nimport { getSnackbarMsg, getStatusText } from './attendance-utils';\nimport * as Styled from './attendance.styled';\nimport type { ICalenderViewProps } from './attendance-types';\n\nfunction AttendanceView({ day, reportMonth, onDateClick }: ICalenderViewProps) {\n const handleClick = useCallback(() => {\n onDateClick?.({\n type: 'info',\n message:\n getSnackbarMsg(day?.classes || [], `${MONTH_NAMES[reportMonth]} ${day?.date ?? ''}`) ?? '',\n bgColor: day?.snackbarBg || 'WHITE_5',\n });\n }, [day?.classes, day?.date, day?.snackbarBg, onDateClick, reportMonth]);\n\n return (\n <Styled.TooltipWrapper onClick={handleClick}>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"top\"\n hidden={IS_APP_RUNNING_IN_RN || !day?.hasClasses}\n backgroundColor={day?.tooltipBgColor || 'WHITE_5'}\n tooltipItem={\n day?.classes ? (\n <FlexView>\n <Text $align=\"center\" $renderAs=\"ab3\" $color=\"BLACK_1\">\n {MONTH_NAMES[reportMonth - 1]} {day.date}\n </Text>\n {day.classes.map(classEvent => (\n <Text $align=\"center\" $renderAs=\"ab3\" key={classEvent.time}>\n {getStatusText(classEvent)}\n </Text>\n ))}\n </FlexView>\n ) : (\n ''\n )\n }\n >\n <Styled.CalendarDay\n $background={day?.themeColor || 'WHITE_1'}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n {day && (\n <>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_38\">\n {day.date}\n </Text>\n <Styled.StatusSymbol>{!!day.statusSymbol && day.statusSymbol}</Styled.StatusSymbol>\n </>\n )}\n </Styled.CalendarDay>\n </ArrowTooltip>\n </Styled.TooltipWrapper>\n );\n}\n\nexport default memo(AttendanceView);\n"],"names":["AttendanceView","day","reportMonth","onDateClick","handleClick","useCallback","getSnackbarMsg","MONTH_NAMES","jsx","Styled.TooltipWrapper","ArrowTooltip","IS_APP_RUNNING_IN_RN","jsxs","FlexView","Text","classEvent","getStatusText","Styled.CalendarDay","Fragment","Styled.StatusSymbol","AttendenceView","memo"],"mappings":";;;;;;;;;AAWA,SAASA,EAAe,EAAE,KAAAC,GAAK,aAAAC,GAAa,aAAAC,KAAmC;AACvE,QAAAC,IAAcC,EAAY,MAAM;AACtB,IAAAF,KAAA,QAAAA,EAAA;AAAA,MACZ,MAAM;AAAA,MACN,SACEG,GAAeL,KAAA,gBAAAA,EAAK,YAAW,CAAI,GAAA,GAAGM,EAAYL,CAAW,CAAC,KAAID,KAAA,gBAAAA,EAAK,SAAQ,EAAE,EAAE,KAAK;AAAA,MAC1F,UAASA,KAAA,gBAAAA,EAAK,eAAc;AAAA,IAAA;AAAA,EAC7B,GACA,CAACA,KAAA,gBAAAA,EAAK,SAASA,KAAA,gBAAAA,EAAK,MAAMA,KAAA,gBAAAA,EAAK,YAAYE,GAAaD,CAAW,CAAC;AAEvE,SACG,gBAAAM,EAAAC,GAAA,EAAsB,SAASL,GAC9B,UAAA,gBAAAI;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAS;AAAA,MACT,UAAS;AAAA,MACT,QAAQC,KAAwB,EAACV,KAAA,QAAAA,EAAK;AAAA,MACtC,kBAAiBA,KAAA,gBAAAA,EAAK,mBAAkB;AAAA,MACxC,aACEA,KAAA,QAAAA,EAAK,UACH,gBAAAW,EAACC,GACC,EAAA,UAAA;AAAA,QAAA,gBAAAD,EAACE,KAAK,QAAO,UAAS,WAAU,OAAM,QAAO,WAC1C,UAAA;AAAA,UAAAP,EAAYL,IAAc,CAAC;AAAA,UAAE;AAAA,UAAED,EAAI;AAAA,QAAA,GACtC;AAAA,QACCA,EAAI,QAAQ,IAAI,CAAAc,wBACdD,GAAK,EAAA,QAAO,UAAS,WAAU,OAC7B,UAAcE,EAAAD,CAAU,KADgBA,EAAW,IAEtD,CACD;AAAA,MAAA,EAAA,CACH,IAEA;AAAA,MAIJ,UAAA,gBAAAP;AAAA,QAACS;AAAAA,QAAA;AAAA,UACC,cAAahB,KAAA,gBAAAA,EAAK,eAAc;AAAA,UAChC,iBAAgB;AAAA,UAChB,aAAY;AAAA,UAEX,eAEG,gBAAAW,EAAAM,GAAA,EAAA,UAAA;AAAA,YAAA,gBAAAV,EAACM,KAAK,WAAU,OAAM,QAAO,cAC1B,YAAI,MACP;AAAA,YACA,gBAAAN,EAACW,GAAA,EAAqB,WAAC,CAAClB,EAAI,gBAAgBA,EAAI,cAAa;AAAA,UAAA,GAC/D;AAAA,QAAA;AAAA,MAEJ;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ;AAEA,MAAemB,IAAAC,EAAKrB,CAAc;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback-styled.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/feedback/feedback-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const FeedbackContainer = styled(FlexView)`\n margin: 0 -16px;\n`;\n"],"names":["FeedbackContainer","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAoBC,EAAOC,CAAQ;AAAA;AAAA;"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsxs as h, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as X, useCallback as i } from "react";
|
|
3
|
+
import n from "../../../../ui/layout/flex-view.js";
|
|
4
|
+
import { ILLUSTRATIONS as p } from "../../../../../assets/illustrations/illustrations.js";
|
|
5
|
+
import g from "../../../../ui/image/image.js";
|
|
6
|
+
import { invalidateMonthlyReport as w, useMonthlyReportPatch as y } from "../../api/use-monthly-report-get.js";
|
|
7
|
+
import $ from "../../../../ui/separator/separator.js";
|
|
8
|
+
import P from "../../../../ui/text/text.js";
|
|
9
|
+
import f from "../../../../ui/buttons/clickable/clickable.js";
|
|
10
|
+
import { FeedbackContainer as x } from "./feedback-styled.js";
|
|
11
|
+
const R = ({
|
|
12
|
+
reportId: l,
|
|
13
|
+
studentName: b,
|
|
14
|
+
onFeedback: c,
|
|
15
|
+
studentCourseId: s,
|
|
16
|
+
showSnackbar: a
|
|
17
|
+
}) => {
|
|
18
|
+
const u = i(
|
|
19
|
+
(r, o) => {
|
|
20
|
+
r && a && a({
|
|
21
|
+
type: "error",
|
|
22
|
+
message: "Something went wrong. Please try again.",
|
|
23
|
+
bgColor: "red"
|
|
24
|
+
}), !r && c && (o != null && o.feedback) && (w(l), c(o.feedback, s));
|
|
25
|
+
},
|
|
26
|
+
[c, s]
|
|
27
|
+
), { patch: m, isProcessing: d } = y({
|
|
28
|
+
onComplete: u
|
|
29
|
+
}), t = i(
|
|
30
|
+
(r) => {
|
|
31
|
+
m(l, { feedback: r });
|
|
32
|
+
},
|
|
33
|
+
[l, m]
|
|
34
|
+
), C = i(() => {
|
|
35
|
+
t("positive");
|
|
36
|
+
}, [t]), k = i(() => {
|
|
37
|
+
t("negative");
|
|
38
|
+
}, [t]);
|
|
39
|
+
return /* @__PURE__ */ h(x, { $gapX: 1.25, $background: "WHITE_3", children: [
|
|
40
|
+
/* @__PURE__ */ e(n, { $gutterX: 1, children: /* @__PURE__ */ h(P, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
|
|
41
|
+
"Are you happy with ",
|
|
42
|
+
b ?? "her",
|
|
43
|
+
" progress?"
|
|
44
|
+
] }) }),
|
|
45
|
+
/* @__PURE__ */ e($, { heightX: 1.5 }),
|
|
46
|
+
/* @__PURE__ */ h(n, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
|
|
47
|
+
/* @__PURE__ */ e(
|
|
48
|
+
f,
|
|
49
|
+
{
|
|
50
|
+
label: "Report thumps up",
|
|
51
|
+
disabled: d,
|
|
52
|
+
onClick: C,
|
|
53
|
+
children: /* @__PURE__ */ e(
|
|
54
|
+
n,
|
|
55
|
+
{
|
|
56
|
+
$widthX: 5,
|
|
57
|
+
$heightX: 5,
|
|
58
|
+
$alignItems: "center",
|
|
59
|
+
$justifyContent: "center",
|
|
60
|
+
$borderRadiusX: 2.5,
|
|
61
|
+
$borderColor: "BLACK_5",
|
|
62
|
+
children: /* @__PURE__ */ e(g, { src: p.THUMPS_UP, alt: "UP", width: 32, height: 32 })
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ e(
|
|
68
|
+
f,
|
|
69
|
+
{
|
|
70
|
+
label: "Report thumps down",
|
|
71
|
+
disabled: d,
|
|
72
|
+
onClick: k,
|
|
73
|
+
children: /* @__PURE__ */ e(
|
|
74
|
+
n,
|
|
75
|
+
{
|
|
76
|
+
$widthX: 5,
|
|
77
|
+
$heightX: 5,
|
|
78
|
+
$alignItems: "center",
|
|
79
|
+
$justifyContent: "center",
|
|
80
|
+
$borderColor: "BLACK_5",
|
|
81
|
+
$borderRadiusX: 2.5,
|
|
82
|
+
children: /* @__PURE__ */ e(g, { src: p.THUMPS_DOWN, alt: "DOWN", width: 32, height: 32 })
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
/* @__PURE__ */ e($, { heightX: 1.5 })
|
|
89
|
+
] });
|
|
90
|
+
}, I = X(R);
|
|
91
|
+
export {
|
|
92
|
+
I as default
|
|
93
|
+
};
|
|
94
|
+
//# sourceMappingURL=feedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"feedback.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../ui/image/image';\nimport { invalidateMonthlyReport, useMonthlyReportPatch } from '../../api/use-monthly-report-get';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport * as Styled from './feedback-styled';\n\nconst Feedback = ({\n reportId,\n studentName,\n onFeedback,\n studentCourseId,\n showSnackbar,\n}: IFeedbackTypesProps) => {\n const onComplete = useCallback(\n (err: string | null, data?: IMonthlyReportResponse) => {\n if (err && showSnackbar) {\n showSnackbar({\n type: 'error',\n message: 'Something went wrong. Please try again.',\n bgColor: 'red',\n });\n }\n\n if (!err && onFeedback && data?.feedback) {\n invalidateMonthlyReport(reportId);\n onFeedback(data.feedback, studentCourseId);\n }\n },\n [onFeedback, studentCourseId],\n );\n\n const { patch: updateMilestone, isProcessing } = useMonthlyReportPatch({\n onComplete,\n });\n\n const handleFeedback = useCallback(\n (feedback: TFeedback) => {\n updateMilestone(reportId, { feedback });\n },\n [reportId, updateMilestone],\n );\n\n const handlePositiveFeedback = useCallback(() => {\n handleFeedback('positive');\n }, [handleFeedback]);\n\n const handleNegativeFeedback = useCallback(() => {\n handleFeedback('negative');\n }, [handleFeedback]);\n\n return (\n <Styled.FeedbackContainer $gapX={1.25} $background=\"WHITE_3\">\n <FlexView $gutterX={1}>\n <Text $renderAs=\"ab2-black\" $color=\"BLACK_1\" $align=\"center\">\n Are you happy with {studentName ?? 'her'} progress?\n </Text>\n </FlexView>\n <Separator heightX={1.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={3} $alignItems=\"center\" $justifyContent=\"center\">\n <Clickable\n label=\"Report thumps up\"\n disabled={isProcessing}\n onClick={handlePositiveFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2.5}\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.THUMPS_UP} alt=\"UP\" width={32} height={32} />\n </FlexView>\n </Clickable>\n <Clickable\n label=\"Report thumps down\"\n disabled={isProcessing}\n onClick={handleNegativeFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"BLACK_5\"\n $borderRadiusX={2.5}\n >\n <Image src={ILLUSTRATIONS.THUMPS_DOWN} alt=\"DOWN\" width={32} height={32} />\n </FlexView>\n </Clickable>\n </FlexView>\n <Separator heightX={1.5} />\n </Styled.FeedbackContainer>\n );\n};\n\nexport default memo(Feedback);\n"],"names":["Feedback","reportId","studentName","onFeedback","studentCourseId","showSnackbar","onComplete","useCallback","err","data","invalidateMonthlyReport","updateMilestone","isProcessing","useMonthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","handleNegativeFeedback","Styled.FeedbackContainer","jsx","FlexView","jsxs","Text","Separator","Clickable","Image","ILLUSTRATIONS","Feedback$1","memo"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAW,CAAC;AAAA,EAChB,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AACF,MAA2B;AACzB,QAAMC,IAAaC;AAAA,IACjB,CAACC,GAAoBC,MAAkC;AACrD,MAAID,KAAOH,KACIA,EAAA;AAAA,QACX,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,MAAA,CACV,GAGC,CAACG,KAAOL,MAAcM,KAAA,QAAAA,EAAM,cAC9BC,EAAwBT,CAAQ,GACrBE,EAAAM,EAAK,UAAUL,CAAe;AAAA,IAE7C;AAAA,IACA,CAACD,GAAYC,CAAe;AAAA,EAAA,GAGxB,EAAE,OAAOO,GAAiB,cAAAC,EAAA,IAAiBC,EAAsB;AAAA,IACrE,YAAAP;AAAA,EAAA,CACD,GAEKQ,IAAiBP;AAAA,IACrB,CAACQ,MAAwB;AACP,MAAAJ,EAAAV,GAAU,EAAE,UAAAc,EAAA,CAAU;AAAA,IACxC;AAAA,IACA,CAACd,GAAUU,CAAe;AAAA,EAAA,GAGtBK,IAAyBT,EAAY,MAAM;AAC/C,IAAAO,EAAe,UAAU;AAAA,EAAA,GACxB,CAACA,CAAc,CAAC,GAEbG,IAAyBV,EAAY,MAAM;AAC/C,IAAAO,EAAe,UAAU;AAAA,EAAA,GACxB,CAACA,CAAc,CAAC;AAEnB,2BACGI,GAAA,EAAyB,OAAO,MAAM,aAAY,WACjD,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAS,UAAU,GAClB,UAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,aAAY,QAAO,WAAU,QAAO,UAAS,UAAA;AAAA,MAAA;AAAA,MACvCpB,KAAe;AAAA,MAAM;AAAA,IAAA,EAAA,CAC3C,EACF,CAAA;AAAA,IACA,gBAAAiB,EAACI,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IACzB,gBAAAF,EAACD,KAAS,gBAAe,OAAM,WAAW,GAAG,aAAY,UAAS,iBAAgB,UAChF,UAAA;AAAA,MAAA,gBAAAD;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,UAAUZ;AAAA,UACV,SAASI;AAAA,UAET,UAAA,gBAAAG;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,gBAAgB;AAAA,cAChB,cAAa;AAAA,cAEb,UAAA,gBAAAD,EAACM,GAAM,EAAA,KAAKC,EAAc,WAAW,KAAI,MAAK,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,YAAA;AAAA,UACvE;AAAA,QAAA;AAAA,MACF;AAAA,MACA,gBAAAP;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,UAAUZ;AAAA,UACV,SAASK;AAAA,UAET,UAAA,gBAAAE;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,cAAa;AAAA,cACb,gBAAgB;AAAA,cAEhB,UAAA,gBAAAD,EAACM,GAAM,EAAA,KAAKC,EAAc,aAAa,KAAI,QAAO,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,YAAA;AAAA,UAC3E;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAP,EAACI,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,EAC3B,EAAA,CAAA;AAEJ,GAEeI,IAAAC,EAAK5B,CAAQ;"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsxs as e, jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import i from "../../../../../ui/text/text.js";
|
|
3
|
+
import c from "../../../../../ui/layout/flex-view.js";
|
|
4
|
+
import C from "../../../../../chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js";
|
|
5
|
+
import { calculateProgress as g } from "../goals-constants.js";
|
|
6
|
+
const E = ({ chapters: t }) => !t || t.length === 0 ? null : t.map((o, u) => {
|
|
7
|
+
const { completed: _, total: a } = o.progress_stat, { completed: $, total: m } = o.previous_progress_stat || {}, r = g(_, a), d = g($ || 0, m || 0), s = r - d, l = o.previous_progress_stat && s > 0 && a === m, f = l ? s : 0, p = r === 100;
|
|
8
|
+
return /* @__PURE__ */ e(
|
|
9
|
+
c,
|
|
10
|
+
{
|
|
11
|
+
$flexDirection: "row",
|
|
12
|
+
$flexGapX: 1,
|
|
13
|
+
$gutterX: 1,
|
|
14
|
+
children: [
|
|
15
|
+
o.image_url && /* @__PURE__ */ n(
|
|
16
|
+
C,
|
|
17
|
+
{
|
|
18
|
+
completionPercentage: l ? d : r,
|
|
19
|
+
imageUrl: o.image_url,
|
|
20
|
+
delta: f,
|
|
21
|
+
imageWidth: 42,
|
|
22
|
+
iconWidth: 16,
|
|
23
|
+
deltaProgressColor: "GREEN_5",
|
|
24
|
+
iconColor: "WHITE",
|
|
25
|
+
iconBackgroundColor: "BLACK_1",
|
|
26
|
+
iconPosition: { top: 0, right: 0 }
|
|
27
|
+
}
|
|
28
|
+
),
|
|
29
|
+
/* @__PURE__ */ e(c, { children: [
|
|
30
|
+
/* @__PURE__ */ n(i, { $renderAs: "ub2", $color: "BLACK_1", children: o.chapter_name }),
|
|
31
|
+
/* @__PURE__ */ e(c, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.25, children: [
|
|
32
|
+
/* @__PURE__ */ n(i, { $renderAs: "ub3", $color: "BLACK_T_60", children: p ? "Completed" : `${r}% completed` }),
|
|
33
|
+
l && !p && /* @__PURE__ */ e(i, { $renderAs: "ab3", $color: "GREEN_6", children: [
|
|
34
|
+
"(+",
|
|
35
|
+
Math.round(s),
|
|
36
|
+
"%)"
|
|
37
|
+
] })
|
|
38
|
+
] })
|
|
39
|
+
] })
|
|
40
|
+
]
|
|
41
|
+
},
|
|
42
|
+
`${o.chapter_name}-${u}`
|
|
43
|
+
);
|
|
44
|
+
});
|
|
45
|
+
export {
|
|
46
|
+
E as default
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=goal-chapter-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goal-chapter-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.tsx"],"sourcesContent":["import { type FC } from 'react';\n\nimport { type IGoalsCardChaptersProps } from './goals-card-types';\nimport Text from '../../../../../ui/text/text';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport ChapterCircularProgress from '../../../../../chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress';\nimport { calculateProgress } from '../goals-constants';\n\nconst GoalsCardChapters: FC<IGoalsCardChaptersProps> = ({ chapters }) => {\n if (!chapters || chapters.length === 0) {\n return null;\n }\n\n return chapters.map((chapter, i) => {\n const { completed, total } = chapter.progress_stat;\n const { completed: prevCompleted, total: prevTotal } = chapter.previous_progress_stat || {};\n const progress = calculateProgress(completed, total);\n const previousProgress = calculateProgress(prevCompleted || 0, prevTotal || 0);\n const progressDifference = progress - previousProgress;\n const showDelta =\n chapter.previous_progress_stat && progressDifference > 0 && total === prevTotal;\n const delta = showDelta ? progressDifference : 0;\n const isCompoleted = progress === 100;\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $flexGapX={1}\n $gutterX={1}\n key={`${chapter.chapter_name}-${i}`}\n >\n {chapter.image_url && (\n <ChapterCircularProgress\n completionPercentage={showDelta ? previousProgress : progress}\n imageUrl={chapter.image_url}\n delta={delta}\n imageWidth={42}\n iconWidth={16}\n deltaProgressColor=\"GREEN_5\"\n iconColor=\"WHITE\"\n iconBackgroundColor=\"BLACK_1\"\n iconPosition={{ top: 0, right: 0 }}\n />\n )}\n <FlexView>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n {chapter.chapter_name}\n </Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.25}>\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {isCompoleted ? 'Completed' : `${progress}% completed`}\n </Text>\n {showDelta && !isCompoleted && (\n <Text $renderAs=\"ab3\" $color=\"GREEN_6\">\n (+{Math.round(progressDifference)}%)\n </Text>\n )}\n </FlexView>\n </FlexView>\n </FlexView>\n );\n });\n};\n\nexport default GoalsCardChapters;\n"],"names":["GoalsCardChapters","chapters","chapter","i","completed","total","prevCompleted","prevTotal","progress","calculateProgress","previousProgress","progressDifference","showDelta","delta","isCompoleted","jsxs","FlexView","jsx","ChapterCircularProgress","Text"],"mappings":";;;;;AAQA,MAAMA,IAAiD,CAAC,EAAE,UAAAC,QACpD,CAACA,KAAYA,EAAS,WAAW,IAC5B,OAGFA,EAAS,IAAI,CAACC,GAASC,MAAM;AAClC,QAAM,EAAE,WAAAC,GAAW,OAAAC,MAAUH,EAAQ,eAC/B,EAAE,WAAWI,GAAe,OAAOC,MAAcL,EAAQ,0BAA0B,IACnFM,IAAWC,EAAkBL,GAAWC,CAAK,GAC7CK,IAAmBD,EAAkBH,KAAiB,GAAGC,KAAa,CAAC,GACvEI,IAAqBH,IAAWE,GAChCE,IACJV,EAAQ,0BAA0BS,IAAqB,KAAKN,MAAUE,GAClEM,IAAQD,IAAYD,IAAqB,GACzCG,IAAeN,MAAa;AAGhC,SAAA,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,WAAW;AAAA,MACX,UAAU;AAAA,MAGT,UAAA;AAAA,QAAAd,EAAQ,aACP,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,sBAAsBN,IAAYF,IAAmBF;AAAA,YACrD,UAAUN,EAAQ;AAAA,YAClB,OAAAW;AAAA,YACA,YAAY;AAAA,YACZ,WAAW;AAAA,YACX,oBAAmB;AAAA,YACnB,WAAU;AAAA,YACV,qBAAoB;AAAA,YACpB,cAAc,EAAE,KAAK,GAAG,OAAO,EAAE;AAAA,UAAA;AAAA,QACnC;AAAA,0BAEDG,GACC,EAAA,UAAA;AAAA,UAAA,gBAAAC,EAACE,KAAK,WAAU,OAAM,QAAO,WAC1B,YAAQ,cACX;AAAA,4BACCH,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,WAAW,MAC7D,UAAA;AAAA,YAAC,gBAAAC,EAAAE,GAAA,EAAK,WAAU,OAAM,QAAO,cAC1B,UAAeL,IAAA,cAAc,GAAGN,CAAQ,cAC3C,CAAA;AAAA,YACCI,KAAa,CAACE,KACb,gBAAAC,EAACI,KAAK,WAAU,OAAM,QAAO,WAAU,UAAA;AAAA,cAAA;AAAA,cAClC,KAAK,MAAMR,CAAkB;AAAA,cAAE;AAAA,YAAA,GACpC;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,IA7BK,GAAGT,EAAQ,YAAY,IAAIC,CAAC;AAAA,EAAA;AA8BnC,CAEH;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import t from "../../../../../ui/layout/flex-view.js";
|
|
3
|
+
const p = o(t)`
|
|
4
|
+
position: absolute;
|
|
5
|
+
bottom: 0px;
|
|
6
|
+
left: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
`, s = o(t)`
|
|
9
|
+
border-top: none;
|
|
10
|
+
`, a = o(t)`
|
|
11
|
+
position: relative;
|
|
12
|
+
&::after {
|
|
13
|
+
content: '';
|
|
14
|
+
position: absolute;
|
|
15
|
+
height: 12px;
|
|
16
|
+
width: 20px;
|
|
17
|
+
left: 10px;
|
|
18
|
+
top: -8px;
|
|
19
|
+
clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
|
|
20
|
+
background-color: ${({ theme: e, $background: r }) => e.colors[r ?? "WHITE_1"]};
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
23
|
+
export {
|
|
24
|
+
s as ChaptersContainer,
|
|
25
|
+
p as ProgressBarContainer,
|
|
26
|
+
a as TagContainer
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=goals-card-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goals-card-styled.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goals-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const ProgressBarContainer = styled(FlexView)`\n position: absolute;\n bottom: 0px;\n left: 0;\n right: 0;\n`;\n\nexport const ChaptersContainer = styled(FlexView)`\n border-top: none;\n`;\n\nexport const TagContainer = styled(FlexView)`\n position: relative;\n &::after {\n content: '';\n position: absolute;\n height: 12px;\n width: 20px;\n left: 10px;\n top: -8px;\n clip-path: polygon(50% 0%, 0% 100%, 100% 100%);\n background-color: ${({ theme, $background }) => theme.colors[$background ?? 'WHITE_1']};\n }\n`;\n"],"names":["ProgressBarContainer","styled","FlexView","ChaptersContainer","TagContainer","theme","$background"],"mappings":";;AAIa,MAAAA,IAAuBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOtCC,IAAoBF,EAAOC,CAAQ;AAAA;AAAA,GAInCE,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBAUnB,CAAC,EAAE,OAAAG,GAAO,aAAAC,QAAkBD,EAAM,OAAOC,KAAe,SAAS,CAAC;AAAA;AAAA;"}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r, Fragment as h } from "react/jsx-runtime";
|
|
2
|
+
import { memo as F, useState as H, useMemo as O, useCallback as W } from "react";
|
|
3
|
+
import { GOAL_CATEGORY_CONFIG as j, calculateProgress as w } from "../goals-constants.js";
|
|
4
|
+
import { ProgressBarContainer as y, TagContainer as E, ChaptersContainer as V } from "./goals-card-styled.js";
|
|
5
|
+
import t from "../../../../../ui/text/text.js";
|
|
6
|
+
import l from "../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import C from "../../../../../ui/separator/separator.js";
|
|
8
|
+
import Y from "../../../../../ui/image/image.js";
|
|
9
|
+
import G from "../../../../../ui/buttons/clickable/clickable.js";
|
|
10
|
+
import B from "./goal-chapter-card.js";
|
|
11
|
+
import q from "../../../../../ui/linear-progress-bar/linear-progress-bar.js";
|
|
12
|
+
const z = ({ category: L, milestone: T, isExpended: o = !1 }) => {
|
|
13
|
+
const [d, k] = H(!1), {
|
|
14
|
+
milestone_name: v,
|
|
15
|
+
user_chapters: p,
|
|
16
|
+
progress_stat: P,
|
|
17
|
+
previous_progress_stat: n
|
|
18
|
+
} = T, { completed: I, total: a } = P, { completed: $, total: u } = n ?? {}, c = w(I, a), f = n && $ && u ? w($, u) : 0, i = c - f, g = !!(n && i > 0 && a === a), S = !!(n && i <= 0 && a !== a), b = c === 100, K = Math.round(c), x = Math.round(i), _ = p.length, D = p.slice(0, 2), m = Math.max(0, _ - 2), M = d ? p.slice(2) : [], N = m > 0, s = O(() => j[L], []), A = s.icon, X = W(() => {
|
|
19
|
+
k((R) => !R);
|
|
20
|
+
}, []);
|
|
21
|
+
return /* @__PURE__ */ e(l, { children: [
|
|
22
|
+
/* @__PURE__ */ e(
|
|
23
|
+
l,
|
|
24
|
+
{
|
|
25
|
+
$position: "relative",
|
|
26
|
+
$background: s.backgroundColor,
|
|
27
|
+
$borderColor: o ? "WHITE_5" : void 0,
|
|
28
|
+
$gutterX: 1,
|
|
29
|
+
$gapX: 1,
|
|
30
|
+
$height: o ? "auto" : 72,
|
|
31
|
+
children: [
|
|
32
|
+
/* @__PURE__ */ e(l, { $flexDirection: "row", $flexGapX: o ? 1 : 0.5, children: [
|
|
33
|
+
A && /* @__PURE__ */ r(
|
|
34
|
+
Y,
|
|
35
|
+
{
|
|
36
|
+
src: A,
|
|
37
|
+
withLoader: !0,
|
|
38
|
+
width: o ? 40 : 32,
|
|
39
|
+
height: o ? 40 : 32,
|
|
40
|
+
alt: s.label
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ e(l, { children: [
|
|
44
|
+
o && /* @__PURE__ */ e(h, { children: [
|
|
45
|
+
/* @__PURE__ */ r(t, { $renderAs: "ac5", $color: s.labelColor, children: s.label }),
|
|
46
|
+
/* @__PURE__ */ r(C, { heightX: 0.25 })
|
|
47
|
+
] }),
|
|
48
|
+
/* @__PURE__ */ r(t, { $renderAs: "ab2", $color: "BLACK_1", children: v }),
|
|
49
|
+
/* @__PURE__ */ r(C, { heightX: o ? 0.5 : 0.125 }),
|
|
50
|
+
/* @__PURE__ */ e(l, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.25, children: [
|
|
51
|
+
/* @__PURE__ */ r(t, { $renderAs: "ab3", $color: "BLACK_T_60", children: b ? "Completed" : `${K}% complete` }),
|
|
52
|
+
g && !b && /* @__PURE__ */ e(t, { $renderAs: "ab3", $color: "GREEN_6", children: [
|
|
53
|
+
"(+",
|
|
54
|
+
x,
|
|
55
|
+
"%)"
|
|
56
|
+
] })
|
|
57
|
+
] })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ r(y, { children: /* @__PURE__ */ r(
|
|
60
|
+
q,
|
|
61
|
+
{
|
|
62
|
+
percentage: g ? f : c,
|
|
63
|
+
delta: g ? i : 0,
|
|
64
|
+
height: 4,
|
|
65
|
+
backgroundColor: "WHITE_5",
|
|
66
|
+
fillColor: "BLACK_1",
|
|
67
|
+
deltaProgressColor: "GREEN_5"
|
|
68
|
+
}
|
|
69
|
+
) })
|
|
70
|
+
] }),
|
|
71
|
+
S && /* @__PURE__ */ e(h, { children: [
|
|
72
|
+
/* @__PURE__ */ r(C, { heightX: 0.875 }),
|
|
73
|
+
/* @__PURE__ */ r(E, { $gapX: 0.5, $gutterX: 1, $background: s.tagColor, children: /* @__PURE__ */ r(t, { $renderAs: "ub3", $color: "BLACK_1", children: "Learning plan was modified — progress updated accordingly." }) })
|
|
74
|
+
] })
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
o && _ > 0 && /* @__PURE__ */ e(
|
|
79
|
+
V,
|
|
80
|
+
{
|
|
81
|
+
$gapX: 1,
|
|
82
|
+
$flexDirection: "column",
|
|
83
|
+
$flexGapX: 1.25,
|
|
84
|
+
$borderColor: "WHITE_5",
|
|
85
|
+
children: [
|
|
86
|
+
/* @__PURE__ */ r(B, { chapters: D }),
|
|
87
|
+
N && /* @__PURE__ */ e(h, { children: [
|
|
88
|
+
!d && /* @__PURE__ */ r(l, { $gutterX: 4.5, children: /* @__PURE__ */ r(
|
|
89
|
+
G,
|
|
90
|
+
{
|
|
91
|
+
onClick: X,
|
|
92
|
+
label: `+${m} chapters`,
|
|
93
|
+
children: /* @__PURE__ */ e(t, { $renderAs: "ub3-bold", $color: "BLACK_1", children: [
|
|
94
|
+
"+",
|
|
95
|
+
m,
|
|
96
|
+
" chapters"
|
|
97
|
+
] })
|
|
98
|
+
}
|
|
99
|
+
) }),
|
|
100
|
+
d && /* @__PURE__ */ e(h, { children: [
|
|
101
|
+
/* @__PURE__ */ r(B, { chapters: M }),
|
|
102
|
+
/* @__PURE__ */ r(l, { $gutterX: 4.5, children: /* @__PURE__ */ r(G, { onClick: X, label: "Show less", children: /* @__PURE__ */ r(t, { $renderAs: "ub3-bold", $color: "BLACK_1", children: "Show less" }) }) })
|
|
103
|
+
] })
|
|
104
|
+
] })
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
)
|
|
108
|
+
] });
|
|
109
|
+
}, nr = F(z);
|
|
110
|
+
export {
|
|
111
|
+
nr as default
|
|
112
|
+
};
|
|
113
|
+
//# sourceMappingURL=goals-card.js.map
|