@cuemath/leap 3.5.30-as7 → 3.5.30-as8
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.
|
@@ -18,7 +18,7 @@ const T = ({
|
|
|
18
18
|
reportType: l,
|
|
19
19
|
courseStream: u
|
|
20
20
|
}) => {
|
|
21
|
-
var m,
|
|
21
|
+
var m, h, f;
|
|
22
22
|
const b = () => {
|
|
23
23
|
s && s((e == null ? void 0 : e.id) || "", l, _, E[R - 1] || "");
|
|
24
24
|
};
|
|
@@ -28,16 +28,17 @@ const T = ({
|
|
|
28
28
|
icon: "full"
|
|
29
29
|
});
|
|
30
30
|
const d = l === o.PTM ? [] : ((m = e == null ? void 0 : e.progress_data) == null ? void 0 : m.user_milestones) || [];
|
|
31
|
-
return l === o.MPR_V2 && !((
|
|
31
|
+
return l === o.MPR_V2 && !((f = (h = e == null ? void 0 : e.progress_data) == null ? void 0 : h.user_milestones) != null && f.length) ? /* @__PURE__ */ a(
|
|
32
32
|
n,
|
|
33
33
|
{
|
|
34
34
|
$flexDirection: "row",
|
|
35
35
|
$alignItems: "center",
|
|
36
36
|
$flexGapX: 0.5,
|
|
37
|
-
$gutterX:
|
|
37
|
+
$gutterX: 1,
|
|
38
38
|
$gapX: 1,
|
|
39
39
|
$borderColor: "WHITE_5",
|
|
40
40
|
$background: "WHITE_3",
|
|
41
|
+
$heightX: 4.5,
|
|
41
42
|
children: [
|
|
42
43
|
/* @__PURE__ */ i(g, { src: L.NO_REPORT, alt: "report icon", withLoader: !0, width: 32, height: 32 }),
|
|
43
44
|
/* @__PURE__ */ i($, { $renderAs: "ub2", $color: "BLACK_1", children: "Report unavailable - no activity this month." })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monthly-card.js","sources":["../../../../../../src/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { type IMonthlyReportCardProps } from './monthly-card-types';\nimport * as Styled from './monthly-card.styled';\nimport GoalsCard from '../../../monthly-report/comps/goals/goals-card/goals-card';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport Text from '../../../../ui/text/text';\nimport Image from '../../../../ui/image/image';\nimport { monthNames, REPORT_CONFIG } from '../../constants';\nimport { REPORT_TYPE } from '../../monthly-timeline-types';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\n\nconst MonthlyReportCard: FC<IMonthlyReportCardProps> = ({\n report,\n year,\n month,\n onReportClick,\n reportType,\n courseStream,\n}) => {\n const handleReportClick = () => {\n if (onReportClick) {\n onReportClick(report?.id || '', reportType, year, monthNames[month - 1] || '');\n }\n };\n\n let config = { label: '', icon: '' };\n\n if (reportType === REPORT_TYPE.PTM) {\n config = REPORT_CONFIG.PTM ?? { label: 'Report', icon: 'full' };\n } else if (reportType === REPORT_TYPE.MPR_V1) {\n config = REPORT_CONFIG.MPR_V1 ?? { label: 'Report', icon: 'full' };\n } else if (reportType === REPORT_TYPE.MPR_V2) {\n config = REPORT_CONFIG['MPR_V2_' + (courseStream || '').toLowerCase()] ?? {\n label: 'Report',\n icon: 'full',\n };\n }\n\n const reportMilestones =\n reportType === REPORT_TYPE.PTM ? [] : report?.progress_data?.user_milestones || [];\n\n if (reportType === REPORT_TYPE.MPR_V2 && !report?.progress_data?.user_milestones?.length) {\n return (\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={0.5}\n $gutterX={
|
|
1
|
+
{"version":3,"file":"monthly-card.js","sources":["../../../../../../src/features/timeline/monthly-timeline/comps/monthly-card/monthly-card.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport { type IMonthlyReportCardProps } from './monthly-card-types';\nimport * as Styled from './monthly-card.styled';\nimport GoalsCard from '../../../monthly-report/comps/goals/goals-card/goals-card';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport CaratRightIcon from '../../../../../assets/line-icons/icons/carat-right';\nimport Text from '../../../../ui/text/text';\nimport Image from '../../../../ui/image/image';\nimport { monthNames, REPORT_CONFIG } from '../../constants';\nimport { REPORT_TYPE } from '../../monthly-timeline-types';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\n\nconst MonthlyReportCard: FC<IMonthlyReportCardProps> = ({\n report,\n year,\n month,\n onReportClick,\n reportType,\n courseStream,\n}) => {\n const handleReportClick = () => {\n if (onReportClick) {\n onReportClick(report?.id || '', reportType, year, monthNames[month - 1] || '');\n }\n };\n\n let config = { label: '', icon: '' };\n\n if (reportType === REPORT_TYPE.PTM) {\n config = REPORT_CONFIG.PTM ?? { label: 'Report', icon: 'full' };\n } else if (reportType === REPORT_TYPE.MPR_V1) {\n config = REPORT_CONFIG.MPR_V1 ?? { label: 'Report', icon: 'full' };\n } else if (reportType === REPORT_TYPE.MPR_V2) {\n config = REPORT_CONFIG['MPR_V2_' + (courseStream || '').toLowerCase()] ?? {\n label: 'Report',\n icon: 'full',\n };\n }\n\n const reportMilestones =\n reportType === REPORT_TYPE.PTM ? [] : report?.progress_data?.user_milestones || [];\n\n if (reportType === REPORT_TYPE.MPR_V2 && !report?.progress_data?.user_milestones?.length) {\n return (\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={0.5}\n $gutterX={1}\n $gapX={1}\n $borderColor=\"WHITE_5\"\n $background=\"WHITE_3\"\n $heightX={4.5}\n >\n <Image src={ILLUSTRATIONS.NO_REPORT} alt=\"report icon\" withLoader width={32} height={32} />\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n Report unavailable - no activity this month.\n </Text>\n </FlexView>\n );\n }\n\n return (\n <Clickable\n onClick={handleReportClick}\n disabled={!report?.id && reportType !== REPORT_TYPE.MPR_V1}\n label=\"Report Card click\"\n >\n <FlexView $flexGap={1} $borderColor=\"BLACK_1\">\n {!!reportMilestones.length && (\n <Styled.GoalsSection $flexGap={1}>\n {reportMilestones.map((milestone, milestoneIndex) => (\n <GoalsCard\n key={milestone.user_milestone_id || milestoneIndex}\n category={milestone.goal_category}\n milestone={milestone}\n isExpended={false}\n />\n ))}\n </Styled.GoalsSection>\n )}\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $background=\"BLACK_1\"\n $heightX={3}\n >\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={0.5} $gutterX={1}>\n <Image src={config.icon} alt=\"report icon\" withLoader width={32} height={32} />\n <Text $renderAs=\"ub2-bold\" $color=\"WHITE\">\n {config.label}\n </Text>\n </FlexView>\n <FlexView $gutterX={0.75}>\n <CaratRightIcon width={24} height={24} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n </FlexView>\n </Clickable>\n );\n};\n\nexport default memo(MonthlyReportCard);\n"],"names":["MonthlyReportCard","report","year","month","onReportClick","reportType","courseStream","handleReportClick","monthNames","config","REPORT_TYPE","REPORT_CONFIG","reportMilestones","_a","_c","_b","jsxs","FlexView","jsx","Image","ILLUSTRATIONS","Text","Clickable","Styled.GoalsSection","milestone","milestoneIndex","GoalsCard","CaratRightIcon","MonthlyReportCard$1","memo"],"mappings":";;;;;;;;;;;;AAcA,MAAMA,IAAiD,CAAC;AAAA,EACtD,QAAAC;AAAA,EACA,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AACF,MAAM;;AACJ,QAAMC,IAAoB,MAAM;AAC9B,IAAIH,KACYA,GAAAH,KAAA,gBAAAA,EAAQ,OAAM,IAAII,GAAYH,GAAMM,EAAWL,IAAQ,CAAC,KAAK,EAAE;AAAA,EAC/E;AAGF,MAAIM,IAAS,EAAE,OAAO,IAAI,MAAM,GAAG;AAE/B,EAAAJ,MAAeK,EAAY,MAC7BD,IAASE,EAAc,OAAO,EAAE,OAAO,UAAU,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