@cuemath/leap 3.5.29-as3 → 3.5.29-as4

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.
@@ -1,57 +1,57 @@
1
- import { jsxs as c, jsx as e } from "react/jsx-runtime";
1
+ import { jsxs as l, jsx as e } from "react/jsx-runtime";
2
2
  import { memo as X, useCallback as i } from "react";
3
- import s from "../../../../ui/layout/flex-view.js";
3
+ import c from "../../../../ui/layout/flex-view.js";
4
4
  import { ILLUSTRATIONS as p } from "../../../../../assets/illustrations/illustrations.js";
5
5
  import g from "../../../../ui/image/image.js";
6
- import { useMonthlyReportInvalidate as w, useMonthlyReportPatch as y } from "../../api/use-monthly-report-get.js";
6
+ import { useMonthlyReportPatch as w } from "../../api/use-monthly-report-get.js";
7
7
  import $ from "../../../../ui/separator/separator.js";
8
- import P from "../../../../ui/text/text.js";
8
+ import y from "../../../../ui/text/text.js";
9
9
  import f from "../../../../ui/buttons/clickable/clickable.js";
10
- import { FeedbackContainer as x } from "./feedback-styled.js";
11
- const R = ({
12
- reportId: n,
10
+ import { FeedbackContainer as P } from "./feedback-styled.js";
11
+ const x = ({
12
+ reportId: s,
13
13
  studentName: b,
14
- onFeedback: l,
15
- studentCourseId: a,
16
- showSnackbar: h
14
+ onFeedback: n,
15
+ studentCourseId: h,
16
+ showSnackbar: a
17
17
  }) => {
18
- const u = i(
19
- (r, o) => {
20
- r && h && h({
18
+ const C = i(
19
+ (t, o) => {
20
+ t && a && a({
21
21
  type: "error",
22
22
  message: "Something went wrong. Please try again.",
23
23
  bgColor: "red"
24
- }), !r && l && (o != null && o.feedback) && (w(n), l(o.feedback, a));
24
+ }), !t && n && (o != null && o.feedback) && n(o.feedback, h);
25
25
  },
26
- [l, a]
27
- ), { patch: m, isProcessing: d } = y({
28
- onComplete: u
29
- }), t = i(
30
- (r) => {
31
- m(n, { feedback: r });
26
+ [n, h]
27
+ ), { patch: m, isProcessing: d } = w({
28
+ onComplete: C
29
+ }), r = i(
30
+ (t) => {
31
+ m(s, { feedback: t });
32
32
  },
33
- [n, m]
34
- ), C = i(() => {
35
- t("positive");
36
- }, [t]), k = i(() => {
37
- t("negative");
38
- }, [t]);
39
- return /* @__PURE__ */ c(x, { $gapX: 1.25, $background: "WHITE_3", children: [
40
- /* @__PURE__ */ c(P, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
33
+ [s, m]
34
+ ), u = i(() => {
35
+ r("positive");
36
+ }, [r]), k = i(() => {
37
+ r("negative");
38
+ }, [r]);
39
+ return /* @__PURE__ */ l(P, { $gapX: 1.25, $background: "WHITE_3", children: [
40
+ /* @__PURE__ */ l(y, { $renderAs: "ab2-black", $color: "BLACK_1", $align: "center", children: [
41
41
  "Are you happy with ",
42
42
  b ?? "her",
43
43
  " progress?"
44
44
  ] }),
45
45
  /* @__PURE__ */ e($, { heightX: 1.5 }),
46
- /* @__PURE__ */ c(s, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
46
+ /* @__PURE__ */ l(c, { $flexDirection: "row", $flexGapX: 3, $alignItems: "center", $justifyContent: "center", children: [
47
47
  /* @__PURE__ */ e(
48
48
  f,
49
49
  {
50
50
  label: "Report thumps up",
51
51
  disabled: d,
52
- onClick: C,
52
+ onClick: u,
53
53
  children: /* @__PURE__ */ e(
54
- s,
54
+ c,
55
55
  {
56
56
  $widthX: 5,
57
57
  $heightX: 5,
@@ -71,7 +71,7 @@ const R = ({
71
71
  disabled: d,
72
72
  onClick: k,
73
73
  children: /* @__PURE__ */ e(
74
- s,
74
+ c,
75
75
  {
76
76
  $widthX: 5,
77
77
  $heightX: 5,
@@ -87,8 +87,8 @@ const R = ({
87
87
  ] }),
88
88
  /* @__PURE__ */ e($, { heightX: 1.5 })
89
89
  ] });
90
- }, U = X(R);
90
+ }, v = X(x);
91
91
  export {
92
- U as default
92
+ v as default
93
93
  };
94
94
  //# sourceMappingURL=feedback.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"feedback.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../ui/image/image';\nimport {\n useMonthlyReportInvalidate,\n useMonthlyReportPatch,\n} from '../../api/use-monthly-report-get';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\n\nimport * as Styled from './feedback-styled';\n\nconst Feedback = ({\n reportId,\n studentName,\n onFeedback,\n studentCourseId,\n showSnackbar,\n}: IFeedbackTypesProps) => {\n const onComplete = useCallback(\n (err: string | null, data?: IMonthlyReportResponse) => {\n if (err && showSnackbar) {\n showSnackbar({\n type: 'error',\n message: 'Something went wrong. Please try again.',\n bgColor: 'red',\n });\n }\n\n if (!err && onFeedback && data?.feedback) {\n useMonthlyReportInvalidate(reportId);\n onFeedback(data.feedback, studentCourseId);\n }\n },\n [onFeedback, studentCourseId],\n );\n\n const { patch: updateMilestone, isProcessing } = useMonthlyReportPatch({\n onComplete,\n });\n\n const handleFeedback = useCallback(\n (feedback: TFeedback) => {\n updateMilestone(reportId, { feedback });\n },\n [reportId, updateMilestone],\n );\n\n const handlePositiveFeedback = useCallback(() => {\n handleFeedback('positive');\n }, [handleFeedback]);\n\n const handleNegativeFeedback = useCallback(() => {\n handleFeedback('negative');\n }, [handleFeedback]);\n\n return (\n <Styled.FeedbackContainer $gapX={1.25} $background=\"WHITE_3\">\n <Text $renderAs=\"ab2-black\" $color=\"BLACK_1\" $align=\"center\">\n Are you happy with {studentName ?? 'her'} progress?\n </Text>\n <Separator heightX={1.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={3} $alignItems=\"center\" $justifyContent=\"center\">\n <Clickable\n label=\"Report thumps up\"\n disabled={isProcessing}\n onClick={handlePositiveFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2.5}\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.THUMPS_UP} alt=\"UP\" width={32} height={32} />\n </FlexView>\n </Clickable>\n <Clickable\n label=\"Report thumps down\"\n disabled={isProcessing}\n onClick={handleNegativeFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"BLACK_5\"\n $borderRadiusX={2.5}\n >\n <Image src={ILLUSTRATIONS.THUMPS_DOWN} alt=\"DOWN\" width={32} height={32} />\n </FlexView>\n </Clickable>\n </FlexView>\n <Separator heightX={1.5} />\n </Styled.FeedbackContainer>\n );\n};\n\nexport default memo(Feedback);\n"],"names":["Feedback","reportId","studentName","onFeedback","studentCourseId","showSnackbar","onComplete","useCallback","err","data","useMonthlyReportInvalidate","updateMilestone","isProcessing","useMonthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","handleNegativeFeedback","Styled.FeedbackContainer","jsxs","Text","jsx","Separator","FlexView","Clickable","Image","ILLUSTRATIONS","Feedback$1","memo"],"mappings":";;;;;;;;;;AAiBA,MAAMA,IAAW,CAAC;AAAA,EAChB,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,YAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AACF,MAA2B;AACzB,QAAMC,IAAaC;AAAA,IACjB,CAACC,GAAoBC,MAAkC;AACrD,MAAID,KAAOH,KACIA,EAAA;AAAA,QACX,MAAM;AAAA,QACN,SAAS;AAAA,QACT,SAAS;AAAA,MAAA,CACV,GAGC,CAACG,KAAOL,MAAcM,KAAA,QAAAA,EAAM,cAC9BC,EAA2BT,CAAQ,GACxBE,EAAAM,EAAK,UAAUL,CAAe;AAAA,IAE7C;AAAA,IACA,CAACD,GAAYC,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AAA;AAAA,UACC,OAAM;AAAA,UACN,UAAUZ;AAAA,UACV,SAASK;AAAA,UAET,UAAA,gBAAAI;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,cAAa;AAAA,cACb,gBAAgB;AAAA,cAEhB,UAAA,gBAAAF,EAACI,GAAM,EAAA,KAAKC,EAAc,aAAa,KAAI,QAAO,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,YAAA;AAAA,UAC3E;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAL,EAACC,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,EAC3B,EAAA,CAAA;AAEJ,GAEeK,IAAAC,EAAK5B,CAAQ;"}
1
+ {"version":3,"file":"feedback.js","sources":["../../../../../../src/features/timeline/monthly-report/comps/feedback/feedback.tsx"],"sourcesContent":["import { memo, useCallback } from 'react';\n\nimport type { IMonthlyReportResponse, TFeedback } from '../../monthly-report-types';\nimport type { IFeedbackTypesProps } from './feedback-types';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Image from '../../../../ui/image/image';\nimport {\n useMonthlyReportInvalidate,\n useMonthlyReportPatch,\n} from '../../api/use-monthly-report-get';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport * as Styled from './feedback-styled';\n\nconst Feedback = ({\n reportId,\n studentName,\n onFeedback,\n studentCourseId,\n showSnackbar,\n}: IFeedbackTypesProps) => {\n const onComplete = useCallback(\n (err: string | null, data?: IMonthlyReportResponse) => {\n if (err && showSnackbar) {\n showSnackbar({\n type: 'error',\n message: 'Something went wrong. Please try again.',\n bgColor: 'red',\n });\n }\n\n if (!err && onFeedback && data?.feedback) {\n onFeedback(data.feedback, studentCourseId);\n }\n },\n [onFeedback, studentCourseId],\n );\n\n const { patch: updateMilestone, isProcessing } = useMonthlyReportPatch({\n onComplete,\n });\n\n const handleFeedback = useCallback(\n (feedback: TFeedback) => {\n updateMilestone(reportId, { feedback });\n },\n [reportId, updateMilestone],\n );\n\n const handlePositiveFeedback = useCallback(() => {\n handleFeedback('positive');\n }, [handleFeedback]);\n\n const handleNegativeFeedback = useCallback(() => {\n handleFeedback('negative');\n }, [handleFeedback]);\n\n return (\n <Styled.FeedbackContainer $gapX={1.25} $background=\"WHITE_3\">\n <Text $renderAs=\"ab2-black\" $color=\"BLACK_1\" $align=\"center\">\n Are you happy with {studentName ?? 'her'} progress?\n </Text>\n <Separator heightX={1.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={3} $alignItems=\"center\" $justifyContent=\"center\">\n <Clickable\n label=\"Report thumps up\"\n disabled={isProcessing}\n onClick={handlePositiveFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2.5}\n $borderColor=\"BLACK_5\"\n >\n <Image src={ILLUSTRATIONS.THUMPS_UP} alt=\"UP\" width={32} height={32} />\n </FlexView>\n </Clickable>\n <Clickable\n label=\"Report thumps down\"\n disabled={isProcessing}\n onClick={handleNegativeFeedback}\n >\n <FlexView\n $widthX={5}\n $heightX={5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderColor=\"BLACK_5\"\n $borderRadiusX={2.5}\n >\n <Image src={ILLUSTRATIONS.THUMPS_DOWN} alt=\"DOWN\" width={32} height={32} />\n </FlexView>\n </Clickable>\n </FlexView>\n <Separator heightX={1.5} />\n </Styled.FeedbackContainer>\n );\n};\n\nexport default memo(Feedback);\n"],"names":["Feedback","reportId","studentName","onFeedback","studentCourseId","showSnackbar","onComplete","useCallback","err","data","updateMilestone","isProcessing","useMonthlyReportPatch","handleFeedback","feedback","handlePositiveFeedback","handleNegativeFeedback","Styled.FeedbackContainer","jsxs","Text","jsx","Separator","FlexView","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UAAA;AAAA,MAAA,gBAAAF;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,UAAUZ;AAAA,UACV,SAASI;AAAA,UAET,UAAA,gBAAAK;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,gBAAgB;AAAA,cAChB,cAAa;AAAA,cAEb,UAAA,gBAAAF,EAACI,GAAM,EAAA,KAAKC,EAAc,WAAW,KAAI,MAAK,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,YAAA;AAAA,UACvE;AAAA,QAAA;AAAA,MACF;AAAA,MACA,gBAAAL;AAAA,QAACG;AAAA,QAAA;AAAA,UACC,OAAM;AAAA,UACN,UAAUZ;AAAA,UACV,SAASK;AAAA,UAET,UAAA,gBAAAI;AAAA,YAACE;AAAA,YAAA;AAAA,cACC,SAAS;AAAA,cACT,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAChB,cAAa;AAAA,cACb,gBAAgB;AAAA,cAEhB,UAAA,gBAAAF,EAACI,GAAM,EAAA,KAAKC,EAAc,aAAa,KAAI,QAAO,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,YAAA;AAAA,UAC3E;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAL,EAACC,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,EAC3B,EAAA,CAAA;AAEJ,GAEeK,IAAAC,EAAK3B,CAAQ;"}
@@ -1,44 +1,44 @@
1
1
  import { jsx as t, jsxs as u } from "react/jsx-runtime";
2
- import { memo as _, useCallback as h, useEffect as m } from "react";
2
+ import { memo as _, useCallback as h, useEffect as c } from "react";
3
3
  import { useMonthlyReportGet as g } from "./api/use-monthly-report-get.js";
4
4
  import y from "../../ui/loader/app-loader/app-loader.js";
5
5
  import v from "../../ui/error/error.js";
6
6
  import { MonthlyReportContainer as x } from "./monthly-report-styled.js";
7
7
  import R from "./comps/goals/goals.js";
8
8
  import A from "./comps/activities/activities.js";
9
- import c from "../../ui/layout/flex-view.js";
9
+ import p from "../../ui/layout/flex-view.js";
10
10
  import C from "./comps/attendance/attendance.js";
11
11
  import $ from "./comps/feedback/feedback.js";
12
12
  import j from "./comps/achievements/achievements.js";
13
13
  import { IS_APP_RUNNING_IN_RN as D } from "../../../constants/app-config.js";
14
14
  const I = ({
15
- studentName: i,
15
+ studentName: s,
16
16
  reportId: o,
17
- onPuzzleClick: p,
18
- showSnackbar: s,
19
- onFeedback: f
17
+ onPuzzleClick: f,
18
+ showSnackbar: n,
19
+ onFeedback: l
20
20
  }) => {
21
21
  const {
22
- get: n,
22
+ get: a,
23
23
  data: e,
24
- isProcessing: a,
25
- isProcessingFailed: l,
26
- isStale: d
24
+ isProcessing: i,
25
+ isProcessingFailed: d,
26
+ isStale: m
27
27
  } = g(), r = h(() => {
28
- n(o);
29
- }, [n, o]);
30
- return m(() => {
28
+ a(o);
29
+ }, [a, o]);
30
+ return c(() => {
31
31
  r();
32
- }, [r]), m(() => {
33
- d && !a && r();
34
- }, []), a || !e ? /* @__PURE__ */ t(c, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(y, { height: "100dvh" }) }) : l ? /* @__PURE__ */ t(c, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(v, { onTryAgain: r }) }) : e ? /* @__PURE__ */ u(x, { children: [
32
+ }, [r]), c(() => {
33
+ m && !i && r();
34
+ }, [m, i, r]), i || !e ? /* @__PURE__ */ t(p, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(y, { height: "100dvh" }) }) : d ? /* @__PURE__ */ t(p, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ t(v, { onTryAgain: r }) }) : e ? /* @__PURE__ */ u(x, { children: [
35
35
  /* @__PURE__ */ t(R, { milestones: e.progress_data.user_milestones, isExpended: !0 }),
36
- /* @__PURE__ */ t(A, { activities: e.progress_data.activities, onPuzzleClick: p }),
36
+ /* @__PURE__ */ t(A, { activities: e.progress_data.activities, onPuzzleClick: f }),
37
37
  /* @__PURE__ */ t(
38
38
  j,
39
39
  {
40
40
  achievements: e.progress_data.user_achievements,
41
- studentName: i
41
+ studentName: s
42
42
  }
43
43
  ),
44
44
  /* @__PURE__ */ t(
@@ -47,17 +47,17 @@ const I = ({
47
47
  calendarData: e.calendar_data,
48
48
  reportMonth: e.report_month,
49
49
  reportYear: e.report_year,
50
- onDateClick: s
50
+ onDateClick: n
51
51
  }
52
52
  ),
53
53
  D && !e.feedback && e.student_course_ids[0] && /* @__PURE__ */ t(
54
54
  $,
55
55
  {
56
56
  reportId: o,
57
- studentName: i,
58
- onFeedback: f,
57
+ studentName: s,
58
+ onFeedback: l,
59
59
  studentCourseId: e.student_course_ids[0],
60
- showSnackbar: s
60
+ showSnackbar: n
61
61
  }
62
62
  )
63
63
  ] }) : null;
@@ -1 +1 @@
1
- {"version":3,"file":"monthly-report.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { type IMonthlyReportProps } from './monthly-report-types';\nimport { useMonthlyReportGet } from './api/use-monthly-report-get';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Error from '../../ui/error/error';\nimport * as Styled from './monthly-report-styled';\nimport Goals from './comps/goals/goals';\nimport Activities from './comps/activities/activities';\nimport FlexView from '../../ui/layout/flex-view';\nimport Attendance from './comps/attendance/attendance';\nimport Feedback from './comps/feedback/feedback';\nimport Achievements from './comps/achievements/achievements';\nimport { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\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 }, []);\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 </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","monthlyReport","memo"],"mappings":";;;;;;;;;;;;;AAeA,MAAMA,IAAyC,CAAC;AAAA,EAC9C,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AACF,MAAM;AACE,Q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A;AAAA,QACC,UAAAxB;AAAA,QACA,aAAAD;AAAA,QACA,YAAAI;AAAA,QACA,iBAAiBE,EAAW,mBAAmB,CAAC;AAAA,QAChD,cAAAH;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ,EAAA,CAAA,IA1BO;AA4BX,GAEeuB,IAAAC,EAAK5B,CAAa;"}
1
+ {"version":3,"file":"monthly-report.js","sources":["../../../../src/features/timeline/monthly-report/monthly-report.tsx"],"sourcesContent":["import { type FC, memo, useCallback, useEffect } from 'react';\n\nimport { type IMonthlyReportProps } from './monthly-report-types';\nimport { useMonthlyReportGet } from './api/use-monthly-report-get';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Error from '../../ui/error/error';\nimport * as Styled from './monthly-report-styled';\nimport Goals from './comps/goals/goals';\nimport Activities from './comps/activities/activities';\nimport FlexView from '../../ui/layout/flex-view';\nimport Attendance from './comps/attendance/attendance';\nimport Feedback from './comps/feedback/feedback';\nimport Achievements from './comps/achievements/achievements';\nimport { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\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 </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","monthlyReport","memo"],"mappings":";;;;;;;;;;;;;AAeA,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,KAAg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