@cuemath/leap 3.5.32-as10 → 3.5.32-as3
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/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal-constants.js +7 -7
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal-constants.js.map +1 -1
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal.js +13 -13
- package/dist/features/timeline/comps/new-progress-intro-modal/new-progress-intro-modal.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js +5 -5
- package/dist/features/timeline/monthly-timeline/api/use-monthly-timeline-get.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js +40 -40
- package/dist/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/constants.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/api/{use-monthly-report-api.js → use-monthly-report-get.js} +4 -4
- package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-get.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js +52 -52
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card/activities-card.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js +88 -39
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activities-card-puzzles.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js +13 -13
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/constants.js +4 -10
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/constants.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js +12 -6
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/utils.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js +75 -60
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/feedback/feedback.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js +59 -69
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js +46 -49
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js.map +1 -1
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js +37 -23
- package/dist/features/timeline/timeline-tabs/timeline-tabs.js.map +1 -1
- package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js +2 -2
- package/dist/features/timeline/timeline-tabs/timeline-tabs.styled.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/package.json +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-api.js.map +0 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.js +0 -66
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.js.map +0 -1
- package/dist/features/timeline/timeline-tabs/constants.js +0 -17
- package/dist/features/timeline/timeline-tabs/constants.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monthly-report-types.js","sources":["../../../../../src/features/timeline/monthly-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/daily-timeline-types';\nimport { type IUserMilestone } from '../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 'sat_mock_test' = 'sat_mock_test',\n
|
|
1
|
+
{"version":3,"file":"monthly-report-types.js","sources":["../../../../../src/features/timeline/monthly-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/daily-timeline-types';\nimport { type IUserMilestone } from '../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 'sat_mock_test' = 'sat_mock_test',\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,kBACnBA,EAAA,gBAAkB,iBAlCRA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,79 +1,69 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { MonthlyReportContainer as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import { IS_APP_RUNNING_IN_RN as
|
|
14
|
-
import
|
|
15
|
-
const
|
|
16
|
-
studentName:
|
|
17
|
-
reportId:
|
|
18
|
-
onPuzzleClick:
|
|
19
|
-
showSnackbar:
|
|
20
|
-
onFeedback:
|
|
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
21
|
}) => {
|
|
22
22
|
const {
|
|
23
|
-
get:
|
|
24
|
-
data:
|
|
25
|
-
isProcessing:
|
|
26
|
-
isProcessingFailed:
|
|
27
|
-
isStale:
|
|
28
|
-
} =
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
user_milestones:
|
|
37
|
-
activities:
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
m(r);
|
|
41
|
-
}, [m, r]);
|
|
42
|
-
if (g(() => {
|
|
43
|
-
t();
|
|
44
|
-
}, [t]), g(() => {
|
|
45
|
-
l && !o && t();
|
|
46
|
-
}, [l, o, t]), o && !c)
|
|
47
|
-
return /* @__PURE__ */ e(y, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(S, { height: "100dvh" }) });
|
|
48
|
-
if (x)
|
|
49
|
-
return /* @__PURE__ */ e(y, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(b, { onTryAgain: t }) });
|
|
50
|
-
const n = s == null ? void 0 : s[0];
|
|
51
|
-
return /* @__PURE__ */ R(j, { children: [
|
|
52
|
-
d && /* @__PURE__ */ e(M, { milestones: d, isExpended: !0 }),
|
|
53
|
-
u && /* @__PURE__ */ e(N, { activities: u, onPuzzleClick: C }),
|
|
54
|
-
_ && /* @__PURE__ */ e(G, { achievements: _, studentName: i }),
|
|
55
|
-
p && f && h && /* @__PURE__ */ e(
|
|
56
|
-
P,
|
|
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,
|
|
57
40
|
{
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
reportYear: h,
|
|
61
|
-
onDateClick: a
|
|
41
|
+
achievements: e.progress_data.user_achievements,
|
|
42
|
+
studentName: s
|
|
62
43
|
}
|
|
63
44
|
),
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
/* @__PURE__ */ t(
|
|
46
|
+
C,
|
|
66
47
|
{
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
showSnackbar: a
|
|
48
|
+
calendarData: e.calendar_data,
|
|
49
|
+
reportMonth: e.report_month,
|
|
50
|
+
reportYear: e.report_year,
|
|
51
|
+
onDateClick: n
|
|
72
52
|
}
|
|
73
|
-
)
|
|
74
|
-
|
|
75
|
-
|
|
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);
|
|
76
66
|
export {
|
|
77
|
-
|
|
67
|
+
q as default
|
|
78
68
|
};
|
|
79
69
|
//# sourceMappingURL=monthly-report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monthly-report.js","sources":["../../../../../src/features/timeline/monthly-timeline/monthly-report/monthly-report.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { type IMonthlyReportProps } from './monthly-report-types';\nimport {
|
|
1
|
+
{"version":3,"file":"monthly-report.js","sources":["../../../../../src/features/timeline/monthly-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,GA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jsx-runtime";
|
|
2
|
+
import { memo as x, useCallback as A, useEffect as C } from "react";
|
|
3
|
+
import { useMonthlyTimelineGet as E } from "./api/use-monthly-timeline-get.js";
|
|
4
|
+
import _ from "./monthly-timeline-view.js";
|
|
5
|
+
import b from "../../ui/loader/app-loader/app-loader.js";
|
|
6
6
|
import t from "../../ui/layout/flex-view.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { yearImages as
|
|
11
|
-
import
|
|
12
|
-
import { ImageContainer as
|
|
13
|
-
import { getTimezone as
|
|
14
|
-
import { ILLUSTRATIONS as
|
|
15
|
-
const
|
|
16
|
-
userType:
|
|
17
|
-
studentId:
|
|
18
|
-
courseStreams:
|
|
19
|
-
onReportClick:
|
|
7
|
+
import w from "../../ui/text/text.js";
|
|
8
|
+
import p from "../../ui/image/image.js";
|
|
9
|
+
import m from "../../ui/separator/separator.js";
|
|
10
|
+
import { yearImages as L, monthNames as R } from "./constants.js";
|
|
11
|
+
import X from "../../ui/error/error.js";
|
|
12
|
+
import { ImageContainer as j, DateText as F } from "./monthly-timeline-styled.js";
|
|
13
|
+
import { getTimezone as M } from "../../../helpers/date-time.js";
|
|
14
|
+
import { ILLUSTRATIONS as P } from "../../../assets/illustrations/illustrations.js";
|
|
15
|
+
const S = ({
|
|
16
|
+
userType: a,
|
|
17
|
+
studentId: s,
|
|
18
|
+
courseStreams: h,
|
|
19
|
+
onReportClick: d
|
|
20
20
|
}) => {
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
course_streams: h === "TEACHER" ? l : [],
|
|
24
|
-
timezone: S()
|
|
25
|
-
}),
|
|
26
|
-
[l, h]
|
|
27
|
-
), {
|
|
28
|
-
get: c,
|
|
21
|
+
const {
|
|
22
|
+
get: l,
|
|
29
23
|
data: o = [],
|
|
30
|
-
isProcessing:
|
|
31
|
-
isProcessingFailed:
|
|
32
|
-
} =
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
}, [
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
24
|
+
isProcessing: T,
|
|
25
|
+
isProcessingFailed: $
|
|
26
|
+
} = E(), n = A(() => {
|
|
27
|
+
l(s, {
|
|
28
|
+
course_streams: a === "TEACHER" ? h : [],
|
|
29
|
+
timezone: M()
|
|
30
|
+
});
|
|
31
|
+
}, [h, l, s, a]);
|
|
32
|
+
return C(() => {
|
|
33
|
+
n();
|
|
34
|
+
}, [n]), T ? /* @__PURE__ */ e(b, { height: "100dvh" }) : $ ? /* @__PURE__ */ e(t, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(X, { onTryAgain: n }) }) : /* @__PURE__ */ e(I, { children: (o == null ? void 0 : o.length) > 0 ? /* @__PURE__ */ e(t, { $gapX: 2, children: o.map((r, y) => {
|
|
35
|
+
const c = y === 0, u = r.month === 12, g = !c && u, f = L[r.year];
|
|
36
|
+
return /* @__PURE__ */ i(t, { $width: "100%", children: [
|
|
37
|
+
!c && !g && /* @__PURE__ */ e(m, { heightX: 2 }),
|
|
38
|
+
g && f && /* @__PURE__ */ e(j, { $marginBottom: -122, children: /* @__PURE__ */ e(p, { src: f, alt: r.year.toString() }) }),
|
|
39
|
+
/* @__PURE__ */ i(t, { $gutterX: 1, children: [
|
|
40
|
+
/* @__PURE__ */ e(F, { $renderAs: "ac4", $color: "BLACK_T_60", children: R[r.month - 1] }),
|
|
41
|
+
/* @__PURE__ */ e(m, { heightX: 1 }),
|
|
45
42
|
/* @__PURE__ */ e(
|
|
46
|
-
|
|
43
|
+
_,
|
|
47
44
|
{
|
|
48
45
|
reports: r.reports,
|
|
49
46
|
month: r.month,
|
|
50
47
|
year: r.year,
|
|
51
|
-
onReportClick:
|
|
48
|
+
onReportClick: d
|
|
52
49
|
}
|
|
53
50
|
)
|
|
54
51
|
] })
|
|
55
52
|
] }, `${r.month}-${r.year}`);
|
|
56
|
-
}) }) : /* @__PURE__ */
|
|
57
|
-
/* @__PURE__ */ e(
|
|
58
|
-
/* @__PURE__ */ e(
|
|
59
|
-
/* @__PURE__ */ e(
|
|
53
|
+
}) }) : /* @__PURE__ */ i(t, { $justifyContent: "center", $alignItems: "center", $height: "100%", children: [
|
|
54
|
+
/* @__PURE__ */ e(p, { src: P.EMPTY_REPORTS }),
|
|
55
|
+
/* @__PURE__ */ e(m, { heightX: 1.5 }),
|
|
56
|
+
/* @__PURE__ */ e(w, { $renderAs: "ab2", color: "BLACK_T_60", children: "Report will be available next month." })
|
|
60
57
|
] }) });
|
|
61
|
-
},
|
|
58
|
+
}, J = x(S);
|
|
62
59
|
export {
|
|
63
|
-
|
|
60
|
+
J as default
|
|
64
61
|
};
|
|
65
62
|
//# sourceMappingURL=monthly-timeline.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monthly-timeline.js","sources":["../../../../src/features/timeline/monthly-timeline/monthly-timeline.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect
|
|
1
|
+
{"version":3,"file":"monthly-timeline.js","sources":["../../../../src/features/timeline/monthly-timeline/monthly-timeline.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { type IMonthlyTimelineProps } from './monthly-timeline-types';\nimport { useMonthlyTimelineGet } from './api/use-monthly-timeline-get';\nimport MonthlyTimelineView from './monthly-timeline-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport Image from '../../ui/image/image';\nimport Separator from '../../ui/separator/separator';\nimport { monthNames, yearImages } from './constants';\nimport Error from '../../ui/error/error';\nimport * as Styled from './monthly-timeline-styled';\nimport { getTimezone } from '../../../helpers/date-time';\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\nconst MonthlyTimeline: FC<IMonthlyTimelineProps> = ({\n userType,\n studentId,\n courseStreams,\n onReportClick,\n}) => {\n const {\n get: getTimeline,\n data: timelineData = [],\n isProcessing,\n isProcessingFailed,\n } = useMonthlyTimelineGet();\n\n const fetchData = useCallback(() => {\n getTimeline(studentId, {\n course_streams: userType === 'TEACHER' ? courseStreams : [],\n timezone: getTimezone(),\n });\n }, [courseStreams, getTimeline, studentId, userType]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isProcessing) {\n return <AppLoader height=\"100dvh\" />;\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 return (\n <>\n {timelineData?.length > 0 ? (\n <FlexView $gapX={2}>\n {timelineData.map((item, index) => {\n const isFirstItem = index === 0;\n const isDecember = item.month === 12;\n const showYearImage = !isFirstItem && isDecember;\n const yearImage = yearImages[item.year];\n\n return (\n <FlexView key={`${item.month}-${item.year}`} $width=\"100%\">\n {!isFirstItem && !showYearImage && <Separator heightX={2} />}\n {showYearImage && yearImage && (\n <Styled.ImageContainer $marginBottom={-122}>\n <Image src={yearImage} alt={item.year.toString()} />\n </Styled.ImageContainer>\n )}\n <FlexView $gutterX={1}>\n <Styled.DateText $renderAs=\"ac4\" $color=\"BLACK_T_60\">\n {monthNames[item.month - 1]}\n </Styled.DateText>\n <Separator heightX={1} />\n <MonthlyTimelineView\n reports={item.reports}\n month={item.month}\n year={item.year}\n onReportClick={onReportClick}\n />\n </FlexView>\n </FlexView>\n );\n })}\n </FlexView>\n ) : (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $height=\"100%\">\n <Image src={ILLUSTRATIONS.EMPTY_REPORTS} />\n <Separator heightX={1.5} />\n <Text $renderAs=\"ab2\" color=\"BLACK_T_60\">\n Report will be available next month.\n </Text>\n </FlexView>\n )}\n </>\n );\n};\n\nexport default memo(MonthlyTimeline);\n"],"names":["MonthlyTimeline","userType","studentId","courseStreams","onReportClick","getTimeline","timelineData","isProcessing","isProcessingFailed","useMonthlyTimelineGet","fetchData","useCallback","getTimezone","useEffect","jsx","AppLoader","FlexView","Error","Fragment","item","index","isFirstItem","isDecember","showYearImage","yearImage","yearImages","jsxs","Separator","Styled.ImageContainer","Image","Styled.DateText","monthNames","MonthlyTimelineView","ILLUSTRATIONS","Text","monthlyTimeline","memo"],"mappings":";;;;;;;;;;;;;;AAgBA,MAAMA,IAA6C,CAAC;AAAA,EAClD,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC,IAAe,CAAC;AAAA,IACtB,cAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAAsB,GAEpBC,IAAYC,EAAY,MAAM;AAClC,IAAAN,EAAYH,GAAW;AAAA,MACrB,gBAAgBD,MAAa,YAAYE,IAAgB,CAAC;AAAA,MAC1D,UAAUS,EAAY;AAAA,IAAA,CACvB;AAAA,KACA,CAACT,GAAeE,GAAaH,GAAWD,CAAQ,CAAC;AAMpD,SAJAY,EAAU,MAAM;AACJ,IAAAH;EAAA,GACT,CAACA,CAAS,CAAC,GAEVH,IACK,gBAAAO,EAACC,GAAU,EAAA,QAAO,SAAS,CAAA,IAGhCP,IAEC,gBAAAM,EAAAE,GAAA,EAAS,OAAO,GAAG,aAAY,UAAS,iBAAgB,UACvD,UAAC,gBAAAF,EAAAG,GAAA,EAAM,YAAYP,EAAA,CAAW,EAChC,CAAA,IAMC,gBAAAI,EAAAI,GAAA,EAAA,WAAAZ,KAAA,gBAAAA,EAAc,UAAS,IACrB,gBAAAQ,EAAAE,GAAA,EAAS,OAAO,GACd,UAAaV,EAAA,IAAI,CAACa,GAAMC,MAAU;AACjC,UAAMC,IAAcD,MAAU,GACxBE,IAAaH,EAAK,UAAU,IAC5BI,IAAgB,CAACF,KAAeC,GAChCE,IAAYC,EAAWN,EAAK,IAAI;AAGpC,WAAA,gBAAAO,EAACV,GAA4C,EAAA,QAAO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
|
8
|
-
return /* @__PURE__ */ i(
|
|
9
|
-
d,
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as a } from "react";
|
|
3
|
+
import { TabContainer as d, TabItem as c } from "./timeline-tabs.styled.js";
|
|
4
|
+
import { ETAB_IDS as r } from "./timeline-tabs-types.js";
|
|
5
|
+
import h from "../../ui/text/text.js";
|
|
6
|
+
const T = ({ onTabClick: o, activeTab: n, headerHeight: l }) => {
|
|
7
|
+
const m = [
|
|
10
8
|
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
$background: r ? "BLACK_1" : "WHITE",
|
|
15
|
-
$gapX: 0.46875,
|
|
16
|
-
$gutterX: 1,
|
|
17
|
-
$widthX: 6.5,
|
|
18
|
-
$width: "100%",
|
|
19
|
-
onClick: () => t(e.id),
|
|
20
|
-
children: /* @__PURE__ */ i($, { $renderAs: "ac4", $color: r ? "WHITE" : "BLACK_T_38", children: e.label })
|
|
9
|
+
id: r.DAILY,
|
|
10
|
+
label: "Daily",
|
|
11
|
+
path: "daily"
|
|
21
12
|
},
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
13
|
+
{
|
|
14
|
+
id: r.MONTHLY,
|
|
15
|
+
label: "Monthly",
|
|
16
|
+
path: "monthly"
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
return /* @__PURE__ */ t(d, { $heightX: 4, $headerHeight: l, children: m.map((e) => {
|
|
20
|
+
const i = e.id === n;
|
|
21
|
+
return /* @__PURE__ */ t(
|
|
22
|
+
c,
|
|
23
|
+
{
|
|
24
|
+
$isActive: i,
|
|
25
|
+
$justifyContent: "center",
|
|
26
|
+
$borderColor: "BLACK_T_38",
|
|
27
|
+
$background: i ? "BLACK_1" : "WHITE",
|
|
28
|
+
$gapX: 0.46875,
|
|
29
|
+
$gutterX: 1,
|
|
30
|
+
$widthX: 6.5,
|
|
31
|
+
$width: "100%",
|
|
32
|
+
onClick: () => o(e.id),
|
|
33
|
+
children: /* @__PURE__ */ t(h, { $renderAs: "ac4", $color: i ? "WHITE" : "BLACK_T_38", children: e.label })
|
|
34
|
+
},
|
|
35
|
+
e.id
|
|
36
|
+
);
|
|
37
|
+
}) });
|
|
38
|
+
}, C = a(T);
|
|
25
39
|
export {
|
|
26
|
-
|
|
40
|
+
C as default
|
|
27
41
|
};
|
|
28
42
|
//# sourceMappingURL=timeline-tabs.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-tabs.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport * as Styled from './timeline-tabs.styled';\nimport { type IProgressTimelineTabs } from './timeline-tabs-types';\nimport Text from '../../ui/text/text';\
|
|
1
|
+
{"version":3,"file":"timeline-tabs.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport * as Styled from './timeline-tabs.styled';\nimport { ETAB_IDS, type ITab, type IProgressTimelineTabs } from './timeline-tabs-types';\nimport Text from '../../ui/text/text';\n\nconst TimelineTabs = ({ onTabClick, activeTab, headerHeight }: IProgressTimelineTabs) => {\n const TABS: ITab[] = [\n {\n id: ETAB_IDS.DAILY,\n label: 'Daily',\n path: 'daily',\n },\n {\n id: ETAB_IDS.MONTHLY,\n label: 'Monthly',\n path: 'monthly',\n },\n ];\n\n return (\n <Styled.TabContainer $heightX={4} $headerHeight={headerHeight}>\n {TABS.map(tab => {\n const isActive = tab.id === activeTab;\n\n return (\n <Styled.TabItem\n key={tab.id}\n $isActive={isActive}\n $justifyContent=\"center\"\n $borderColor=\"BLACK_T_38\"\n $background={isActive ? 'BLACK_1' : 'WHITE'}\n $gapX={0.46875}\n $gutterX={1}\n $widthX={6.5}\n $width=\"100%\"\n onClick={() => onTabClick(tab.id)}\n >\n <Text $renderAs=\"ac4\" $color={isActive ? 'WHITE' : 'BLACK_T_38'}>\n {tab.label}\n </Text>\n </Styled.TabItem>\n );\n })}\n </Styled.TabContainer>\n );\n};\n\nexport default memo(TimelineTabs);\n"],"names":["TimelineTabs","onTabClick","activeTab","headerHeight","TABS","ETAB_IDS","jsx","Styled.TabContainer","tab","isActive","Styled.TabItem","Text","timelineTabs","memo"],"mappings":";;;;;AAMA,MAAMA,IAAe,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,cAAAC,QAA0C;AACvF,QAAMC,IAAe;AAAA,IACnB;AAAA,MACE,IAAIC,EAAS;AAAA,MACb,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,IACA;AAAA,MACE,IAAIA,EAAS;AAAA,MACb,OAAO;AAAA,MACP,MAAM;AAAA,IACR;AAAA,EAAA;AAIA,SAAA,gBAAAC,EAACC,GAAA,EAAoB,UAAU,GAAG,eAAeJ,GAC9C,UAAKC,EAAA,IAAI,CAAOI,MAAA;AACT,UAAAC,IAAWD,EAAI,OAAON;AAG1B,WAAA,gBAAAI;AAAA,MAACI;AAAAA,MAAA;AAAA,QAEC,WAAWD;AAAA,QACX,iBAAgB;AAAA,QAChB,cAAa;AAAA,QACb,aAAaA,IAAW,YAAY;AAAA,QACpC,OAAO;AAAA,QACP,UAAU;AAAA,QACV,SAAS;AAAA,QACT,QAAO;AAAA,QACP,SAAS,MAAMR,EAAWO,EAAI,EAAE;AAAA,QAEhC,UAAA,gBAAAF,EAACK,KAAK,WAAU,OAAM,QAAQF,IAAW,UAAU,cAChD,UAAAD,EAAI,MACP,CAAA;AAAA,MAAA;AAAA,MAbKA,EAAI;AAAA,IAAA;AAAA,EAgBd,CAAA,EACH,CAAA;AAEJ,GAEeI,IAAAC,EAAKb,CAAY;"}
|
|
@@ -4,8 +4,8 @@ const n = i(o)`
|
|
|
4
4
|
position: sticky;
|
|
5
5
|
top: ${({ $headerHeight: t }) => t}px;
|
|
6
6
|
left: calc(
|
|
7
|
-
((100% * 0.5) - (
|
|
8
|
-
); //
|
|
7
|
+
((100% * 0.5) - (512px * 0.5) - 104px - 32px)
|
|
8
|
+
); // 104 tab width + 32 left right margin of container
|
|
9
9
|
`;
|
|
10
10
|
i(o)`
|
|
11
11
|
flex: 1;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"timeline-tabs.styled.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\ninterface ITabItem {\n $isActive: boolean;\n}\n\nconst TabContainer = styled(FlexView)<{ $headerHeight: number }>`\n position: sticky;\n top: ${({ $headerHeight }) => $headerHeight}px;\n left: calc(\n ((100% * 0.5) - (
|
|
1
|
+
{"version":3,"file":"timeline-tabs.styled.js","sources":["../../../../src/features/timeline/timeline-tabs/timeline-tabs.styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\ninterface ITabItem {\n $isActive: boolean;\n}\n\nconst TabContainer = styled(FlexView)<{ $headerHeight: number }>`\n position: sticky;\n top: ${({ $headerHeight }) => $headerHeight}px;\n left: calc(\n ((100% * 0.5) - (512px * 0.5) - 104px - 32px)\n ); // 104 tab width + 32 left right margin of container\n`;\n\nconst ContentContainer = styled(FlexView)`\n flex: 1;\n overflow: hidden;\n position: relative;\n`;\n\nconst TabItem = styled(FlexView)<ITabItem>`\n position: relative;\n cursor: pointer;\n transition: all 0.3s ease;\n\n &::after {\n content: '';\n visibility: ${({ $isActive }) => ($isActive ? 'visible' : 'hidden')};\n position: absolute;\n right: -6px;\n top: 11px;\n width: 0;\n height: 0;\n border-left: 6px solid black;\n border-top: 5px solid transparent;\n border-bottom: 5px solid transparent;\n }\n`;\n\nexport { TabContainer, ContentContainer, TabItem };\n"],"names":["TabContainer","styled","FlexView","$headerHeight","TabItem","$isActive"],"mappings":";;AAQM,MAAAA,IAAeC,EAAOC,CAAQ;AAAA;AAAA,SAE3B,CAAC,EAAE,eAAAC,EAAc,MAAMA,CAAa;AAAA;AAAA;AAAA;AAAA;AAMpBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAMlC,MAAAE,IAAUH,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOb,CAAC,EAAE,WAAAG,EAAA,MAAiBA,IAAY,YAAY,QAAS;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -278,8 +278,7 @@ declare enum CARD_TYPE {
|
|
|
278
278
|
'trial_basic' = "trial_basic",
|
|
279
279
|
'trial_intermediate' = "trial_intermediate",
|
|
280
280
|
'trial_advanced' = "trial_advanced",
|
|
281
|
-
'sat_mock_test' = "sat_mock_test"
|
|
282
|
-
'pdf' = "pdf"
|
|
281
|
+
'sat_mock_test' = "sat_mock_test"
|
|
283
282
|
}
|
|
284
283
|
|
|
285
284
|
export declare const CardTitle: MemoExoticComponent<({ cardHeader, nodeType, courseType, }: {
|
package/package.json
CHANGED
package/dist/features/timeline/monthly-timeline/monthly-report/api/use-monthly-report-api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { jsxs as d, jsx as t } from "react/jsx-runtime";
|
|
2
|
-
import { memo as f, useCallback as p } from "react";
|
|
3
|
-
import { PuzzleContainer as E, StatusIcon as T } from "./activities-card-puzzles.styled.js";
|
|
4
|
-
import g from "../../../../../../ui/layout/flex-view.js";
|
|
5
|
-
import _ from "../../../../../../ui/image/image.js";
|
|
6
|
-
import A from "../../../../../../ui/separator/separator.js";
|
|
7
|
-
import b from "../../../../../../ui/text/text.js";
|
|
8
|
-
import { NODE_STATE as o } from "../../../../../daily-timeline/daily-timeline-types.js";
|
|
9
|
-
import { stateIcon as h } from "../constants.js";
|
|
10
|
-
function I({ puzzle: u, onPuzzleClick: e }) {
|
|
11
|
-
const {
|
|
12
|
-
image_url: m,
|
|
13
|
-
state: r,
|
|
14
|
-
item_ref: n,
|
|
15
|
-
feedback_comments: c,
|
|
16
|
-
image_hue: i,
|
|
17
|
-
title: a,
|
|
18
|
-
tip: s
|
|
19
|
-
} = u, $ = p(() => {
|
|
20
|
-
e == null || e({ item_ref: n, feedback_comments: c, image_hue: i, title: a, tip: s });
|
|
21
|
-
}, [e, n, c, i, a, s]), l = r === o.PENDING || r === o.NOT_STARTED ? "RED" : "BLACK_1";
|
|
22
|
-
return /* @__PURE__ */ d(
|
|
23
|
-
E,
|
|
24
|
-
{
|
|
25
|
-
$gapX: 1,
|
|
26
|
-
$imageHue: i || "BLUE",
|
|
27
|
-
$width: 146,
|
|
28
|
-
$height: 162,
|
|
29
|
-
$background: `${i || "BLUE"}_2`,
|
|
30
|
-
onClick: $,
|
|
31
|
-
children: [
|
|
32
|
-
/* @__PURE__ */ t(
|
|
33
|
-
T,
|
|
34
|
-
{
|
|
35
|
-
$borderRadiusX: 1,
|
|
36
|
-
$background: l,
|
|
37
|
-
$widthX: 1,
|
|
38
|
-
$heightX: 1,
|
|
39
|
-
$alignItems: "center",
|
|
40
|
-
$justifyContent: "center",
|
|
41
|
-
children: r && (h[r] || h[o.COMPLETED])
|
|
42
|
-
}
|
|
43
|
-
),
|
|
44
|
-
/* @__PURE__ */ d(g, { $background: "TRANSPARENT", $alignItems: "center", children: [
|
|
45
|
-
m && /* @__PURE__ */ t(
|
|
46
|
-
_,
|
|
47
|
-
{
|
|
48
|
-
src: m ?? "",
|
|
49
|
-
alt: "Puzzle illustration",
|
|
50
|
-
width: 68,
|
|
51
|
-
height: 68,
|
|
52
|
-
withLoader: !0
|
|
53
|
-
}
|
|
54
|
-
),
|
|
55
|
-
/* @__PURE__ */ t(A, { heightX: 1 }),
|
|
56
|
-
/* @__PURE__ */ t(g, { $gutterX: 0.25, children: /* @__PURE__ */ t(b, { $renderAs: "ab3", $align: "center", children: a }) })
|
|
57
|
-
] })
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
const C = f(I);
|
|
63
|
-
export {
|
|
64
|
-
C as default
|
|
65
|
-
};
|
|
66
|
-
//# sourceMappingURL=activity-puzzle-card.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"activity-puzzle-card.js","sources":["../../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/activities/activities-card-puzzles/activity-puzzle-card.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport * as Styled from './activities-card-puzzles.styled';\nimport FlexView from '../../../../../../ui/layout/flex-view';\nimport Image from '../../../../../../ui/image/image';\nimport Separator from '../../../../../../ui/separator/separator';\nimport Text from '../../../../../../ui/text/text';\nimport { NODE_STATE } from '../../../../../daily-timeline/daily-timeline-types';\nimport { stateIcon } from '../constants';\nimport { type IActivityPuzzleCardProps } from './activities-card-puzzles-types';\n\nfunction ActivityPuzzleCard({ puzzle, onPuzzleClick }: IActivityPuzzleCardProps) {\n const {\n image_url: imageUrl,\n state,\n item_ref,\n feedback_comments,\n image_hue: imageHue,\n title,\n tip,\n } = puzzle;\n\n const handlePuzzleClick = useCallback(() => {\n onPuzzleClick?.({ item_ref, feedback_comments, image_hue: imageHue, title, tip });\n }, [onPuzzleClick, item_ref, feedback_comments, imageHue, title, tip]);\n const statusBg =\n state === NODE_STATE.PENDING || state === NODE_STATE.NOT_STARTED ? 'RED' : 'BLACK_1';\n\n return (\n <Styled.PuzzleContainer\n $gapX={1}\n $imageHue={imageHue || 'BLUE'}\n $width={146}\n $height={162}\n $background={`${imageHue || 'BLUE'}_2`}\n onClick={handlePuzzleClick}\n >\n <Styled.StatusIcon\n $borderRadiusX={1}\n $background={statusBg}\n $widthX={1}\n $heightX={1}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {state && (stateIcon[state as NODE_STATE] || stateIcon[NODE_STATE.COMPLETED])}\n </Styled.StatusIcon>\n <FlexView $background=\"TRANSPARENT\" $alignItems=\"center\">\n {imageUrl && (\n <Image\n src={imageUrl ?? ''}\n alt=\"Puzzle illustration\"\n width={68}\n height={68}\n withLoader={true}\n />\n )}\n <Separator heightX={1} />\n <FlexView $gutterX={0.25}>\n <Text $renderAs=\"ab3\" $align=\"center\">\n {title}\n </Text>\n </FlexView>\n </FlexView>\n </Styled.PuzzleContainer>\n );\n}\n\nexport default memo(ActivityPuzzleCard);\n"],"names":["ActivityPuzzleCard","puzzle","onPuzzleClick","imageUrl","state","item_ref","feedback_comments","imageHue","title","tip","handlePuzzleClick","useCallback","statusBg","NODE_STATE","jsxs","Styled.PuzzleContainer","jsx","Styled.StatusIcon","state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AACK,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,UACvB,gBAAAL,EAACG,GAAS,EAAA,UAAU,MAClB,UAAA,gBAAAH,EAACM,GAAK,EAAA,WAAU,OAAM,QAAO,UAC1B,UAAAd,EACH,CAAA,GACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;AAEA,MAAee,IAAAC,EAAKxB,CAAkB;"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ETAB_IDS as l } from "./timeline-tabs-types.js";
|
|
2
|
-
const a = [
|
|
3
|
-
{
|
|
4
|
-
id: l.DAILY,
|
|
5
|
-
label: "Daily",
|
|
6
|
-
path: "daily"
|
|
7
|
-
},
|
|
8
|
-
{
|
|
9
|
-
id: l.MONTHLY,
|
|
10
|
-
label: "Monthly",
|
|
11
|
-
path: "monthly"
|
|
12
|
-
}
|
|
13
|
-
];
|
|
14
|
-
export {
|
|
15
|
-
a as TABS
|
|
16
|
-
};
|
|
17
|
-
//# sourceMappingURL=constants.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sources":["../../../../src/features/timeline/timeline-tabs/constants.ts"],"sourcesContent":["import { ETAB_IDS, type ITab } from './timeline-tabs-types';\n\nexport const TABS: ITab[] = [\n {\n id: ETAB_IDS.DAILY,\n label: 'Daily',\n path: 'daily',\n },\n {\n id: ETAB_IDS.MONTHLY,\n label: 'Monthly',\n path: 'monthly',\n },\n];\n"],"names":["TABS","ETAB_IDS"],"mappings":";AAEO,MAAMA,IAAe;AAAA,EAC1B;AAAA,IACE,IAAIC,EAAS;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AAAA,EACA;AAAA,IACE,IAAIA,EAAS;AAAA,IACb,OAAO;AAAA,IACP,MAAM;AAAA,EACR;AACF;"}
|