@cuemath/leap 3.5.69-as1 → 3.5.69-as2
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,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as t, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as p, useMemo as h } from "react";
|
|
3
3
|
import n from "../../../../ui/text/text.js";
|
|
4
4
|
import g from "../score-badge/score-badge.js";
|
|
5
5
|
import { IS_APP_RUNNING_IN_RN as o } from "../../../../../constants/app-config.js";
|
|
@@ -8,7 +8,7 @@ import { formatTestDate as $ } from "../../math-fit-report-helpers.js";
|
|
|
8
8
|
import _ from "../../../../../assets/line-icons/icons/back2.js";
|
|
9
9
|
import x from "../../../../ui/buttons/icon-button/icon-button.js";
|
|
10
10
|
import { HeaderContainer as A, BackButtonContainer as C, BackButtonWrapper as I } from "./report-header-styled.js";
|
|
11
|
-
const P =
|
|
11
|
+
const P = p(function({
|
|
12
12
|
createdOnTs: a,
|
|
13
13
|
maxScore: i,
|
|
14
14
|
score: d,
|
|
@@ -19,12 +19,12 @@ const P = u(function({
|
|
|
19
19
|
compactView: e = !1,
|
|
20
20
|
showGreeting: f = !0
|
|
21
21
|
}) {
|
|
22
|
-
const
|
|
22
|
+
const u = h(() => e ? 5 : o ? 9.6 : 11.75, [e]);
|
|
23
23
|
return /* @__PURE__ */ t(
|
|
24
24
|
A,
|
|
25
25
|
{
|
|
26
26
|
$background: "BLUE_4",
|
|
27
|
-
$heightX:
|
|
27
|
+
$heightX: u,
|
|
28
28
|
$gapX: 1.5,
|
|
29
29
|
$gutterX: 1.5,
|
|
30
30
|
$justifyContent: e ? "center" : "flex-end",
|
|
@@ -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, 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 (
|
|
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';\n\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 (compactView) {\n return 5;\n }\n\n if (IS_APP_RUNNING_IN_RN) {\n return 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","Back2Icon","Text","Separator","ScoreBadge","formatTestDate"],"mappings":";;;;;;;;;;AAYM,MAAAA,IAAuCC,EAAK,SAAsB;AAAA,EACtE,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,cAAAC,IAAe;AACjB,GAAG;AACK,QAAAC,IAAeC,EAAQ,MACvBH,IACK,IAGLI,IACK,MAGF,OACN,CAACJ,CAAW,CAAC;AAOd,SAAA,gBAAAK;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAY;AAAA,MACZ,UAAUJ;AAAA,MACV,O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