@cuemath/leap 3.5.29 → 3.5.30-as10
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 +22 -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/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 +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/homework/card-title.js +8 -8
- package/dist/features/homework/card-title.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/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 +60 -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 +120 -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 +94 -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 +9 -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 +56 -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 +41 -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/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/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/ui/theme/text.js +14 -0
- package/dist/features/ui/theme/text.js.map +1 -1
- package/dist/index.d.ts +231 -25
- package/dist/index.js +588 -568
- 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/english-icon.50c2e005.svg +1 -0
- package/dist/static/focus-blue.664be268.svg +1 -0
- package/dist/static/full-report.00112c74.svg +1 -0
- package/dist/static/key.fa0b4c98.svg +1 -0
- package/dist/static/live-session-blue.ec7fa85f.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/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/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/features/{circle-games/game-launcher/comps/swipable-component → ui/swipeable-component}/swipeable-component-styled.js +0 -0
|
@@ -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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goals-card.js","sources":["../../../../../../../src/features/timeline/monthly-report/comps/goals/goals-card/goals-card.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useMemo, useState } from 'react';\n\nimport { type IGoalsCardProps } from '../goals-types';\nimport { calculateProgress, GOAL_CATEGORY_CONFIG } from '../goals-constants';\nimport * as Styled from './goals-card-styled';\nimport Text from '../../../../../ui/text/text';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Image from '../../../../../ui/image/image';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\nimport GoalsCardChapters from './goal-chapter-card';\nimport LinearProgressBar from '../../../../../ui/linear-progress-bar/linear-progress-bar';\n\nconst GoalsCard: FC<IGoalsCardProps> = ({ category, milestone, isExpended = false }) => {\n const [showAllChapters, setShowAllChapters] = useState(false);\n const {\n milestone_name: milestoneName,\n user_chapters: userChapters,\n progress_stat: progressStat,\n previous_progress_stat: prevProgressStat,\n } = milestone;\n const { completed, total } = progressStat;\n const { completed: prevCompleted, total: prevTotal } = prevProgressStat ?? {};\n const currentProgress = calculateProgress(completed, total);\n const previousProgress =\n prevProgressStat && prevCompleted && prevTotal\n ? calculateProgress(prevCompleted, prevTotal)\n : 0;\n\n const progressDifference = currentProgress - previousProgress;\n const showIndicator = Boolean(prevProgressStat && progressDifference > 0 && total === total);\n const showTag = Boolean(prevProgressStat && progressDifference <= 0 && total !== total);\n const isCompleted = currentProgress === 100;\n const roundedProgress = Math.round(currentProgress);\n const roundedDifference = Math.round(progressDifference);\n\n const totalChapters = userChapters.length;\n const visibleChapters = userChapters.slice(0, 2);\n const remainingChapters = Math.max(0, totalChapters - 2);\n const hiddenChapters = showAllChapters ? userChapters.slice(2) : [];\n const hasRemainingChapters = remainingChapters > 0;\n\n const categoryConfig = useMemo(() => GOAL_CATEGORY_CONFIG[category], []);\n const icon = categoryConfig.icon;\n\n const handleToggleChapters = useCallback(() => {\n setShowAllChapters(prev => !prev);\n }, []);\n\n return (\n <FlexView>\n <FlexView\n $position=\"relative\"\n $background={categoryConfig.backgroundColor}\n $borderColor={isExpended ? 'WHITE_5' : undefined}\n $gutterX={1}\n $gapX={1}\n $height={isExpended ? 'auto' : 72}\n >\n <FlexView $flexDirection=\"row\" $flexGapX={isExpended ? 1 : 0.5}>\n {icon && (\n <Image\n src={icon}\n withLoader\n width={isExpended ? 40 : 32}\n height={isExpended ? 40 : 32}\n alt={categoryConfig.label}\n />\n )}\n <FlexView>\n {isExpended && (\n <>\n <Text $renderAs=\"ac5\" $color={categoryConfig.labelColor}>\n {categoryConfig.label}\n </Text>\n <Separator heightX={0.25} />\n </>\n )}\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\">\n {milestoneName}\n </Text>\n <Separator heightX={isExpended ? 0.5 : 0.125} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.25}>\n <Text $renderAs=\"ab3\" $color=\"BLACK_T_60\">\n {isCompleted ? 'Completed' : `${roundedProgress}% complete`}\n </Text>\n {showIndicator && !isCompleted && (\n <Text $renderAs=\"ab3\" $color=\"GREEN_6\">\n (+{roundedDifference}%)\n </Text>\n )}\n </FlexView>\n </FlexView>\n <Styled.ProgressBarContainer>\n <LinearProgressBar\n percentage={showIndicator ? previousProgress : currentProgress}\n delta={showIndicator ? progressDifference : 0}\n height={4}\n backgroundColor=\"WHITE_5\"\n fillColor=\"BLACK_1\"\n deltaProgressColor=\"GREEN_5\"\n />\n </Styled.ProgressBarContainer>\n </FlexView>\n {showTag && (\n <>\n <Separator heightX={0.875} />\n <Styled.TagContainer $gapX={0.5} $gutterX={1} $background={categoryConfig.tagColor}>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\">\n Learning plan was modified — progress updated accordingly.\n </Text>\n </Styled.TagContainer>\n </>\n )}\n </FlexView>\n {isExpended && totalChapters > 0 && (\n <Styled.ChaptersContainer\n $gapX={1}\n $flexDirection=\"column\"\n $flexGapX={1.25}\n $borderColor=\"WHITE_5\"\n >\n <GoalsCardChapters chapters={visibleChapters} />\n {hasRemainingChapters && (\n <>\n {!showAllChapters && (\n <FlexView $gutterX={4.5}>\n <Clickable\n onClick={handleToggleChapters}\n label={`+${remainingChapters} chapters`}\n >\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\">\n +{remainingChapters} chapters\n </Text>\n </Clickable>\n </FlexView>\n )}\n {showAllChapters && (\n <>\n <GoalsCardChapters chapters={hiddenChapters} />\n <FlexView $gutterX={4.5}>\n <Clickable onClick={handleToggleChapters} label=\"Show less\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\">\n Show less\n </Text>\n </Clickable>\n </FlexView>\n </>\n )}\n </>\n )}\n </Styled.ChaptersContainer>\n )}\n </FlexView>\n );\n};\n\nexport default memo(GoalsCard);\n"],"names":["GoalsCard","category","milestone","isExpended","showAllChapters","setShowAllChapters","useState","milestoneName","userChapters","progressStat","prevProgressStat","completed","total","prevCompleted","prevTotal","currentProgress","calculateProgress","previousProgress","progressDifference","showIndicator","showTag","isCompleted","roundedProgress","roundedDifference","totalChapters","visibleChapters","remainingChapters","hiddenChapters","hasRemainingChapters","categoryConfig","useMemo","GOAL_CATEGORY_CONFIG","icon","handleToggleChapters","useCallback","prev","FlexView","jsxs","jsx","Image","Fragment","Text","Separator","Styled.ProgressBarContainer","LinearProgressBar","Styled.TagContainer","Styled.ChaptersContainer","GoalsCardChapters","Clickable","GoalsCard$1","memo"],"mappings":"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"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ILLUSTRATIONS as o } from "../../../../../assets/illustrations/illustrations.js";
|
|
2
|
+
import { EGoalCategory as l } from "../../../monthly-timeline/monthly-timeline-types.js";
|
|
3
|
+
const a = {
|
|
4
|
+
[l.SCHOOL_SUCCESS]: {
|
|
5
|
+
label: "School Success",
|
|
6
|
+
icon: o.GRADUATE_ICON_PINK,
|
|
7
|
+
backgroundColor: "PURPLE_1",
|
|
8
|
+
labelColor: "PURPLE_6",
|
|
9
|
+
tagColor: "PURPLE_2"
|
|
10
|
+
},
|
|
11
|
+
[l.ENRICHMENT]: {
|
|
12
|
+
label: "Enrichment",
|
|
13
|
+
icon: o.STAR_ORANGE,
|
|
14
|
+
backgroundColor: "ORANGE_1",
|
|
15
|
+
labelColor: "ORANGE_6",
|
|
16
|
+
tagColor: "ORANGE_2"
|
|
17
|
+
},
|
|
18
|
+
[l.TEST_PREP]: {
|
|
19
|
+
label: "Test Prep",
|
|
20
|
+
icon: o.TROPHY_BLUE,
|
|
21
|
+
backgroundColor: "BLUE_1",
|
|
22
|
+
labelColor: "BLUE_6",
|
|
23
|
+
tagColor: "BLUE_2"
|
|
24
|
+
}
|
|
25
|
+
}, e = (E, r) => r > 0 ? Math.floor(E / r * 100) : 0;
|
|
26
|
+
export {
|
|
27
|
+
a as GOAL_CATEGORY_CONFIG,
|
|
28
|
+
e as calculateProgress
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=goals-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goals-constants.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/goals/goals-constants.ts"],"sourcesContent":["import { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport { EGoalCategory } from '../../../monthly-timeline/monthly-timeline-types';\n\nexport const GOAL_CATEGORY_CONFIG = {\n [EGoalCategory.SCHOOL_SUCCESS]: {\n label: 'School Success',\n icon: ILLUSTRATIONS.GRADUATE_ICON_PINK,\n backgroundColor: 'PURPLE_1',\n labelColor: 'PURPLE_6',\n tagColor: 'PURPLE_2',\n },\n [EGoalCategory.ENRICHMENT]: {\n label: 'Enrichment',\n icon: ILLUSTRATIONS.STAR_ORANGE,\n backgroundColor: 'ORANGE_1',\n labelColor: 'ORANGE_6',\n tagColor: 'ORANGE_2',\n },\n [EGoalCategory.TEST_PREP]: {\n label: 'Test Prep',\n icon: ILLUSTRATIONS.TROPHY_BLUE,\n backgroundColor: 'BLUE_1',\n labelColor: 'BLUE_6',\n tagColor: 'BLUE_2',\n },\n} as const;\n\nexport const calculateProgress = (completed: number, total: number): number => {\n return total > 0 ? Math.floor((completed / total) * 100) : 0;\n};\n"],"names":["GOAL_CATEGORY_CONFIG","EGoalCategory","ILLUSTRATIONS","calculateProgress","completed","total"],"mappings":";;AAGO,MAAMA,IAAuB;AAAA,EAClC,CAACC,EAAc,cAAc,GAAG;AAAA,IAC9B,OAAO;AAAA,IACP,MAAMC,EAAc;AAAA,IACpB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA,CAACD,EAAc,UAAU,GAAG;AAAA,IAC1B,OAAO;AAAA,IACP,MAAMC,EAAc;AAAA,IACpB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AAAA,EACA,CAACD,EAAc,SAAS,GAAG;AAAA,IACzB,OAAO;AAAA,IACP,MAAMC,EAAc;AAAA,IACpB,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,UAAU;AAAA,EACZ;AACF,GAEaC,IAAoB,CAACC,GAAmBC,MAC5CA,IAAQ,IAAI,KAAK,MAAOD,IAAYC,IAAS,GAAG,IAAI;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsxs as e, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import f from "./goals-card/goals-card.js";
|
|
3
|
+
import t from "../../../../ui/layout/flex-view.js";
|
|
4
|
+
import i from "../../../../ui/text/text.js";
|
|
5
|
+
import m from "../../../../ui/separator/separator.js";
|
|
6
|
+
const n = ({ milestones: o, isExpended: l = !1 }) => !o || o.length === 0 ? null : /* @__PURE__ */ e(t, { children: [
|
|
7
|
+
/* @__PURE__ */ r(i, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "Goals" }),
|
|
8
|
+
/* @__PURE__ */ r(m, { heightX: 1 }),
|
|
9
|
+
/* @__PURE__ */ r(t, { $flexRowGapX: l ? 1.5 : 0, children: o.map((a) => /* @__PURE__ */ r(
|
|
10
|
+
f,
|
|
11
|
+
{
|
|
12
|
+
category: a.goal_category,
|
|
13
|
+
milestone: a,
|
|
14
|
+
isExpended: l
|
|
15
|
+
},
|
|
16
|
+
a.user_milestone_id
|
|
17
|
+
)) })
|
|
18
|
+
] });
|
|
19
|
+
export {
|
|
20
|
+
n as default
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=goals.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"goals.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/goals/goals.tsx"],"sourcesContent":["import { type FC } from 'react';\n\nimport { type IGoalsProps } from './goals-types';\nimport GoalsCard from './goals-card/goals-card';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport Separator from '../../../../ui/separator/separator';\n\nconst Goals: FC<IGoalsProps> = ({ milestones, isExpended = false }) => {\n if (!milestones || milestones.length === 0) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Goals\n </Text>\n <Separator heightX={1} />\n <FlexView $flexRowGapX={isExpended ? 1.5 : 0}>\n {milestones.map(milestone => (\n <GoalsCard\n key={milestone.user_milestone_id}\n category={milestone.goal_category}\n milestone={milestone}\n isExpended={isExpended}\n />\n ))}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default Goals;\n"],"names":["Goals","milestones","isExpended","FlexView","jsx","Text","Separator","milestone","GoalsCard"],"mappings":";;;;;AAQA,MAAMA,IAAyB,CAAC,EAAE,YAAAC,GAAY,YAAAC,IAAa,SACrD,CAACD,KAAcA,EAAW,WAAW,IAChC,yBAINE,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,SAAA;AAAA,EACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EACvB,gBAAAF,EAACD,KAAS,cAAcD,IAAa,MAAM,GACxC,UAAAD,EAAW,IAAI,CACdM,MAAA,gBAAAH;AAAA,IAACI;AAAA,IAAA;AAAA,MAEC,UAAUD,EAAU;AAAA,MACpB,WAAAA;AAAA,MACA,YAAAL;AAAA,IAAA;AAAA,IAHKK,EAAU;AAAA,EAKlB,CAAA,GACH;AACF,EAAA,CAAA;"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
const o = t.div`
|
|
3
|
+
display: flex;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
gap: 24px;
|
|
6
|
+
padding: 0 16px;
|
|
7
|
+
max-width: 512px;
|
|
8
|
+
width: 100%;
|
|
9
|
+
margin: 0 auto;
|
|
10
|
+
`;
|
|
11
|
+
export {
|
|
12
|
+
o as MonthlyReportContainer
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=monthly-report-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-report-styled.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const MonthlyReportContainer = styled.div`\n display: flex;\n flex-direction: column;\n gap: 24px;\n padding: 0 16px;\n max-width: 512px;\n width: 100%;\n margin: 0 auto;\n`;\n"],"names":["MonthlyReportContainer","styled"],"mappings":";AAEO,MAAMA,IAAyBC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
var e = /* @__PURE__ */ ((t) => (t.general = "general", t.legacy = "legacy", t.diagnostic = "diagnostic", t.remedial = "remedial", t.recap = "recap", t.learn = "learn", t.extra_practice = "extra_practice", t.practice = "practice", t.test = "test", t.revision = "revision", t.advanced = "advanced", t.challenge = "challenge", t.video = "video", t.simulation = "simulation", t.note = "note", t.subjective = "subjective", t.deck = "deck", t.puzzle = "puzzle", t.test_series = "test_series", t.activity = "activity", t.project = "project", t.certificate = "certificate", t.ppt_viva = "ppt_viva", t.ppt_content = "ppt_content", t.wb_activity = "wb_activity", t.smart_practice = "smart_practice", t.exit_ticket = "exit_ticket", t.monthly_mastery_test = "monthly_mastery_test", t.supplementary_mastery_test = "supplementary_mastery_test", t.trial_diagnostic = "trial_diagnostic", t.trial_basic = "trial_basic", t.trial_intermediate = "trial_intermediate", t.trial_advanced = "trial_advanced", t))(e || {});
|
|
2
|
+
export {
|
|
3
|
+
e as CARD_TYPE
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=monthly-report-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-report-types.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report-types.ts"],"sourcesContent":["import { type NODE_TYPES } from '../../../types/models/worksheet';\nimport { type TCourseStream } from '../../milestone/create/milestone-create-types';\nimport { type THueNames } from '../../ui/types';\nimport { type NODE_STATE } from '../daily-timeline-types';\nimport { type IUserMilestone } from '../monthly-timeline/monthly-timeline-types';\n\nexport enum CARD_TYPE {\n 'general' = 'general',\n 'legacy' = 'legacy',\n 'diagnostic' = 'diagnostic',\n 'remedial' = 'remedial',\n 'recap' = 'recap',\n 'learn' = 'learn',\n 'extra_practice' = 'extra_practice',\n 'practice' = 'practice',\n 'test' = 'test',\n 'revision' = 'revision',\n 'advanced' = 'advanced',\n 'challenge' = 'challenge',\n 'video' = 'video',\n 'simulation' = 'simulation',\n 'note' = 'note',\n 'subjective' = 'subjective',\n 'deck' = 'deck',\n 'puzzle' = 'puzzle',\n 'test_series' = 'test_series',\n 'activity' = 'activity',\n 'project' = 'project',\n 'certificate' = 'certificate',\n 'ppt_viva' = 'ppt_viva',\n 'ppt_content' = 'ppt_content',\n 'wb_activity' = 'wb_activity',\n 'smart_practice' = 'smart_practice',\n 'exit_ticket' = 'exit_ticket',\n 'monthly_mastery_test' = 'monthly_mastery_test',\n 'supplementary_mastery_test' = 'supplementary_mastery_test',\n 'trial_diagnostic' = 'trial_diagnostic',\n 'trial_basic' = 'trial_basic',\n 'trial_intermediate' = 'trial_intermediate',\n 'trial_advanced' = 'trial_advanced',\n}\n\nexport type ActivitiesByCardType = Partial<{\n [K in CARD_TYPE]: IMonthlyActivity[];\n}>;\n\nexport type TFeedback = 'positive' | 'negative';\n\nexport interface IMonthlyReportResponse {\n course_stream: TCourseStream;\n id: string;\n created_on_ts: number;\n is_deleted: boolean;\n report_date: string;\n report_date_ts: number;\n report_month: number;\n report_year: number;\n student_course_ids: string[];\n user_id: string;\n updated_on_ts: number;\n calendar_data: TCalendarData | null;\n progress_data: {\n user_milestones: IUserMilestone[];\n activities: ActivitiesByCardType;\n user_achievements: IAchievementAsset[];\n };\n feedback: TFeedback | null;\n}\n\nexport interface IProgressStat {\n completed: number;\n total: number;\n}\n\nexport interface IMonthlyActivity {\n id: string;\n node_type: NODE_TYPES;\n card_type: CARD_TYPE;\n card_header: CARD_TYPE | null;\n feedback_comments: string | null;\n state: NODE_STATE;\n title?: string;\n accuracy?: number | null;\n subtext?: string | null;\n is_timed?: boolean;\n image_hue?: THueNames;\n image_url?: string;\n sat_max_score?: number | null;\n sat_total_score?: number | null;\n item_ref?: string | null;\n thumbnail_url?: string;\n user_attempt_id?: string | null;\n tip: string | null;\n user_block_id: string | null;\n user_chapter_id: string | null;\n user_node_id: string | null;\n}\n\nexport interface IAchievementAsset {\n asset_id: string;\n url: string;\n}\n\nexport interface IMonthlyReportProps {\n reportId: string;\n studentName: string;\n onPuzzleClick?: (params: {\n item_ref: IMonthlyActivity['item_ref'];\n feedback_comments: IMonthlyActivity['feedback_comments'];\n image_hue: IMonthlyActivity['image_hue'];\n title: IMonthlyActivity['title'];\n tip: IMonthlyActivity['tip'];\n }) => void;\n showSnackbar?: (params: { type: 'error' | 'info'; message: string; bgColor: string }) => void;\n onFeedback?: (feedback: TFeedback, studentCourseId: string) => void;\n}\n\nexport type TClassType = 'REGULAR' | 'EXTRA';\nexport interface IClassEvent {\n class_type: TClassType;\n is_paused: boolean;\n is_present: boolean;\n status: string;\n tag: string | null;\n theme: string;\n time: number;\n}\n\nexport type TCalendarData = Record<string, IClassEvent[]>;\n"],"names":["CARD_TYPE"],"mappings":"AAMY,IAAAA,sBAAAA,OACVA,EAAA,UAAY,WACZA,EAAA,SAAW,UACXA,EAAA,aAAe,cACfA,EAAA,WAAa,YACbA,EAAA,QAAU,SACVA,EAAA,QAAU,SACVA,EAAA,iBAAmB,kBACnBA,EAAA,WAAa,YACbA,EAAA,OAAS,QACTA,EAAA,WAAa,YACbA,EAAA,WAAa,YACbA,EAAA,YAAc,aACdA,EAAA,QAAU,SACVA,EAAA,aAAe,cACfA,EAAA,OAAS,QACTA,EAAA,aAAe,cACfA,EAAA,OAAS,QACTA,EAAA,SAAW,UACXA,EAAA,cAAgB,eAChBA,EAAA,WAAa,YACbA,EAAA,UAAY,WACZA,EAAA,cAAgB,eAChBA,EAAA,WAAa,YACbA,EAAA,cAAgB,eAChBA,EAAA,cAAgB,eAChBA,EAAA,iBAAmB,kBACnBA,EAAA,cAAgB,eAChBA,EAAA,uBAAyB,wBACzBA,EAAA,6BAA+B,8BAC/BA,EAAA,mBAAqB,oBACrBA,EAAA,cAAgB,eAChBA,EAAA,qBAAuB,sBACvBA,EAAA,iBAAmB,kBAjCTA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx as t, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h, useCallback as _, useEffect as p } from "react";
|
|
3
|
+
import { useMonthlyReportGet as g } from "./api/use-monthly-report-get.js";
|
|
4
|
+
import y from "../../ui/loader/app-loader/app-loader.js";
|
|
5
|
+
import v from "../../ui/error/error.js";
|
|
6
|
+
import { MonthlyReportContainer as x } from "./monthly-report-styled.js";
|
|
7
|
+
import R from "./comps/goals/goals.js";
|
|
8
|
+
import A from "./comps/activities/activities.js";
|
|
9
|
+
import c from "../../ui/layout/flex-view.js";
|
|
10
|
+
import C from "./comps/attendance/attendance.js";
|
|
11
|
+
import $ from "./comps/feedback/feedback.js";
|
|
12
|
+
import j from "./comps/achievements/achievements.js";
|
|
13
|
+
import { IS_APP_RUNNING_IN_RN as D } from "../../../constants/app-config.js";
|
|
14
|
+
import I from "../../ui/separator/separator.js";
|
|
15
|
+
const M = ({
|
|
16
|
+
studentName: s,
|
|
17
|
+
reportId: o,
|
|
18
|
+
onPuzzleClick: f,
|
|
19
|
+
showSnackbar: n,
|
|
20
|
+
onFeedback: l
|
|
21
|
+
}) => {
|
|
22
|
+
const {
|
|
23
|
+
get: a,
|
|
24
|
+
data: e,
|
|
25
|
+
isProcessing: i,
|
|
26
|
+
isProcessingFailed: d,
|
|
27
|
+
isStale: m
|
|
28
|
+
} = g(), r = _(() => {
|
|
29
|
+
a(o);
|
|
30
|
+
}, [a, o]);
|
|
31
|
+
return p(() => {
|
|
32
|
+
r();
|
|
33
|
+
}, [r]), p(() => {
|
|
34
|
+
m && !i && r();
|
|
35
|
+
}, [m, i, r]), i || !e ? /* @__PURE__ */ t(c, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(y, { height: "100dvh" }) }) : d ? /* @__PURE__ */ t(c, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(v, { onTryAgain: r }) }) : e ? /* @__PURE__ */ u(x, { children: [
|
|
36
|
+
/* @__PURE__ */ t(R, { milestones: e.progress_data.user_milestones, isExpended: !0 }),
|
|
37
|
+
/* @__PURE__ */ t(A, { activities: e.progress_data.activities, onPuzzleClick: f }),
|
|
38
|
+
/* @__PURE__ */ t(
|
|
39
|
+
j,
|
|
40
|
+
{
|
|
41
|
+
achievements: e.progress_data.user_achievements,
|
|
42
|
+
studentName: s
|
|
43
|
+
}
|
|
44
|
+
),
|
|
45
|
+
/* @__PURE__ */ t(
|
|
46
|
+
C,
|
|
47
|
+
{
|
|
48
|
+
calendarData: e.calendar_data,
|
|
49
|
+
reportMonth: e.report_month,
|
|
50
|
+
reportYear: e.report_year,
|
|
51
|
+
onDateClick: n
|
|
52
|
+
}
|
|
53
|
+
),
|
|
54
|
+
D && !e.feedback && e.student_course_ids[0] ? /* @__PURE__ */ t(
|
|
55
|
+
$,
|
|
56
|
+
{
|
|
57
|
+
reportId: o,
|
|
58
|
+
studentName: s,
|
|
59
|
+
onFeedback: l,
|
|
60
|
+
studentCourseId: e.student_course_ids[0],
|
|
61
|
+
showSnackbar: n
|
|
62
|
+
}
|
|
63
|
+
) : /* @__PURE__ */ t(I, { heightX: 1 })
|
|
64
|
+
] }) : null;
|
|
65
|
+
}, q = h(M);
|
|
66
|
+
export {
|
|
67
|
+
q as default
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=monthly-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-report.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { type IMonthlyReportProps } from './monthly-report-types';\nimport { useMonthlyReportGet } from './api/use-monthly-report-get';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Error from '../../ui/error/error';\nimport * as Styled from './monthly-report-styled';\nimport Goals from './comps/goals/goals';\nimport Activities from './comps/activities/activities';\nimport FlexView from '../../ui/layout/flex-view';\nimport Attendance from './comps/attendance/attendance';\nimport Feedback from './comps/feedback/feedback';\nimport Achievements from './comps/achievements/achievements';\nimport { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\nimport Separator from '../../ui/separator/separator';\n\nconst MonthlyReport: FC<IMonthlyReportProps> = ({\n studentName,\n reportId,\n onPuzzleClick,\n showSnackbar,\n onFeedback,\n}) => {\n const {\n get: getReport,\n data: reportData,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useMonthlyReportGet();\n\n const fetchData = useCallback(() => {\n getReport(reportId);\n }, [getReport, reportId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n if (isStale && !isProcessing) {\n fetchData();\n }\n }, [isStale, isProcessing, fetchData]);\n\n if (isProcessing || !reportData) {\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <AppLoader height=\"100dvh\" />\n </FlexView>\n );\n }\n\n if (isProcessingFailed) {\n return (\n <FlexView $flex={1} $alignItems=\"center\" $justifyContent=\"center\">\n <Error onTryAgain={fetchData} />\n </FlexView>\n );\n }\n\n if (!reportData) {\n return null;\n }\n\n return (\n <Styled.MonthlyReportContainer>\n <Goals milestones={reportData.progress_data.user_milestones} isExpended={true} />\n <Activities activities={reportData.progress_data.activities} onPuzzleClick={onPuzzleClick} />\n <Achievements\n achievements={reportData.progress_data.user_achievements}\n studentName={studentName}\n />\n <Attendance\n calendarData={reportData.calendar_data}\n reportMonth={reportData.report_month}\n reportYear={reportData.report_year}\n onDateClick={showSnackbar}\n />\n {IS_APP_RUNNING_IN_RN && !reportData.feedback && reportData.student_course_ids[0] ? (\n <Feedback\n reportId={reportId}\n studentName={studentName}\n onFeedback={onFeedback}\n studentCourseId={reportData.student_course_ids[0]}\n showSnackbar={showSnackbar}\n />\n ) : (\n <Separator heightX={1} />\n )}\n </Styled.MonthlyReportContainer>\n );\n};\n\nexport default memo(MonthlyReport);\n"],"names":["MonthlyReport","studentName","reportId","onPuzzleClick","showSnackbar","onFeedback","getReport","reportData","isProcessing","isProcessingFailed","isStale","useMonthlyReportGet","fetchData","useCallback","useEffect","jsx","FlexView","AppLoader","Error","jsxs","Styled.MonthlyReportContainer","Goals","Activities","Achievements","Attendance","IS_APP_RUNNING_IN_RN","Feedback","Separator","monthlyReport","memo"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,IAAyC,CAAC;AAAA,EAC9C,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,EAAoB,GAElBC,IAAYC,EAAY,MAAM;AAClC,IAAAP,EAAUJ,CAAQ;AAAA,EAAA,GACjB,CAACI,GAAWJ,CAAQ,CAAC;AAYpB,SAVJY,EAAU,MAAM;AACJ,IAAAF;EAAA,GACT,CAACA,CAAS,CAAC,GAEdE,EAAU,MAAM;AACV,IAAAJ,KAAW,CAACF,KACJI;EAEX,GAAA,CAACF,GAASF,GAAcI,CAAS,CAAC,GAEjCJ,KAAgB,CAACD,IAEhB,gBAAAQ,EAAAC,GAAA,EAAS,OAAO,GAAG,aAAY,UAAS,iBAAgB,UACvD,UAAC,gBAAAD,EAAAE,GAAA,EAAU,QAAO,SAAA,CAAS,EAC7B,CAAA,IAIAR,IAEC,gBAAAM,EAAAC,GAAA,EAAS,OAAO,GAAG,aAAY,UAAS,iBAAgB,UACvD,UAAC,gBAAAD,EAAAG,GAAA,EAAM,YAAYN,EAAA,CAAW,EAChC,CAAA,IAICL,IAKH,gBAAAY,EAACC,GAAA,EACC,UAAA;AAAA,IAAA,gBAAAL,EAACM,KAAM,YAAYd,EAAW,cAAc,iBAAiB,YAAY,IAAM;AAAA,sBAC9Ee,GAAW,EAAA,YAAYf,EAAW,cAAc,YAAY,eAAAJ,GAA8B;AAAA,IAC3F,gBAAAY;AAAA,MAACQ;AAAA,MAAA;AAAA,QACC,cAAchB,EAAW,cAAc;AAAA,QACvC,aAAAN;AAAA,MAAA;AAAA,IACF;AAAA,IACA,gBAAAc;AAAA,MAACS;AAAA,MAAA;AAAA,QACC,cAAcjB,EAAW;AAAA,QACzB,aAAaA,EAAW;AAAA,QACxB,YAAYA,EAAW;AAAA,QACvB,aAAaH;AAAA,MAAA;AAAA,IACf;AAAA,IACCqB,KAAwB,CAAClB,EAAW,YAAYA,EAAW,mBAAmB,CAAC,IAC9E,gBAAAQ;AAAA,MAACW;AAAA,MAAA;AAAA,QACC,UAAAxB;AAAA,QACA,aAAAD;AAAA,QACA,YAAAI;AAAA,QACA,iBAAiBE,EAAW,mBAAmB,CAAC;AAAA,QAChD,cAAAH;AAAA,MAAA;AAAA,IAGF,IAAA,gBAAAW,EAACY,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,EAE3B,EAAA,CAAA,IA5BO;AA8BX,GAEeC,IAAAC,EAAK7B,CAAa;"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { createGetAPI as t } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL_V1 as o } from "../../../../constants/api.js";
|
|
3
|
+
import { stringify as i } from "../../../../helpers/query-string.js";
|
|
4
|
+
const { useGet: p } = t({
|
|
5
|
+
getURL: (e, r) => `${o}/users/${e}/reports/?${i(r)}`
|
|
6
|
+
});
|
|
7
|
+
export {
|
|
8
|
+
p as useMonthlyTimelineGet
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=use-monthly-timeline-get.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-monthly-timeline-get.js","sources":["../../../../../src/features/timeline/monthly-timeline/api/use-monthly-timeline-get.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../../constants/api';\nimport { type IMonthlyTimeline } from '../monthly-timeline-types';\nimport { stringify } from '../../../../helpers/query-string';\n\ninterface MonthlyTimelineParams {\n course_stream?: string[];\n timezone?: string;\n}\n\nconst { useGet: useMonthlyTimelineGet } = createGetAPI<IMonthlyTimeline[], MonthlyTimelineParams>({\n getURL: (studentId, params: MonthlyTimelineParams) => {\n return `${BASE_URL_V1}/users/${studentId}/reports/?${stringify(params)}`;\n },\n});\n\nexport { useMonthlyTimelineGet };\n"],"names":["useMonthlyTimelineGet","createGetAPI","studentId","params","BASE_URL_V1","stringify"],"mappings":";;;AAWA,MAAM,EAAE,QAAQA,EAAsB,IAAIC,EAAwD;AAAA,EAChG,QAAQ,CAACC,GAAWC,MACX,GAAGC,CAAW,UAAUF,CAAS,aAAaG,EAAUF,CAAM,CAAC;AAE1E,CAAC;"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsxs as a, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as x } from "react";
|
|
3
|
+
import { GoalsSection as P } from "./monthly-card.styled.js";
|
|
4
|
+
import I from "../../../monthly-report/comps/goals/goals-card/goals-card.js";
|
|
5
|
+
import n from "../../../../ui/layout/flex-view.js";
|
|
6
|
+
import M from "../../../../ui/buttons/clickable/clickable.js";
|
|
7
|
+
import w from "../../../../../assets/line-icons/icons/carat-right.js";
|
|
8
|
+
import $ from "../../../../ui/text/text.js";
|
|
9
|
+
import g from "../../../../ui/image/image.js";
|
|
10
|
+
import { REPORT_CONFIG as c, monthNames as E } from "../../constants.js";
|
|
11
|
+
import { REPORT_TYPE as o } from "../../monthly-timeline-types.js";
|
|
12
|
+
import { ILLUSTRATIONS as L } from "../../../../../assets/illustrations/illustrations.js";
|
|
13
|
+
const T = ({
|
|
14
|
+
report: e,
|
|
15
|
+
year: _,
|
|
16
|
+
month: R,
|
|
17
|
+
onReportClick: s,
|
|
18
|
+
reportType: l,
|
|
19
|
+
courseStream: u
|
|
20
|
+
}) => {
|
|
21
|
+
var m, h, f;
|
|
22
|
+
const b = () => {
|
|
23
|
+
s && s((e == null ? void 0 : e.id) || "", l, _, E[R - 1] || "");
|
|
24
|
+
};
|
|
25
|
+
let t = { label: "", icon: "" };
|
|
26
|
+
l === o.PTM ? t = c.PTM ?? { label: "Report", icon: "full" } : l === o.MPR_V1 ? t = c.MPR_V1 ?? { label: "Report", icon: "full" } : l === o.MPR_V2 && (t = c["MPR_V2_" + (u || "").toLowerCase()] ?? {
|
|
27
|
+
label: "Report",
|
|
28
|
+
icon: "full"
|
|
29
|
+
});
|
|
30
|
+
const d = l === o.PTM ? [] : ((m = e == null ? void 0 : e.progress_data) == null ? void 0 : m.user_milestones) || [];
|
|
31
|
+
return l === o.MPR_V2 && !((f = (h = e == null ? void 0 : e.progress_data) == null ? void 0 : h.user_milestones) != null && f.length) ? /* @__PURE__ */ a(
|
|
32
|
+
n,
|
|
33
|
+
{
|
|
34
|
+
$flexDirection: "row",
|
|
35
|
+
$alignItems: "center",
|
|
36
|
+
$flexGapX: 0.5,
|
|
37
|
+
$gutterX: 1,
|
|
38
|
+
$gapX: 1,
|
|
39
|
+
$borderColor: "WHITE_5",
|
|
40
|
+
$background: "WHITE_3",
|
|
41
|
+
$heightX: 4.5,
|
|
42
|
+
children: [
|
|
43
|
+
/* @__PURE__ */ i(g, { src: L.NO_REPORT, alt: "report icon", withLoader: !0, width: 32, height: 32 }),
|
|
44
|
+
/* @__PURE__ */ i($, { $renderAs: "ub2", $color: "BLACK_1", children: "Report unavailable - no activity this month." })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
) : /* @__PURE__ */ i(
|
|
48
|
+
M,
|
|
49
|
+
{
|
|
50
|
+
onClick: b,
|
|
51
|
+
disabled: !(e != null && e.id) && l !== o.MPR_V1,
|
|
52
|
+
label: "Report Card click",
|
|
53
|
+
children: /* @__PURE__ */ a(n, { $flexGap: 1, $borderColor: "BLACK_1", children: [
|
|
54
|
+
!!d.length && /* @__PURE__ */ i(P, { $flexGap: 1, children: d.map((r, C) => /* @__PURE__ */ i(
|
|
55
|
+
I,
|
|
56
|
+
{
|
|
57
|
+
category: r.goal_category,
|
|
58
|
+
milestone: r,
|
|
59
|
+
isExpended: !1
|
|
60
|
+
},
|
|
61
|
+
r.user_milestone_id || C
|
|
62
|
+
)) }),
|
|
63
|
+
/* @__PURE__ */ a(
|
|
64
|
+
n,
|
|
65
|
+
{
|
|
66
|
+
$flexDirection: "row",
|
|
67
|
+
$alignItems: "center",
|
|
68
|
+
$justifyContent: "space-between",
|
|
69
|
+
$background: "BLACK_1",
|
|
70
|
+
$heightX: 3,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ a(n, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.5, $gutterX: 1, children: [
|
|
73
|
+
/* @__PURE__ */ i(g, { src: t.icon, alt: "report icon", withLoader: !0, width: 32, height: 32 }),
|
|
74
|
+
/* @__PURE__ */ i($, { $renderAs: "ub2-bold", $color: "WHITE", children: t.label })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ i(n, { $gutterX: 0.75, children: /* @__PURE__ */ i(w, { width: 24, height: 24, color: "WHITE" }) })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}, K = x(T);
|
|
84
|
+
export {
|
|
85
|
+
K as default
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=monthly-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-card.js","sources":["../../../../../../src/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { type IMonthlyReportCardProps } from './monthly-card-types';\nimport * as Styled from './monthly-card.styled';\nimport GoalsCard from '../../../monthly-report/comps/goals/goals-card/goals-card';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport Text from '../../../../ui/text/text';\nimport Image from '../../../../ui/image/image';\nimport { monthNames, REPORT_CONFIG } from '../../constants';\nimport { REPORT_TYPE } from '../../monthly-timeline-types';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\n\nconst MonthlyReportCard: FC<IMonthlyReportCardProps> = ({\n report,\n year,\n month,\n onReportClick,\n reportType,\n courseStream,\n}) => {\n const handleReportClick = () => {\n if (onReportClick) {\n onReportClick(report?.id || '', reportType, year, monthNames[month - 1] || '');\n }\n };\n\n let config = { label: '', icon: '' };\n\n if (reportType === REPORT_TYPE.PTM) {\n config = REPORT_CONFIG.PTM ?? { label: 'Report', icon: 'full' };\n } else if (reportType === REPORT_TYPE.MPR_V1) {\n config = REPORT_CONFIG.MPR_V1 ?? { label: 'Report', icon: 'full' };\n } else if (reportType === REPORT_TYPE.MPR_V2) {\n config = REPORT_CONFIG['MPR_V2_' + (courseStream || '').toLowerCase()] ?? {\n label: 'Report',\n icon: 'full',\n };\n }\n\n const reportMilestones =\n reportType === REPORT_TYPE.PTM ? [] : report?.progress_data?.user_milestones || [];\n\n if (reportType === REPORT_TYPE.MPR_V2 && !report?.progress_data?.user_milestones?.length) {\n return (\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={0.5}\n $gutterX={1}\n $gapX={1}\n $borderColor=\"WHITE_5\"\n $background=\"WHITE_3\"\n $heightX={4.5}\n >\n <Image src={ILLUSTRATIONS.NO_REPORT} alt=\"report icon\" withLoader width={32} height={32} />\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n Report unavailable - no activity this month.\n </Text>\n </FlexView>\n );\n }\n\n return (\n <Clickable\n onClick={handleReportClick}\n disabled={!report?.id && reportType !== REPORT_TYPE.MPR_V1}\n label=\"Report Card click\"\n >\n <FlexView $flexGap={1} $borderColor=\"BLACK_1\">\n {!!reportMilestones.length && (\n <Styled.GoalsSection $flexGap={1}>\n {reportMilestones.map((milestone, milestoneIndex) => (\n <GoalsCard\n key={milestone.user_milestone_id || milestoneIndex}\n category={milestone.goal_category}\n milestone={milestone}\n isExpended={false}\n />\n ))}\n </Styled.GoalsSection>\n )}\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $background=\"BLACK_1\"\n $heightX={3}\n >\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.5} $gutterX={1}>\n <Image src={config.icon} alt=\"report icon\" withLoader width={32} height={32} />\n <Text $renderAs=\"ub2-bold\" $color=\"WHITE\">\n {config.label}\n </Text>\n </FlexView>\n <FlexView $gutterX={0.75}>\n <CaratRightIcon width={24} height={24} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n </FlexView>\n </Clickable>\n );\n};\n\nexport default memo(MonthlyReportCard);\n"],"names":["MonthlyReportCard","report","year","month","onReportClick","reportType","courseStream","handleReportClick","monthNames","config","REPORT_TYPE","REPORT_CONFIG","reportMilestones","_a","_c","_b","jsxs","FlexView","jsx","Image","ILLUSTRATIONS","Text","Clickable","Styled.GoalsSection","milestone","milestoneIndex","GoalsCard","CaratRightIcon","MonthlyReportCard$1","memo"],"mappings":";;;;;;;;;;;;AAcA,MAAMA,IAAiD,CAAC;AAAA,EACtD,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AACF,MAAM;;AACJ,QAAMC,IAAoB,MAAM;AAC9B,IAAIH,KACYA,GAAAH,KAAA,gBAAAA,EAAQ,OAAM,IAAII,GAAYH,GAAMM,EAAWL,IAAQ,CAAC,KAAK,EAAE;AAAA,EAC/E;AAGF,MAAIM,IAAS,EAAE,OAAO,IAAI,MAAM,GAAG;AAE/B,EAAAJ,MAAeK,EAAY,MAC7BD,IAASE,EAAc,OAAO,EAAE,OAAO,UAAU,MAAM,WAC9CN,MAAeK,EAAY,SACpCD,IAASE,EAAc,UAAU,EAAE,OAAO,UAAU,MAAM,WACjDN,MAAeK,EAAY,WACpCD,IAASE,EAAc,aAAaL,KAAgB,IAAI,YAAA,CAAa,KAAK;AAAA,IACxE,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAIJ,QAAAM,IACJP,MAAeK,EAAY,MAAM,CAAK,MAAAG,IAAAZ,KAAA,gBAAAA,EAAQ,kBAAR,gBAAAY,EAAuB,oBAAmB;AAElF,SAAIR,MAAeK,EAAY,UAAU,GAACI,KAAAC,IAAAd,KAAA,gBAAAA,EAAQ,kBAAR,gBAAAc,EAAuB,oBAAvB,QAAAD,EAAwC,UAE9E,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,WAAW;AAAA,MACX,UAAU;AAAA,MACV,OAAO;AAAA,MACP,cAAa;AAAA,MACb,aAAY;AAAA,MACZ,UAAU;AAAA,MAEV,UAAA;AAAA,QAAC,gBAAAC,EAAAC,GAAA,EAAM,KAAKC,EAAc,WAAW,KAAI,eAAc,YAAU,IAAC,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,0BACxFC,GAAK,EAAA,WAAU,OAAM,QAAO,WAAU,UAEvC,gDAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IAMJ,gBAAAH;AAAA,IAACI;AAAA,IAAA;AAAA,MACC,SAASf;AAAA,MACT,UAAU,EAACN,KAAA,QAAAA,EAAQ,OAAMI,MAAeK,EAAY;AAAA,MACpD,OAAM;AAAA,MAEN,UAAC,gBAAAM,EAAAC,GAAA,EAAS,UAAU,GAAG,cAAa,WACjC,UAAA;AAAA,QAAA,CAAC,CAACL,EAAiB,UAClB,gBAAAM,EAACK,GAAA,EAAoB,UAAU,GAC5B,UAAAX,EAAiB,IAAI,CAACY,GAAWC,MAChC,gBAAAP;AAAA,UAACQ;AAAA,UAAA;AAAA,YAEC,UAAUF,EAAU;AAAA,YACpB,WAAAA;AAAA,YACA,YAAY;AAAA,UAAA;AAAA,UAHPA,EAAU,qBAAqBC;AAAA,QAKvC,CAAA,GACH;AAAA,QAEF,gBAAAT;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,gBAAe;AAAA,YACf,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,aAAY;AAAA,YACZ,UAAU;AAAA,YAEV,UAAA;AAAA,cAAC,gBAAAD,EAAAC,GAAA,EAAS,gBAAe,OAAM,aAAY,UAAS,WAAW,KAAK,UAAU,GAC5E,UAAA;AAAA,gBAAC,gBAAAC,EAAAC,GAAA,EAAM,KAAKV,EAAO,MAAM,KAAI,eAAc,YAAU,IAAC,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,kCAC5EY,GAAK,EAAA,WAAU,YAAW,QAAO,SAC/B,YAAO,OACV;AAAA,cAAA,GACF;AAAA,cACC,gBAAAH,EAAAD,GAAA,EAAS,UAAU,MAClB,UAAC,gBAAAC,EAAAS,GAAA,EAAe,OAAO,IAAI,QAAQ,IAAI,OAAM,QAAQ,CAAA,GACvD;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,GAEeC,IAAAC,EAAK7B,CAAiB;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-card.styled.js","sources":["../../../../../../src/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const GoalsSection = styled(FlexView)`\n border-bottom: none;\n`;\n"],"names":["GoalsSection","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAeC,EAAOC,CAAQ;AAAA;AAAA;"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ILLUSTRATIONS as e } from "../../../assets/illustrations/illustrations.js";
|
|
2
|
+
import { IMAGES as R } from "../../../assets/images/images.js";
|
|
3
|
+
const l = [
|
|
4
|
+
"Jan",
|
|
5
|
+
"Feb",
|
|
6
|
+
"Mar",
|
|
7
|
+
"Apr",
|
|
8
|
+
"May",
|
|
9
|
+
"Jun",
|
|
10
|
+
"Jul",
|
|
11
|
+
"Aug",
|
|
12
|
+
"Sep",
|
|
13
|
+
"Oct",
|
|
14
|
+
"Nov",
|
|
15
|
+
"Dec"
|
|
16
|
+
], n = {
|
|
17
|
+
2021: R[2021],
|
|
18
|
+
2022: R[2022],
|
|
19
|
+
2023: R[2023],
|
|
20
|
+
2024: R[2024],
|
|
21
|
+
2025: R[2025],
|
|
22
|
+
2026: R[2026],
|
|
23
|
+
2027: R[2027],
|
|
24
|
+
2028: R[2028]
|
|
25
|
+
}, t = {
|
|
26
|
+
PTM: { label: "PTM Report", icon: e.PTM_REPORT_ICON },
|
|
27
|
+
MPR_V1: { label: "View Full Report", icon: e.FULL_REPORT },
|
|
28
|
+
MPR_V2_math: { label: "MathFit Report", icon: e.MATH_FIT_GREY },
|
|
29
|
+
MPR_V2_elp: { label: "ELP Report", icon: e.ELP_ICON },
|
|
30
|
+
MPR_V2_ela: { label: "ELA Report", icon: e.ELP_ICON },
|
|
31
|
+
MPR_V2_english: { label: "English Report", icon: e.ENGLISH_ICON },
|
|
32
|
+
MPR_V2_science: { label: "Science Report", icon: e.SCIENCE_REPORT_ICON },
|
|
33
|
+
MPR_V2_sat: { label: "SAT Report", icon: e.SAT_REPORT_ICON },
|
|
34
|
+
MPR_V2_coding: { label: "Coding Report", icon: e.CODING_REPORT_ICON }
|
|
35
|
+
};
|
|
36
|
+
export {
|
|
37
|
+
t as REPORT_CONFIG,
|
|
38
|
+
l as monthNames,
|
|
39
|
+
n as yearImages
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/features/timeline/monthly-timeline/constants.ts"],"sourcesContent":["import { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport { IMAGES } from '../../../assets/images/images';\n\nexport const monthNames = [\n 'Jan',\n 'Feb',\n 'Mar',\n 'Apr',\n 'May',\n 'Jun',\n 'Jul',\n 'Aug',\n 'Sep',\n 'Oct',\n 'Nov',\n 'Dec',\n];\n\nexport const yearImages: Record<number, string> = {\n 2021: IMAGES[2021],\n 2022: IMAGES[2022],\n 2023: IMAGES[2023],\n 2024: IMAGES[2024],\n 2025: IMAGES[2025],\n 2026: IMAGES[2026],\n 2027: IMAGES[2027],\n 2028: IMAGES[2028],\n};\n\nexport const REPORT_CONFIG: Record<string, { label: string; icon: string }> = {\n PTM: { label: 'PTM Report', icon: ILLUSTRATIONS.PTM_REPORT_ICON },\n MPR_V1: { label: 'View Full Report', icon: ILLUSTRATIONS.FULL_REPORT },\n MPR_V2_math: { label: 'MathFit Report', icon: ILLUSTRATIONS.MATH_FIT_GREY },\n MPR_V2_elp: { label: 'ELP Report', icon: ILLUSTRATIONS.ELP_ICON },\n MPR_V2_ela: { label: 'ELA Report', icon: ILLUSTRATIONS.ELP_ICON },\n MPR_V2_english: { label: 'English Report', icon: ILLUSTRATIONS.ENGLISH_ICON },\n MPR_V2_science: { label: 'Science Report', icon: ILLUSTRATIONS.SCIENCE_REPORT_ICON },\n MPR_V2_sat: { label: 'SAT Report', icon: ILLUSTRATIONS.SAT_REPORT_ICON },\n MPR_V2_coding: { label: 'Coding Report', icon: ILLUSTRATIONS.CODING_REPORT_ICON },\n};\n"],"names":["monthNames","yearImages","IMAGES","REPORT_CONFIG","ILLUSTRATIONS"],"mappings":";;AAGO,MAAMA,IAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,GAEaC,IAAqC;AAAA,EAChD,MAAMC,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AAAA,EACjB,MAAMA,EAAO,IAAI;AACnB,GAEaC,IAAiE;AAAA,EAC5E,KAAK,EAAE,OAAO,cAAc,MAAMC,EAAc,gBAAgB;AAAA,EAChE,QAAQ,EAAE,OAAO,oBAAoB,MAAMA,EAAc,YAAY;AAAA,EACrE,aAAa,EAAE,OAAO,kBAAkB,MAAMA,EAAc,cAAc;AAAA,EAC1E,YAAY,EAAE,OAAO,cAAc,MAAMA,EAAc,SAAS;AAAA,EAChE,YAAY,EAAE,OAAO,cAAc,MAAMA,EAAc,SAAS;AAAA,EAChE,gBAAgB,EAAE,OAAO,kBAAkB,MAAMA,EAAc,aAAa;AAAA,EAC5E,gBAAgB,EAAE,OAAO,kBAAkB,MAAMA,EAAc,oBAAoB;AAAA,EACnF,YAAY,EAAE,OAAO,cAAc,MAAMA,EAAc,gBAAgB;AAAA,EACvE,eAAe,EAAE,OAAO,iBAAiB,MAAMA,EAAc,mBAAmB;AAClF;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-timeline-styled.js","sources":["../../../../src/features/timeline/monthly-timeline/monthly-timeline-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nexport const ImageContainer = styled(FlexView)<{ $marginBottom?: number }>`\n z-index: -1;\n`;\n"],"names":["ImageContainer","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAiBC,EAAOC,CAAQ;AAAA;AAAA;"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
var M = /* @__PURE__ */ ((S) => (S.MPR_V1 = "MPR_V1", S.MPR_V2 = "MPR_V2", S.PTM = "PTM", S))(M || {}), C = /* @__PURE__ */ ((S) => (S.SCHOOL_SUCCESS = "SCHOOL_SUCCESS", S.ENRICHMENT = "ENRICHMENT", S.TEST_PREP = "TEST_PREP", S))(C || {});
|
|
2
|
+
export {
|
|
3
|
+
C as EGoalCategory,
|
|
4
|
+
M as REPORT_TYPE
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=monthly-timeline-types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-timeline-types.js","sources":["../../../../src/features/timeline/monthly-timeline/monthly-timeline-types.ts"],"sourcesContent":["import { type TCourseStream } from '../../milestone/create/milestone-create-types';\n\nexport enum REPORT_TYPE {\n MPR_V1 = 'MPR_V1',\n MPR_V2 = 'MPR_V2',\n PTM = 'PTM',\n}\n\nexport enum EGoalCategory {\n SCHOOL_SUCCESS = 'SCHOOL_SUCCESS',\n ENRICHMENT = 'ENRICHMENT',\n TEST_PREP = 'TEST_PREP',\n}\n\nexport interface IMonthlyTimeline {\n year: number;\n month: number;\n reports: IMonthlyTimelineReport[];\n}\n\nexport interface IMonthlyTimelineReport {\n report_data: TimelineReportData | null;\n course_stream: TCourseStream | null;\n report_type: REPORT_TYPE;\n}\n\nexport interface TimelineReportData {\n id: string | null;\n progress_data: ProgressData | null;\n}\n\nexport interface ProgressData {\n user_milestones: IUserMilestone[];\n}\n\nexport interface IUserMilestone {\n goal_category: EGoalCategory;\n goal_code: string;\n milestone_name: string;\n previous_progress_stat: ProgressStat | null;\n progress_stat: ProgressStat;\n user_chapters: IUserChapter[];\n user_milestone_id: string;\n}\n\nexport interface IUserChapter {\n chapter_code: string;\n chapter_name: string;\n image_url: string;\n previous_progress_stat: ProgressStat | null;\n progress_stat: ProgressStat;\n user_chapter_id: string;\n}\n\nexport interface ProgressStat {\n completed: number;\n total: number;\n}\n\nexport interface IMonthlyTimelineProps {\n userType: 'PARENT' | 'TEACHER' | 'STUDENT';\n studentId: string;\n courseStreams?: string[];\n onReportClick?: (reportId: string, reportType: REPORT_TYPE, year: number, month: string) => void;\n scrollAreaHeight?: string | number;\n}\n\nexport interface IMonthlyTimelineViewProps {\n reports: IMonthlyTimelineReport[];\n onReportClick?: IMonthlyTimelineProps['onReportClick'];\n year: number;\n month: number;\n}\n"],"names":["REPORT_TYPE","EGoalCategory"],"mappings":"AAEY,IAAAA,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,SAAS,UACTA,EAAA,MAAM,OAHIA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,iBAAiB,kBACjBA,EAAA,aAAa,cACbA,EAAA,YAAY,aAHFA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as n } from "react";
|
|
3
|
+
import m from "./comps/monthly-card/monthly-card.js";
|
|
4
|
+
import s from "../../ui/layout/flex-view.js";
|
|
5
|
+
const d = ({
|
|
6
|
+
reports: t,
|
|
7
|
+
onReportClick: p,
|
|
8
|
+
month: a,
|
|
9
|
+
year: l
|
|
10
|
+
}) => /* @__PURE__ */ e(s, { $flexRowGapX: 1.5, children: t.map((r) => {
|
|
11
|
+
var o;
|
|
12
|
+
return /* @__PURE__ */ e(
|
|
13
|
+
m,
|
|
14
|
+
{
|
|
15
|
+
report: r.report_data,
|
|
16
|
+
reportType: r.report_type,
|
|
17
|
+
courseStream: r.course_stream,
|
|
18
|
+
year: l,
|
|
19
|
+
month: a,
|
|
20
|
+
onReportClick: p
|
|
21
|
+
},
|
|
22
|
+
(o = r == null ? void 0 : r.report_data) == null ? void 0 : o.id
|
|
23
|
+
);
|
|
24
|
+
}) }), h = n(d);
|
|
25
|
+
export {
|
|
26
|
+
h as default
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=monthly-timeline-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"monthly-timeline-view.js","sources":["../../../../src/features/timeline/monthly-timeline/monthly-timeline-view.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport {\n type IMonthlyTimelineReport,\n type IMonthlyTimelineViewProps,\n} from './monthly-timeline-types';\nimport MonthlyReportCard from './comps/monthly-card/monthly-card';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst MonthlyTimelineView: FC<IMonthlyTimelineViewProps> = ({\n reports,\n onReportClick,\n month,\n year,\n}) => {\n return (\n <FlexView $flexRowGapX={1.5}>\n {reports.map((item: IMonthlyTimelineReport) => (\n <MonthlyReportCard\n key={item?.report_data?.id}\n report={item.report_data}\n reportType={item.report_type}\n courseStream={item.course_stream}\n year={year}\n month={month}\n onReportClick={onReportClick}\n />\n ))}\n </FlexView>\n );\n};\n\nexport default memo(MonthlyTimelineView);\n"],"names":["MonthlyTimelineView","reports","onReportClick","month","year","FlexView","item","jsx","MonthlyReportCard","_a","MonthlyTimelineView$1","memo"],"mappings":";;;;AASA,MAAMA,IAAqD,CAAC;AAAA,EAC1D,SAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AACF,wBAEKC,GAAS,EAAA,cAAc,KACrB,UAAQJ,EAAA,IAAI,CAACK;;AACZ,yBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MAEC,QAAQF,EAAK;AAAA,MACb,YAAYA,EAAK;AAAA,MACjB,cAAcA,EAAK;AAAA,MACnB,MAAAF;AAAA,MACA,OAAAD;AAAA,MACA,eAAAD;AAAA,IAAA;AAAA,KANKO,IAAAH,KAAA,gBAAAA,EAAM,gBAAN,gBAAAG,EAAmB;AAAA,EAQ3B;AAAA,CAAA,EACH,CAAA,GAIWC,IAAAC,EAAKX,CAAmB;"}
|