@cuemath/leap 3.5.68-as2 → 3.5.69-as1
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/math-fit/math-fit-report/comps/report-header/report-header.js +43 -31
- package/dist/features/math-fit/math-fit-report/comps/report-header/report-header.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge-helpers.js +9 -0
- package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge-helpers.js.map +1 -0
- package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge.js +23 -21
- package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js +55 -52
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/math-fit-report.js +72 -74
- package/dist/features/math-fit/math-fit-report/math-fit-report.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/mathfit/mathfit.js +11 -9
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/mathfit/mathfit.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
|
@@ -1,58 +1,70 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { formatTestDate as B } from "../../math-fit-report-helpers.js";
|
|
1
|
+
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as u, useMemo as h } from "react";
|
|
3
|
+
import n from "../../../../ui/text/text.js";
|
|
4
|
+
import g from "../score-badge/score-badge.js";
|
|
5
|
+
import { IS_APP_RUNNING_IN_RN as o } from "../../../../../constants/app-config.js";
|
|
6
|
+
import B from "../../../../ui/separator/separator.js";
|
|
7
|
+
import { formatTestDate as $ } from "../../math-fit-report-helpers.js";
|
|
9
8
|
import _ from "../../../../../assets/line-icons/icons/back2.js";
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
import x from "../../../../ui/buttons/icon-button/icon-button.js";
|
|
10
|
+
import { HeaderContainer as A, BackButtonContainer as C, BackButtonWrapper as I } from "./report-header-styled.js";
|
|
11
|
+
const P = u(function({
|
|
12
|
+
createdOnTs: a,
|
|
13
|
+
maxScore: i,
|
|
14
|
+
score: d,
|
|
15
|
+
scoreChange: s,
|
|
16
|
+
studentName: c,
|
|
17
|
+
userType: l,
|
|
18
|
+
onBack: m,
|
|
19
|
+
compactView: e = !1,
|
|
20
|
+
showGreeting: f = !0
|
|
19
21
|
}) {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
+
const p = h(() => o ? e ? 5 : 9.6 : 11.75, [e]);
|
|
23
|
+
return /* @__PURE__ */ t(
|
|
24
|
+
A,
|
|
22
25
|
{
|
|
23
26
|
$background: "BLUE_4",
|
|
24
|
-
$heightX:
|
|
27
|
+
$heightX: p,
|
|
25
28
|
$gapX: 1.5,
|
|
26
29
|
$gutterX: 1.5,
|
|
27
|
-
$justifyContent: "flex-end",
|
|
30
|
+
$justifyContent: e ? "center" : "flex-end",
|
|
28
31
|
$position: "relative",
|
|
29
32
|
children: [
|
|
30
|
-
|
|
31
|
-
|
|
33
|
+
l === "TEACHER" && /* @__PURE__ */ r(C, { $height: "100%", children: /* @__PURE__ */ r(I, { children: /* @__PURE__ */ r(
|
|
34
|
+
x,
|
|
32
35
|
{
|
|
33
36
|
Icon: _,
|
|
34
37
|
renderAs: "secondary-gray",
|
|
35
38
|
analyticsLabel: "chapter_page_exit",
|
|
36
39
|
size: "xsmall",
|
|
37
|
-
onClick:
|
|
40
|
+
onClick: m
|
|
38
41
|
}
|
|
39
42
|
) }) }),
|
|
40
|
-
/* @__PURE__ */
|
|
43
|
+
f && /* @__PURE__ */ t(n, { $renderAs: "ab1-bold", $color: "BLACK_1", children: [
|
|
41
44
|
"Well done, ",
|
|
42
|
-
|
|
45
|
+
c || "",
|
|
43
46
|
"!"
|
|
44
47
|
] }),
|
|
45
|
-
/* @__PURE__ */ r(
|
|
46
|
-
/* @__PURE__ */ r(
|
|
47
|
-
|
|
48
|
+
/* @__PURE__ */ r(B, { heightX: 0.5 }),
|
|
49
|
+
/* @__PURE__ */ r(
|
|
50
|
+
g,
|
|
51
|
+
{
|
|
52
|
+
score: d,
|
|
53
|
+
maxScore: i,
|
|
54
|
+
scoreChange: s,
|
|
55
|
+
renderInHeader: !0,
|
|
56
|
+
renderInMobile: !!(o || e)
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ t(n, { $renderAs: o || e ? "ac5" : "ac4", $color: "BLACK_T_60", children: [
|
|
48
60
|
"TEST Score • ",
|
|
49
|
-
|
|
61
|
+
$(a)
|
|
50
62
|
] })
|
|
51
63
|
]
|
|
52
64
|
}
|
|
53
65
|
);
|
|
54
66
|
});
|
|
55
67
|
export {
|
|
56
|
-
|
|
68
|
+
P as default
|
|
57
69
|
};
|
|
58
70
|
//# sourceMappingURL=report-header.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report-header.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/report-header/report-header.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\
|
|
1
|
+
{"version":3,"file":"report-header.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/report-header/report-header.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\nimport Text from '../../../../ui/text/text';\nimport ScoreBadge from '../score-badge/score-badge';\nimport type { IReportHeaderProps } from './report-header-types';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../constants/app-config';\nimport Separator from '../../../../ui/separator/separator';\nimport { formatTestDate } from '../../math-fit-report-helpers';\nimport Back2Icon from '../../../../../assets/line-icons/icons/back2';\nimport IconButton from '../../../../ui/buttons/icon-button/icon-button';\nimport * as Styled from './report-header-styled';\n\nconst ReportHeader: FC<IReportHeaderProps> = memo(function ReportHeader({\n createdOnTs,\n maxScore,\n score,\n scoreChange,\n studentName,\n userType,\n onBack,\n compactView = false,\n showGreeting = true,\n}) {\n const headerHeight = useMemo(() => {\n if (IS_APP_RUNNING_IN_RN) {\n return compactView ? 5 : 9.6;\n }\n\n return 11.75;\n }, [compactView]);\n\n const justifyContent = compactView ? 'center' : 'flex-end';\n const dateTextVariant = IS_APP_RUNNING_IN_RN || compactView ? 'ac5' : 'ac4';\n const renderScoreBadgeAsMobile = !!(IS_APP_RUNNING_IN_RN || compactView);\n\n return (\n <Styled.HeaderContainer\n $background=\"BLUE_4\"\n $heightX={headerHeight}\n $gapX={1.5}\n $gutterX={1.5}\n $justifyContent={justifyContent}\n $position=\"relative\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onBack}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n {showGreeting && (\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Well done, {studentName || ''}!\n </Text>\n )}\n <Separator heightX={0.5} />\n <ScoreBadge\n score={score}\n maxScore={maxScore}\n scoreChange={scoreChange}\n renderInHeader\n renderInMobile={renderScoreBadgeAsMobile}\n />\n <Text $renderAs={dateTextVariant} $color=\"BLACK_T_60\">\n TEST Score • {formatTestDate(createdOnTs)}\n </Text>\n </Styled.HeaderContainer>\n );\n});\n\nexport default ReportHeader;\n"],"names":["ReportHeader","memo","createdOnTs","maxScore","score","scoreChange","studentName","userType","onBack","compactView","showGreeting","headerHeight","useMemo","IS_APP_RUNNING_IN_RN","jsxs","Styled.HeaderContainer","jsx","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2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KAAwBJ,IAAc,QAAQ,OAsChC,QAAO,cAAa,UAAA;AAAA,UAAA;AAAA,UACtCe,EAAetB,CAAW;AAAA,QAAA,GAC1C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = (r, t) => r ? t ? "ah3-bold" : "ah2-bold" : "ac2", o = (r, t) => r ? t ? "ab1-bold" : "ah4-bold" : "ac4", n = (r, t) => r && !t ? 5 : 2, a = (r, t) => r ? t ? 3 : -7 : 9, c = (r, t) => r ? t ? 7 : 10 : 2;
|
|
2
|
+
export {
|
|
3
|
+
a as getArrowMarginBottom,
|
|
4
|
+
n as getMaxScoreMarginBottom,
|
|
5
|
+
o as getMaxScoreTextSize,
|
|
6
|
+
c as getScoreChangeMarginBottom,
|
|
7
|
+
e as getScoreTextSize
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=score-badge-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"score-badge-helpers.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-badge/score-badge-helpers.ts"],"sourcesContent":["import type { TTextVariants } from '../../../../ui/types';\n\nexport const getScoreTextSize = (\n renderInHeader: boolean,\n renderInMobile: boolean,\n): TTextVariants => {\n if (renderInHeader) {\n return renderInMobile ? 'ah3-bold' : 'ah2-bold';\n }\n\n return 'ac2';\n};\n\nexport const getMaxScoreTextSize = (\n renderInHeader: boolean,\n renderInMobile: boolean,\n): TTextVariants => {\n if (renderInHeader) {\n return renderInMobile ? 'ab1-bold' : 'ah4-bold';\n }\n\n return 'ac4';\n};\n\nexport const getMaxScoreMarginBottom = (\n renderInHeader: boolean,\n renderInMobile: boolean,\n): number => {\n if (renderInHeader && !renderInMobile) {\n return 5;\n }\n\n return 2;\n};\n\nexport const getArrowMarginBottom = (renderInHeader: boolean, renderInMobile: boolean): number => {\n if (!renderInHeader) {\n return 9;\n }\n\n return renderInMobile ? 3 : -7;\n};\n\nexport const getScoreChangeMarginBottom = (\n renderInHeader: boolean,\n renderInMobile: boolean,\n): number => {\n if (!renderInHeader) {\n return 2;\n }\n\n return renderInMobile ? 7 : 10;\n};\n"],"names":["getScoreTextSize","renderInHeader","renderInMobile","getMaxScoreTextSize","getMaxScoreMarginBottom","getArrowMarginBottom","getScoreChangeMarginBottom"],"mappings":"AAEa,MAAAA,IAAmB,CAC9BC,GACAC,MAEID,IACKC,IAAiB,aAAa,aAGhC,OAGIC,IAAsB,CACjCF,GACAC,MAEID,IACKC,IAAiB,aAAa,aAGhC,OAGIE,IAA0B,CACrCH,GACAC,MAEID,KAAkB,CAACC,IACd,IAGF,GAGIG,IAAuB,CAACJ,GAAyBC,MACvDD,IAIEC,IAAiB,IAAI,KAHnB,GAMEI,IAA6B,CACxCL,GACAC,MAEKD,IAIEC,IAAiB,IAAI,KAHnB;"}
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import { jsxs as e, jsx as o, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h } from "react";
|
|
3
|
+
import m from "../../../../ui/layout/flex-view.js";
|
|
4
|
+
import p from "../../../../ui/separator/separator.js";
|
|
5
|
+
import a from "../../../../ui/text/text.js";
|
|
6
|
+
import { getScoreTextSize as d, getMaxScoreMarginBottom as A, getMaxScoreTextSize as w, getArrowMarginBottom as M, getScoreChangeMarginBottom as T } from "./score-badge-helpers.js";
|
|
7
|
+
import { ArrowIcon as z } from "./score-badge-styled.js";
|
|
8
|
+
const K = h(function({
|
|
9
|
+
score: c,
|
|
10
|
+
maxScore: g = 10,
|
|
11
|
+
scoreChange: r,
|
|
12
|
+
renderInHeader: t = !1,
|
|
13
|
+
renderInMobile: i = !1
|
|
12
14
|
}) {
|
|
13
|
-
const
|
|
14
|
-
return /* @__PURE__ */ m
|
|
15
|
-
/* @__PURE__ */ o(
|
|
16
|
-
!!
|
|
15
|
+
const n = r !== void 0 && r !== 0, s = n && r > 0, x = d(t, i), l = A(t, i), f = w(t, i), S = M(t, i), $ = T(t, i);
|
|
16
|
+
return /* @__PURE__ */ e(m, { $flexDirection: "row", $alignItems: "flex-end", children: [
|
|
17
|
+
/* @__PURE__ */ o(a, { $renderAs: x, $color: "BLACK_1", children: c ? c.toFixed(1) : "-" }),
|
|
18
|
+
!!c && /* @__PURE__ */ o(m, { $marginBottom: l, children: /* @__PURE__ */ e(a, { $renderAs: f, $color: "BLACK_1", children: [
|
|
17
19
|
"/",
|
|
18
|
-
|
|
20
|
+
g
|
|
19
21
|
] }) }),
|
|
20
|
-
/* @__PURE__ */ o(
|
|
21
|
-
|
|
22
|
-
/* @__PURE__ */ o(
|
|
23
|
-
/* @__PURE__ */ o(
|
|
22
|
+
/* @__PURE__ */ o(p, { width: 8 }),
|
|
23
|
+
n && /* @__PURE__ */ e(B, { children: [
|
|
24
|
+
/* @__PURE__ */ o(m, { $marginBottom: S, $alignSelf: "center", children: /* @__PURE__ */ o(z, { $isPositive: s, $renderInHeader: t }) }),
|
|
25
|
+
/* @__PURE__ */ o(m, { $marginBottom: $, children: /* @__PURE__ */ o(a, { $renderAs: "ac4", $color: s ? "GREEN_6" : "RED", children: Math.abs(r).toFixed(1) }) })
|
|
24
26
|
] })
|
|
25
27
|
] });
|
|
26
28
|
});
|
|
27
29
|
export {
|
|
28
|
-
|
|
30
|
+
K as default
|
|
29
31
|
};
|
|
30
32
|
//# sourceMappingURL=score-badge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score-badge.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-badge/score-badge.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport
|
|
1
|
+
{"version":3,"file":"score-badge.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-badge/score-badge.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport type { IScoreBadgeProps } from './score-badge-types';\nimport Text from '../../../../ui/text/text';\nimport {\n getArrowMarginBottom,\n getMaxScoreMarginBottom,\n getMaxScoreTextSize,\n getScoreChangeMarginBottom,\n getScoreTextSize,\n} from './score-badge-helpers';\nimport * as Styled from './score-badge-styled';\n\nconst ScoreBadge: FC<IScoreBadgeProps> = memo(function ScoreBadge({\n score,\n maxScore = 10,\n scoreChange,\n renderInHeader = false,\n renderInMobile = false,\n}) {\n const hasChange = scoreChange !== undefined && scoreChange !== 0;\n const isPositive = hasChange && scoreChange > 0;\n const scoreTextSize = getScoreTextSize(renderInHeader, renderInMobile);\n const maxScoreMarginBottom = getMaxScoreMarginBottom(renderInHeader, renderInMobile);\n const maxScoreTextSize = getMaxScoreTextSize(renderInHeader, renderInMobile);\n const arrowMarginBottom = getArrowMarginBottom(renderInHeader, renderInMobile);\n const scoreChangeMarginBottom = getScoreChangeMarginBottom(renderInHeader, renderInMobile);\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Text $renderAs={scoreTextSize} $color=\"BLACK_1\">\n {score ? score.toFixed(1) : '-'}\n </Text>\n {!!score && (\n <FlexView $marginBottom={maxScoreMarginBottom}>\n <Text $renderAs={maxScoreTextSize} $color=\"BLACK_1\">\n /{maxScore}\n </Text>\n </FlexView>\n )}\n <Separator width={8} />\n {hasChange && (\n <>\n <FlexView $marginBottom={arrowMarginBottom} $alignSelf=\"center\">\n <Styled.ArrowIcon $isPositive={isPositive} $renderInHeader={renderInHeader} />\n </FlexView>\n <FlexView $marginBottom={scoreChangeMarginBottom}>\n <Text $renderAs=\"ac4\" $color={isPositive ? 'GREEN_6' : 'RED'}>\n {Math.abs(scoreChange).toFixed(1)}\n </Text>\n </FlexView>\n </>\n )}\n </FlexView>\n );\n});\n\nexport default ScoreBadge;\n"],"names":["ScoreBadge","memo","score","maxScore","scoreChange","renderInHeader","renderInMobile","hasChange","isPositive","scoreTextSize","getScoreTextSize","maxScoreMarginBottom","getMaxScoreMarginBottom","maxScoreTextSize","getMaxScoreTextSize","arrowMarginBottom","getArrowMarginBottom","scoreChangeMarginBottom","getScoreChangeMarginBottom","jsxs","FlexView","jsx","Text","Separator","Fragment","Styled.ArrowIcon"],"mappings":";;;;;;;AAeM,MAAAA,IAAmCC,EAAK,SAAoB;AAAA,EAChE,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,aAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,gBAAAC,IAAiB;AACnB,GAAG;AACK,QAAAC,IAAYH,MAAgB,UAAaA,MAAgB,GACzDI,IAAaD,KAAaH,IAAc,GACxCK,IAAgBC,EAAiBL,GAAgBC,CAAc,GAC/DK,IAAuBC,EAAwBP,GAAgBC,CAAc,GAC7EO,IAAmBC,EAAoBT,GAAgBC,CAAc,GACrES,IAAoBC,EAAqBX,GAAgBC,CAAc,GACvEW,IAA0BC,EAA2Bb,GAAgBC,CAAc;AAEzF,SACG,gBAAAa,EAAAC,GAAA,EAAS,gBAAe,OAAM,aAAY,YACzC,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAWb,GAAe,QAAO,WACpC,cAAQP,EAAM,QAAQ,CAAC,IAAI,IAC9B,CAAA;AAAA,IACC,CAAC,CAACA,KACD,gBAAAmB,EAACD,GAAS,EAAA,eAAeT,GACvB,UAAA,gBAAAQ,EAACG,GAAK,EAAA,WAAWT,GAAkB,QAAO,WAAU,UAAA;AAAA,MAAA;AAAA,MAChDV;AAAA,IAAA,EAAA,CACJ,EACF,CAAA;AAAA,IAEF,gBAAAkB,EAACE,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IACpBhB,KAEG,gBAAAY,EAAAK,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAH,EAACD,GAAS,EAAA,eAAeL,GAAmB,YAAW,UACrD,UAAA,gBAAAM,EAACI,GAAA,EAAiB,aAAajB,GAAY,iBAAiBH,EAAgB,CAAA,GAC9E;AAAA,wBACCe,GAAS,EAAA,eAAeH,GACvB,UAAC,gBAAAI,EAAAC,GAAA,EAAK,WAAU,OAAM,QAAQd,IAAa,YAAY,OACpD,eAAK,IAAIJ,CAAW,EAAE,QAAQ,CAAC,EAClC,CAAA,GACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,67 +1,70 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
1
|
+
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as X, useCallback as _, Fragment as L } from "react";
|
|
3
3
|
import { useTheme as w } from "styled-components";
|
|
4
|
-
import
|
|
4
|
+
import y from "../../../../ui/buttons/button/button.js";
|
|
5
5
|
import r from "../../../../ui/layout/flex-view.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Divider as
|
|
9
|
-
import
|
|
10
|
-
import { getQuestionStatusBgColor as
|
|
11
|
-
import { EQuestionState as
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
6
|
+
import l from "../../../../ui/text/text.js";
|
|
7
|
+
import G from "../score-badge/score-badge.js";
|
|
8
|
+
import { Divider as K } from "./score-section-styled.js";
|
|
9
|
+
import g from "../../../../ui/separator/separator.js";
|
|
10
|
+
import { getQuestionStatusBgColor as k } from "../../math-fit-report-helpers.js";
|
|
11
|
+
import { EQuestionState as u } from "../../../math-fit-overview/math-fit-overview-types.js";
|
|
12
|
+
import { EDeviceType as j } from "../../../../ui/theme/constants.js";
|
|
13
|
+
const Y = X(function({
|
|
14
|
+
onReviewSection: c,
|
|
15
|
+
section: s,
|
|
16
|
+
sheet: $,
|
|
17
|
+
compactView: a = !1,
|
|
18
|
+
showReviewButton: b = !0
|
|
19
19
|
}) {
|
|
20
20
|
const {
|
|
21
|
-
title:
|
|
21
|
+
title: x,
|
|
22
22
|
score: f,
|
|
23
|
-
scoreChange:
|
|
23
|
+
scoreChange: C,
|
|
24
24
|
sessionId: p,
|
|
25
|
-
isIncomplete:
|
|
26
|
-
sectionNumber:
|
|
27
|
-
topics:
|
|
28
|
-
} =
|
|
29
|
-
!
|
|
30
|
-
}, [
|
|
31
|
-
return /* @__PURE__ */
|
|
32
|
-
/* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
25
|
+
isIncomplete: t = !1,
|
|
26
|
+
sectionNumber: T,
|
|
27
|
+
topics: A
|
|
28
|
+
} = s, { device: I } = w(), m = I <= j.MOBILE, h = [...A ?? []].sort((i, d) => i.miniGoal.order - d.miniGoal.order), E = m || a ? "column" : "row", B = m || a ? "" : "center", S = m || a ? 0.5 : 0, D = _(() => {
|
|
29
|
+
!t && s.sheet && c && c($, p);
|
|
30
|
+
}, [t, c, s.sheet, $, p]);
|
|
31
|
+
return /* @__PURE__ */ o(r, { children: [
|
|
32
|
+
/* @__PURE__ */ o(r, { $flexDirection: "row", $alignItems: "center", children: [
|
|
33
|
+
/* @__PURE__ */ o(l, { $renderAs: "ab2-bold", $color: "BLACK_1", children: [
|
|
34
|
+
x,
|
|
35
35
|
":"
|
|
36
36
|
] }),
|
|
37
|
-
/* @__PURE__ */ e(
|
|
38
|
-
|
|
37
|
+
/* @__PURE__ */ e(g, { width: 4 }),
|
|
38
|
+
t ? /* @__PURE__ */ e(r, { $gutter: 3, $gap: 2.5, $background: "BLACK_5", children: /* @__PURE__ */ e(l, { $renderAs: "ab4-bold", $color: "WHITE", children: "INCOMPLETE" }) }) : f && /* @__PURE__ */ e(G, { score: f, maxScore: 10, scoreChange: C })
|
|
39
39
|
] }),
|
|
40
|
-
/* @__PURE__ */ e(r, { $flexRowGapX: 0.5, $gapX: 0.75, children: h.map((i, d) => /* @__PURE__ */
|
|
41
|
-
/* @__PURE__ */
|
|
40
|
+
/* @__PURE__ */ e(r, { $flexRowGapX: 0.5, $gapX: 0.75, children: h.map((i, d) => /* @__PURE__ */ o(L, { children: [
|
|
41
|
+
/* @__PURE__ */ o(
|
|
42
42
|
r,
|
|
43
43
|
{
|
|
44
|
-
$flexDirection:
|
|
44
|
+
$flexDirection: E,
|
|
45
45
|
$justifyContent: "space-between",
|
|
46
|
-
$alignItems:
|
|
47
|
-
$flexRowGapX:
|
|
46
|
+
$alignItems: B,
|
|
47
|
+
$flexRowGapX: S,
|
|
48
48
|
children: [
|
|
49
|
-
/* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(l, { $renderAs: "ub2", $color: t ? "BLACK_T_38" : "BLACK_1", children: i.name }),
|
|
50
50
|
/* @__PURE__ */ e(r, { $flexGapX: 0.5, $flexDirection: "row", $flexWrap: !0, children: i.miniGoal.items.map((n) => /* @__PURE__ */ e(
|
|
51
51
|
r,
|
|
52
52
|
{
|
|
53
|
-
$widthX: 1.25,
|
|
54
53
|
$heightX: 1.25,
|
|
54
|
+
$gutterX: 0.5,
|
|
55
55
|
$alignItems: "center",
|
|
56
56
|
$justifyContent: "center",
|
|
57
|
-
$borderRadiusX:
|
|
58
|
-
$background:
|
|
59
|
-
children: /* @__PURE__ */
|
|
60
|
-
|
|
57
|
+
$borderRadiusX: 1,
|
|
58
|
+
$background: k(n.state),
|
|
59
|
+
children: /* @__PURE__ */ o(
|
|
60
|
+
l,
|
|
61
61
|
{
|
|
62
62
|
$renderAs: "ub3",
|
|
63
|
-
$color: n.state ===
|
|
64
|
-
children:
|
|
63
|
+
$color: n.state === u.SKIPPED || n.state === u.UNATTEMPTED ? "BLACK_T_38" : "WHITE",
|
|
64
|
+
children: [
|
|
65
|
+
"Q",
|
|
66
|
+
n.order
|
|
67
|
+
]
|
|
65
68
|
}
|
|
66
69
|
)
|
|
67
70
|
},
|
|
@@ -70,24 +73,24 @@ const M = _(function({
|
|
|
70
73
|
]
|
|
71
74
|
}
|
|
72
75
|
),
|
|
73
|
-
d !== h.length - 1 && /* @__PURE__ */ e(
|
|
76
|
+
d !== h.length - 1 && /* @__PURE__ */ e(K, {})
|
|
74
77
|
] }, i.name)) }),
|
|
75
|
-
|
|
76
|
-
/* @__PURE__ */ e(
|
|
78
|
+
b && /* @__PURE__ */ o(r, { $alignItems: "center", children: [
|
|
79
|
+
/* @__PURE__ */ e(g, { heightX: 0.75 }),
|
|
77
80
|
/* @__PURE__ */ e(
|
|
78
|
-
|
|
81
|
+
y,
|
|
79
82
|
{
|
|
80
|
-
label: `Review Section ${
|
|
81
|
-
renderAs:
|
|
83
|
+
label: `Review Section ${T}`,
|
|
84
|
+
renderAs: t ? "secondary" : "primary",
|
|
82
85
|
size: "small",
|
|
83
|
-
onClick:
|
|
84
|
-
disabled:
|
|
86
|
+
onClick: D,
|
|
87
|
+
disabled: t
|
|
85
88
|
}
|
|
86
89
|
)
|
|
87
90
|
] })
|
|
88
91
|
] });
|
|
89
92
|
});
|
|
90
93
|
export {
|
|
91
|
-
|
|
94
|
+
Y as default
|
|
92
95
|
};
|
|
93
96
|
//# sourceMappingURL=score-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score-section.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-section/score-section.tsx"],"sourcesContent":["import { Fragment, memo, useCallback, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport ScoreBadge from '../score-badge/score-badge';\nimport type { IScoreSectionProps } from './score-section-types';\nimport * as Styled from './score-section-styled';\nimport Separator from '../../../../ui/separator/separator';\nimport { getQuestionStatusBgColor } from '../../math-fit-report-helpers';\nimport { EQuestionState } from '../../../math-fit-overview/math-fit-overview-types';\nimport {
|
|
1
|
+
{"version":3,"file":"score-section.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-section/score-section.tsx"],"sourcesContent":["import { Fragment, memo, useCallback, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport ScoreBadge from '../score-badge/score-badge';\nimport type { IScoreSectionProps } from './score-section-types';\nimport * as Styled from './score-section-styled';\nimport Separator from '../../../../ui/separator/separator';\nimport { getQuestionStatusBgColor } from '../../math-fit-report-helpers';\nimport { EQuestionState } from '../../../math-fit-overview/math-fit-overview-types';\nimport { EDeviceType } from '../../../../ui/theme/constants';\n\nconst ScoreSection: FC<IScoreSectionProps> = memo(function ScoreSection({\n onReviewSection,\n section,\n sheet,\n compactView = false,\n showReviewButton = true,\n}) {\n const {\n title,\n score,\n scoreChange,\n sessionId,\n isIncomplete = false,\n sectionNumber,\n topics,\n } = section;\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const sortedTopics = [...(topics ?? [])].sort((a, b) => a.miniGoal.order - b.miniGoal.order);\n const layoutDirection = isMobile || compactView ? 'column' : 'row';\n const alignment = isMobile || compactView ? '' : 'center';\n const gap = isMobile || compactView ? 0.5 : 0;\n\n const onClickReview = useCallback(() => {\n if (!isIncomplete && section.sheet && onReviewSection) {\n onReviewSection(sheet, sessionId);\n }\n }, [isIncomplete, onReviewSection, section.sheet, sheet, sessionId]);\n\n return (\n <FlexView>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_1\">\n {title}:\n </Text>\n <Separator width={4} />\n {isIncomplete ? (\n <FlexView $gutter={3} $gap={2.5} $background=\"BLACK_5\">\n <Text $renderAs=\"ab4-bold\" $color=\"WHITE\">\n INCOMPLETE\n </Text>\n </FlexView>\n ) : (\n score && <ScoreBadge score={score} maxScore={10} scoreChange={scoreChange} />\n )}\n </FlexView>\n <FlexView $flexRowGapX={0.5} $gapX={0.75}>\n {sortedTopics.map((topic, index) => (\n <Fragment key={topic.name}>\n <FlexView\n $flexDirection={layoutDirection}\n $justifyContent=\"space-between\"\n $alignItems={alignment}\n $flexRowGapX={gap}\n >\n <Text $renderAs=\"ub2\" $color={isIncomplete ? 'BLACK_T_38' : 'BLACK_1'}>\n {topic.name}\n </Text>\n <FlexView $flexGapX={0.5} $flexDirection=\"row\" $flexWrap>\n {topic.miniGoal.items.map(question => (\n <FlexView\n key={question.item_reference}\n $heightX={1.25}\n $gutterX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={1}\n $background={getQuestionStatusBgColor(question.state)}\n >\n <Text\n $renderAs=\"ub3\"\n $color={\n question.state === EQuestionState.SKIPPED ||\n question.state === EQuestionState.UNATTEMPTED\n ? 'BLACK_T_38'\n : 'WHITE'\n }\n >\n Q{question.order}\n </Text>\n </FlexView>\n ))}\n </FlexView>\n </FlexView>\n {index !== sortedTopics.length - 1 && <Styled.Divider />}\n </Fragment>\n ))}\n </FlexView>\n {showReviewButton && (\n <FlexView $alignItems=\"center\">\n <Separator heightX={0.75} />\n <Button\n label={`Review Section ${sectionNumber}`}\n renderAs={isIncomplete ? 'secondary' : 'primary'}\n size=\"small\"\n onClick={onClickReview}\n disabled={isIncomplete}\n />\n </FlexView>\n )}\n </FlexView>\n );\n});\n\nexport default ScoreSection;\n"],"names":["ScoreSection","memo","onReviewSection","section","sheet","compactView","showReviewButton","title","score","scoreChange","sessionId","isIncomplete","sectionNumber","topics","device","useTheme","isMobile","EDeviceType","sortedTopics","a","b","layoutDirection","alignment","gap","onClickReview","useCallback","FlexView","jsxs","Text","jsx","Separator","ScoreBadge","topic","index","Fragment","question","getQuestionStatusBgColor","EQuestionState","Styled.Divider","Button"],"mappings":";;;;;;;;;;;;AAcM,MAAAA,IAAuCC,EAAK,SAAsB;AAAA,EACtE,iBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,kBAA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kBAAkB3B,CAAa;AAAA,UACtC,UAAUD,IAAe,cAAc;AAAA,UACvC,MAAK;AAAA,UACL,SAASa;AAAA,UACT,UAAUb;AAAA,QAAA;AAAA,MACZ;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,85 +1,83 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as _, useMemo as c } from "react";
|
|
3
|
+
import { IS_APP_RUNNING_IN_RN as x } from "../../../constants/app-config.js";
|
|
3
4
|
import o from "../../ui/layout/flex-view.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { transformSectionsToReportData as
|
|
8
|
-
const
|
|
5
|
+
import s from "../../ui/text/text.js";
|
|
6
|
+
import b from "./comps/report-header/report-header.js";
|
|
7
|
+
import C from "./comps/score-section/score-section.js";
|
|
8
|
+
import { transformSectionsToReportData as R, LEGEND_ITEMS as X, getQuestionStatusBgColor as I } from "./math-fit-report-helpers.js";
|
|
9
|
+
const A = _(function({
|
|
9
10
|
data: e,
|
|
10
11
|
onReview: $,
|
|
11
|
-
studentName:
|
|
12
|
-
userType:
|
|
13
|
-
onBack:
|
|
14
|
-
|
|
12
|
+
studentName: h,
|
|
13
|
+
userType: m,
|
|
14
|
+
onBack: u,
|
|
15
|
+
compactView: i = !1,
|
|
16
|
+
showBorder: a = !1,
|
|
17
|
+
showEncouragement: g = !0
|
|
15
18
|
}) {
|
|
16
|
-
const
|
|
19
|
+
const p = a ? "WHITE_5" : void 0, l = c(() => R(e.sections), [e.sections]), f = c(() => {
|
|
17
20
|
if (e.previous_score && e.score)
|
|
18
21
|
return e.score - e.previous_score;
|
|
19
22
|
}, [e.score, e.previous_score]);
|
|
20
|
-
return /* @__PURE__ */ n(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
] })
|
|
78
|
-
]
|
|
79
|
-
}
|
|
80
|
-
);
|
|
81
|
-
}), I = C;
|
|
23
|
+
return /* @__PURE__ */ n(o, { $flex: 1, $background: "BLACK_T_04", $borderColor: p, children: [
|
|
24
|
+
/* @__PURE__ */ r(
|
|
25
|
+
b,
|
|
26
|
+
{
|
|
27
|
+
score: e.score ?? 0,
|
|
28
|
+
maxScore: 10,
|
|
29
|
+
scoreChange: f,
|
|
30
|
+
createdOnTs: e.created_on_ts,
|
|
31
|
+
studentName: h,
|
|
32
|
+
userType: m,
|
|
33
|
+
onBack: u,
|
|
34
|
+
compactView: i,
|
|
35
|
+
showGreeting: !i
|
|
36
|
+
}
|
|
37
|
+
),
|
|
38
|
+
l.map((t, d) => /* @__PURE__ */ n(o, { $background: "WHITE", children: [
|
|
39
|
+
/* @__PURE__ */ r(o, { $gapX: 1.5, $gutterX: 1.25, children: /* @__PURE__ */ r(
|
|
40
|
+
C,
|
|
41
|
+
{
|
|
42
|
+
onReviewSection: $,
|
|
43
|
+
section: t,
|
|
44
|
+
sheet: t.sheet,
|
|
45
|
+
compactView: i,
|
|
46
|
+
showReviewButton: !i && !x
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
d !== l.length - 1 && /* @__PURE__ */ r(o, { $height: 1, $background: "BLACK_T_08" })
|
|
50
|
+
] }, t.title)),
|
|
51
|
+
/* @__PURE__ */ n(o, { $gutterX: 1, $flexColumnGapX: 1, $gapX: 1, $flexRowGapX: 2, $alignItems: "center", children: [
|
|
52
|
+
/* @__PURE__ */ r(o, { $flexDirection: "row", $flexColumnGapX: 1, $alignItems: "center", children: X.map((t) => /* @__PURE__ */ n(
|
|
53
|
+
o,
|
|
54
|
+
{
|
|
55
|
+
$flexDirection: "row",
|
|
56
|
+
$flexColumnGapX: 0.25,
|
|
57
|
+
$alignItems: "center",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ r(s, { $renderAs: "ub3", $color: "BLACK_T_60", children: t.label }),
|
|
60
|
+
/* @__PURE__ */ r(
|
|
61
|
+
o,
|
|
62
|
+
{
|
|
63
|
+
$width: 10,
|
|
64
|
+
$height: 10,
|
|
65
|
+
$borderRadiusX: 1,
|
|
66
|
+
$background: I(t.state)
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
t.label
|
|
72
|
+
)) }),
|
|
73
|
+
g && /* @__PURE__ */ n(o, { $flexRowGapX: 0.25, $marginBottomX: 0.5, $alignItems: "center", children: [
|
|
74
|
+
/* @__PURE__ */ r(s, { $renderAs: "ub3-bold", $color: "BLACK_1", $align: "center", children: "Keep Up the Great Work! 🚀" }),
|
|
75
|
+
/* @__PURE__ */ r(s, { $renderAs: "ub3", $color: "BLACK_1", $align: "center", children: "You're getting stronger at MathFit each day. See you next month!" })
|
|
76
|
+
] })
|
|
77
|
+
] })
|
|
78
|
+
] });
|
|
79
|
+
}), N = A;
|
|
82
80
|
export {
|
|
83
|
-
|
|
81
|
+
N as default
|
|
84
82
|
};
|
|
85
83
|
//# sourceMappingURL=math-fit-report.js.map
|
|
@@ -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
|
|
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 { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\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 compactView = false,\n showBorder = false,\n showEncouragement = true,\n}) {\n const borderColor = showBorder ? 'WHITE_5' : undefined;\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\" $borderColor={borderColor}>\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 compactView={compactView}\n showGreeting={!compactView}\n />\n\n {sectionData.map((section, index) => (\n <FlexView key={section.title} $background=\"WHITE\">\n <FlexView $gapX={1.5} $gutterX={1.25}>\n <ScoreSection\n onReviewSection={onReview}\n section={section}\n sheet={section.sheet}\n compactView={compactView}\n showReviewButton={!compactView && !IS_APP_RUNNING_IN_RN}\n />\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 {showEncouragement && (\n <FlexView $flexRowGapX={0.25} $marginBottomX={0.5} $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\" $align=\"center\">\n Keep Up the Great Work! 🚀\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\" $align=\"center\">\n You're getting stronger at MathFit each day. See you next month!\n </Text>\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default MathFitReport;\n"],"names":["MathFitReport","memo","data","onReview","studentName","userType","onBack","compactView","showBorder","showEncouragement","borderColor","sectionData","useMemo","transformSectionsToReportData","scoreChange","FlexView","jsx","ReportHeader","section","index","jsxs","ScoreSection","IS_APP_RUNNING_IN_RN","LEGEND_ITEMS","item","Text","getQuestionStatusBgColor","MathFitReport$1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aAAa,CAAA;AAAA,IAAA,KAVvEG,EAAQ,KAWvB,CACD;AAAA,IAED,gBAAAE,EAACL,GAAS,EAAA,UAAU,GAAG,iBAAiB,GAAG,OAAO,GAAG,cAAc,GAAG,aAAY,UAChF,UAAA;AAAA,MAAC,gBAAAC,EAAAD,GAAA,EAAS,gBAAe,OAAM,iBAAiB,GAAG,aAAY,UAC5D,UAAaQ,EAAA,IAAI,CAChBC,MAAA,gBAAAJ;AAAA,QAACL;AAAA,QAAA;AAAA,UAEC,gBAAe;AAAA,UACf,iBAAiB;AAAA,UACjB,aAAY;AAAA,UAEZ,UAAA;AAAA,YAAA,gBAAAC,EAACS,KAAK,WAAU,OAAM,QAAO,cAC1B,YAAK,OACR;AAAA,YACA,gBAAAT;AAAA,cAACD;AAAA,cAAA;AAAA,gBACC,QAAQ;AAAA,gBACR,SAAS;AAAA,gBACT,gBAAgB;AAAA,gBAChB,aAAaW,EAAyBF,EAAK,KAAK;AAAA,cAAA;AAAA,YAClD;AAAA,UAAA;AAAA,QAAA;AAAA,QAbKA,EAAK;AAAA,MAeb,CAAA,GACH;AAAA,MACCf,uBACEM,GAAS,EAAA,cAAc,MAAM,gBAAgB,KAAK,aAAY,UAC7D,UAAA;AAAA,QAAA,gBAAAC,EAACS,KAAK,WAAU,YAAW,QAAO,WAAU,QAAO,UAAS,UAE5D,6BAAA,CAAA;AAAA,QACA,gBAAAT,EAACS,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAAS,UAEvD,mEAAA,CAAA;AAAA,MAAA,GACF;AAAA,IAAA,GAEJ;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDE,IAAe3B;"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as a, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import n from "../../../../../math-fit/math-fit-report/math-fit-report.js";
|
|
3
3
|
import t from "../../../../../ui/layout/flex-view.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import p from "../../../../../ui/separator/separator.js";
|
|
5
|
+
import l from "../../../../../ui/text/text.js";
|
|
6
6
|
const u = ({
|
|
7
7
|
mathfitTests: e,
|
|
8
8
|
studentName: i
|
|
9
|
-
}) => !e || e.length === 0 ? null : /* @__PURE__ */
|
|
10
|
-
/* @__PURE__ */ r(
|
|
11
|
-
/* @__PURE__ */ r(
|
|
9
|
+
}) => !e || e.length === 0 ? null : /* @__PURE__ */ a(t, { children: [
|
|
10
|
+
/* @__PURE__ */ r(l, { $renderAs: "ab1-bold", $color: "BLACK_1", children: "MathFit Test Report" }),
|
|
11
|
+
/* @__PURE__ */ r(p, { heightX: 1 }),
|
|
12
12
|
/* @__PURE__ */ r(t, { $flexGapX: 1.5, children: e.map((o) => /* @__PURE__ */ r(
|
|
13
|
-
|
|
13
|
+
n,
|
|
14
14
|
{
|
|
15
15
|
data: o,
|
|
16
16
|
studentName: i,
|
|
17
17
|
userType: "STUDENT",
|
|
18
|
-
|
|
18
|
+
compactView: !0,
|
|
19
|
+
showBorder: !0,
|
|
20
|
+
showEncouragement: !1,
|
|
19
21
|
onBack: () => {
|
|
20
22
|
},
|
|
21
23
|
onReview: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mathfit.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/mathfit/mathfit.tsx"],"sourcesContent":["import { type IMathFitAssessmentResponse } from '../../../../../math-fit/math-fit-overview/math-fit-overview-types';\nimport MathFitReport from '../../../../../math-fit/math-fit-report/math-fit-report';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\n\nconst Mathfit = ({\n mathfitTests,\n studentName,\n}: {\n mathfitTests: IMathFitAssessmentResponse[];\n studentName: string;\n}) => {\n if (!mathfitTests || mathfitTests.length === 0) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n MathFit Test Report\n </Text>\n <Separator heightX={1} />\n <FlexView $flexGapX={1.5}>\n {mathfitTests.map(test => (\n <MathFitReport\n key={test.id}\n data={test}\n studentName={studentName}\n userType=\"STUDENT\"\n
|
|
1
|
+
{"version":3,"file":"mathfit.js","sources":["../../../../../../../src/features/timeline/monthly-timeline/monthly-report/comps/mathfit/mathfit.tsx"],"sourcesContent":["import { type IMathFitAssessmentResponse } from '../../../../../math-fit/math-fit-overview/math-fit-overview-types';\nimport MathFitReport from '../../../../../math-fit/math-fit-report/math-fit-report';\nimport FlexView from '../../../../../ui/layout/flex-view';\nimport Separator from '../../../../../ui/separator/separator';\nimport Text from '../../../../../ui/text/text';\n\nconst Mathfit = ({\n mathfitTests,\n studentName,\n}: {\n mathfitTests: IMathFitAssessmentResponse[];\n studentName: string;\n}) => {\n if (!mathfitTests || mathfitTests.length === 0) {\n return null;\n }\n\n return (\n <FlexView>\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n MathFit Test Report\n </Text>\n <Separator heightX={1} />\n <FlexView $flexGapX={1.5}>\n {mathfitTests.map(test => (\n <MathFitReport\n key={test.id}\n data={test}\n studentName={studentName}\n userType=\"STUDENT\"\n compactView={true}\n showBorder={true}\n showEncouragement={false}\n onBack={() => {}}\n onReview={() => {}}\n />\n ))}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default Mathfit;\n"],"names":["Mathfit","mathfitTests","studentName","FlexView","jsx","Text","Separator","test","MathFitReport"],"mappings":";;;;;AAMA,MAAMA,IAAU,CAAC;AAAA,EACf,cAAAC;AAAA,EACA,aAAAC;AACF,MAIM,CAACD,KAAgBA,EAAa,WAAW,IACpC,yBAINE,GACC,EAAA,UAAA;AAAA,EAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,uBAAA;AAAA,EACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,oBACtBH,GAAS,EAAA,WAAW,KAClB,UAAAF,EAAa,IAAI,CAChBM,MAAA,gBAAAH;AAAA,IAACI;AAAA,IAAA;AAAA,MAEC,MAAMD;AAAA,MACN,aAAAL;AAAA,MACA,UAAS;AAAA,MACT,aAAa;AAAA,MACb,YAAY;AAAA,MACZ,mBAAmB;AAAA,MACnB,QAAQ,MAAM;AAAA,MAAC;AAAA,MACf,UAAU,MAAM;AAAA,MAAC;AAAA,IAAA;AAAA,IARZK,EAAK;AAAA,EAUb,CAAA,GACH;AACF,EAAA,CAAA;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -2791,8 +2791,10 @@ declare interface IMathFitReportProps {
|
|
|
2791
2791
|
onReview: (sheetData: INodeDataProps, sectionId: string) => void;
|
|
2792
2792
|
studentName: string;
|
|
2793
2793
|
userType: TUserTypes;
|
|
2794
|
-
isMonthlyReportPage?: boolean;
|
|
2795
2794
|
onBack: () => void;
|
|
2795
|
+
compactView?: boolean;
|
|
2796
|
+
showBorder?: boolean;
|
|
2797
|
+
showEncouragement?: boolean;
|
|
2796
2798
|
}
|
|
2797
2799
|
|
|
2798
2800
|
declare interface IMathFitSection {
|