@cuemath/leap 3.5.52 → 3.5.53
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.
|
@@ -3,8 +3,8 @@ import { memo as a, useMemo as s } from "react";
|
|
|
3
3
|
import o from "../../ui/layout/flex-view.js";
|
|
4
4
|
import i from "../../ui/text/text.js";
|
|
5
5
|
import g from "./comps/report-header/report-header.js";
|
|
6
|
-
import
|
|
7
|
-
import { transformSectionsToReportData as
|
|
6
|
+
import f from "./comps/score-section/score-section.js";
|
|
7
|
+
import { transformSectionsToReportData as d, LEGEND_ITEMS as x, getQuestionStatusBgColor as _ } from "./math-fit-report-helpers.js";
|
|
8
8
|
const b = a(function({
|
|
9
9
|
data: e,
|
|
10
10
|
onReview: l,
|
|
@@ -12,11 +12,11 @@ const b = a(function({
|
|
|
12
12
|
userType: m,
|
|
13
13
|
onBack: p
|
|
14
14
|
}) {
|
|
15
|
-
const c = s(() =>
|
|
15
|
+
const c = s(() => d(e.sections), [e.sections]), h = s(() => {
|
|
16
16
|
if (e.previous_score && e.score)
|
|
17
17
|
return e.score - e.previous_score;
|
|
18
18
|
}, [e.score, e.previous_score]);
|
|
19
|
-
return /* @__PURE__ */ n(o, { $background: "BLACK_T_04", children: [
|
|
19
|
+
return /* @__PURE__ */ n(o, { $flex: 1, $background: "BLACK_T_04", children: [
|
|
20
20
|
/* @__PURE__ */ r(
|
|
21
21
|
g,
|
|
22
22
|
{
|
|
@@ -30,7 +30,7 @@ const b = a(function({
|
|
|
30
30
|
}
|
|
31
31
|
),
|
|
32
32
|
c.map((t, u) => /* @__PURE__ */ n(o, { $background: "WHITE", children: [
|
|
33
|
-
/* @__PURE__ */ r(o, { $gapX: 1.5, $gutterX: 1.25, children: /* @__PURE__ */ r(
|
|
33
|
+
/* @__PURE__ */ r(o, { $gapX: 1.5, $gutterX: 1.25, children: /* @__PURE__ */ r(f, { section: t, onReviewSection: l, sheet: t.sheet }) }),
|
|
34
34
|
u !== c.length - 1 && /* @__PURE__ */ r(o, { $height: 1, $background: "BLACK_T_08" })
|
|
35
35
|
] }, t.title)),
|
|
36
36
|
/* @__PURE__ */ n(o, { $gutterX: 1, $flexColumnGapX: 1, $gapX: 1, $flexRowGapX: 2, $alignItems: "center", children: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-fit-report.js","sources":["../../../../src/features/math-fit/math-fit-report/math-fit-report.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport ReportHeader from './comps/report-header/report-header';\nimport ScoreSection from './comps/score-section/score-section';\nimport {\n getQuestionStatusBgColor,\n LEGEND_ITEMS,\n transformSectionsToReportData,\n} from './math-fit-report-helpers';\nimport type { IMathFitReportProps } from './math-fit-report-types';\n\nconst MathFitReport: FC<IMathFitReportProps> = memo(function MathFitReport({\n data,\n onReview,\n studentName,\n userType,\n onBack,\n}) {\n const sectionData = useMemo(() => transformSectionsToReportData(data.sections), [data.sections]);\n\n const scoreChange = useMemo(() => {\n if (data.previous_score && data.score) {\n return data.score - data.previous_score;\n }\n\n return undefined;\n }, [data.score, data.previous_score]);\n\n return (\n <FlexView $background=\"BLACK_T_04\">\n <ReportHeader\n score={data.score ?? 0}\n maxScore={10}\n scoreChange={scoreChange}\n createdOnTs={data.created_on_ts}\n studentName={studentName}\n userType={userType}\n onBack={onBack}\n />\n\n {sectionData.map((section, index) => (\n <FlexView key={section.title} $background=\"WHITE\">\n <FlexView $gapX={1.5} $gutterX={1.25}>\n <ScoreSection section={section} onReviewSection={onReview} sheet={section.sheet} />\n </FlexView>\n {index !== sectionData.length - 1 && <FlexView $height={1} $background=\"BLACK_T_08\" />}\n </FlexView>\n ))}\n\n <FlexView $gutterX={1} $flexColumnGapX={1} $gapX={1} $flexRowGapX={2} $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {LEGEND_ITEMS.map(item => (\n <FlexView\n key={item.label}\n $flexDirection=\"row\"\n $flexColumnGapX={0.25}\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {item.label}\n </Text>\n <FlexView\n $width={10}\n $height={10}\n $borderRadiusX={1}\n $background={getQuestionStatusBgColor(item.state)}\n />\n </FlexView>\n ))}\n </FlexView>\n <FlexView $flexRowGapX={0.25} $marginBottomX={0.5} $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\">\n Keep Up the Great Work! 🚀\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\">\n You’re getting stronger at MathFit each day. See you next month!\n </Text>\n </FlexView>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default MathFitReport;\n"],"names":["MathFitReport","memo","data","onReview","studentName","userType","onBack","sectionData","useMemo","transformSectionsToReportData","scoreChange","jsxs","FlexView","jsx","ReportHeader","section","index","ScoreSection","LEGEND_ITEMS","item","Text","getQuestionStatusBgColor","MathFitReport$1"],"mappings":";;;;;;;AAaA,MAAMA,IAAyCC,EAAK,SAAuB;AAAA,EACzE,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AACF,GAAG;AACK,QAAAC,IAAcC,EAAQ,MAAMC,EAA8BP,EAAK,QAAQ,GAAG,CAACA,EAAK,QAAQ,CAAC,GAEzFQ,IAAcF,EAAQ,MAAM;AAC5B,QAAAN,EAAK,kBAAkBA,EAAK;AACvB,aAAAA,EAAK,QAAQA,EAAK;AAAA,KAI1B,CAACA,EAAK,OAAOA,EAAK,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"math-fit-report.js","sources":["../../../../src/features/math-fit/math-fit-report/math-fit-report.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport ReportHeader from './comps/report-header/report-header';\nimport ScoreSection from './comps/score-section/score-section';\nimport {\n getQuestionStatusBgColor,\n LEGEND_ITEMS,\n transformSectionsToReportData,\n} from './math-fit-report-helpers';\nimport type { IMathFitReportProps } from './math-fit-report-types';\n\nconst MathFitReport: FC<IMathFitReportProps> = memo(function MathFitReport({\n data,\n onReview,\n studentName,\n userType,\n onBack,\n}) {\n const sectionData = useMemo(() => transformSectionsToReportData(data.sections), [data.sections]);\n\n const scoreChange = useMemo(() => {\n if (data.previous_score && data.score) {\n return data.score - data.previous_score;\n }\n\n return undefined;\n }, [data.score, data.previous_score]);\n\n return (\n <FlexView $flex={1} $background=\"BLACK_T_04\">\n <ReportHeader\n score={data.score ?? 0}\n maxScore={10}\n scoreChange={scoreChange}\n createdOnTs={data.created_on_ts}\n studentName={studentName}\n userType={userType}\n onBack={onBack}\n />\n\n {sectionData.map((section, index) => (\n <FlexView key={section.title} $background=\"WHITE\">\n <FlexView $gapX={1.5} $gutterX={1.25}>\n <ScoreSection section={section} onReviewSection={onReview} sheet={section.sheet} />\n </FlexView>\n {index !== sectionData.length - 1 && <FlexView $height={1} $background=\"BLACK_T_08\" />}\n </FlexView>\n ))}\n\n <FlexView $gutterX={1} $flexColumnGapX={1} $gapX={1} $flexRowGapX={2} $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {LEGEND_ITEMS.map(item => (\n <FlexView\n key={item.label}\n $flexDirection=\"row\"\n $flexColumnGapX={0.25}\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {item.label}\n </Text>\n <FlexView\n $width={10}\n $height={10}\n $borderRadiusX={1}\n $background={getQuestionStatusBgColor(item.state)}\n />\n </FlexView>\n ))}\n </FlexView>\n <FlexView $flexRowGapX={0.25} $marginBottomX={0.5} $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\">\n Keep Up the Great Work! 🚀\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\">\n You’re getting stronger at MathFit each day. See you next month!\n </Text>\n </FlexView>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default MathFitReport;\n"],"names":["MathFitReport","memo","data","onReview","studentName","userType","onBack","sectionData","useMemo","transformSectionsToReportData","scoreChange","jsxs","FlexView","jsx","ReportHeader","section","index","ScoreSection","LEGEND_ITEMS","item","Text","getQuestionStatusBgColor","MathFitReport$1"],"mappings":";;;;;;;AAaA,MAAMA,IAAyCC,EAAK,SAAuB;AAAA,EACzE,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AACF,GAAG;AACK,QAAAC,IAAcC,EAAQ,MAAMC,EAA8BP,EAAK,QAAQ,GAAG,CAACA,EAAK,QAAQ,CAAC,GAEzFQ,IAAcF,EAAQ,MAAM;AAC5B,QAAAN,EAAK,kBAAkBA,EAAK;AACvB,aAAAA,EAAK,QAAQA,EAAK;AAAA,KAI1B,CAACA,EAAK,OAAOA,EAAK,cAAc,CAAC;AAEpC,SACG,gBAAAS,EAAAC,GAAA,EAAS,OAAO,GAAG,aAAY,cAC9B,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOZ,EAAK,SAAS;AAAA,QACrB,UAAU;AAAA,QACV,aAAAQ;AAAA,QACA,aAAaR,EAAK;AAAA,QAClB,aAAAE;AAAA,QACA,UAAAC;AAAA,QACA,QAAAC;AAAA,MAAA;AAAA,IACF;AAAA,IAECC,EAAY,IAAI,CAACQ,GAASC,MACxB,gBAAAL,EAAAC,GAAA,EAA6B,aAAY,SACxC,UAAA;AAAA,MAAA,gBAAAC,EAACD,GAAS,EAAA,OAAO,KAAK,UAAU,MAC9B,UAAA,gBAAAC,EAACI,GAAa,EAAA,SAAAF,GAAkB,iBAAiBZ,GAAU,OAAOY,EAAQ,MAAO,CAAA,GACnF;AAAA,MACCC,MAAUT,EAAY,SAAS,uBAAMK,GAAS,EAAA,SAAS,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