@cuemath/leap 3.5.31 → 3.5.32-as11
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 +38 -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/features/analytics-events/whitelist-events.js +10 -8
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js +3 -3
- package/dist/features/chapters/chapters-list/chapter-item/chapter-circular-progress/chapter-circular-progress.js.map +1 -1
- package/dist/features/journey/tracking-id/tracking-id-teacher.js +5 -0
- package/dist/features/journey/tracking-id/tracking-id-teacher.js.map +1 -0
- package/dist/features/journey/tracking-id/tracking-ids.js +5 -3
- package/dist/features/journey/tracking-id/tracking-ids.js.map +1 -1
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal-constants.js +17 -0
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal-constants.js.map +1 -0
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal.js +54 -0
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal.js.map +1 -0
- package/dist/features/timeline/{api → daily-timeline/api}/use-daily-timeline-get.js +2 -2
- package/dist/features/timeline/daily-timeline/api/use-daily-timeline-get.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/accordion-item/accordion-item.js +6 -6
- package/dist/features/timeline/daily-timeline/comps/accordion-item/accordion-item.js.map +1 -0
- package/dist/features/timeline/daily-timeline/comps/constants.js +22 -0
- package/dist/features/timeline/daily-timeline/comps/constants.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/daily-timeline-items/daily-timeline-items-styled.js +1 -1
- package/dist/features/timeline/daily-timeline/comps/daily-timeline-items/daily-timeline-items-styled.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/daily-timeline-items/daily-timeline-items.js +18 -18
- package/dist/features/timeline/daily-timeline/comps/daily-timeline-items/daily-timeline-items.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/month-break/month-break-styled.js +1 -1
- package/dist/features/timeline/daily-timeline/comps/month-break/month-break-styled.js.map +1 -0
- package/dist/features/timeline/daily-timeline/comps/month-break/month-break.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/no-activity.js +4 -4
- package/dist/features/timeline/daily-timeline/comps/no-activity.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/utils.js +5 -5
- package/dist/features/timeline/daily-timeline/comps/utils.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/year-break/year-break-styled.js +1 -1
- package/dist/features/timeline/daily-timeline/comps/year-break/year-break-styled.js.map +1 -0
- package/dist/features/timeline/{comps → daily-timeline/comps}/year-break/year-break.js +2 -2
- package/dist/features/timeline/daily-timeline/comps/year-break/year-break.js.map +1 -0
- package/dist/features/timeline/{daily-timeline-events.js → daily-timeline/daily-timeline-events.js} +1 -1
- package/dist/features/timeline/daily-timeline/daily-timeline-events.js.map +1 -0
- package/dist/features/timeline/daily-timeline/daily-timeline-styled.js +25 -0
- package/dist/features/timeline/daily-timeline/daily-timeline-styled.js.map +1 -0
- package/dist/features/timeline/daily-timeline/daily-timeline-types.js +7 -0
- package/dist/features/timeline/daily-timeline/daily-timeline-types.js.map +1 -0
- package/dist/features/timeline/{daily-timeline-view.js → daily-timeline/daily-timeline-view.js} +24 -25
- package/dist/features/timeline/daily-timeline/daily-timeline-view.js.map +1 -0
- package/dist/features/timeline/{daily-timeline.js → daily-timeline/daily-timeline.js} +23 -23
- package/dist/features/timeline/daily-timeline/daily-timeline.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-report/api/use-monthly-report-api.js +13 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-api.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.js +59 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.styled.js +15 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/constant.js +16 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/constant.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js +128 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js +53 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +75 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js +58 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.js +66 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js +27 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/constants.js +102 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/constants.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js +9 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-constants.js +29 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-constants.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-utils.js +123 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance-utils.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.js +49 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.styled.js +48 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendance.styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendence-view.js +56 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/attendance/attendence-view.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback-styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js +85 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js +48 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goal-chapter-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js +28 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card.js +118 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-card/goals-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-constants.js +30 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals-constants.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals.js +22 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/goals/goals.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-events.js +11 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-events.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-styled.js +14 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js +5 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js +79 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.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 +65 -0
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/api/use-ptm-report-get.js +9 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/api/use-ptm-report-get.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/key-need/key-need-styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/key-need/key-need-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/key-need/key-need.js +35 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/key-need/key-need.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/parent-support/parent-support.js +53 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/parent-support/parent-support.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js +19 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/real-world-projects/real-world-projects-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/real-world-projects/real-world-projects.js +50 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/real-world-projects/real-world-projects.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/report-card/report-card-styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/report-card/report-card-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/report-card/report-card.js +22 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/report-card/report-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/school-support/school-support-styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/school-support/school-support-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/school-support/school-support.js +84 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/school-support/school-support.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategies/strategies-constant.js +11 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategies/strategies-constant.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategies/strategies.js +36 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategies/strategies.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategy-card/strategy-card-styled.js +55 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategy-card/strategy-card-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategy-card/strategy-card.js +35 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/strategy-card/strategy-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/student-info/student-info-styled.js +21 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/student-info/student-info-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/student-info/student-info.js +21 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/student-info/student-info.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card-styled.js +9 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card.js +30 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/support-card/support-card.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js +9 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/teacher-observations/teacher-observations-constant.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/teacher-observations/teacher-observations.js +56 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/teacher-observations/teacher-observations.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js +15 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/comps/upcoming-chapters/upcoming-chapters.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-constants.js +16 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-constants.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-helpers.js +8 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-helpers.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-styled.js +11 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-styled.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-types.js +5 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report-types.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report.js +113 -0
- package/dist/features/timeline/monthly-timeline/ptm-report/ptm-report.js.map +1 -0
- package/dist/features/timeline/timeline-tabs/constants.js +17 -0
- package/dist/features/timeline/timeline-tabs/constants.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 +28 -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/index.d.ts +169 -15
- package/dist/index.js +327 -313
- 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/calendar_purple_2.6e8249ef.svg +1 -0
- package/dist/static/clock_purple.c774c9bf.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/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/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/node-learn-large-bg.faa03631.svg +1 -0
- package/dist/static/node-puzzle-large-bg.ba23382e.svg +1 -0
- package/dist/static/node-test-large-bg.e9120fd1.svg +1 -0
- package/dist/static/nov.c44e4739.svg +1 -0
- package/dist/static/oct.856b3b3f.svg +1 -0
- package/dist/static/progress_bar_purple.2ff4dfe2.svg +1 -0
- package/dist/static/ptm-report-icon.5089218f.svg +1 -0
- package/dist/static/sat-report-icon.4331be86.svg +1 -0
- package/dist/static/science-report-icon.a0014c40.svg +1 -0
- package/dist/static/sep.2d547b31.svg +1 -0
- package/dist/static/thumps-down.a1192a62.svg +1 -0
- package/dist/static/thumps-up.caa35a98.svg +1 -0
- package/package.json +1 -1
- package/dist/features/timeline/api/use-daily-timeline-get.js.map +0 -1
- package/dist/features/timeline/comps/accordion-item/accordion-item.js.map +0 -1
- package/dist/features/timeline/comps/constants.js +0 -22
- package/dist/features/timeline/comps/constants.js.map +0 -1
- package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items-styled.js.map +0 -1
- package/dist/features/timeline/comps/daily-timeline-items/daily-timeline-items.js.map +0 -1
- package/dist/features/timeline/comps/month-break/month-break-styled.js.map +0 -1
- package/dist/features/timeline/comps/month-break/month-break.js.map +0 -1
- package/dist/features/timeline/comps/no-activity.js.map +0 -1
- package/dist/features/timeline/comps/utils.js.map +0 -1
- package/dist/features/timeline/comps/year-break/year-break-styled.js.map +0 -1
- package/dist/features/timeline/comps/year-break/year-break.js.map +0 -1
- package/dist/features/timeline/daily-timeline-events.js.map +0 -1
- package/dist/features/timeline/daily-timeline-styled.js +0 -21
- package/dist/features/timeline/daily-timeline-styled.js.map +0 -1
- package/dist/features/timeline/daily-timeline-types.js +0 -7
- package/dist/features/timeline/daily-timeline-types.js.map +0 -1
- package/dist/features/timeline/daily-timeline-view.js.map +0 -1
- package/dist/features/timeline/daily-timeline.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/timeline/{comps → daily-timeline/comps}/month-break/month-break.js +0 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { jsxs as a, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import { memo as C, useCallback 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 t from "../../../../ui/layout/flex-view.js";
|
|
6
|
+
import w from "../../../../ui/buttons/clickable/clickable.js";
|
|
7
|
+
import E from "../../../../../assets/line-icons/icons/carat-right.js";
|
|
8
|
+
import _ from "../../../../ui/text/text.js";
|
|
9
|
+
import u from "../../../../ui/image/image.js";
|
|
10
|
+
import { monthNames as V, REPORT_CONFIG as d } 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 X = ({
|
|
14
|
+
report: i,
|
|
15
|
+
year: r,
|
|
16
|
+
month: h,
|
|
17
|
+
onReportClick: s,
|
|
18
|
+
reportType: e,
|
|
19
|
+
courseStream: R
|
|
20
|
+
}) => {
|
|
21
|
+
var f, $, g;
|
|
22
|
+
const b = x(() => {
|
|
23
|
+
s && s((i == null ? void 0 : i.id) || "", e, r, V[h - 1] || "");
|
|
24
|
+
}, [h, s, i == null ? void 0 : i.id, e, r]);
|
|
25
|
+
let n = { label: "", icon: "" };
|
|
26
|
+
e === o.PTM ? n = d.PTM ?? { label: "Report", icon: "full" } : e === o.MPR_V1 ? n = d.MPR_V1 ?? { label: "Report", icon: "full" } : e === o.MPR_V2 && (n = d["MPR_V2_" + (R || "").toLowerCase()] ?? {
|
|
27
|
+
label: "Report",
|
|
28
|
+
icon: "full"
|
|
29
|
+
});
|
|
30
|
+
const m = e === o.PTM ? [] : ((f = i == null ? void 0 : i.progress_data) == null ? void 0 : f.user_milestones) || [];
|
|
31
|
+
return e === o.MPR_V2 && !((g = ($ = i == null ? void 0 : i.progress_data) == null ? void 0 : $.user_milestones) != null && g.length) ? /* @__PURE__ */ a(
|
|
32
|
+
t,
|
|
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__ */ l(u, { src: L.NO_REPORT, alt: "report icon", withLoader: !0, width: 32, height: 32 }),
|
|
44
|
+
/* @__PURE__ */ l(_, { $renderAs: "ub2", $color: "BLACK_1", children: "Report unavailable - no activity this month." })
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
) : /* @__PURE__ */ l(
|
|
48
|
+
w,
|
|
49
|
+
{
|
|
50
|
+
onClick: b,
|
|
51
|
+
disabled: !(i != null && i.id) && e !== o.MPR_V1,
|
|
52
|
+
label: "Report Card click",
|
|
53
|
+
children: /* @__PURE__ */ a(t, { $flexGap: 1, $borderColor: "BLACK_1", children: [
|
|
54
|
+
!!m.length && /* @__PURE__ */ l(P, { $flexGap: 1, children: m.map((c, M) => /* @__PURE__ */ l(
|
|
55
|
+
I,
|
|
56
|
+
{
|
|
57
|
+
category: c.goal_category,
|
|
58
|
+
milestone: c,
|
|
59
|
+
isExpended: !1
|
|
60
|
+
},
|
|
61
|
+
c.user_milestone_id || M
|
|
62
|
+
)) }),
|
|
63
|
+
/* @__PURE__ */ a(
|
|
64
|
+
t,
|
|
65
|
+
{
|
|
66
|
+
$flexDirection: "row",
|
|
67
|
+
$alignItems: "center",
|
|
68
|
+
$justifyContent: "space-between",
|
|
69
|
+
$background: "BLACK_1",
|
|
70
|
+
$heightX: 3,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ a(t, { $flexDirection: "row", $alignItems: "center", $flexGapX: 0.5, $gutterX: 1, children: [
|
|
73
|
+
/* @__PURE__ */ l(u, { src: n.icon, alt: "report icon", withLoader: !0, width: 32, height: 32 }),
|
|
74
|
+
/* @__PURE__ */ l(_, { $renderAs: "ub2-bold", $color: "WHITE", children: n.label })
|
|
75
|
+
] }),
|
|
76
|
+
/* @__PURE__ */ l(t, { $gutterX: 0.75, children: /* @__PURE__ */ l(E, { width: 24, height: 24, color: "WHITE" }) })
|
|
77
|
+
]
|
|
78
|
+
}
|
|
79
|
+
)
|
|
80
|
+
] })
|
|
81
|
+
}
|
|
82
|
+
);
|
|
83
|
+
}, v = C(X);
|
|
84
|
+
export {
|
|
85
|
+
v 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, useCallback, 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 = useCallback(() => {\n if (onReportClick) {\n onReportClick(report?.id || '', reportType, year, monthNames[month - 1] || '');\n }\n }, [month, onReportClick, report?.id, reportType, year]);\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[\n ('MPR_V2_' + (courseStream || '').toLowerCase()) as keyof typeof REPORT_CONFIG\n ] ?? {\n label: 'Report',\n icon: 'full',\n };\n }\n\n const reportMilestones =\n reportType === REPORT_TYPE.PTM ? [] : report?.progress_data?.user_milestones || [];\n\n const hasNoMprV2Milestones =\n reportType === REPORT_TYPE.MPR_V2 && !report?.progress_data?.user_milestones?.length;\n\n if (hasNoMprV2Milestones) {\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","useCallback","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;;AACE,QAAAC,IAAoBC,EAAY,MAAM;AAC1C,IAAIJ,KACYA,GAAAH,KAAA,gBAAAA,EAAQ,OAAM,IAAII,GAAYH,GAAMO,EAAWN,IAAQ,CAAC,KAAK,EAAE;AAAA,EAC/E,GACC,CAACA,GAAOC,GAAeH,KAAA,gBAAAA,EAAQ,IAAII,GAAYH,CAAI,CAAC;AAEvD,MAAIQ,IAAS,EAAE,OAAO,IAAI,MAAM,GAAG;AAE/B,EAAAL,MAAeM,EAAY,MAC7BD,IAASE,EAAc,OAAO,EAAE,OAAO,UAAU,MAAM,WAC9CP,MAAeM,EAAY,SACpCD,IAASE,EAAc,UAAU,EAAE,OAAO,UAAU,MAAM,WACjDP,MAAeM,EAAY,WACpCD,IAASE,EACN,aAAaN,KAAgB,IAAI,YAAA,CACpC,KAAK;AAAA,IACH,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAIJ,QAAAO,IACJR,MAAeM,EAAY,MAAM,CAAK,MAAAG,IAAAb,KAAA,gBAAAA,EAAQ,kBAAR,gBAAAa,EAAuB,oBAAmB;AAKlF,SAFET,MAAeM,EAAY,UAAU,GAACI,KAAAC,IAAAf,KAAA,gBAAAA,EAAQ,kBAAR,gBAAAe,EAAuB,oBAAvB,QAAAD,EAAwC,UAI5E,gBAAAE;AAAA,IAACC;AAAA,IAAA;AAAA,M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AC5EY,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,EAAK9B,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,40 @@
|
|
|
1
|
+
import { ILLUSTRATIONS as e } from "../../../assets/illustrations/illustrations.js";
|
|
2
|
+
const _ = [
|
|
3
|
+
"Jan",
|
|
4
|
+
"Feb",
|
|
5
|
+
"Mar",
|
|
6
|
+
"Apr",
|
|
7
|
+
"May",
|
|
8
|
+
"Jun",
|
|
9
|
+
"Jul",
|
|
10
|
+
"Aug",
|
|
11
|
+
"Sep",
|
|
12
|
+
"Oct",
|
|
13
|
+
"Nov",
|
|
14
|
+
"Dec"
|
|
15
|
+
], o = {
|
|
16
|
+
2021: e[2021],
|
|
17
|
+
2022: e[2022],
|
|
18
|
+
2023: e[2023],
|
|
19
|
+
2024: e[2024],
|
|
20
|
+
2025: e[2025],
|
|
21
|
+
2026: e[2026],
|
|
22
|
+
2027: e[2027],
|
|
23
|
+
2028: e[2028]
|
|
24
|
+
}, l = {
|
|
25
|
+
PTM: { label: "PTM Report", icon: e.PTM_REPORT_ICON },
|
|
26
|
+
MPR_V1: { label: "View Full Report", icon: e.FULL_REPORT },
|
|
27
|
+
MPR_V2_math: { label: "MathFit Report", icon: e.MATH_FIT_GREY },
|
|
28
|
+
MPR_V2_elp: { label: "ELP Report", icon: e.ELP_ICON },
|
|
29
|
+
MPR_V2_ela: { label: "ELA Report", icon: e.ELP_ICON },
|
|
30
|
+
MPR_V2_english: { label: "English Report", icon: e.ENGLISH_ICON },
|
|
31
|
+
MPR_V2_science: { label: "Science Report", icon: e.SCIENCE_REPORT_ICON },
|
|
32
|
+
MPR_V2_sat: { label: "SAT Report", icon: e.SAT_REPORT_ICON },
|
|
33
|
+
MPR_V2_coding: { label: "Coding Report", icon: e.CODING_REPORT_ICON }
|
|
34
|
+
};
|
|
35
|
+
export {
|
|
36
|
+
l as REPORT_CONFIG,
|
|
37
|
+
_ as monthNames,
|
|
38
|
+
o as yearImages
|
|
39
|
+
};
|
|
40
|
+
//# 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';\n\nexport enum REPORT_CONFIG_TYPE {\n PTM = 'PTM',\n MPR_V1 = 'MPR_V1',\n MPR_V2_math = 'MPR_V2_math',\n MPR_V2_elp = 'MPR_V2_elp',\n MPR_V2_ela = 'MPR_V2_ela',\n MPR_V2_english = 'MPR_V2_english',\n MPR_V2_science = 'MPR_V2_science',\n MPR_V2_sat = 'MPR_V2_sat',\n MPR_V2_coding = 'MPR_V2_coding',\n}\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: ILLUSTRATIONS[2021],\n 2022: ILLUSTRATIONS[2022],\n 2023: ILLUSTRATIONS[2023],\n 2024: ILLUSTRATIONS[2024],\n 2025: ILLUSTRATIONS[2025],\n 2026: ILLUSTRATIONS[2026],\n 2027: ILLUSTRATIONS[2027],\n 2028: ILLUSTRATIONS[2028],\n};\n\nexport const REPORT_CONFIG: Record<REPORT_CONFIG_TYPE, { 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","ILLUSTRATIONS","REPORT_CONFIG"],"mappings":";AAcO,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,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAAA,EACxB,MAAMA,EAAc,IAAI;AAC1B,GAEaC,IAA6E;AAAA,EACxF,KAAK,EAAE,OAAO,cAAc,MAAMD,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,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: s, 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
|
+
s as monthlyReportGet,
|
|
11
|
+
h as monthlyReportPatch
|
|
12
|
+
};
|
|
13
|
+
//# sourceMappingURL=use-monthly-report-api.js.map
|
package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-api.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-monthly-report-api.js","sources":["../../../../../../src/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-api.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: monthlyReportGet, invalidate: invalidateMonthlyReport } =\n createGetAPI<IMonthlyReportResponse>({\n getURL: (reportId: string) => {\n return `${BASE_URL_V1}/monthly-progress-reports/${reportId}`;\n },\n });\n\nconst { usePatch: monthlyReportPatch } = createPatchAPI<\n IMonthlyReportResponse,\n { feedback: string }\n>({\n getURL: (reportId: string) => {\n return `${BASE_URL_V1}/monthly-progress-reports/${reportId}`;\n },\n});\n\nexport { monthlyReportGet, monthlyReportPatch, invalidateMonthlyReport };\n"],"names":["monthlyReportGet","invalidateMonthlyReport","createGetAPI","reportId","BASE_URL_V1","monthlyReportPatch","createPatchAPI"],"mappings":";;AAKA,MAAM,EAAE,QAAQA,GAAkB,YAAYC,EAAA,IAC5CC,EAAqC;AAAA,EACnC,QAAQ,CAACC,MACA,GAAGC,CAAW,6BAA6BD,CAAQ;AAE9D,CAAC,GAEG,EAAE,UAAUE,EAAmB,IAAIC,EAGvC;AAAA,EACA,QAAQ,CAACH,MACA,GAAGC,CAAW,6BAA6BD,CAAQ;AAE9D,CAAC;"}
|
package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { jsx as r, jsxs as g } from "react/jsx-runtime";
|
|
2
|
+
import { memo as f, useRef as u, useMemo as l } from "react";
|
|
3
|
+
import { CarousalItem as c, 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 m from "../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import w 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 $, navigationConfig as A } from "./constant.js";
|
|
10
|
+
const _ = ({ achievements: o, studentName: e }) => {
|
|
11
|
+
const h = u(null), s = l(
|
|
12
|
+
() => o.map((i) => /* @__PURE__ */ r(
|
|
13
|
+
c,
|
|
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(m, { children: [
|
|
29
|
+
/* @__PURE__ */ r(a, { $renderAs: "ab1-bold", color: "BLACK_1", children: "Achievements" }),
|
|
30
|
+
/* @__PURE__ */ r(n, { heightX: 0.125 }),
|
|
31
|
+
/* @__PURE__ */ r(m, { $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
|
+
w,
|
|
40
|
+
{
|
|
41
|
+
ref: h,
|
|
42
|
+
items: s,
|
|
43
|
+
defaultIndex: 0,
|
|
44
|
+
transitionDuration: 300,
|
|
45
|
+
showIndicators: !0,
|
|
46
|
+
dotsConfig: $,
|
|
47
|
+
showNavigationButtons: d,
|
|
48
|
+
navigationConfig: A
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
),
|
|
53
|
+
/* @__PURE__ */ r(n, { heightX: 0.75 })
|
|
54
|
+
] }) : null;
|
|
55
|
+
}, j = f(_);
|
|
56
|
+
export {
|
|
57
|
+
j as default
|
|
58
|
+
};
|
|
59
|
+
//# sourceMappingURL=achievements.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"achievements.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/achievements/achievements.tsx"],"sourcesContent":["import { memo, 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 memo(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","Achievements$1","memo"],"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,GAEeK,IAAAC,EAAKrB,CAAY;"}
|
|
@@ -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-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
|
package/dist/features/timeline/monthly-timeline/monthly-report/comps/achievements/constant.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constant.js","sources":["../../../../../../../src/features/timeline/monthly-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;"}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as B, useRef as D, useState as I, useMemo as d, useCallback as u } from "react";
|
|
3
|
+
import { getCardTypeIconMap as $, stateIcon as S } from "../constants.js";
|
|
4
|
+
import { CARD_TYPE as g } from "../../../monthly-report-types.js";
|
|
5
|
+
import { ActivityCardContainerWrapper as M, ActivityCardContainer as T } from "./activities-card.styled.js";
|
|
6
|
+
import n from "../../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import j from "../../../../../../ui/lottie-animation/lottie-animation.js";
|
|
8
|
+
import m from "../../../../../../ui/text/text.js";
|
|
9
|
+
import k from "../../../../../../homework/card-title.js";
|
|
10
|
+
import G from "../activities-card-puzzles/activities-card-puzzles.js";
|
|
11
|
+
import { NODE_STATE as p } from "../../../../../daily-timeline/daily-timeline-types.js";
|
|
12
|
+
import K from "../../../../../../ui/buttons/text-button/text-button.js";
|
|
13
|
+
import { countActivitiesByState as y } from "../utils.js";
|
|
14
|
+
const N = {
|
|
15
|
+
autoplay: !1,
|
|
16
|
+
loop: !0,
|
|
17
|
+
renderer: "canvas"
|
|
18
|
+
}, O = ({
|
|
19
|
+
cardType: t,
|
|
20
|
+
nodeType: f,
|
|
21
|
+
activitiesList: r = [],
|
|
22
|
+
onPuzzleClick: A
|
|
23
|
+
}) => {
|
|
24
|
+
const a = D(null), [s, C] = I(!1), x = d(() => {
|
|
25
|
+
const { totalDone: e, totalPending: i, totalOverdue: c } = y(r);
|
|
26
|
+
return [
|
|
27
|
+
e > 0 && `${e} Done`,
|
|
28
|
+
i > 0 && `${i} In-progress`,
|
|
29
|
+
c > 0 && `${c} Overdue`
|
|
30
|
+
].filter(Boolean).join(", ");
|
|
31
|
+
}, [r]), b = d(() => t ? t.split("_").join(" ") : "", [t]), { displayedActivities: X, remainingCount: h } = d(() => {
|
|
32
|
+
if (t === g.puzzle)
|
|
33
|
+
return { displayedActivities: r, remainingCount: 0 };
|
|
34
|
+
const e = 3, i = r.length > e;
|
|
35
|
+
return s || !i ? { displayedActivities: r, remainingCount: 0 } : {
|
|
36
|
+
displayedActivities: r.slice(0, e),
|
|
37
|
+
remainingCount: r.length - e
|
|
38
|
+
};
|
|
39
|
+
}, [r, s, t]), w = (h > 0 || s) && r.length > 3, _ = u(() => {
|
|
40
|
+
var e;
|
|
41
|
+
(e = a.current) == null || e.play();
|
|
42
|
+
}, []), v = u(() => {
|
|
43
|
+
var e;
|
|
44
|
+
(e = a.current) == null || e.stop();
|
|
45
|
+
}, []), E = u(() => {
|
|
46
|
+
C((e) => !e);
|
|
47
|
+
}, []);
|
|
48
|
+
return /* @__PURE__ */ l(n, { onMouseEnter: _, onMouseLeave: v, children: [
|
|
49
|
+
/* @__PURE__ */ o(
|
|
50
|
+
M,
|
|
51
|
+
{
|
|
52
|
+
$background: $(t).color,
|
|
53
|
+
children: /* @__PURE__ */ l(
|
|
54
|
+
T,
|
|
55
|
+
{
|
|
56
|
+
$flexDirection: "row",
|
|
57
|
+
$alignItems: "center",
|
|
58
|
+
$height: "56px",
|
|
59
|
+
$bgImage: $(t).background,
|
|
60
|
+
$gutterX: 0.78125,
|
|
61
|
+
$flexGap: 8.5,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ o(
|
|
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__ */ o(
|
|
74
|
+
j,
|
|
75
|
+
{
|
|
76
|
+
ref: a,
|
|
77
|
+
src: $(t).lottie,
|
|
78
|
+
width: 32,
|
|
79
|
+
height: 32,
|
|
80
|
+
settings: N
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
}
|
|
84
|
+
),
|
|
85
|
+
/* @__PURE__ */ l(n, { children: [
|
|
86
|
+
/* @__PURE__ */ o(k, { cardHeader: b, nodeType: f }),
|
|
87
|
+
/* @__PURE__ */ o(m, { $renderAs: "ub3", $color: "BLACK_1", children: x })
|
|
88
|
+
] })
|
|
89
|
+
]
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
r.length > 0 && (t === g.puzzle ? /* @__PURE__ */ o(G, { puzzles: r, onPuzzleClick: A }) : /* @__PURE__ */ l(n, { $flexRowGapX: 1.25, $gutterX: 1, $gapX: 1, $borderColor: "GREY_2", children: [
|
|
95
|
+
X.map(({ state: e, title: i, subtext: c, id: R }, z) => /* @__PURE__ */ l(n, { $flexDirection: "row", $flexGapX: 1.05, children: [
|
|
96
|
+
/* @__PURE__ */ o(n, { $gapX: 0.25, children: /* @__PURE__ */ o(
|
|
97
|
+
n,
|
|
98
|
+
{
|
|
99
|
+
$borderRadiusX: 1,
|
|
100
|
+
$background: e === p.PENDING || e === p.NOT_STARTED ? "RED" : "BLACK_1",
|
|
101
|
+
$widthX: 1,
|
|
102
|
+
$heightX: 1,
|
|
103
|
+
$alignItems: "center",
|
|
104
|
+
$justifyContent: "center",
|
|
105
|
+
children: !!e && S[e]
|
|
106
|
+
}
|
|
107
|
+
) }),
|
|
108
|
+
/* @__PURE__ */ l(n, { $flexRowGap: 4, children: [
|
|
109
|
+
/* @__PURE__ */ o(m, { $renderAs: "ub2", $color: "BLACK_1", children: i || "" }),
|
|
110
|
+
/* @__PURE__ */ o(m, { $renderAs: "ub3", $color: "BLACK_T_60", children: c || "" })
|
|
111
|
+
] })
|
|
112
|
+
] }, `${R}-${z}`)),
|
|
113
|
+
w && /* @__PURE__ */ o(n, { $gutterX: 2, children: /* @__PURE__ */ o(
|
|
114
|
+
K,
|
|
115
|
+
{
|
|
116
|
+
label: s ? "Show less" : `+${h} activities`,
|
|
117
|
+
size: "regular",
|
|
118
|
+
color: "BLACK_1",
|
|
119
|
+
onClick: E
|
|
120
|
+
}
|
|
121
|
+
) })
|
|
122
|
+
] }))
|
|
123
|
+
] });
|
|
124
|
+
}, oe = B(O);
|
|
125
|
+
export {
|
|
126
|
+
oe as default
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=activities-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activities-card.js","sources":["../../../../../../../../src/features/timeline/monthly-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/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 shouldShowToggleButton =\n (remainingCount > 0 || showAllActivities) && activitiesList.length > 3;\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 }, index) => (\n <FlexView $flexDirection=\"row\" $flexGapX={1.05} key={`${id}-${index}`}>\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]}\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 {shouldShowToggleButton && (\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","shouldShowToggleButton","handleMouseEnter","useCallback","_a","handleMouseLeave","handleToggleActivities","prev","jsxs","FlexView","jsx","Styled.ActivityCardContainerWrapper","getCardTypeIconMap","Styled.ActivityCardContainer","LottieAnimation","CardTitle","Text","ActivitiesCardPuzzles","state","title","subtext","id","index","NODE_STATE","stateIcon","TextButton","ActivitiesCard$1","memo"],"mappings":";;;;;;;;;;;;;AAiBA,MAAMA,IAAiB;AAAA,EACrB,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAA2C,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,gBAAAC,IAAiB,CAAC;AAAA,EAClB,eAAAC;AACF,MAAM;AACE,QAAAC,IAAYC,EAA4B,IAAI,GAC5C,CAACC,GAAmBC,CAAoB,IAAIC,EAAS,EAAK,GAE1DC,IAAiBC,EAAQ,MAAM;AACnC,UAAM,EAAE,WAAAC,GAAW,cAAAC,GAAc,cAAAC,EAAa,IAAIC,EAAuBZ,CAAc;AAEhF,WAAA;AAAA,MACLS,IAAY,KAAK,GAAGA,CAAS;AAAA,MAC7BC,IAAe,KAAK,GAAGA,CAAY;AAAA,MACnCC,IAAe,KAAK,GAAGA,CAAY;AAAA,IAElC,EAAA,OAAO,OAAO,EACd,KAAK,IAAI;AAAA,EAAA,GACX,CAACX,CAAc,CAAC,GACba,IAAiBL,EAAQ,MAAOV,IAAWA,EAAS,MAAM,GAAG,EAAE,KAAK,GAAG,IAAI,IAAK,CAACA,CAAQ,CAAC,GAC1F,EAAE,qBAAAgB,GAAqB,gBAAAC,EAAe,IAAIP,EAAQ,MAAM;AACxD,QAAAV,MAAakB,EAAU;AACzB,aAAO,EAAE,qBAAqBhB,GAAgB,gBAAgB,EAAE;AAGlE,UAAMiB,IAAa,GACbC,IAAUlB,EAAe,SAASiB;AAEpC,WAA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,eAAW,IACd;AAAA,QAAA,GACF;AAAA,MAAA,EAAA,GAxBmD,GAAGK,CAAE,IAAIC,CAAK,EAyBnE,CACD;AAAA,MACArB,KACC,gBAAAS,EAACD,GAAS,EAAA,UAAU,GAClB,UAAA,gBAAAC;AAAA,QAACe;AAAA,QAAA;AAAA,UACC,OAAOvC,IAAoB,cAAc,IAAIW,CAAc;AAAA,UAC3D,MAAK;AAAA,UACL,OAAM;AAAA,UACN,SAASS;AAAA,QAAA;AAAA,MAAA,GAEb;AAAA,IAEJ,EAAA,CAAA;AAAA,EAEN,EAAA,CAAA;AAEJ,GAEeoB,KAAAC,EAAKhD,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-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,75 @@
|
|
|
1
|
+
import { jsx as e, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as S, useRef as R, useState as h, useCallback as i, useEffect as b } from "react";
|
|
3
|
+
import x from "../../../../../../../assets/line-icons/icons/chevron-left.js";
|
|
4
|
+
import L from "../../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import { ContentWrapper as _, ScrollButton as a, ScrollContainer as w } from "./activities-card-puzzles.styled.js";
|
|
6
|
+
import c from "../../../../../../ui/layout/flex-view.js";
|
|
7
|
+
import I from "../../../../../../ui/separator/separator.js";
|
|
8
|
+
import { IS_APP_RUNNING_IN_RN as f } from "../../../../../../../constants/app-config.js";
|
|
9
|
+
import A from "./activity-puzzle-card.js";
|
|
10
|
+
const B = ({ puzzles: o, onPuzzleClick: u }) => {
|
|
11
|
+
const r = R(null), [d, m] = h(!1), [$, p] = h(!1), g = i(() => {
|
|
12
|
+
r.current && r.current.scrollBy({ left: -180, behavior: "smooth" });
|
|
13
|
+
}, []), C = i(() => {
|
|
14
|
+
r.current && r.current.scrollBy({ left: 180, behavior: "smooth" });
|
|
15
|
+
}, []), l = i(() => {
|
|
16
|
+
if (r.current) {
|
|
17
|
+
const { scrollLeft: t, scrollWidth: n, clientWidth: v } = r.current;
|
|
18
|
+
m(t > 0), p(t < n - v - 10);
|
|
19
|
+
}
|
|
20
|
+
}, []);
|
|
21
|
+
return b(() => {
|
|
22
|
+
const t = r.current;
|
|
23
|
+
if (t)
|
|
24
|
+
return l(), t.addEventListener("scroll", l), () => {
|
|
25
|
+
t.removeEventListener("scroll", l);
|
|
26
|
+
};
|
|
27
|
+
}, [l, o.length]), !o || o.length === 0 ? null : /* @__PURE__ */ e(_, { $flexRowGapX: 1, children: /* @__PURE__ */ s(c, { $position: "relative", $borderColor: "GREY_2", children: [
|
|
28
|
+
/* @__PURE__ */ e(
|
|
29
|
+
a,
|
|
30
|
+
{
|
|
31
|
+
$background: "BLACK_T_60",
|
|
32
|
+
$justifyContent: "center",
|
|
33
|
+
$alignItems: "center",
|
|
34
|
+
$widthX: 2,
|
|
35
|
+
$height: "100%",
|
|
36
|
+
onClick: g,
|
|
37
|
+
$visible: !f && d,
|
|
38
|
+
$left: "0px",
|
|
39
|
+
$right: "auto",
|
|
40
|
+
children: /* @__PURE__ */ e(x, { width: 24, height: 24 })
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ e(c, { $gapX: 1, children: /* @__PURE__ */ e(w, { ref: r, children: /* @__PURE__ */ s(c, { $flexDirection: "row", $flexGapX: 1, children: [
|
|
44
|
+
/* @__PURE__ */ e(I, {}),
|
|
45
|
+
o.map((t, n) => /* @__PURE__ */ e(
|
|
46
|
+
A,
|
|
47
|
+
{
|
|
48
|
+
puzzle: t,
|
|
49
|
+
onPuzzleClick: u
|
|
50
|
+
},
|
|
51
|
+
`${t.id}-${n}`
|
|
52
|
+
))
|
|
53
|
+
] }) }) }),
|
|
54
|
+
/* @__PURE__ */ e(
|
|
55
|
+
a,
|
|
56
|
+
{
|
|
57
|
+
$position: "absolute",
|
|
58
|
+
$widthX: 2,
|
|
59
|
+
$height: "100%",
|
|
60
|
+
$background: "BLACK_T_60",
|
|
61
|
+
$justifyContent: "center",
|
|
62
|
+
$alignItems: "center",
|
|
63
|
+
onClick: C,
|
|
64
|
+
$visible: !f && $,
|
|
65
|
+
$left: "auto",
|
|
66
|
+
$right: "0px",
|
|
67
|
+
children: /* @__PURE__ */ e(L, { width: 24, height: 24 })
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }) });
|
|
71
|
+
}, z = S(B);
|
|
72
|
+
export {
|
|
73
|
+
z as default
|
|
74
|
+
};
|
|
75
|
+
//# sourceMappingURL=activities-card-puzzles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activities-card-puzzles.js","sources":["../../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.tsx"],"sourcesContent":["import { type FC, useRef, memo, useCallback, useState, useEffect } from 'react';\n\nimport ChevronLeftIcon from '../../../../../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../../../../../assets/line-icons/icons/chevron-right';\nimport { type IActivitiesCardPuzzlesProps } from './activities-card-puzzles-types';\nimport * as Styled from './activities-card-puzzles.styled';\nimport FlexView from '../../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../../ui/separator/separator';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../../../constants/app-config';\nimport ActivityPuzzleCard from './activity-puzzle-card';\n\nconst ActivitiesCardPuzzles: FC<IActivitiesCardPuzzlesProps> = ({ puzzles, onPuzzleClick }) => {\n const scrollRef = useRef<HTMLDivElement>(null);\n const [canScrollLeft, setCanScrollLeft] = useState(false);\n const [canScrollRight, setCanScrollRight] = useState(false);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -180, behavior: 'smooth' });\n }\n }, []);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 180, behavior: 'smooth' });\n }\n }, []);\n\n const updateScrollButtons = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n setCanScrollLeft(scrollLeft > 0);\n setCanScrollRight(scrollLeft < scrollWidth - clientWidth - 10);\n }\n }, []);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n updateScrollButtons();\n\n scrollElement.addEventListener('scroll', updateScrollButtons);\n\n return () => {\n scrollElement.removeEventListener('scroll', updateScrollButtons);\n };\n }\n }, [updateScrollButtons, puzzles.length]);\n\n if (!puzzles || puzzles.length === 0) return null;\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1}>\n <FlexView $position=\"relative\" $borderColor=\"GREY_2\">\n <Styled.ScrollButton\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={2}\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={!IS_APP_RUNNING_IN_RN && canScrollLeft}\n $left=\"0px\"\n $right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n <FlexView $gapX={1}>\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n <Separator />\n {puzzles.map((item, index) => {\n return (\n <ActivityPuzzleCard\n key={`${item.id}-${index}`}\n puzzle={item}\n onPuzzleClick={onPuzzleClick}\n />\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n </FlexView>\n\n <Styled.ScrollButton\n $position=\"absolute\"\n $widthX={2}\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={!IS_APP_RUNNING_IN_RN && canScrollRight}\n $left=\"auto\"\n $right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(ActivitiesCardPuzzles);\n"],"names":["ActivitiesCardPuzzles","puzzles","onPuzzleClick","scrollRef","useRef","canScrollLeft","setCanScrollLeft","useState","canScrollRight","setCanScrollRight","handleScrollLeft","useCallback","handleScrollRight","updateScrollButtons","scrollLeft","scrollWidth","clientWidth","useEffect","scrollElement","jsx","Styled.ContentWrapper","jsxs","FlexView","Styled.ScrollButton","IS_APP_RUNNING_IN_RN","ChevronLeftIcon","Styled.ScrollContainer","Separator","item","index","ActivityPuzzleCard","ChevronRightIcon","ActivitiesCardPuzzles$1","memo"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAyD,CAAC,EAAE,SAAAC,GAAS,eAAAC,QAAoB;AACvF,QAAAC,IAAYC,EAAuB,IAAI,GACvC,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAgBC,CAAiB,IAAIF,EAAS,EAAK,GAEpDG,IAAmBC,EAAY,MAAM;AACzC,IAAIR,EAAU,WACZA,EAAU,QAAQ,SAAS,EAAE,MAAM,MAAM,UAAU,UAAU;AAAA,EAEjE,GAAG,CAAE,CAAA,GAECS,IAAoBD,EAAY,MAAM;AAC1C,IAAIR,EAAU,WACZA,EAAU,QAAQ,SAAS,EAAE,MAAM,KAAK,UAAU,UAAU;AAAA,EAEhE,GAAG,CAAE,CAA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