@cuemath/leap 3.5.30-link.4 → 3.5.31-as1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/illustrations/illustrations.js +43 -0
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/images/images.js +0 -12
- 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/assets/line-icons/icons/dots-icon.js +21 -0
- package/dist/assets/line-icons/icons/dots-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/pause-icon.js +24 -0
- package/dist/assets/line-icons/icons/pause-icon.js.map +1 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js +82 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js.map +1 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.styled.js +77 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.styled.js.map +1 -0
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +18 -91
- 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 +42 -58
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.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 +85 -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/homework/card-title.js +8 -8
- package/dist/features/homework/card-title.js.map +1 -1
- package/dist/features/milestone/constants.js +15 -28
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +42 -43
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +5 -5
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +1 -1
- package/dist/features/timeline/comps/constants.js +18 -18
- package/dist/features/timeline/comps/constants.js.map +1 -1
- package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js +14 -14
- package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.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-types.js +4 -4
- package/dist/features/timeline/daily-timeline-types.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 +59 -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/achievements/constant.js +16 -0
- package/dist/features/timeline/monthly-report/comps/achievements/constant.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 +96 -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 +107 -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 +40 -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/trial-session/comps/school-goals/school-goals.js +71 -82
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/worksheet/worksheet.js +33 -42
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/helper.js +66 -69
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +17 -22
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +128 -139
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/left-panel/index.js.map +1 -1
- package/dist/features/trial-session/trial-session-constants.js +9 -16
- package/dist/features/trial-session/trial-session-constants.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session.js +66 -68
- package/dist/features/trial-session/trial-session.js.map +1 -1
- package/dist/features/ui/animated-arc/animated-arc-styled.js +7 -7
- package/dist/features/ui/animated-arc/animated-arc-styled.js.map +1 -1
- package/dist/features/ui/animated-arc/animated-arc.js +37 -26
- package/dist/features/ui/animated-arc/animated-arc.js.map +1 -1
- package/dist/features/ui/linear-progress-bar/linear-progress-bar.js +39 -0
- package/dist/features/ui/linear-progress-bar/linear-progress-bar.js.map +1 -0
- package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js +23 -0
- package/dist/features/ui/linear-progress-bar/linear-progress-bar.styled.js.map +1 -0
- package/dist/features/ui/swipeable-carousel/constants.js +16 -0
- package/dist/features/ui/swipeable-carousel/constants.js.map +1 -0
- package/dist/features/ui/swipeable-carousel/swipeable-carousel-styled.js +57 -0
- package/dist/features/ui/swipeable-carousel/swipeable-carousel-styled.js.map +1 -0
- package/dist/features/ui/swipeable-carousel/swipeable-carousel.js +150 -0
- package/dist/features/ui/swipeable-carousel/swipeable-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/ui/theme/text.js +14 -0
- package/dist/features/ui/theme/text.js.map +1 -1
- package/dist/index.d.ts +246 -41
- package/dist/index.js +588 -568
- package/dist/index.js.map +1 -1
- package/dist/static/2021.2a1a2ec9.svg +1 -0
- package/dist/static/2022.2091553a.svg +1 -0
- package/dist/static/2023.ed718b4e.svg +1 -0
- package/dist/static/2024.aa60edc5.svg +1 -0
- package/dist/static/2025.014a8ad3.svg +1 -0
- package/dist/static/2026.95d70f27.svg +1 -0
- package/dist/static/2027.fe83a41c.svg +1 -0
- package/dist/static/2028.b1c253ef.svg +1 -0
- package/dist/static/apr.cd56f13d.svg +1 -0
- package/dist/static/aug.3ceade02.svg +1 -0
- package/dist/static/coding-report-icon.91a1e900.svg +1 -0
- package/dist/static/dec.90729a5e.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/feb.a9ecd320.svg +1 -0
- package/dist/static/focus-blue.664be268.svg +1 -0
- package/dist/static/full-report.00112c74.svg +1 -0
- package/dist/static/jan.f8fb9c39.svg +1 -0
- package/dist/static/jul.04a98cf0.svg +1 -0
- package/dist/static/jun.9b6ab6bf.svg +1 -0
- package/dist/static/key.fa0b4c98.svg +1 -0
- package/dist/static/live-session-blue.ec7fa85f.svg +1 -0
- package/dist/static/mar.f8b372ef.svg +1 -0
- package/dist/static/math-fit-grey.c32f37b3.svg +1 -0
- package/dist/static/may.23adae48.svg +1 -0
- package/dist/static/no-report.4158fad3.svg +1 -0
- package/dist/static/nov.c44e4739.svg +1 -0
- package/dist/static/oct.856b3b3f.svg +1 -0
- package/dist/static/opened-book-green.faacda34.svg +1 -0
- package/dist/static/percentage-pattern-yellow.6a25e820.svg +1 -0
- package/dist/static/pi-orange.132b108d.svg +1 -0
- package/dist/static/ptm-report-icon.5089218f.svg +1 -0
- package/dist/static/puzzle-purple.60ff4884.svg +1 -0
- package/dist/static/question-mark-yellow.1925aa04.svg +1 -0
- package/dist/static/renewal-blue.1ab3b2d4.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/sep.2d547b31.svg +1 -0
- package/dist/static/thumbs-up-green.6a03b9d2.svg +1 -0
- package/dist/static/thumps-down.a1192a62.svg +1 -0
- package/dist/static/thumps-up.caa35a98.svg +1 -0
- package/dist/static/time-purple.ab1a458d.svg +1 -0
- package/package.json +3 -2
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -34
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
- 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/static/apr.09a50ff7.png +0 -0
- package/dist/static/aug.7179d37e.png +0 -0
- package/dist/static/dec.09f7e315.png +0 -0
- package/dist/static/feb.9e72504d.png +0 -0
- package/dist/static/jan.da91944a.png +0 -0
- package/dist/static/jul.5a1c4932.png +0 -0
- package/dist/static/jun.62639c2f.png +0 -0
- package/dist/static/mar.f51bcfa6.png +0 -0
- package/dist/static/may.7c542020.png +0 -0
- package/dist/static/nov.058343e7.png +0 -0
- package/dist/static/oct.573ee19d.png +0 -0
- package/dist/static/sep.3ccb6468.png +0 -0
- /package/dist/features/{circle-games/game-launcher/comps/swipable-component → ui/swipeable-component}/swipeable-component-styled.js +0 -0
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
import e from "../ui/layout/flex-view.js";
|
|
3
|
+
import o from "../ui/text/text.js";
|
|
4
|
+
const n = t(e)`
|
|
4
5
|
overflow-y: auto;
|
|
5
6
|
width: 100%;
|
|
6
7
|
scroll-behavior: smooth;
|
|
7
8
|
will-change: height;
|
|
8
|
-
`,
|
|
9
|
+
`, a = t(e)`
|
|
9
10
|
max-width: 512px;
|
|
10
11
|
width: 100%;
|
|
11
12
|
will-change: height;
|
|
12
|
-
`,
|
|
13
|
-
margin-top: ${({ $addedMonthBreak:
|
|
13
|
+
`, m = t(e)`
|
|
14
|
+
margin-top: ${({ $addedMonthBreak: i }) => i ? "-108px" : "0"};
|
|
14
15
|
z-index: 1;
|
|
16
|
+
`, p = t(o)`
|
|
17
|
+
line-height: 8px;
|
|
15
18
|
`;
|
|
16
19
|
export {
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
m as DailyItems,
|
|
21
|
+
a as DailyTimelineContainer,
|
|
22
|
+
p as DateText,
|
|
23
|
+
n as ScrollWrapper
|
|
20
24
|
};
|
|
21
25
|
//# sourceMappingURL=daily-timeline-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-timeline-styled.js","sources":["../../../src/features/timeline/daily-timeline-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../ui/layout/flex-view';\n\nconst ScrollWrapper = styled(FlexView)`\n overflow-y: auto;\n width: 100%;\n scroll-behavior: smooth;\n will-change: height;\n`;\n\nconst DailyTimelineContainer = styled(FlexView)`\n max-width: 512px;\n width: 100%;\n will-change: height;\n`;\n\nconst DailyItems = styled(FlexView)<{ $addedMonthBreak?: boolean }>`\n margin-top: ${({ $addedMonthBreak }) =>\n $addedMonthBreak\n ? '-108px' // 64px card height + 16px(separator) + 16(date text) + 12(separator)\n : '0'};\n z-index: 1;\n`;\n\nexport { DailyTimelineContainer, DailyItems, ScrollWrapper };\n"],"names":["ScrollWrapper","styled","FlexView","DailyTimelineContainer","DailyItems","$addedMonthBreak"],"mappings":"
|
|
1
|
+
{"version":3,"file":"daily-timeline-styled.js","sources":["../../../src/features/timeline/daily-timeline-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../ui/layout/flex-view';\nimport Text from '../ui/text/text';\n\nconst ScrollWrapper = styled(FlexView)`\n overflow-y: auto;\n width: 100%;\n scroll-behavior: smooth;\n will-change: height;\n`;\n\nconst DailyTimelineContainer = styled(FlexView)`\n max-width: 512px;\n width: 100%;\n will-change: height;\n`;\n\nconst DailyItems = styled(FlexView)<{ $addedMonthBreak?: boolean }>`\n margin-top: ${({ $addedMonthBreak }) =>\n $addedMonthBreak\n ? '-108px' // 64px card height + 16px(separator) + 16(date text) + 12(separator)\n : '0'};\n z-index: 1;\n`;\n\nconst DateText = styled(Text)`\n line-height: 8px;\n`;\n\nexport { DailyTimelineContainer, DailyItems, ScrollWrapper, DateText };\n"],"names":["ScrollWrapper","styled","FlexView","DailyTimelineContainer","DailyItems","$addedMonthBreak","DateText","Text"],"mappings":";;;AAKM,MAAAA,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAO/BC,IAAyBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMxCE,IAAaH,EAAOC,CAAQ;AAAA,gBAClB,CAAC,EAAE,kBAAAG,EAAA,MACfA,IACI,WACA,GAAG;AAAA;AAAA,GAILC,IAAWL,EAAOM,CAAI;AAAA;AAAA;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var r = /* @__PURE__ */ ((R) => (R.COMPLETED = "COMPLETED", R.IN_PROGRESS = "IN_PROGRESS", R.PENDING = "PENDING", R.NOT_STARTED = "NOT_STARTED", R.WAIT_FOR_REVIEW = "WAIT_FOR_REVIEW", R))(r || {}), E = /* @__PURE__ */ ((R) => (R.TEACHER = "TEACHER", R.STUDENT = "STUDENT", R.PARENT = "PARENT", R))(E || {}), I = /* @__PURE__ */ ((R) => (R.CW = "CW", R.HW = "HW", R.CIRCLE = "CIRCLE", R))(I || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
I as CARD_TYPE,
|
|
4
|
+
r as NODE_STATE,
|
|
5
|
+
E as USER_TYPE
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=daily-timeline-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-timeline-types.js","sources":["../../../src/features/timeline/daily-timeline-types.ts"],"sourcesContent":["import { type TCourseStream } from '../milestone/create/milestone-create-types';\nimport { type ITimeLineItem, type ITimelineData } from './api/use-daily-timeline-get';\n\nexport enum NODE_STATE {\n COMPLETED = 'COMPLETED',\n IN_PROGRESS = 'IN_PROGRESS',\n PENDING = 'PENDING',\n NOT_STARTED = 'NOT_STARTED',\n}\n\nexport enum USER_TYPE {\n TEACHER = 'TEACHER',\n STUDENT = 'STUDENT',\n PARENT = 'PARENT',\n}\n\nexport enum CARD_TYPE {\n CW = 'CW',\n HW = 'HW',\n CIRCLE = 'CIRCLE',\n}\n\nexport interface IDailyTimelineProps {\n userType: USER_TYPE;\n studentId: string;\n courseStreams?: TCourseStream[];\n onPuzzleClick?: (card: ITimeLineItem) => void;\n onReviewClick?: (\n userNodeId: string | null,\n isSatMockTestBlock: boolean,\n userBlockId: string | null,\n ) => void;\n scrollAreaHeight?: string | number;\n}\n\nexport interface IDailyTimelineItemsProps extends IDailyTimelineProps {\n entry: ITimelineData;\n isFirstElement: boolean;\n shouldShowTag: boolean;\n}\n"],"names":["NODE_STATE","USER_TYPE","CARD_TYPE"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,cAAc,eACdA,EAAA,UAAU,WACVA,EAAA,cAAc,
|
|
1
|
+
{"version":3,"file":"daily-timeline-types.js","sources":["../../../src/features/timeline/daily-timeline-types.ts"],"sourcesContent":["import { type TCourseStream } from '../milestone/create/milestone-create-types';\nimport { type ITimeLineItem, type ITimelineData } from './api/use-daily-timeline-get';\n\nexport enum NODE_STATE {\n COMPLETED = 'COMPLETED',\n IN_PROGRESS = 'IN_PROGRESS',\n PENDING = 'PENDING',\n NOT_STARTED = 'NOT_STARTED',\n WAIT_FOR_REVIEW = 'WAIT_FOR_REVIEW',\n}\n\nexport enum USER_TYPE {\n TEACHER = 'TEACHER',\n STUDENT = 'STUDENT',\n PARENT = 'PARENT',\n}\n\nexport enum CARD_TYPE {\n CW = 'CW',\n HW = 'HW',\n CIRCLE = 'CIRCLE',\n}\n\nexport interface IDailyTimelineProps {\n userType: USER_TYPE;\n studentId: string;\n courseStreams?: TCourseStream[];\n onPuzzleClick?: (card: ITimeLineItem) => void;\n onReviewClick?: (\n userNodeId: string | null,\n isSatMockTestBlock: boolean,\n userBlockId: string | null,\n ) => void;\n scrollAreaHeight?: string | number;\n}\n\nexport interface IDailyTimelineItemsProps extends IDailyTimelineProps {\n entry: ITimelineData;\n isFirstElement: boolean;\n shouldShowTag: boolean;\n}\n"],"names":["NODE_STATE","USER_TYPE","CARD_TYPE"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,cAAc,eACdA,EAAA,UAAU,WACVA,EAAA,cAAc,eACdA,EAAA,kBAAkB,mBALRA,IAAAA,KAAA,CAAA,CAAA,GAQAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,KAAK,MACLA,EAAA,KAAK,MACLA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -2,10 +2,9 @@ import { jsxs as s, Fragment as j, jsx as t } from "react/jsx-runtime";
|
|
|
2
2
|
import { getDayMonthYear as D } from "./comps/utils.js";
|
|
3
3
|
import w from "../ui/layout/flex-view.js";
|
|
4
4
|
import x from "./comps/year-break/year-break.js";
|
|
5
|
-
import
|
|
5
|
+
import a from "../ui/separator/separator.js";
|
|
6
6
|
import A from "./comps/month-break/month-break.js";
|
|
7
|
-
import { DailyItems as B } from "./daily-timeline-styled.js";
|
|
8
|
-
import C from "../ui/text/text.js";
|
|
7
|
+
import { DailyItems as B, DateText as C } from "./daily-timeline-styled.js";
|
|
9
8
|
import I from "./comps/daily-timeline-items/daily-timeline-items.js";
|
|
10
9
|
import S from "./comps/no-activity.js";
|
|
11
10
|
import { CARD_TYPE as k } from "./daily-timeline-types.js";
|
|
@@ -20,7 +19,7 @@ const b = ({
|
|
|
20
19
|
studentId: L,
|
|
21
20
|
userType: T
|
|
22
21
|
}) => {
|
|
23
|
-
const { daily_logs: r, from_date:
|
|
22
|
+
const { daily_logs: r, from_date: m, to_date: h } = $, N = u(m), f = u(h), { day: y, month: c, monthName: O } = D(N), {
|
|
24
23
|
day: p,
|
|
25
24
|
month: d,
|
|
26
25
|
year: X,
|
|
@@ -29,7 +28,7 @@ const b = ({
|
|
|
29
28
|
return r ? /* @__PURE__ */ s(w, { children: [
|
|
30
29
|
!n && /* @__PURE__ */ s(j, { children: [
|
|
31
30
|
/* @__PURE__ */ t(x, { toYear: X, isLastDayOfYear: e }),
|
|
32
|
-
!e && c && e && /* @__PURE__ */ t(
|
|
31
|
+
!e && c && e && /* @__PURE__ */ t(a, { heightX: 1 }),
|
|
33
32
|
/* @__PURE__ */ t(
|
|
34
33
|
A,
|
|
35
34
|
{
|
|
@@ -45,9 +44,9 @@ const b = ({
|
|
|
45
44
|
$gutterX: 1,
|
|
46
45
|
$addedMonthBreak: !!(i && d && !n),
|
|
47
46
|
children: [
|
|
48
|
-
/* @__PURE__ */ t(
|
|
49
|
-
/* @__PURE__ */ t(C, { $renderAs: "ac4", $color: "BLACK_T_60", children:
|
|
50
|
-
/* @__PURE__ */ t(
|
|
47
|
+
/* @__PURE__ */ t(a, { heightX: 1 }),
|
|
48
|
+
/* @__PURE__ */ t(C, { $renderAs: "ac4", $color: "BLACK_T_60", children: m === h ? `${y} ${O}` : `${y} - ${p} ${Y}` }),
|
|
49
|
+
/* @__PURE__ */ t(a, { heightX: 0.75 }),
|
|
51
50
|
r.length > 0 ? r.map((o, l) => /* @__PURE__ */ t(
|
|
52
51
|
I,
|
|
53
52
|
{
|
|
@@ -60,12 +59,12 @@ const b = ({
|
|
|
60
59
|
userType: T,
|
|
61
60
|
shouldShowTag: g && o.course_stream !== k.CIRCLE,
|
|
62
61
|
isLastItem: l === r.length - 1,
|
|
63
|
-
fromDate:
|
|
62
|
+
fromDate: m,
|
|
64
63
|
studentId: L
|
|
65
64
|
},
|
|
66
65
|
`timeline-${l}`
|
|
67
66
|
)) : /* @__PURE__ */ t(S, {}),
|
|
68
|
-
/* @__PURE__ */ t(
|
|
67
|
+
/* @__PURE__ */ t(a, { heightX: 1 })
|
|
69
68
|
]
|
|
70
69
|
}
|
|
71
70
|
)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"daily-timeline-view.js","sources":["../../../src/features/timeline/daily-timeline-view.tsx"],"sourcesContent":["import { isLastDayOfMonth, parseISO } from 'date-fns';\nimport { type FC } from 'react';\n\nimport { getDayMonthYear } from './comps/utils';\nimport FlexView from '../ui/layout/flex-view';\nimport YearBreak from './comps/year-break/year-break';\nimport Separator from '../ui/separator/separator';\nimport MonthBreak from './comps/month-break/month-break';\nimport * as Styled from './daily-timeline-styled';\nimport
|
|
1
|
+
{"version":3,"file":"daily-timeline-view.js","sources":["../../../src/features/timeline/daily-timeline-view.tsx"],"sourcesContent":["import { isLastDayOfMonth, parseISO } from 'date-fns';\nimport { type FC } from 'react';\n\nimport { getDayMonthYear } from './comps/utils';\nimport FlexView from '../ui/layout/flex-view';\nimport YearBreak from './comps/year-break/year-break';\nimport Separator from '../ui/separator/separator';\nimport MonthBreak from './comps/month-break/month-break';\nimport * as Styled from './daily-timeline-styled';\nimport DailyTimelineItems from './comps/daily-timeline-items/daily-timeline-items';\nimport NoActivity from './comps/no-activity';\nimport { CARD_TYPE, type IDailyTimelineItemsProps } from './daily-timeline-types';\n\nconst DailyTimelineView: FC<IDailyTimelineItemsProps> = ({\n entry,\n isFirstElement,\n onPuzzleClick,\n onReviewClick,\n shouldShowTag,\n studentId,\n userType,\n}) => {\n const { daily_logs: dailyLogs, from_date: fromDate, to_date: toDate } = entry;\n const fromDateObj = parseISO(fromDate);\n const toDateObj = parseISO(toDate);\n\n const { day: fromDay, month: fromMonth, monthName: fromMonthName } = getDayMonthYear(fromDateObj);\n\n const {\n day: toDay,\n month: toMonth,\n year: toYear,\n monthName: toMonthName,\n } = getDayMonthYear(toDateObj);\n\n const isLastDayOfMth = isLastDayOfMonth(toDateObj);\n const isLastDayOfYear = isLastDayOfMth && toMonth === 12 && toDay === 31;\n\n if (!dailyLogs) {\n return null;\n }\n\n return (\n <FlexView>\n {!isFirstElement && (\n <>\n <YearBreak toYear={toYear} isLastDayOfYear={isLastDayOfYear} />\n {!isLastDayOfYear && fromMonth && isLastDayOfYear && <Separator heightX={1} />}\n <MonthBreak\n fromMonth={fromMonth}\n isLastDayOfMth={isLastDayOfMth}\n isLastDayOfYear={isLastDayOfYear}\n />\n </>\n )}\n <Styled.DailyItems\n $gutterX={1}\n $addedMonthBreak={!!(isLastDayOfMth && toMonth && !isFirstElement)}\n >\n <Separator heightX={1} />\n <Styled.DateText $renderAs=\"ac4\" $color=\"BLACK_T_60\">\n {fromDate === toDate\n ? `${fromDay} ${fromMonthName}`\n : `${fromDay} - ${toDay} ${toMonthName}`}\n </Styled.DateText>\n <Separator heightX={0.75} />\n {dailyLogs.length > 0 ? (\n dailyLogs.map((log, logIndex) => (\n <DailyTimelineItems\n key={`timeline-${logIndex}`}\n type={log.type}\n summary={log.summary ?? ''}\n courseStream={log.course_stream}\n cards={log.cards}\n onPuzzleClick={onPuzzleClick}\n onReviewClick={onReviewClick}\n userType={userType}\n shouldShowTag={shouldShowTag && log.course_stream !== CARD_TYPE.CIRCLE}\n isLastItem={logIndex === dailyLogs.length - 1}\n fromDate={fromDate}\n studentId={studentId}\n />\n ))\n ) : (\n <NoActivity />\n )}\n <Separator heightX={1} />\n </Styled.DailyItems>\n </FlexView>\n );\n};\n\nDailyTimelineView.displayName = 'DailyTimelineView';\n\nexport default DailyTimelineView;\n"],"names":["DailyTimelineView","entry","isFirstElement","onPuzzleClick","onReviewClick","shouldShowTag","studentId","userType","dailyLogs","fromDate","toDate","fromDateObj","parseISO","toDateObj","fromDay","fromMonth","fromMonthName","getDayMonthYear","toDay","toMonth","toYear","toMonthName","isLastDayOfMth","isLastDayOfMonth","isLastDayOfYear","FlexView","jsxs","Fragment","jsx","YearBreak","Separator","MonthBreak","Styled.DailyItems","Styled.DateText","log","logIndex","DailyTimelineItems","CARD_TYPE","NoActivity"],"mappings":";;;;;;;;;;;;AAaA,MAAMA,IAAkD,CAAC;AAAA,EACvD,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAYC,GAAW,WAAWC,GAAU,SAASC,EAAW,IAAAT,GAClEU,IAAcC,EAASH,CAAQ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F,EAAI;AAAA,cACV,SAASA,EAAI,WAAW;AAAA,cACxB,cAAcA,EAAI;AAAA,cAClB,OAAOA,EAAI;AAAA,cACX,eAAA/B;AAAA,cACA,eAAAC;AAAA,cACA,UAAAG;AAAA,cACA,eAAeF,KAAiB6B,EAAI,kBAAkBG,EAAU;AAAA,cAChE,YAAYF,MAAa3B,EAAU,SAAS;AAAA,cAC5C,UAAAC;AAAA,cACA,WAAAH;AAAA,YAAA;AAAA,YAXK,YAAY6B,CAAQ;AAAA,UAAA,CAa5B,IAED,gBAAAP,EAACU,GAAW,EAAA;AAAA,UAEd,gBAAAV,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACzB;AAAA,EACF,EAAA,CAAA,IAjDO;AAmDX;AAEA9B,EAAkB,cAAc;"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createGetAPI as r, createPatchAPI as o } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL_V1 as e } from "../../../../constants/api.js";
|
|
3
|
+
const { useGet: p, invalidate: a } = r({
|
|
4
|
+
getURL: (t) => `${e}/monthly-progress-reports/${t}`
|
|
5
|
+
}), { usePatch: h } = o({
|
|
6
|
+
getURL: (t) => `${e}/monthly-progress-reports/${t}`
|
|
7
|
+
});
|
|
8
|
+
export {
|
|
9
|
+
a as invalidateMonthlyReport,
|
|
10
|
+
p as useMonthlyReportGet,
|
|
11
|
+
h as useMonthlyReportPatch
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=use-monthly-report-get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-monthly-report-get.js","sources":["../../../../../src/features/timeline/monthly-report/api/use-monthly-report-get.ts"],"sourcesContent":["import { createGetAPI, createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../../constants/api';\nimport { type IMonthlyReportResponse } from '../monthly-report-types';\n\nconst { useGet: useMonthlyReportGet, invalidate: invalidateMonthlyReport } =\n createGetAPI<IMonthlyReportResponse>({\n getURL: (reportId: string) => {\n return `${BASE_URL_V1}/monthly-progress-reports/${reportId}`;\n },\n });\n\nconst { usePatch: useMonthlyReportPatch } = createPatchAPI<\n IMonthlyReportResponse,\n { feedback: string }\n>({\n getURL: (reportId: string) => {\n return `${BASE_URL_V1}/monthly-progress-reports/${reportId}`;\n },\n});\n\nexport { useMonthlyReportGet, useMonthlyReportPatch, invalidateMonthlyReport };\n"],"names":["useMonthlyReportGet","invalidateMonthlyReport","createGetAPI","reportId","BASE_URL_V1","useMonthlyReportPatch","createPatchAPI"],"mappings":";;AAKA,MAAM,EAAE,QAAQA,GAAqB,YAAYC,EAAA,IAC/CC,EAAqC;AAAA,EACnC,QAAQ,CAACC,MACA,GAAGC,CAAW,6BAA6BD,CAAQ;AAE9D,CAAC,GAEG,EAAE,UAAUE,EAAsB,IAAIC,EAG1C;AAAA,EACA,QAAQ,CAACH,MACA,GAAGC,CAAW,6BAA6BD,CAAQ;AAE9D,CAAC;"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as f, useMemo as l } from "react";
|
|
3
|
+
import { CarousalItem as u, CarouselWrapper as x } from "./achievements.styled.js";
|
|
4
|
+
import a from "../../../../ui/text/text.js";
|
|
5
|
+
import n from "../../../../ui/separator/separator.js";
|
|
6
|
+
import h from "../../../../ui/layout/flex-view.js";
|
|
7
|
+
import c from "../../../../ui/swipeable-carousel/swipeable-carousel.js";
|
|
8
|
+
import { IS_APP_RUNNING_IN_RN as t } from "../../../../../constants/app-config.js";
|
|
9
|
+
import { dotsConfig as w, navigationConfig as _ } from "./constant.js";
|
|
10
|
+
const L = ({ achievements: o, studentName: e }) => {
|
|
11
|
+
const m = f(null), s = l(
|
|
12
|
+
() => o.map((i) => /* @__PURE__ */ r(
|
|
13
|
+
u,
|
|
14
|
+
{
|
|
15
|
+
src: i.url,
|
|
16
|
+
alt: `Achievement ${i.asset_id}`,
|
|
17
|
+
withLoader: !0,
|
|
18
|
+
height: t ? "343px" : "480px",
|
|
19
|
+
width: t ? "343px" : "480px"
|
|
20
|
+
},
|
|
21
|
+
i.asset_id
|
|
22
|
+
)),
|
|
23
|
+
[o]
|
|
24
|
+
), p = l(
|
|
25
|
+
() => o.length >= 2 ? `Outstanding month! ${e} earned several achievements showing excellent progress across different areas.` : `Great work! ${e} earned new achievements this month, demonstrating growth in their skills.`,
|
|
26
|
+
[o.length, e]
|
|
27
|
+
), d = !t && s.length > 1;
|
|
28
|
+
return o != null && o.length ? /* @__PURE__ */ g(h, { children: [
|
|
29
|
+
/* @__PURE__ */ r(a, { $renderAs: "ab1-bold", color: "BLACK_1", children: "Achievements" }),
|
|
30
|
+
/* @__PURE__ */ r(n, { heightX: 0.125 }),
|
|
31
|
+
/* @__PURE__ */ r(h, { $marginBottom: -24, children: /* @__PURE__ */ r(a, { $renderAs: "ub2", color: "BLUE_6", children: p }) }),
|
|
32
|
+
t && /* @__PURE__ */ r(n, { heightX: 1 }),
|
|
33
|
+
/* @__PURE__ */ r(
|
|
34
|
+
x,
|
|
35
|
+
{
|
|
36
|
+
$height: t ? "380px" : "580px",
|
|
37
|
+
$marginBottomX: t ? -0.5 : -1,
|
|
38
|
+
children: /* @__PURE__ */ r(
|
|
39
|
+
c,
|
|
40
|
+
{
|
|
41
|
+
ref: m,
|
|
42
|
+
items: s,
|
|
43
|
+
defaultIndex: 0,
|
|
44
|
+
transitionDuration: 300,
|
|
45
|
+
showIndicators: !0,
|
|
46
|
+
dotsConfig: w,
|
|
47
|
+
showNavigationButtons: d,
|
|
48
|
+
navigationConfig: _
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ r(n, { heightX: 0.75 })
|
|
54
|
+
] }) : null;
|
|
55
|
+
};
|
|
56
|
+
export {
|
|
57
|
+
L as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=achievements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"achievements.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/achievements/achievements.tsx"],"sourcesContent":["import { useMemo, useRef, type FC } from 'react';\n\nimport { type IAchievementsProps } from './achievements-types';\nimport * as Styled from './achievements.styled';\nimport Text from '../../../../ui/text/text';\nimport Separator from '../../../../ui/separator/separator';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport SwipeableCarousel from '../../../../ui/swipeable-carousel/swipeable-carousel';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../constants/app-config';\nimport type { ISwipeableCarouselRefs } from '../../../../ui/swipeable-carousel/swipeable-carousel-types';\nimport { dotsConfig, navigationConfig } from './constant';\n\nconst Achievements: FC<IAchievementsProps> = ({ achievements, studentName }) => {\n const carouselRef = useRef<ISwipeableCarouselRefs>(null);\n\n const carouselItems = useMemo(\n () =>\n achievements.map(achievement => (\n <Styled.CarousalItem\n key={achievement.asset_id}\n src={achievement.url}\n alt={`Achievement ${achievement.asset_id}`}\n withLoader\n height={IS_APP_RUNNING_IN_RN ? '343px' : '480px'}\n width={IS_APP_RUNNING_IN_RN ? '343px' : '480px'}\n />\n )),\n [achievements],\n );\n\n const tipText = useMemo(\n () =>\n achievements.length >= 2\n ? `Outstanding month! ${studentName} earned several achievements showing excellent progress across different areas.`\n : `Great work! ${studentName} earned new achievements this month, demonstrating growth in their skills.`,\n [achievements.length, studentName],\n );\n\n const showNavigationButtons = !IS_APP_RUNNING_IN_RN && carouselItems.length > 1;\n\n if (!achievements?.length) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" color=\"BLACK_1\">\n Achievements\n </Text>\n <Separator heightX={0.125} />\n <FlexView $marginBottom={-24}>\n <Text $renderAs=\"ub2\" color=\"BLUE_6\">\n {tipText}\n </Text>\n </FlexView>\n {IS_APP_RUNNING_IN_RN && <Separator heightX={1} />}\n <Styled.CarouselWrapper\n $height={IS_APP_RUNNING_IN_RN ? '380px' : '580px'}\n $marginBottomX={IS_APP_RUNNING_IN_RN ? -0.5 : -1}\n >\n <SwipeableCarousel\n ref={carouselRef}\n items={carouselItems}\n defaultIndex={0}\n transitionDuration={300}\n showIndicators={true}\n dotsConfig={dotsConfig}\n showNavigationButtons={showNavigationButtons}\n navigationConfig={navigationConfig}\n />\n </Styled.CarouselWrapper>\n <Separator heightX={0.75} />\n </FlexView>\n );\n};\n\nexport default Achievements;\n"],"names":["Achievements","achievements","studentName","carouselRef","useRef","carouselItems","useMemo","achievement","jsx","Styled.CarousalItem","IS_APP_RUNNING_IN_RN","tipText","showNavigationButtons","FlexView","Text","Separator","Styled.CarouselWrapper","SwipeableCarousel","dotsConfig","navigationConfig"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAuC,CAAC,EAAE,cAAAC,GAAc,aAAAC,QAAkB;AACxE,QAAAC,IAAcC,EAA+B,IAAI,GAEjDC,IAAgBC;AAAA,IACpB,MACEL,EAAa,IAAI,CACfM,MAAA,gBAAAC;AAAA,MAACC;AAAAA,MAAA;AAAA,QAEC,KAAKF,EAAY;AAAA,QACjB,KAAK,eAAeA,EAAY,QAAQ;AAAA,QACxC,YAAU;AAAA,QACV,QAAQG,IAAuB,UAAU;AAAA,QACzC,OAAOA,IAAuB,UAAU;AAAA,MAAA;AAAA,MALnCH,EAAY;AAAA,IAAA,CAOpB;AAAA,IACH,CAACN,CAAY;AAAA,EAAA,GAGTU,IAAUL;AAAA,IACd,MACEL,EAAa,UAAU,IACnB,sBAAsBC,CAAW,oFACjC,eAAeA,CAAW;AAAA,IAChC,CAACD,EAAa,QAAQC,CAAW;AAAA,EAAA,GAG7BU,IAAwB,CAACF,KAAwBL,EAAc,SAAS;AAE1E,SAACJ,KAAA,QAAAA,EAAc,2BAKhBY,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAL,EAACM,GAAK,EAAA,WAAU,YAAW,OAAM,WAAU,UAE3C,gBAAA;AAAA,IACA,gBAAAN,EAACO,GAAU,EAAA,SAAS,MAAO,CAAA;AAAA,IAC3B,gBAAAP,EAACK,GAAS,EAAA,eAAe,KACvB,UAAA,gBAAAL,EAACM,GAAK,EAAA,WAAU,OAAM,OAAM,UACzB,UAAAH,EACH,CAAA,GACF;AAAA,IACCD,KAAwB,gBAAAF,EAACO,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,IAChD,gBAAAP;AAAA,MAACQ;AAAAA,MAAA;AAAA,QACC,SAASN,IAAuB,UAAU;AAAA,QAC1C,gBAAgBA,IAAuB,OAAO;AAAA,QAE9C,UAAA,gBAAAF;AAAA,UAACS;AAAA,UAAA;AAAA,YACC,KAAKd;AAAA,YACL,OAAOE;AAAA,YACP,cAAc;AAAA,YACd,oBAAoB;AAAA,YACpB,gBAAgB;AAAA,YAChB,YAAAa;AAAA,YACA,uBAAAN;AAAA,YACA,kBAAAO;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAX,EAACO,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,EAC5B,EAAA,CAAA,IA/BO;AAiCX;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import o from "styled-components";
|
|
2
|
+
import t from "../../../../ui/image/image.js";
|
|
3
|
+
import e from "../../../../ui/layout/flex-view.js";
|
|
4
|
+
const m = o(e)`
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
position: relative;
|
|
7
|
+
`, p = o(t)`
|
|
8
|
+
position: relative;
|
|
9
|
+
touch-action: auto;
|
|
10
|
+
`;
|
|
11
|
+
export {
|
|
12
|
+
p as CarousalItem,
|
|
13
|
+
m as CarouselWrapper
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=achievements.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"achievements.styled.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/achievements/achievements.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const CarouselWrapper = styled(FlexView)`\n overflow: hidden;\n position: relative;\n`;\n\nexport const CarousalItem = styled(Image)`\n position: relative;\n touch-action: auto;\n`;\n"],"names":["CarouselWrapper","styled","FlexView","CarousalItem","Image"],"mappings":";;;AAKa,MAAAA,IAAkBC,EAAOC,CAAQ;AAAA;AAAA;AAAA,GAKjCC,IAAeF,EAAOG,CAAK;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
const o = {
|
|
2
|
+
dotColor: "BLACK_1",
|
|
3
|
+
inactiveDotColor: "WHITE_1",
|
|
4
|
+
activeIndicatorSize: "8px",
|
|
5
|
+
inactiveIndicatorSize: "8px",
|
|
6
|
+
spacing: "8px"
|
|
7
|
+
}, i = {
|
|
8
|
+
buttonVariant: "secondary",
|
|
9
|
+
buttonSize: "xsmall",
|
|
10
|
+
spacing: 8
|
|
11
|
+
};
|
|
12
|
+
export {
|
|
13
|
+
o as dotsConfig,
|
|
14
|
+
i as navigationConfig
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=constant.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/achievements/constant.ts"],"sourcesContent":["const dotsConfig = {\n dotColor: 'BLACK_1',\n inactiveDotColor: 'WHITE_1',\n activeIndicatorSize: '8px',\n inactiveIndicatorSize: '8px',\n spacing: '8px',\n} as const;\n\nconst navigationConfig = {\n buttonVariant: 'secondary',\n buttonSize: 'xsmall',\n spacing: 8,\n} as const;\n\nexport { dotsConfig, navigationConfig };\n"],"names":["dotsConfig","navigationConfig"],"mappings":"AAAA,MAAMA,IAAa;AAAA,EACjB,UAAU;AAAA,EACV,kBAAkB;AAAA,EAClB,qBAAqB;AAAA,EACrB,uBAAuB;AAAA,EACvB,SAAS;AACX,GAEMC,IAAmB;AAAA,EACvB,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,SAAS;AACX;"}
|
package/dist/features/timeline/monthly-report/comps/activities/activities-card/activities-card.js
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as R, useRef as z, useState as I, useMemo as d, useCallback as u } from "react";
|
|
3
|
+
import { getCardTypeIconMap as m, stateIcon as p } from "../constants.js";
|
|
4
|
+
import { CARD_TYPE as f } from "../../../monthly-report-types.js";
|
|
5
|
+
import { ActivityCardContainerWrapper as B, ActivityCardContainer as M } from "./activities-card.styled.js";
|
|
6
|
+
import n from "../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import S from "../../../../../ui/lottie-animation/lottie-animation.js";
|
|
8
|
+
import $ from "../../../../../ui/text/text.js";
|
|
9
|
+
import T from "../../../../../homework/card-title.js";
|
|
10
|
+
import j from "../activities-card-puzzles/activities-card-puzzles.js";
|
|
11
|
+
import { NODE_STATE as h } from "../../../../daily-timeline-types.js";
|
|
12
|
+
import k from "../../../../../ui/buttons/text-button/text-button.js";
|
|
13
|
+
import { countActivitiesByState as G } from "../utils.js";
|
|
14
|
+
const K = {
|
|
15
|
+
autoplay: !1,
|
|
16
|
+
loop: !0,
|
|
17
|
+
renderer: "canvas"
|
|
18
|
+
}, O = ({
|
|
19
|
+
cardType: t,
|
|
20
|
+
nodeType: A,
|
|
21
|
+
activitiesList: o = [],
|
|
22
|
+
onPuzzleClick: C
|
|
23
|
+
}) => {
|
|
24
|
+
const a = z(null), [s, x] = I(!1), b = d(() => {
|
|
25
|
+
const { totalDone: e, totalPending: i, totalOverdue: c } = G(o);
|
|
26
|
+
return [
|
|
27
|
+
e > 0 && `${e} Done`,
|
|
28
|
+
i > 0 && `${i} In-progress`,
|
|
29
|
+
c > 0 && `${c} Overdue`
|
|
30
|
+
].filter(Boolean).join(", ");
|
|
31
|
+
}, [o]), X = d(() => t ? t.split("_").join(" ") : "", [t]), { displayedActivities: E, remainingCount: g } = d(() => {
|
|
32
|
+
if (t === f.puzzle)
|
|
33
|
+
return { displayedActivities: o, remainingCount: 0 };
|
|
34
|
+
const e = 3, i = o.length > e;
|
|
35
|
+
return s || !i ? { displayedActivities: o, remainingCount: 0 } : {
|
|
36
|
+
displayedActivities: o.slice(0, e),
|
|
37
|
+
remainingCount: o.length - e
|
|
38
|
+
};
|
|
39
|
+
}, [o, s, t]), _ = u(() => {
|
|
40
|
+
var e;
|
|
41
|
+
(e = a.current) == null || e.play();
|
|
42
|
+
}, []), w = u(() => {
|
|
43
|
+
var e;
|
|
44
|
+
(e = a.current) == null || e.stop();
|
|
45
|
+
}, []), v = u(() => {
|
|
46
|
+
x((e) => !e);
|
|
47
|
+
}, []);
|
|
48
|
+
return /* @__PURE__ */ l(n, { onMouseEnter: _, onMouseLeave: w, children: [
|
|
49
|
+
/* @__PURE__ */ r(
|
|
50
|
+
B,
|
|
51
|
+
{
|
|
52
|
+
$background: m(t).color,
|
|
53
|
+
children: /* @__PURE__ */ l(
|
|
54
|
+
M,
|
|
55
|
+
{
|
|
56
|
+
$flexDirection: "row",
|
|
57
|
+
$alignItems: "center",
|
|
58
|
+
$height: "56px",
|
|
59
|
+
$bgImage: m(t).background,
|
|
60
|
+
$gutterX: 0.78125,
|
|
61
|
+
$flexGap: 8.5,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ r(
|
|
64
|
+
n,
|
|
65
|
+
{
|
|
66
|
+
$widthX: 2,
|
|
67
|
+
$heightX: 2,
|
|
68
|
+
$borderRadiusX: 2,
|
|
69
|
+
$background: "WHITE_1",
|
|
70
|
+
$position: "relative",
|
|
71
|
+
$alignItems: "center",
|
|
72
|
+
$justifyContent: "center",
|
|
73
|
+
children: /* @__PURE__ */ r(
|
|
74
|
+
S,
|
|
75
|
+
{
|
|
76
|
+
ref: a,
|
|
77
|
+
src: m(t).lottie,
|
|
78
|
+
width: 32,
|
|
79
|
+
height: 32,
|
|
80
|
+
settings: K
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ l(n, { children: [
|
|
86
|
+
/* @__PURE__ */ r(T, { cardHeader: X, nodeType: A }),
|
|
87
|
+
/* @__PURE__ */ r($, { $renderAs: "ub3", $color: "BLACK_1", children: b })
|
|
88
|
+
] })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
o.length > 0 && (t === f.puzzle ? /* @__PURE__ */ r(j, { puzzles: o, onPuzzleClick: C }) : /* @__PURE__ */ l(n, { $flexRowGapX: 1.25, $gutterX: 1, $gapX: 1, $borderColor: "GREY_2", children: [
|
|
95
|
+
E.map(({ state: e, title: i, subtext: c, id: D }) => /* @__PURE__ */ l(n, { $flexDirection: "row", $flexGapX: 1.05, children: [
|
|
96
|
+
/* @__PURE__ */ r(n, { $gapX: 0.25, children: /* @__PURE__ */ r(
|
|
97
|
+
n,
|
|
98
|
+
{
|
|
99
|
+
$borderRadiusX: 1,
|
|
100
|
+
$background: e === h.PENDING || e === h.NOT_STARTED ? "RED" : "BLACK_1",
|
|
101
|
+
$widthX: 1,
|
|
102
|
+
$heightX: 1,
|
|
103
|
+
$alignItems: "center",
|
|
104
|
+
$justifyContent: "center",
|
|
105
|
+
children: !!e && (p[e] || p[h.COMPLETED])
|
|
106
|
+
}
|
|
107
|
+
) }),
|
|
108
|
+
/* @__PURE__ */ l(n, { $flexRowGap: 4, children: [
|
|
109
|
+
/* @__PURE__ */ r($, { $renderAs: "ub2", $color: "BLACK_1", children: i || "" }),
|
|
110
|
+
/* @__PURE__ */ r($, { $renderAs: "ub3", $color: "BLACK_T_60", children: c || "" })
|
|
111
|
+
] })
|
|
112
|
+
] }, D)),
|
|
113
|
+
(g > 0 || s) && o.length > 3 && /* @__PURE__ */ r(n, { $gutterX: 2, children: /* @__PURE__ */ r(
|
|
114
|
+
k,
|
|
115
|
+
{
|
|
116
|
+
label: s ? "Show less" : `+${g} activities`,
|
|
117
|
+
size: "regular",
|
|
118
|
+
color: "BLACK_1",
|
|
119
|
+
onClick: v
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] }))
|
|
123
|
+
] });
|
|
124
|
+
}, L = R(O);
|
|
125
|
+
export {
|
|
126
|
+
L as default
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=activities-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activities-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/activities/activities-card/activities-card.tsx"],"sourcesContent":["import { memo, type FC, useRef, useCallback, useMemo, useState } from 'react';\n\nimport { type IActivitiesCardProps } from './activities-card-types';\nimport { getCardTypeIconMap, stateIcon } from '../constants';\nimport { CARD_TYPE } from '../../../monthly-report-types';\nimport * as Styled from './activities-card.styled';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../../ui/lottie-animation/lottie-animation';\nimport { type ILottieAnimationRef } from '../../../../../ui/lottie-animation/types';\nimport Text from '../../../../../ui/text/text';\nimport CardTitle from '../../../../../homework/card-title';\nimport { type TColorNames } from '../../../../../ui/types';\nimport ActivitiesCardPuzzles from '../activities-card-puzzles/activities-card-puzzles';\nimport { NODE_STATE } from '../../../../daily-timeline-types';\nimport TextButton from '../../../../../ui/buttons/text-button/text-button';\nimport { countActivitiesByState } from '../utils';\n\nconst lottieSettings = {\n autoplay: false,\n loop: true,\n renderer: 'canvas',\n};\n\nconst ActivitiesCard: FC<IActivitiesCardProps> = ({\n cardType,\n nodeType,\n activitiesList = [],\n onPuzzleClick,\n}) => {\n const lottieRef = useRef<ILottieAnimationRef>(null);\n const [showAllActivities, setShowAllActivities] = useState(false);\n\n const progressStatus = useMemo(() => {\n const { totalDone, totalPending, totalOverdue } = countActivitiesByState(activitiesList);\n\n return [\n totalDone > 0 && `${totalDone} Done`,\n totalPending > 0 && `${totalPending} In-progress`,\n totalOverdue > 0 && `${totalOverdue} Overdue`,\n ]\n .filter(Boolean)\n .join(', ');\n }, [activitiesList]);\n const cardHeaderText = useMemo(() => (cardType ? cardType.split('_').join(' ') : ''), [cardType]);\n const { displayedActivities, remainingCount } = useMemo(() => {\n if (cardType === CARD_TYPE.puzzle) {\n return { displayedActivities: activitiesList, remainingCount: 0 };\n }\n\n const maxVisible = 3;\n const hasMore = activitiesList.length > maxVisible;\n\n if (showAllActivities || !hasMore) {\n return { displayedActivities: activitiesList, remainingCount: 0 };\n }\n\n return {\n displayedActivities: activitiesList.slice(0, maxVisible),\n remainingCount: activitiesList.length - maxVisible,\n };\n }, [activitiesList, showAllActivities, cardType]);\n\n const handleMouseEnter = useCallback(() => {\n lottieRef.current?.play();\n }, []);\n\n const handleMouseLeave = useCallback(() => {\n lottieRef.current?.stop();\n }, []);\n\n const handleToggleActivities = useCallback(() => {\n setShowAllActivities(prev => !prev);\n }, []);\n\n return (\n <FlexView onMouseEnter={handleMouseEnter} onMouseLeave={handleMouseLeave}>\n <Styled.ActivityCardContainerWrapper\n $background={getCardTypeIconMap(cardType).color as TColorNames}\n >\n <Styled.ActivityCardContainer\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $height=\"56px\"\n $bgImage={getCardTypeIconMap(cardType).background}\n $gutterX={0.78125}\n $flexGap={8.5}\n >\n <FlexView\n $widthX={2}\n $heightX={2}\n $borderRadiusX={2}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation\n ref={lottieRef}\n src={getCardTypeIconMap(cardType).lottie}\n width={32}\n height={32}\n settings={lottieSettings}\n />\n </FlexView>\n <FlexView>\n <CardTitle cardHeader={cardHeaderText} nodeType={nodeType} />\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\">\n {progressStatus}\n </Text>\n </FlexView>\n </Styled.ActivityCardContainer>\n </Styled.ActivityCardContainerWrapper>\n {activitiesList.length > 0 &&\n (cardType === CARD_TYPE.puzzle ? (\n <ActivitiesCardPuzzles puzzles={activitiesList} onPuzzleClick={onPuzzleClick} />\n ) : (\n <FlexView $flexRowGapX={1.25} $gutterX={1} $gapX={1} $borderColor=\"GREY_2\">\n {displayedActivities.map(({ state, title, subtext, id }) => (\n <FlexView $flexDirection=\"row\" $flexGapX={1.05} key={id}>\n <FlexView $gapX={0.25}>\n <FlexView\n $borderRadiusX={1}\n $background={\n state === NODE_STATE.PENDING || state === NODE_STATE.NOT_STARTED\n ? 'RED'\n : 'BLACK_1'\n }\n $widthX={1}\n $heightX={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {!!state && (stateIcon[state as NODE_STATE] || stateIcon[NODE_STATE.COMPLETED])}\n </FlexView>\n </FlexView>\n <FlexView $flexRowGap={4}>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n {title || ''}\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subtext || ''}\n </Text>\n </FlexView>\n </FlexView>\n ))}\n {(remainingCount > 0 || showAllActivities) && activitiesList.length > 3 && (\n <FlexView $gutterX={2}>\n <TextButton\n label={showAllActivities ? 'Show less' : `+${remainingCount} activities`}\n size=\"regular\"\n color=\"BLACK_1\"\n onClick={handleToggleActivities}\n />\n </FlexView>\n )}\n </FlexView>\n ))}\n </FlexView>\n );\n};\n\nexport default memo(ActivitiesCard);\n"],"names":["lottieSettings","ActivitiesCard","cardType","nodeType","activitiesList","onPuzzleClick","lottieRef","useRef","showAllActivities","setShowAllActivities","useState","progressStatus","useMemo","totalDone","totalPending","totalOverdue","countActivitiesByState","cardHeaderText","displayedActivities","remainingCount","CARD_TYPE","maxVisible","hasMore","handleMouseEnter","useCallback","_a","handleMouseLeave","handleToggleActivities","prev","jsxs","FlexView","jsx","Styled.ActivityCardContainerWrapper","getCardTypeIconMap","Styled.ActivityCardContainer","LottieAnimation","CardTitle","Text","ActivitiesCardPuzzles","state","title","subtext","id","NODE_STATE","stateIcon","TextButton","ActivitiesCard$1","memo"],"mapp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AA,IAEJ,EAAA,CAAA;AAAA,EAEN,EAAA,CAAA;AAEJ,GAEemB,IAAAC,EAAK9C,CAAc;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import r from "styled-components";
|
|
2
|
+
import e from "../../../../../ui/layout/flex-view.js";
|
|
3
|
+
const n = r(e)`
|
|
4
|
+
background-image: url(${({ $bgImage: o }) => o});
|
|
5
|
+
background-size: cover;
|
|
6
|
+
background-position: center left;
|
|
7
|
+
background-repeat: no-repeat;
|
|
8
|
+
max-width: 512px;
|
|
9
|
+
position: relative;
|
|
10
|
+
overflow: hidden;
|
|
11
|
+
`, d = r(e)`
|
|
12
|
+
position: relative;
|
|
13
|
+
outline: 1px solid ${({ theme: o }) => o.colors.WHITE_5};
|
|
14
|
+
`;
|
|
15
|
+
r(e)`
|
|
16
|
+
border: 2px dashed ${({ theme: o }) => o.colors.ORANGE_2};
|
|
17
|
+
border-radius: 8px;
|
|
18
|
+
padding: 12px;
|
|
19
|
+
margin-top: 8px;
|
|
20
|
+
position: relative;
|
|
21
|
+
`;
|
|
22
|
+
r(e)`
|
|
23
|
+
background-color: ${({ theme: o }) => o.colors.ORANGE_2};
|
|
24
|
+
color: white;
|
|
25
|
+
border-radius: 4px;
|
|
26
|
+
padding: 4px 8px;
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
min-width: 24px;
|
|
30
|
+
height: 20px;
|
|
31
|
+
align-items: center;
|
|
32
|
+
justify-content: center;
|
|
33
|
+
`;
|
|
34
|
+
r.button`
|
|
35
|
+
background: none;
|
|
36
|
+
border: none;
|
|
37
|
+
color: ${({ theme: o }) => o.colors.BLACK_1};
|
|
38
|
+
text-decoration: underline;
|
|
39
|
+
cursor: pointer;
|
|
40
|
+
font-size: 14px;
|
|
41
|
+
font-weight: 500;
|
|
42
|
+
padding: 0;
|
|
43
|
+
margin: 0;
|
|
44
|
+
|
|
45
|
+
&:hover {
|
|
46
|
+
color: ${({ theme: o }) => o.colors.ORANGE_2};
|
|
47
|
+
}
|
|
48
|
+
`;
|
|
49
|
+
export {
|
|
50
|
+
n as ActivityCardContainer,
|
|
51
|
+
d as ActivityCardContainerWrapper
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=activities-card.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activities-card.styled.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/activities/activities-card/activities-card.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nexport const ActivityCardContainer = styled(FlexView)<{ $bgImage: string }>`\n background-image: url(${({ $bgImage }) => $bgImage});\n background-size: cover;\n background-position: center left;\n background-repeat: no-repeat;\n max-width: 512px;\n position: relative;\n overflow: hidden;\n`;\n\nexport const ActivityCardContainerWrapper = styled(FlexView)`\n position: relative;\n outline: 1px solid ${({ theme }) => theme.colors.WHITE_5};\n`;\n\nexport const MoreActivitiesContainer = styled(FlexView)`\n border: 2px dashed ${({ theme }) => theme.colors.ORANGE_2};\n border-radius: 8px;\n padding: 12px;\n margin-top: 8px;\n position: relative;\n`;\n\nexport const CountBadge = styled(FlexView)`\n background-color: ${({ theme }) => theme.colors.ORANGE_2};\n color: white;\n border-radius: 4px;\n padding: 4px 8px;\n font-size: 12px;\n font-weight: 600;\n min-width: 24px;\n height: 20px;\n align-items: center;\n justify-content: center;\n`;\n\nexport const MoreActivitiesLink = styled.button`\n background: none;\n border: none;\n color: ${({ theme }) => theme.colors.BLACK_1};\n text-decoration: underline;\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n padding: 0;\n margin: 0;\n\n &:hover {\n color: ${({ theme }) => theme.colors.ORANGE_2};\n }\n`;\n"],"names":["ActivityCardContainer","styled","FlexView","$bgImage","ActivityCardContainerWrapper","theme"],"mappings":";;AAIa,MAAAA,IAAwBC,EAAOC,CAAQ;AAAA,0BAC1B,CAAC,EAAE,UAAAC,EAAS,MAAMA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASvCC,IAA+BH,EAAOC,CAAQ;AAAA;AAAA,uBAEpC,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAGnBJ,EAAOC,CAAQ;AAAA,uBAC/B,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAOjCJ,EAAOC,CAAQ;AAAA,sBACnB,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYxBJ,EAAO;AAAA;AAAA;AAAA,WAG9B,CAAC,EAAE,OAAAI,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aASjC,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,OAAO,QAAQ;AAAA;AAAA;"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as L, useRef as I, useState as h, useCallback as l, useEffect as v } from "react";
|
|
3
|
+
import X from "../../../../../../assets/line-icons/icons/chevron-left.js";
|
|
4
|
+
import w from "../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import { PuzzleContainer as A, StatusIcon as N, ContentWrapper as T, ScrollButton as m, ScrollContainer as x } from "./activities-card-puzzles.styled.js";
|
|
6
|
+
import i from "../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import B from "../../../../../ui/image/image.js";
|
|
8
|
+
import k from "../../../../../ui/separator/separator.js";
|
|
9
|
+
import D from "../../../../../ui/text/text.js";
|
|
10
|
+
import { NODE_STATE as a } from "../../../../daily-timeline-types.js";
|
|
11
|
+
import { stateIcon as d } from "../constants.js";
|
|
12
|
+
import { IS_APP_RUNNING_IN_RN as f } from "../../../../../../constants/app-config.js";
|
|
13
|
+
const j = ({
|
|
14
|
+
puzzles: $,
|
|
15
|
+
onPuzzleClick: o
|
|
16
|
+
}) => {
|
|
17
|
+
const n = $ || [], r = I(null), [g, u] = h(!1), [_, C] = h(!1), b = l(() => {
|
|
18
|
+
r.current && r.current.scrollBy({ left: -180, behavior: "smooth" });
|
|
19
|
+
}, []), p = l(() => {
|
|
20
|
+
r.current && r.current.scrollBy({ left: 180, behavior: "smooth" });
|
|
21
|
+
}, []), c = l(() => {
|
|
22
|
+
if (r.current) {
|
|
23
|
+
const { scrollLeft: t, scrollWidth: E, clientWidth: R } = r.current;
|
|
24
|
+
u(t > 0), C(t < E - R - 10);
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
v(() => {
|
|
28
|
+
const t = r.current;
|
|
29
|
+
if (t)
|
|
30
|
+
return c(), t.addEventListener("scroll", c), () => {
|
|
31
|
+
t.removeEventListener("scroll", c);
|
|
32
|
+
};
|
|
33
|
+
}, [c, n.length]);
|
|
34
|
+
const S = l(
|
|
35
|
+
(t) => /* @__PURE__ */ s(
|
|
36
|
+
A,
|
|
37
|
+
{
|
|
38
|
+
$gapX: 1,
|
|
39
|
+
$imageHue: t.image_hue || "BLUE",
|
|
40
|
+
$width: 146,
|
|
41
|
+
$height: 162,
|
|
42
|
+
$background: `${t.image_hue || "BLUE"}_2`,
|
|
43
|
+
onClick: () => o == null ? void 0 : o({
|
|
44
|
+
item_ref: t.item_ref,
|
|
45
|
+
feedback_comments: t.feedback_comments,
|
|
46
|
+
image_hue: t.image_hue,
|
|
47
|
+
title: t.title,
|
|
48
|
+
tip: t.tip
|
|
49
|
+
}),
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ e(
|
|
52
|
+
N,
|
|
53
|
+
{
|
|
54
|
+
$borderRadiusX: 1,
|
|
55
|
+
$background: t.state === a.PENDING || t.state === a.NOT_STARTED ? "RED" : "BLACK_1",
|
|
56
|
+
$widthX: 1,
|
|
57
|
+
$heightX: 1,
|
|
58
|
+
$alignItems: "center",
|
|
59
|
+
$justifyContent: "center",
|
|
60
|
+
children: t.state && (d[t.state] || d[a.COMPLETED])
|
|
61
|
+
}
|
|
62
|
+
),
|
|
63
|
+
/* @__PURE__ */ s(i, { $background: "TRANSPARENT", $alignItems: "center", children: [
|
|
64
|
+
t.image_url && /* @__PURE__ */ e(
|
|
65
|
+
B,
|
|
66
|
+
{
|
|
67
|
+
src: t.image_url ?? "",
|
|
68
|
+
alt: "Puzzle illustration",
|
|
69
|
+
width: 68,
|
|
70
|
+
height: 68,
|
|
71
|
+
withLoader: !0
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ e(k, { heightX: 1 }),
|
|
75
|
+
/* @__PURE__ */ e(i, { $gutterX: 0.25, children: /* @__PURE__ */ e(D, { $renderAs: "ab3", $align: "center", children: t.title }) })
|
|
76
|
+
] })
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
t.id
|
|
80
|
+
),
|
|
81
|
+
[o]
|
|
82
|
+
);
|
|
83
|
+
return !n || n.length === 0 ? null : /* @__PURE__ */ e(T, { $flexRowGapX: 1, children: /* @__PURE__ */ s(i, { $position: "relative", $borderColor: "GREY_2", children: [
|
|
84
|
+
/* @__PURE__ */ e(
|
|
85
|
+
m,
|
|
86
|
+
{
|
|
87
|
+
$background: "BLACK_T_60",
|
|
88
|
+
$justifyContent: "center",
|
|
89
|
+
$alignItems: "center",
|
|
90
|
+
$widthX: 2,
|
|
91
|
+
$height: "100%",
|
|
92
|
+
onClick: b,
|
|
93
|
+
$visible: !f && g,
|
|
94
|
+
$left: "0px",
|
|
95
|
+
$right: "auto",
|
|
96
|
+
children: /* @__PURE__ */ e(X, { width: 24, height: 24 })
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
/* @__PURE__ */ e(i, { $gutterX: 1, $gapX: 1, children: /* @__PURE__ */ e(x, { ref: r, children: /* @__PURE__ */ e(i, { $flexDirection: "row", $flexGapX: 1, children: n.map(S) }) }) }),
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
m,
|
|
102
|
+
{
|
|
103
|
+
$position: "absolute",
|
|
104
|
+
$widthX: 2,
|
|
105
|
+
$height: "100%",
|
|
106
|
+
$background: "BLACK_T_60",
|
|
107
|
+
$justifyContent: "center",
|
|
108
|
+
$alignItems: "center",
|
|
109
|
+
onClick: p,
|
|
110
|
+
$visible: !f && _,
|
|
111
|
+
$left: "auto",
|
|
112
|
+
$right: "0px",
|
|
113
|
+
children: /* @__PURE__ */ e(w, { width: 24, height: 24 })
|
|
114
|
+
}
|
|
115
|
+
)
|
|
116
|
+
] }) });
|
|
117
|
+
}, q = L(j);
|
|
118
|
+
export {
|
|
119
|
+
q as default
|
|
120
|
+
};
|
|
121
|
+
//# sourceMappingURL=activities-card-puzzles.js.map
|