@cuemath/leap 3.5.50 → 3.5.51-as10

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.
Files changed (98) hide show
  1. package/dist/assets/illustrations/illustrations.js +4 -0
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +27 -31
  4. package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -1
  5. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +21 -13
  6. package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
  7. package/dist/features/chapters-v2/constants/node-constants.js +1 -1
  8. package/dist/features/chapters-v2/constants/node-constants.js.map +1 -1
  9. package/dist/features/chapters-v2/utils/node-card-utils.js +86 -79
  10. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  11. package/dist/features/homework/homework-card-view.js +125 -98
  12. package/dist/features/homework/homework-card-view.js.map +1 -1
  13. package/dist/features/homework/homework-card.js +196 -161
  14. package/dist/features/homework/homework-card.js.map +1 -1
  15. package/dist/features/homework/hw-card-list/api/get-homeworks.js +1 -1
  16. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -1
  17. package/dist/features/homework/hw-card-list/hw-card-list-types.js +5 -0
  18. package/dist/features/homework/hw-card-list/hw-card-list-types.js.map +1 -0
  19. package/dist/features/homework/hw-card-list/hw-card-list-view.js +96 -86
  20. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  21. package/dist/features/homework/hw-card-list/hw-card-list.js +45 -43
  22. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  23. package/dist/features/homework/styles.js +0 -1
  24. package/dist/features/homework/styles.js.map +1 -1
  25. package/dist/features/homework/utils.js +18 -15
  26. package/dist/features/homework/utils.js.map +1 -1
  27. package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +325 -201
  28. package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
  29. package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js +59 -56
  30. package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js.map +1 -1
  31. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +17 -15
  32. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -1
  33. package/dist/features/math-fit/api/get-mathfit-assessment.js +10 -0
  34. package/dist/features/math-fit/api/get-mathfit-assessment.js.map +1 -0
  35. package/dist/features/math-fit/math-fit/math-fit.js +37 -0
  36. package/dist/features/math-fit/math-fit/math-fit.js.map +1 -0
  37. package/dist/features/math-fit/math-fit-card/math-fit-card-styled.js +22 -0
  38. package/dist/features/math-fit/math-fit-card/math-fit-card-styled.js.map +1 -0
  39. package/dist/features/math-fit/math-fit-card/math-fit-card.js +80 -0
  40. package/dist/features/math-fit/math-fit-card/math-fit-card.js.map +1 -0
  41. package/dist/features/math-fit/math-fit-overview/comps/section-card/section-card-styled.js +24 -0
  42. package/dist/features/math-fit/math-fit-overview/comps/section-card/section-card-styled.js.map +1 -0
  43. package/dist/features/math-fit/math-fit-overview/comps/section-card/section-card-types.js +5 -0
  44. package/dist/features/math-fit/math-fit-overview/comps/section-card/section-card-types.js.map +1 -0
  45. package/dist/features/math-fit/math-fit-overview/comps/section-card/section-card.js +99 -0
  46. package/dist/features/math-fit/math-fit-overview/comps/section-card/section-card.js.map +1 -0
  47. package/dist/features/math-fit/math-fit-overview/comps/stat-item/stat-item-styled.js +9 -0
  48. package/dist/features/math-fit/math-fit-overview/comps/stat-item/stat-item-styled.js.map +1 -0
  49. package/dist/features/math-fit/math-fit-overview/comps/stat-item/stat-item.js +26 -0
  50. package/dist/features/math-fit/math-fit-overview/comps/stat-item/stat-item.js.map +1 -0
  51. package/dist/features/math-fit/math-fit-overview/math-fit-overview-helpers.js +63 -0
  52. package/dist/features/math-fit/math-fit-overview/math-fit-overview-helpers.js.map +1 -0
  53. package/dist/features/math-fit/math-fit-overview/math-fit-overview-styled.js +9 -0
  54. package/dist/features/math-fit/math-fit-overview/math-fit-overview-styled.js.map +1 -0
  55. package/dist/features/math-fit/math-fit-overview/math-fit-overview-types.js +7 -0
  56. package/dist/features/math-fit/math-fit-overview/math-fit-overview-types.js.map +1 -0
  57. package/dist/features/math-fit/math-fit-overview/math-fit-overview.js +71 -0
  58. package/dist/features/math-fit/math-fit-overview/math-fit-overview.js.map +1 -0
  59. package/dist/features/math-fit/math-fit-report/comps/report-header/report-header-styled.js +38 -0
  60. package/dist/features/math-fit/math-fit-report/comps/report-header/report-header-styled.js.map +1 -0
  61. package/dist/features/math-fit/math-fit-report/comps/report-header/report-header.js +58 -0
  62. package/dist/features/math-fit/math-fit-report/comps/report-header/report-header.js.map +1 -0
  63. package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge-styled.js +28 -0
  64. package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge-styled.js.map +1 -0
  65. package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge.js +30 -0
  66. package/dist/features/math-fit/math-fit-report/comps/score-badge/score-badge.js.map +1 -0
  67. package/dist/features/math-fit/math-fit-report/comps/score-section/score-section-styled.js +9 -0
  68. package/dist/features/math-fit/math-fit-report/comps/score-section/score-section-styled.js.map +1 -0
  69. package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js +82 -0
  70. package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js.map +1 -0
  71. package/dist/features/math-fit/math-fit-report/math-fit-report-helpers.js +42 -0
  72. package/dist/features/math-fit/math-fit-report/math-fit-report-helpers.js.map +1 -0
  73. package/dist/features/math-fit/math-fit-report/math-fit-report.js +68 -0
  74. package/dist/features/math-fit/math-fit-report/math-fit-report.js.map +1 -0
  75. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js +1 -1
  76. package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
  77. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +38 -36
  78. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  79. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +57 -55
  80. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
  81. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +59 -57
  82. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
  83. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +54 -52
  84. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  85. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +39 -37
  86. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
  87. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +48 -56
  88. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
  89. package/dist/features/sheet-v2/resource-list/resource-list.js +27 -23
  90. package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
  91. package/dist/index.d.ts +132 -7
  92. package/dist/index.js +131 -121
  93. package/dist/index.js.map +1 -1
  94. package/dist/static/clock-green.020570d3.svg +1 -0
  95. package/dist/static/math-fit-bg.4bfa3244.svg +1 -0
  96. package/dist/static/math-fit-card-bg.20c826bb.svg +1 -0
  97. package/dist/static/question-mark-blue.b6a7f37d.svg +1 -0
  98. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-card-styled.js","sources":["../../../../../../src/features/math-fit/math-fit-overview/comps/section-card/section-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n margin-left: 12px;\n`;\n\nexport const StatusColumn = styled(FlexView)`\n margin-left: -12px;\n`;\n\nexport const Divider = styled.div(({ theme }) => {\n const { colors } = theme;\n\n return `\n position: absolute;\n height: 100%;\n left:0;\n top: calc(50% + 8px);\n z-index: 0;\n width: 1px;\n background: ${colors.BLACK_T_15};\n `;\n});\n"],"names":["Container","styled","FlexView","StatusColumn","Divider","theme","colors"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA,GAI3BC,IAAeF,EAAOC,CAAQ;AAAA;AAAA,GAI9BE,IAAUH,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AACzC,QAAA,EAAE,QAAAC,EAAW,IAAAD;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAOSC,EAAO,UAAU;AAAA;AAEnC,CAAC;"}
@@ -0,0 +1,5 @@
1
+ var D = /* @__PURE__ */ ((e) => (e.COMPLETED = "completed", e.ACTIVE = "active", e.DISABLED = "disabled", e))(D || {});
2
+ export {
3
+ D as ESectionCardVariant
4
+ };
5
+ //# sourceMappingURL=section-card-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-card-types.js","sources":["../../../../../../src/features/math-fit/math-fit-overview/comps/section-card/section-card-types.ts"],"sourcesContent":["import type { ESectionStatus } from '../../math-fit-overview-types';\n\nexport enum ESectionCardVariant {\n COMPLETED = 'completed',\n ACTIVE = 'active',\n DISABLED = 'disabled',\n}\n\nexport interface ISectionCardProps {\n title: string;\n questionsCount: number;\n timeInMinutes: number;\n status: ESectionStatus;\n showDivider?: boolean;\n}\n"],"names":["ESectionCardVariant"],"mappings":"AAEY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,SAAS,UACTA,EAAA,WAAW,YAHDA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -0,0 +1,99 @@
1
+ import { jsx as r, jsxs as a } from "react/jsx-runtime";
2
+ import { memo as u, useMemo as f } from "react";
3
+ import { ILLUSTRATIONS as c } from "../../../../../assets/illustrations/illustrations.js";
4
+ import h from "../../../../../assets/line-icons/icons/check2.js";
5
+ import s from "../../../../../assets/line-icons/icons/lock3.js";
6
+ import e from "../../../../ui/layout/flex-view.js";
7
+ import g from "../../../../ui/separator/separator.js";
8
+ import p from "../../../../ui/text/text.js";
9
+ import b from "../../../../ui/theme/clrs.js";
10
+ import { ESectionStatus as i } from "../../math-fit-overview-types.js";
11
+ import { Container as x, Divider as I, StatusColumn as S } from "./section-card-styled.js";
12
+ import l from "../stat-item/stat-item.js";
13
+ import { getSectionStatusConfig as E } from "../../math-fit-overview-helpers.js";
14
+ const M = u(function({
15
+ title: d,
16
+ questionsCount: n,
17
+ timeInMinutes: m,
18
+ status: t,
19
+ showDivider: $ = !1
20
+ }) {
21
+ const o = E(t), C = f(() => {
22
+ switch (t) {
23
+ case i.COMPLETED:
24
+ return /* @__PURE__ */ r(h, { width: 20, height: 20 });
25
+ case i.ACTIVE:
26
+ return /* @__PURE__ */ r(e, { $widthX: 0.75, $heightX: 0.75, $background: "BLACK_1", $borderRadiusX: 0.75 });
27
+ case i.LOCKED:
28
+ return /* @__PURE__ */ r(s, { color: b().BLACK_T_38 });
29
+ default:
30
+ return null;
31
+ }
32
+ }, [t]);
33
+ return /* @__PURE__ */ a(
34
+ x,
35
+ {
36
+ $flexDirection: "row",
37
+ $alignItems: "center",
38
+ $position: "relative",
39
+ $flexColumnGapX: 1,
40
+ children: [
41
+ $ && /* @__PURE__ */ r(I, {}),
42
+ /* @__PURE__ */ r(S, { $widthX: 1.5, $heightX: 1.5, $background: "WHITE", children: /* @__PURE__ */ r(
43
+ e,
44
+ {
45
+ $position: "relative",
46
+ $widthX: 1.5,
47
+ $heightX: 1.5,
48
+ $borderRadiusX: 0.75,
49
+ $justifyContent: "center",
50
+ $alignItems: "center",
51
+ $background: o.backgroundColor,
52
+ $borderColor: t === i.ACTIVE ? "BLACK_1" : void 0,
53
+ children: C
54
+ }
55
+ ) }),
56
+ /* @__PURE__ */ a(
57
+ e,
58
+ {
59
+ $gapX: 0.75,
60
+ $gutterX: 1,
61
+ $background: o.cardBackgroundColor,
62
+ $borderColor: o.cardBorderColor,
63
+ $width: "100%",
64
+ children: [
65
+ /* @__PURE__ */ r(p, { $renderAs: "ub2-bold", $color: o.textColor, children: d }),
66
+ /* @__PURE__ */ r(g, { height: 8 }),
67
+ /* @__PURE__ */ a(e, { $flexDirection: "row", children: [
68
+ /* @__PURE__ */ r(
69
+ l,
70
+ {
71
+ icon: c.QUESTION_MARK_BLUE,
72
+ value: n < 10 ? `0${n}` : n,
73
+ label: "Questions",
74
+ variant: o.cardVariant,
75
+ textColor: o.textColor
76
+ }
77
+ ),
78
+ /* @__PURE__ */ r(
79
+ l,
80
+ {
81
+ icon: c.CLOCK_GREEN,
82
+ value: m,
83
+ label: "Minutes",
84
+ variant: o.cardVariant,
85
+ textColor: o.textColor
86
+ }
87
+ )
88
+ ] })
89
+ ]
90
+ }
91
+ )
92
+ ]
93
+ }
94
+ );
95
+ });
96
+ export {
97
+ M as default
98
+ };
99
+ //# sourceMappingURL=section-card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"section-card.js","sources":["../../../../../../src/features/math-fit/math-fit-overview/comps/section-card/section-card.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Lock3Icon from '../../../../../assets/line-icons/icons/lock3';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport getColors from '../../../../ui/theme/clrs';\nimport { ESectionStatus } from '../../math-fit-overview-types';\nimport * as Styled from './section-card-styled';\nimport StatItem from '../stat-item/stat-item';\nimport { getSectionStatusConfig } from '../../math-fit-overview-helpers';\nimport { type ISectionCardProps } from './section-card-types';\n\nconst SectionCard: FC<ISectionCardProps> = memo(function SectionCard({\n title,\n questionsCount,\n timeInMinutes,\n status,\n showDivider = false,\n}) {\n const config = getSectionStatusConfig(status);\n\n const statusIcon = useMemo(() => {\n switch (status) {\n case ESectionStatus.COMPLETED:\n return <Check2Icon width={20} height={20} />;\n case ESectionStatus.ACTIVE:\n return (\n <FlexView $widthX={0.75} $heightX={0.75} $background=\"BLACK_1\" $borderRadiusX={0.75} />\n );\n case ESectionStatus.LOCKED:\n return <Lock3Icon color={getColors().BLACK_T_38} />;\n default:\n return null;\n }\n }, [status]);\n\n return (\n <Styled.Container\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $position=\"relative\"\n $flexColumnGapX={1}\n >\n {showDivider && <Styled.Divider />}\n\n <Styled.StatusColumn $widthX={1.5} $heightX={1.5} $background=\"WHITE\">\n <FlexView\n $position=\"relative\"\n $widthX={1.5}\n $heightX={1.5}\n $borderRadiusX={0.75}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $background={config.backgroundColor}\n $borderColor={status === ESectionStatus.ACTIVE ? 'BLACK_1' : undefined}\n >\n {statusIcon}\n </FlexView>\n </Styled.StatusColumn>\n\n <FlexView\n $gapX={0.75}\n $gutterX={1}\n $background={config.cardBackgroundColor}\n $borderColor={config.cardBorderColor}\n $width=\"100%\"\n >\n <Text $renderAs=\"ub2-bold\" $color={config.textColor}>\n {title}\n </Text>\n <Separator height={8} />\n <FlexView $flexDirection=\"row\">\n <StatItem\n icon={ILLUSTRATIONS.QUESTION_MARK_BLUE}\n value={questionsCount < 10 ? `0${questionsCount}` : questionsCount}\n label=\"Questions\"\n variant={config.cardVariant}\n textColor={config.textColor}\n />\n <StatItem\n icon={ILLUSTRATIONS.CLOCK_GREEN}\n value={timeInMinutes}\n label=\"Minutes\"\n variant={config.cardVariant}\n textColor={config.textColor}\n />\n </FlexView>\n </FlexView>\n </Styled.Container>\n );\n});\n\nexport default SectionCard;\n"],"names":["SectionCard","memo","title","questionsCount","timeInMinutes","status","showDivider","config","getSectionStatusConfig","statusIcon","useMemo","ESectionStatus","jsx","Check2Icon","FlexView","Lock3Icon","getColors","jsxs","Styled.Container","Styled.Divider","Styled.StatusColumn","Text","Separator","StatItem","ILLUSTRATIONS"],"mappings":";;;;;;;;;;;;;AAeM,MAAAA,IAAqCC,EAAK,SAAqB;AAAA,EACnE,OAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC,IAAc;AAChB,GAAG;AACK,QAAAC,IAASC,EAAuBH,CAAM,GAEtCI,IAAaC,EAAQ,MAAM;AAC/B,YAAQL,GAAQ;AAAA,MACd,KAAKM,EAAe;AAClB,eAAQ,gBAAAC,EAAAC,GAAA,EAAW,OAAO,IAAI,QAAQ,GAAI,CAAA;AAAA,MAC5C,KAAKF,EAAe;AAEhB,eAAA,gBAAAC,EAACE,KAAS,SAAS,MAAM,UAAU,MAAM,aAAY,WAAU,gBAAgB,KAAM,CAAA;AAAA,MAEzF,KAAKH,EAAe;AAClB,eAAQ,gBAAAC,EAAAG,GAAA,EAAU,OAAOC,IAAY,WAAY,CAAA;AAAA,MACnD;AACS,eAAA;AAAA,IACX;AAAA,EAAA,GACC,CAACX,CAAM,CAAC;AAGT,SAAA,gBAAAY;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,aAAY;AAAA,MACZ,WAAU;AAAA,MACV,iBAAiB;AAAA,MAEhB,UAAA;AAAA,QAAeZ,KAAA,gBAAAM,EAACO,GAAA,EAAe;AAAA,QAEhC,gBAAAP,EAACQ,GAAA,EAAoB,SAAS,KAAK,UAAU,KAAK,aAAY,SAC5D,UAAA,gBAAAR;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,SAAS;AAAA,YACT,UAAU;AAAA,YACV,gBAAgB;AAAA,YAChB,iBAAgB;AAAA,YAChB,aAAY;AAAA,YACZ,aAAaP,EAAO;AAAA,YACpB,cAAcF,MAAWM,EAAe,SAAS,YAAY;AAAA,YAE5D,UAAAF;AAAA,UAAA;AAAA,QAAA,GAEL;AAAA,QAEA,gBAAAQ;AAAA,UAACH;AAAA,UAAA;AAAA,YACC,OAAO;AAAA,YACP,UAAU;AAAA,YACV,aAAaP,EAAO;AAAA,YACpB,cAAcA,EAAO;AAAA,YACrB,QAAO;AAAA,YAEP,UAAA;AAAA,cAAA,gBAAAK,EAACS,KAAK,WAAU,YAAW,QAAQd,EAAO,WACvC,UACHL,GAAA;AAAA,cACA,gBAAAU,EAACU,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,cACtB,gBAAAL,EAACH,GAAS,EAAA,gBAAe,OACvB,UAAA;AAAA,gBAAA,gBAAAF;AAAA,kBAACW;AAAA,kBAAA;AAAA,oBACC,MAAMC,EAAc;AAAA,oBACpB,OAAOrB,IAAiB,KAAK,IAAIA,CAAc,KAAKA;AAAA,oBACpD,OAAM;AAAA,oBACN,SAASI,EAAO;AAAA,oBAChB,WAAWA,EAAO;AAAA,kBAAA;AAAA,gBACpB;AAAA,gBACA,gBAAAK;AAAA,kBAACW;AAAA,kBAAA;AAAA,oBACC,MAAMC,EAAc;AAAA,oBACpB,OAAOpB;AAAA,oBACP,OAAM;AAAA,oBACN,SAASG,EAAO;AAAA,oBAChB,WAAWA,EAAO;AAAA,kBAAA;AAAA,gBACpB;AAAA,cAAA,GACF;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -0,0 +1,9 @@
1
+ import m from "styled-components";
2
+ import t from "../../../../ui/image/image.js";
3
+ const p = m(t)`
4
+ opacity: ${({ $isDisabled: o }) => o ? 0.5 : 1};
5
+ `;
6
+ export {
7
+ p as IconImage
8
+ };
9
+ //# sourceMappingURL=stat-item-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat-item-styled.js","sources":["../../../../../../src/features/math-fit/math-fit-overview/comps/stat-item/stat-item-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport Image from '../../../../ui/image/image';\n\nexport const IconImage = styled(Image)<{ $isDisabled: boolean }>`\n opacity: ${({ $isDisabled }) => ($isDisabled ? 0.5 : 1)};\n`;\n"],"names":["IconImage","styled","Image","$isDisabled"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAK;AAAA,aACxB,CAAC,EAAE,aAAAC,EAAA,MAAmBA,IAAc,MAAM,CAAE;AAAA;"}
@@ -0,0 +1,26 @@
1
+ import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
+ import { memo as s } from "react";
3
+ import t from "../../../../ui/layout/flex-view.js";
4
+ import i from "../../../../ui/text/text.js";
5
+ import { IconImage as d } from "./stat-item-styled.js";
6
+ import { ESectionCardVariant as f } from "../section-card/section-card-types.js";
7
+ const D = s(function({
8
+ icon: m,
9
+ value: n,
10
+ label: c,
11
+ variant: l,
12
+ textColor: a
13
+ }) {
14
+ const e = l === f.DISABLED;
15
+ return /* @__PURE__ */ o(t, { $flexDirection: "row", $alignItems: "center", $width: "50%", $flexColumnGapX: 0.5, children: [
16
+ /* @__PURE__ */ r(d, { src: m, $isDisabled: e }),
17
+ /* @__PURE__ */ o(t, { children: [
18
+ /* @__PURE__ */ r(i, { $renderAs: "ac4-black", $color: e ? "BLACK_T_38" : "BLACK_1", children: n }),
19
+ /* @__PURE__ */ r(i, { $renderAs: "ub3", $color: a, children: c })
20
+ ] })
21
+ ] });
22
+ });
23
+ export {
24
+ D as default
25
+ };
26
+ //# sourceMappingURL=stat-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"stat-item.js","sources":["../../../../../../src/features/math-fit/math-fit-overview/comps/stat-item/stat-item.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport type { IStatItemProps } from './stat-item-types';\nimport * as Styled from './stat-item-styled';\nimport { ESectionCardVariant } from '../section-card/section-card-types';\n\nconst StatItem: FC<IStatItemProps> = memo(function StatItem({\n icon,\n value,\n label,\n variant,\n textColor,\n}) {\n const isDisabled = variant === ESectionCardVariant.DISABLED;\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $width=\"50%\" $flexColumnGapX={0.5}>\n <Styled.IconImage src={icon} $isDisabled={isDisabled} />\n <FlexView>\n <Text $renderAs=\"ac4-black\" $color={isDisabled ? 'BLACK_T_38' : 'BLACK_1'}>\n {value}\n </Text>\n <Text $renderAs=\"ub3\" $color={textColor}>\n {label}\n </Text>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default StatItem;\n"],"names":["StatItem","memo","icon","value","label","variant","textColor","isDisabled","ESectionCardVariant","jsxs","FlexView","jsx","Styled.IconImage","Text"],"mappings":";;;;;;AAQM,MAAAA,IAA+BC,EAAK,SAAkB;AAAA,EAC1D,MAAAC;AAAA,EACA,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AACF,GAAG;AACK,QAAAC,IAAaF,MAAYG,EAAoB;AAGjD,SAAA,gBAAAC,EAACC,KAAS,gBAAe,OAAM,aAAY,UAAS,QAAO,OAAM,iBAAiB,KAChF,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAA,EAAiB,KAAKV,GAAM,aAAaK,GAAY;AAAA,sBACrDG,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACE,KAAK,WAAU,aAAY,QAAQN,IAAa,eAAe,WAC7D,UACHJ,EAAA,CAAA;AAAA,wBACCU,GAAK,EAAA,WAAU,OAAM,QAAQP,GAC3B,UACHF,GAAA;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
@@ -0,0 +1,63 @@
1
+ import { NODE_CARD_STATES as s } from "../../chapters-v2/constants/node-constants.js";
2
+ import { ESectionStatus as o } from "./math-fit-overview-types.js";
3
+ import { ESectionCardVariant as c } from "./comps/section-card/section-card-types.js";
4
+ const E = 1e3 * 60 * 60, d = {
5
+ [o.COMPLETED]: {
6
+ backgroundColor: "GREEN_2",
7
+ cardBackgroundColor: "GREEN_1",
8
+ cardBorderColor: "GREEN_4",
9
+ cardVariant: c.COMPLETED,
10
+ textColor: "BLACK_T_60"
11
+ },
12
+ [o.ACTIVE]: {
13
+ backgroundColor: "YELLOW_1",
14
+ cardBackgroundColor: "YELLOW_1",
15
+ cardBorderColor: "BLACK_1",
16
+ cardVariant: c.ACTIVE,
17
+ textColor: "BLACK_1"
18
+ },
19
+ [o.LOCKED]: {
20
+ backgroundColor: "BLACK_T_08",
21
+ cardBackgroundColor: "WHITE_1",
22
+ cardBorderColor: "BLACK_T_08",
23
+ cardVariant: c.DISABLED,
24
+ textColor: "BLACK_T_38"
25
+ }
26
+ }, i = (e) => e.find(
27
+ (t) => t.sheet.state === s.NOT_STARTED || t.sheet.state === s.IN_PROGRESS
28
+ ), f = (e) => {
29
+ const t = e * 1e3 - Date.now();
30
+ if (t <= 0) return;
31
+ const r = Math.floor(t / E), n = Math.floor(r / 24);
32
+ return n < 1 ? `${r} ${r === 1 ? "hour" : "hours"} left` : `${n} ${n === 1 ? "day" : "days"} left`;
33
+ }, l = (e) => {
34
+ const { sheet: t } = e;
35
+ switch (t.state) {
36
+ case "LOCKED":
37
+ return o.LOCKED;
38
+ case "COMPLETED":
39
+ return o.COMPLETED;
40
+ case "IN_PROGRESS":
41
+ return o.ACTIVE;
42
+ default:
43
+ return o.ACTIVE;
44
+ }
45
+ }, T = (e) => {
46
+ const t = i(e);
47
+ return t ? `${t.sheet.state === s.IN_PROGRESS ? "Resume" : "Start"} Section ${t.section_number}` : "Start Section";
48
+ }, L = (e) => {
49
+ const t = i(e);
50
+ if (!t) return null;
51
+ const r = e.findIndex((a) => a.id === t.id) === 0, n = e.some((a) => a.sheet.state === o.COMPLETED);
52
+ return [r && !n ? "Do each section whenever it suits you, before the deadline." : `Start Section ${t.section_number} now, or later before the deadline.`, "Questions come from what you just learned"];
53
+ }, O = (e) => d[e];
54
+ export {
55
+ d as SECTION_STATUS_CONFIG,
56
+ f as calculateTimeLeftText,
57
+ i as findActiveSection,
58
+ L as getBeforeYouStartText,
59
+ O as getSectionStatusConfig,
60
+ T as getStartButtonText,
61
+ l as mapSectionStatus
62
+ };
63
+ //# sourceMappingURL=math-fit-overview-helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math-fit-overview-helpers.js","sources":["../../../../src/features/math-fit/math-fit-overview/math-fit-overview-helpers.ts"],"sourcesContent":["import { NODE_CARD_STATES } from '../../chapters-v2/constants/node-constants';\nimport { type IMathFitSection, ESectionStatus } from './math-fit-overview-types';\nimport { ESectionCardVariant } from './comps/section-card/section-card-types';\nimport { type TColorNames } from '../../ui/types';\n\ntype TSectionStatusConfig = {\n backgroundColor: TColorNames;\n cardBackgroundColor: TColorNames;\n cardBorderColor: TColorNames;\n cardVariant: ESectionCardVariant;\n textColor: TColorNames;\n};\n\ntype TSectionStatusConfigMap = {\n [key in ESectionStatus]: TSectionStatusConfig;\n};\n\nconst MS_PER_HOUR = 1000 * 60 * 60;\n\nexport const SECTION_STATUS_CONFIG: TSectionStatusConfigMap = {\n [ESectionStatus.COMPLETED]: {\n backgroundColor: 'GREEN_2',\n cardBackgroundColor: 'GREEN_1',\n cardBorderColor: 'GREEN_4',\n cardVariant: ESectionCardVariant.COMPLETED,\n textColor: 'BLACK_T_60',\n },\n [ESectionStatus.ACTIVE]: {\n backgroundColor: 'YELLOW_1',\n cardBackgroundColor: 'YELLOW_1',\n cardBorderColor: 'BLACK_1',\n cardVariant: ESectionCardVariant.ACTIVE,\n textColor: 'BLACK_1',\n },\n [ESectionStatus.LOCKED]: {\n backgroundColor: 'BLACK_T_08',\n cardBackgroundColor: 'WHITE_1',\n cardBorderColor: 'BLACK_T_08',\n cardVariant: ESectionCardVariant.DISABLED,\n textColor: 'BLACK_T_38',\n },\n};\n\nexport const findActiveSection = (sections: IMathFitSection[]) =>\n sections.find(\n s =>\n s.sheet.state === NODE_CARD_STATES.NOT_STARTED ||\n s.sheet.state === NODE_CARD_STATES.IN_PROGRESS,\n );\n\nexport const calculateTimeLeftText = (dueDateTs: number): string | undefined => {\n const timeLeftMs = dueDateTs * 1000 - Date.now();\n\n if (timeLeftMs <= 0) return undefined;\n\n const hoursLeft = Math.floor(timeLeftMs / MS_PER_HOUR);\n const daysLeft = Math.floor(hoursLeft / 24);\n\n if (daysLeft < 1) {\n return `${hoursLeft} ${hoursLeft === 1 ? 'hour' : 'hours'} left`;\n }\n\n return `${daysLeft} ${daysLeft === 1 ? 'day' : 'days'} left`;\n};\n\nexport const mapSectionStatus = (section: IMathFitSection): ESectionStatus => {\n const { sheet } = section;\n\n switch (sheet.state) {\n case 'LOCKED':\n return ESectionStatus.LOCKED;\n case 'COMPLETED':\n return ESectionStatus.COMPLETED;\n case 'IN_PROGRESS':\n return ESectionStatus.ACTIVE;\n default:\n return ESectionStatus.ACTIVE;\n }\n};\n\nexport const getStartButtonText = (sections: IMathFitSection[]): string => {\n const activeSection = findActiveSection(sections);\n\n if (!activeSection) return 'Start Section';\n\n const action = activeSection.sheet.state === NODE_CARD_STATES.IN_PROGRESS ? 'Resume' : 'Start';\n\n return `${action} Section ${activeSection.section_number}`;\n};\n\nexport const getBeforeYouStartText = (sections: IMathFitSection[]): string[] | null => {\n const activeSection = findActiveSection(sections);\n\n if (!activeSection) return null;\n\n const isFirstSection = sections.findIndex(s => s.id === activeSection.id) === 0;\n const hasCompletedSections = sections.some(s => s.sheet.state === ESectionStatus.COMPLETED);\n\n const firstLine =\n isFirstSection && !hasCompletedSections\n ? 'Do each section whenever it suits you, before the deadline.'\n : `Start Section ${activeSection.section_number} now, or later before the deadline.`;\n\n return [firstLine, 'Questions come from what you just learned'];\n};\n\nexport const getSectionStatusConfig = (status: ESectionStatus) => SECTION_STATUS_CONFIG[status];\n"],"names":["MS_PER_HOUR","SECTION_STATUS_CONFIG","ESectionStatus","ESectionCardVariant","findActiveSection","sections","s","NODE_CARD_STATES","calculateTimeLeftText","dueDateTs","timeLeftMs","hoursLeft","daysLeft","mapSectionStatus","section","sheet","getStartButtonText","activeSection","getBeforeYouStartText","isFirstSection","hasCompletedSections","getSectionStatusConfig","status"],"mappings":";;;AAiBA,MAAMA,IAAc,MAAO,KAAK,IAEnBC,IAAiD;AAAA,EAC5D,CAACC,EAAe,SAAS,GAAG;AAAA,IAC1B,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,aAAaC,EAAoB;AAAA,IACjC,WAAW;AAAA,EACb;AAAA,EACA,CAACD,EAAe,MAAM,GAAG;AAAA,IACvB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,aAAaC,EAAoB;AAAA,IACjC,WAAW;AAAA,EACb;AAAA,EACA,CAACD,EAAe,MAAM,GAAG;AAAA,IACvB,iBAAiB;AAAA,IACjB,qBAAqB;AAAA,IACrB,iBAAiB;AAAA,IACjB,aAAaC,EAAoB;AAAA,IACjC,WAAW;AAAA,EACb;AACF,GAEaC,IAAoB,CAACC,MAChCA,EAAS;AAAA,EACP,CAAAC,MACEA,EAAE,MAAM,UAAUC,EAAiB,eACnCD,EAAE,MAAM,UAAUC,EAAiB;AACvC,GAEWC,IAAwB,CAACC,MAA0C;AAC9E,QAAMC,IAAaD,IAAY,MAAO,KAAK,IAAI;AAE3C,MAAAC,KAAc,EAAU;AAE5B,QAAMC,IAAY,KAAK,MAAMD,IAAaV,CAAW,GAC/CY,IAAW,KAAK,MAAMD,IAAY,EAAE;AAE1C,SAAIC,IAAW,IACN,GAAGD,CAAS,IAAIA,MAAc,IAAI,SAAS,OAAO,UAGpD,GAAGC,CAAQ,IAAIA,MAAa,IAAI,QAAQ,MAAM;AACvD,GAEaC,IAAmB,CAACC,MAA6C;AACtE,QAAA,EAAE,OAAAC,EAAU,IAAAD;AAElB,UAAQC,EAAM,OAAO;AAAA,IACnB,KAAK;AACH,aAAOb,EAAe;AAAA,IACxB,KAAK;AACH,aAAOA,EAAe;AAAA,IACxB,KAAK;AACH,aAAOA,EAAe;AAAA,IACxB;AACE,aAAOA,EAAe;AAAA,EAC1B;AACF,GAEac,IAAqB,CAACX,MAAwC;AACnE,QAAAY,IAAgBb,EAAkBC,CAAQ;AAE5C,SAACY,IAIE,GAFQA,EAAc,MAAM,UAAUV,EAAiB,cAAc,WAAW,OAEvE,YAAYU,EAAc,cAAc,KAJ7B;AAK7B,GAEaC,IAAwB,CAACb,MAAiD;AAC/E,QAAAY,IAAgBb,EAAkBC,CAAQ;AAE5C,MAAA,CAACY,EAAsB,QAAA;AAErB,QAAAE,IAAiBd,EAAS,UAAU,CAAAC,MAAKA,EAAE,OAAOW,EAAc,EAAE,MAAM,GACxEG,IAAuBf,EAAS,KAAK,CAAAC,MAAKA,EAAE,MAAM,UAAUJ,EAAe,SAAS;AAOnF,SAAA,CAJLiB,KAAkB,CAACC,IACf,gEACA,iBAAiBH,EAAc,cAAc,uCAEhC,2CAA2C;AAChE,GAEaI,IAAyB,CAACC,MAA2BrB,EAAsBqB,CAAM;"}
@@ -0,0 +1,9 @@
1
+ import o from "styled-components";
2
+ import r from "../../ui/layout/flex-view.js";
3
+ const d = o(r)`
4
+ border-radius: 8px 8px 0 0;
5
+ `;
6
+ export {
7
+ d as CountdownBadge
8
+ };
9
+ //# sourceMappingURL=math-fit-overview-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math-fit-overview-styled.js","sources":["../../../../src/features/math-fit/math-fit-overview/math-fit-overview-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\n\nexport const CountdownBadge = styled(FlexView)`\n border-radius: 8px 8px 0 0;\n`;\n"],"names":["CountdownBadge","styled","FlexView"],"mappings":";;AAIa,MAAAA,IAAiBC,EAAOC,CAAQ;AAAA;AAAA;"}
@@ -0,0 +1,7 @@
1
+ var R = /* @__PURE__ */ ((C) => (C.COMPLETED = "COMPLETED", C.ACTIVE = "ACTIVE", C.LOCKED = "LOCKED", C))(R || {}), O = /* @__PURE__ */ ((C) => (C.CORRECT = "CORRECT", C.INCORRECT = "INCORRECT", C.SKIPPED = "SKIPPED", C))(O || {}), E = /* @__PURE__ */ ((C) => (C.IN_PROGRESS = "IN_PROGRESS", C.COMPLETED = "COMPLETED", C.NOT_STARTED = "NOT_STARTED", C.EXPIRED = "EXPIRED", C))(E || {});
2
+ export {
3
+ E as EMATHFIT_TEST_STATE,
4
+ O as EQuestionState,
5
+ R as ESectionStatus
6
+ };
7
+ //# sourceMappingURL=math-fit-overview-types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math-fit-overview-types.js","sources":["../../../../src/features/math-fit/math-fit-overview/math-fit-overview-types.ts"],"sourcesContent":["import type { INodeDataProps } from '../../chapters-v2/comps/node-card/node-card-types';\nimport { type TUserTypes } from '../../ui/types';\n\nexport enum ESectionStatus {\n COMPLETED = 'COMPLETED',\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n}\n\nexport enum EQuestionState {\n CORRECT = 'CORRECT',\n INCORRECT = 'INCORRECT',\n SKIPPED = 'SKIPPED',\n}\n\nexport enum EMATHFIT_TEST_STATE {\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETED = 'COMPLETED',\n NOT_STARTED = 'NOT_STARTED',\n EXPIRED = 'EXPIRED',\n}\n\nexport interface ISectionData {\n id: string;\n title: string;\n status: ESectionStatus;\n questionsCount: number;\n timeInMinutes: number;\n sheetData: INodeDataProps;\n}\n\nexport interface IQuestionDetail {\n item_reference: string;\n state: EQuestionState;\n order: number;\n}\n\nexport interface IMiniGoalDetail {\n order: number;\n description: string;\n items: IQuestionDetail[];\n}\n\nexport interface IMathFitSection {\n id: string;\n section_number: number;\n score: number;\n previous_score: number;\n user_node_id: string;\n created_on: string;\n created_on_ts: number;\n updated_on: string;\n updated_on_ts: number;\n sheet: INodeDataProps;\n summary: {\n [goalId: string]: IMiniGoalDetail;\n };\n}\n\nexport interface IMathFitAssessmentResponse {\n id: string;\n user_id: string;\n state: EMATHFIT_TEST_STATE;\n score: number;\n previous_score: number;\n created_on: string;\n created_on_ts: number;\n updated_on: string;\n updated_on_ts: number;\n sections: IMathFitSection[];\n}\n\nexport interface IMathFitOverviewProps {\n data: IMathFitAssessmentResponse;\n onResumeClick: (sheetData: INodeDataProps, sectionId: string) => void;\n onDoLater: () => void;\n}\n\nexport interface IMathFitProps {\n mathfitTestId: string;\n userId: string;\n onResumeClick: (sheetData: INodeDataProps, sectionId: string) => void;\n onReviewClick: (sheetData: INodeDataProps, sectionId: string) => void;\n onDoLater: () => void;\n studentName: string;\n userType: TUserTypes;\n}\n"],"names":["ESectionStatus","EQuestionState","EMATHFIT_TEST_STATE"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,SAAS,UACTA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,YAAY,aACZA,EAAA,UAAU,WAHAA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,YAAY,aACZA,EAAA,cAAc,eACdA,EAAA,UAAU,WAJAA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -0,0 +1,71 @@
1
+ import { jsxs as n, Fragment as X, jsx as e } from "react/jsx-runtime";
2
+ import { memo as _, useMemo as a, useCallback as A } from "react";
3
+ import g from "../../ui/buttons/button/button.js";
4
+ import i from "../../ui/layout/flex-view.js";
5
+ import p from "../../ui/separator/separator.js";
6
+ import l from "../../ui/text/text.js";
7
+ import S from "./comps/section-card/section-card.js";
8
+ import { calculateTimeLeftText as B, findActiveSection as b, getStartButtonText as v, getBeforeYouStartText as L, mapSectionStatus as w } from "./math-fit-overview-helpers.js";
9
+ import { CountdownBadge as k } from "./math-fit-overview-styled.js";
10
+ const F = _(function({
11
+ data: T,
12
+ onResumeClick: d,
13
+ onDoLater: x
14
+ }) {
15
+ var $, f;
16
+ const { sections: t } = T, c = (f = ($ = t[0]) == null ? void 0 : $.sheet) == null ? void 0 : f.due_date_ts, u = a(() => {
17
+ if (c)
18
+ return B(c);
19
+ }, [c]), o = a(() => b(t), [t]), m = a(() => v(t), [t]), h = a(() => L(t), [t]), C = A(() => {
20
+ o && d(o.sheet, o.id);
21
+ }, [o, d]);
22
+ return /* @__PURE__ */ n(X, { children: [
23
+ /* @__PURE__ */ e(i, { $gutterX: 1.5, $gapX: 0.75, $background: "BLACK_T_04", children: /* @__PURE__ */ e(l, { $renderAs: "ac4", $color: "BLACK_1", children: "TEST STRUCTURE" }) }),
24
+ /* @__PURE__ */ e(i, { $gutterX: 1, $gapX: 1.5, $flexGapX: 1, children: t.map((r, s) => /* @__PURE__ */ e(
25
+ S,
26
+ {
27
+ title: r.sheet.title,
28
+ questionsCount: r.sheet.total_questions || 0,
29
+ timeInMinutes: r.sheet.sheet_time ? r.sheet.sheet_time / 60 : 0,
30
+ status: w(r),
31
+ showDivider: s < t.length - 1
32
+ },
33
+ r.id
34
+ )) }),
35
+ /* @__PURE__ */ e(p, { heightX: 1 }),
36
+ !!h && /* @__PURE__ */ n(i, { children: [
37
+ /* @__PURE__ */ e(i, { $gutterX: 1.5, $gapX: 0.75, $background: "BLACK_T_04", children: /* @__PURE__ */ e(l, { $renderAs: "ac4", $color: "BLACK_1", children: "BEFORE YOU START" }) }),
38
+ /* @__PURE__ */ e(i, { $gutterX: 2.5, $gapX: 1, $flexRowGapX: 0.5, children: h.map((r, s) => /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(l, { $renderAs: "ub2", $color: "BLACK_1", children: r }) }, s)) })
39
+ ] }),
40
+ /* @__PURE__ */ e(p, { heightX: 2.5 }),
41
+ /* @__PURE__ */ n(
42
+ i,
43
+ {
44
+ $flexDirection: "row",
45
+ $justifyContent: "center",
46
+ $alignItems: "flex-end",
47
+ $flexColumnGapX: 1,
48
+ children: [
49
+ /* @__PURE__ */ e(g, { label: "I'll do it later", renderAs: "secondary", size: "regular", onClick: x }),
50
+ /* @__PURE__ */ n(i, { $alignItems: "center", $justifyContent: "center", children: [
51
+ !!u && /* @__PURE__ */ e(k, { $background: "YELLOW_1", $gapX: 0.35, $gutterX: 0.5, children: /* @__PURE__ */ e(l, { $renderAs: "ac5-black", $color: "BLACK_T_60", children: u }) }),
52
+ !!m && /* @__PURE__ */ e(
53
+ g,
54
+ {
55
+ label: m,
56
+ renderAs: "primary",
57
+ size: "regular",
58
+ onClick: C,
59
+ disabled: !o
60
+ }
61
+ )
62
+ ] })
63
+ ]
64
+ }
65
+ )
66
+ ] });
67
+ }), G = F;
68
+ export {
69
+ G as default
70
+ };
71
+ //# sourceMappingURL=math-fit-overview.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"math-fit-overview.js","sources":["../../../../src/features/math-fit/math-fit-overview/math-fit-overview.tsx"],"sourcesContent":["import { memo, useCallback, useMemo, type FC } from 'react';\n\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport SectionCard from './comps/section-card/section-card';\nimport {\n calculateTimeLeftText,\n findActiveSection,\n getBeforeYouStartText,\n getStartButtonText,\n mapSectionStatus,\n} from './math-fit-overview-helpers';\nimport { type IMathFitOverviewProps } from './math-fit-overview-types';\nimport * as Styled from './math-fit-overview-styled';\n\nconst MathFitOverview: FC<IMathFitOverviewProps> = memo(function MathFitOverview({\n data,\n onResumeClick,\n onDoLater,\n}) {\n const { sections } = data;\n\n const dueDateTS = sections[0]?.sheet?.due_date_ts;\n\n const timeleftText = useMemo(() => {\n if (!dueDateTS) return undefined;\n\n return calculateTimeLeftText(dueDateTS);\n }, [dueDateTS]);\n\n const activeSection = useMemo(() => findActiveSection(sections), [sections]);\n const startButtonText = useMemo(() => getStartButtonText(sections), [sections]);\n const beforeYouStartText = useMemo(() => getBeforeYouStartText(sections), [sections]);\n\n const handleStartClick = useCallback(() => {\n if (activeSection) {\n onResumeClick(activeSection.sheet, activeSection.id);\n }\n }, [activeSection, onResumeClick]);\n\n return (\n <>\n <FlexView $gutterX={1.5} $gapX={0.75} $background=\"BLACK_T_04\">\n <Text $renderAs=\"ac4\" $color=\"BLACK_1\">\n TEST STRUCTURE\n </Text>\n </FlexView>\n <FlexView $gutterX={1} $gapX={1.5} $flexGapX={1}>\n {sections.map((section, index) => (\n <SectionCard\n key={section.id}\n title={section.sheet.title}\n questionsCount={section.sheet.total_questions || 0}\n timeInMinutes={section.sheet.sheet_time ? section.sheet.sheet_time / 60 : 0}\n status={mapSectionStatus(section)}\n showDivider={index < sections.length - 1}\n />\n ))}\n </FlexView>\n <Separator heightX={1} />\n {!!beforeYouStartText && (\n <FlexView>\n <FlexView $gutterX={1.5} $gapX={0.75} $background=\"BLACK_T_04\">\n <Text $renderAs=\"ac4\" $color=\"BLACK_1\">\n BEFORE YOU START\n </Text>\n </FlexView>\n <FlexView $gutterX={2.5} $gapX={1} $flexRowGapX={0.5}>\n {beforeYouStartText.map((item, index) => (\n <li key={index}>\n <Text $renderAs=\"ub2\" $color=\"BLACK_1\">\n {item}\n </Text>\n </li>\n ))}\n </FlexView>\n </FlexView>\n )}\n <Separator heightX={2.5} />\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"center\"\n $alignItems=\"flex-end\"\n $flexColumnGapX={1}\n >\n <Button label=\"I'll do it later\" renderAs=\"secondary\" size=\"regular\" onClick={onDoLater} />\n <FlexView $alignItems=\"center\" $justifyContent=\"center\">\n {!!timeleftText && (\n <Styled.CountdownBadge $background=\"YELLOW_1\" $gapX={0.35} $gutterX={0.5}>\n <Text $renderAs=\"ac5-black\" $color=\"BLACK_T_60\">\n {timeleftText}\n </Text>\n </Styled.CountdownBadge>\n )}\n {!!startButtonText && (\n <Button\n label={startButtonText}\n renderAs=\"primary\"\n size=\"regular\"\n onClick={handleStartClick}\n disabled={!activeSection}\n />\n )}\n </FlexView>\n </FlexView>\n </>\n );\n});\n\nexport default MathFitOverview;\n"],"names":["MathFitOverview","memo","data","onResumeClick","onDoLater","sections","dueDateTS","_b","_a","timeleftText","useMemo","calculateTimeLeftText","activeSection","findActiveSection","startButtonText","getStartButtonText","beforeYouStartText","getBeforeYouStartText","handleStartClick","useCallback","jsxs","Fragment","jsx","FlexView","Text","section","index","SectionCard","mapSectionStatus","Separator","item","Button","Styled.CountdownBadge","MathFitOverview$1"],"mappings":";;;;;;;;;AAiBA,MAAMA,IAA6CC,EAAK,SAAyB;AAAA,EAC/E,MAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AACF,GAAG;;AACK,QAAA,EAAE,UAAAC,EAAa,IAAAH,GAEfI,KAAYC,KAAAC,IAAAH,EAAS,CAAC,MAAV,gBAAAG,EAAa,UAAb,gBAAAD,EAAoB,aAEhCE,IAAeC,EAAQ,MAAM;AAC7B,QAACJ;AAEL,aAAOK,EAAsBL,CAAS;AAAA,EAAA,GACrC,CAACA,CAAS,CAAC,GAERM,IAAgBF,EAAQ,MAAMG,EAAkBR,CAAQ,GAAG,CAACA,CAAQ,CAAC,GACrES,IAAkBJ,EAAQ,MAAMK,EAAmBV,CAAQ,GAAG,CAACA,CAAQ,CAAC,GACxEW,IAAqBN,EAAQ,MAAMO,EAAsBZ,CAAQ,GAAG,CAACA,CAAQ,CAAC,GAE9Ea,IAAmBC,EAAY,MAAM;AACzC,IAAIP,KACYT,EAAAS,EAAc,OAAOA,EAAc,EAAE;AAAA,EACrD,GACC,CAACA,GAAeT,CAAa,CAAC;AAEjC,SAEI,gBAAAiB,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAS,EAAA,UAAU,KAAK,OAAO,MAAM,aAAY,cAChD,UAAC,gBAAAD,EAAAE,GAAA,EAAK,WAAU,OAAM,QAAO,WAAU,2BAEvC,CAAA,GACF;AAAA,IACC,gBAAAF,EAAAC,GAAA,EAAS,UAAU,GAAG,OAAO,KAAK,WAAW,GAC3C,UAASlB,EAAA,IAAI,CAACoB,GAASC,MACtB,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QAEC,OAAOF,EAAQ,MAAM;AAAA,QACrB,gBAAgBA,EAAQ,MAAM,mBAAmB;AAAA,QACjD,eAAeA,EAAQ,MAAM,aAAaA,EAAQ,MAAM,aAAa,KAAK;AAAA,QAC1E,QAAQG,EAAiBH,CAAO;AAAA,QAChC,aAAaC,IAAQrB,EAAS,SAAS;AAAA,MAAA;AAAA,MALlCoB,EAAQ;AAAA,IAOhB,CAAA,GACH;AAAA,IACA,gBAAAH,EAACO,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,IACtB,CAAC,CAACb,KACD,gBAAAI,EAACG,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAD,EAACC,GAAS,EAAA,UAAU,KAAK,OAAO,MAAM,aAAY,cAChD,UAAC,gBAAAD,EAAAE,GAAA,EAAK,WAAU,OAAM,QAAO,WAAU,6BAEvC,CAAA,GACF;AAAA,MACA,gBAAAF,EAACC,GAAS,EAAA,UAAU,KAAK,OAAO,GAAG,cAAc,KAC9C,UAAmBP,EAAA,IAAI,CAACc,GAAMJ,MAC5B,gBAAAJ,EAAA,MAAA,EACC,UAAC,gBAAAA,EAAAE,GAAA,EAAK,WAAU,OAAM,QAAO,WAC1B,UACHM,EAAA,CAAA,EAAA,GAHOJ,CAIT,CACD,EACH,CAAA;AAAA,IAAA,GACF;AAAA,IAEF,gBAAAJ,EAACO,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IACzB,gBAAAT;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,iBAAiB;AAAA,QAEjB,UAAA;AAAA,UAAC,gBAAAD,EAAAS,GAAA,EAAO,OAAM,oBAAmB,UAAS,aAAY,MAAK,WAAU,SAAS3B,EAAW,CAAA;AAAA,UACxF,gBAAAgB,EAAAG,GAAA,EAAS,aAAY,UAAS,iBAAgB,UAC5C,UAAA;AAAA,YAAA,CAAC,CAACd,KACD,gBAAAa,EAACU,GAAA,EAAsB,aAAY,YAAW,OAAO,MAAM,UAAU,KACnE,4BAACR,GAAK,EAAA,WAAU,aAAY,QAAO,cAChC,YACH,CAAA,GACF;AAAA,YAED,CAAC,CAACV,KACD,gBAAAQ;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,OAAOjB;AAAA,gBACP,UAAS;AAAA,gBACT,MAAK;AAAA,gBACL,SAASI;AAAA,gBACT,UAAU,CAACN;AAAA,cAAA;AAAA,YACb;AAAA,UAAA,GAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDqB,IAAejC;"}
@@ -0,0 +1,38 @@
1
+ import t from "styled-components";
2
+ import r from "../../../../ui/layout/flex-view.js";
3
+ import { ILLUSTRATIONS as n } from "../../../../../assets/illustrations/illustrations.js";
4
+ const p = t(r)`
5
+ background-image: url(${n.MATH_FIT_BG});
6
+ background-position: right center;
7
+
8
+ background-repeat: no-repeat;
9
+ `;
10
+ t.button`
11
+ background: transparent;
12
+ border: none;
13
+ color: ${({ theme: o }) => o.colors.WHITE};
14
+ cursor: pointer;
15
+ padding: 8px;
16
+ font-size: 24px;
17
+
18
+ &:hover {
19
+ opacity: 0.8;
20
+ }
21
+ `;
22
+ const c = t(r)`
23
+ position: absolute;
24
+ top: 0;
25
+ left: 0;
26
+ z-index: 6;
27
+ `, s = t(r)(({ theme: o }) => `
28
+ position: sticky;
29
+ top: ${o.layout.gutter}px;
30
+ transform: translateX(${o.layout.gutter}px);
31
+ z-index: 6;
32
+ `);
33
+ export {
34
+ c as BackButtonContainer,
35
+ s as BackButtonWrapper,
36
+ p as HeaderContainer
37
+ };
38
+ //# sourceMappingURL=report-header-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-header-styled.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/report-header/report-header-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\n\nexport const HeaderContainer = styled(FlexView)`\n background-image: url(${ILLUSTRATIONS.MATH_FIT_BG});\n background-position: right center;\n\n background-repeat: no-repeat;\n`;\n\nexport const BackButton = styled.button`\n background: transparent;\n border: none;\n color: ${({ theme }) => theme.colors.WHITE};\n cursor: pointer;\n padding: 8px;\n font-size: 24px;\n\n &:hover {\n opacity: 0.8;\n }\n`;\n\nexport const BackButtonContainer = styled(FlexView)`\n position: absolute;\n top: 0;\n left: 0;\n z-index: 6;\n`;\n\nexport const BackButtonWrapper = styled(FlexView)(({ theme }) => {\n return `\n position: sticky;\n top: ${theme.layout.gutter}px;\n transform: translateX(${theme.layout.gutter}px);\n z-index: 6;\n `;\n});\n"],"names":["HeaderContainer","styled","FlexView","ILLUSTRATIONS","theme","BackButtonContainer","BackButtonWrapper"],"mappings":";;;AAKa,MAAAA,IAAkBC,EAAOC,CAAQ;AAAA,0BACpBC,EAAc,WAAW;AAAA;AAAA;AAAA;AAAA;AAMzBF,EAAO;AAAA;AAAA;AAAA,WAGtB,CAAC,EAAE,OAAAG,EAAA,MAAYA,EAAM,OAAO,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAU/B,MAAAC,IAAsBJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,GAOrCI,IAAoBL,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QAC5C;AAAA;AAAA,WAEEA,EAAM,OAAO,MAAM;AAAA,4BACFA,EAAM,OAAO,MAAM;AAAA;AAAA,GAG9C;"}
@@ -0,0 +1,58 @@
1
+ import { jsxs as e, jsx as r } from "react/jsx-runtime";
2
+ import { memo as p } from "react";
3
+ import o from "../../../../ui/text/text.js";
4
+ import l from "../score-badge/score-badge.js";
5
+ import { HeaderContainer as f, BackButtonContainer as s, BackButtonWrapper as h } from "./report-header-styled.js";
6
+ import { IS_APP_RUNNING_IN_RN as $ } from "../../../../../constants/app-config.js";
7
+ import u from "../../../../ui/separator/separator.js";
8
+ import { formatTestDate as B } from "../../math-fit-report-helpers.js";
9
+ import _ from "../../../../../assets/line-icons/icons/back2.js";
10
+ import g from "../../../../ui/buttons/icon-button/icon-button.js";
11
+ const y = p(function({
12
+ createdOnTs: t,
13
+ maxScore: n,
14
+ score: a,
15
+ scoreChange: i,
16
+ studentName: m,
17
+ userType: c,
18
+ onBack: d
19
+ }) {
20
+ return /* @__PURE__ */ e(
21
+ f,
22
+ {
23
+ $background: "BLUE_4",
24
+ $heightX: $ ? 9.6 : 11.75,
25
+ $gapX: 1.5,
26
+ $gutterX: 1.5,
27
+ $justifyContent: "flex-end",
28
+ $position: "relative",
29
+ children: [
30
+ c === "TEACHER" && /* @__PURE__ */ r(s, { $height: "100%", children: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(
31
+ g,
32
+ {
33
+ Icon: _,
34
+ renderAs: "secondary-gray",
35
+ analyticsLabel: "chapter_page_exit",
36
+ size: "xsmall",
37
+ onClick: d
38
+ }
39
+ ) }) }),
40
+ /* @__PURE__ */ e(o, { $renderAs: "ab1-bold", $color: "BLACK_1", children: [
41
+ "Well done, ",
42
+ m || "",
43
+ "!"
44
+ ] }),
45
+ /* @__PURE__ */ r(u, { heightX: 0.5 }),
46
+ /* @__PURE__ */ r(l, { score: a, maxScore: n, scoreChange: i, renderInHeader: !0 }),
47
+ /* @__PURE__ */ e(o, { $renderAs: "ac4", $color: "BLACK_T_60", children: [
48
+ "TEST Score • ",
49
+ B(t)
50
+ ] })
51
+ ]
52
+ }
53
+ );
54
+ });
55
+ export {
56
+ y as default
57
+ };
58
+ //# sourceMappingURL=report-header.js.map
@@ -0,0 +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';\n\nimport Text from '../../../../ui/text/text';\nimport ScoreBadge from '../score-badge/score-badge';\nimport type { IReportHeaderProps } from './report-header-types';\nimport * as Styled from './report-header-styled';\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';\n\nconst ReportHeader: FC<IReportHeaderProps> = memo(function ReportHeader({\n createdOnTs,\n maxScore,\n score,\n scoreChange,\n studentName,\n userType,\n onBack,\n}) {\n return (\n <Styled.HeaderContainer\n $background=\"BLUE_4\"\n $heightX={IS_APP_RUNNING_IN_RN ? 9.6 : 11.75}\n $gapX={1.5}\n $gutterX={1.5}\n $justifyContent=\"flex-end\"\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 <Text $renderAs=\"ab1-bold\" $color=\"BLACK_1\">\n Well done, {studentName || ''}!\n </Text>\n <Separator heightX={0.5} />\n <ScoreBadge score={score} maxScore={maxScore} scoreChange={scoreChange} renderInHeader />\n <Text $renderAs=\"ac4\" $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","jsxs","Styled.HeaderContainer","IS_APP_RUNNING_IN_RN","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;AACF,GAAG;AAEC,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAY;AAAA,MACZ,UAAUC,IAAuB,MAAM;AAAA,MACvC,OAAO;AAAA,MACP,UAAU;AAAA,MACV,iBAAgB;AAAA,MAChB,WAAU;AAAA,MAET,UAAA;AAAA,QAAaJ,MAAA,aACX,gBAAAK,EAAAC,GAAA,EAA2B,SAAQ,QAClC,UAAA,gBAAAD,EAACE,GAAA,EACC,UAAA,gBAAAF;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,UAAS;AAAA,YACT,gBAAe;AAAA,YACf,MAAK;AAAA,YACL,SAASR;AAAA,UAAA;AAAA,WAEb,EACF,CAAA;AAAA,QAED,gBAAAC,EAAAQ,GAAA,EAAK,WAAU,YAAW,QAAO,WAAU,UAAA;AAAA,UAAA;AAAA,UAC9BX,KAAe;AAAA,UAAG;AAAA,QAAA,GAChC;AAAA,QACA,gBAAAM,EAACM,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,0BACxBC,GAAW,EAAA,OAAAf,GAAc,UAAAD,GAAoB,aAAAE,GAA0B,gBAAc,IAAC;AAAA,QACtF,gBAAAI,EAAAQ,GAAA,EAAK,WAAU,OAAM,QAAO,cAAa,UAAA;AAAA,UAAA;AAAA,UAC1BG,EAAelB,CAAW;AAAA,QAAA,GAC1C;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -0,0 +1,28 @@
1
+ import o from "styled-components";
2
+ import e from "../../../../ui/layout/flex-view.js";
3
+ o(e)`
4
+ align-items: center;
5
+ gap: 4px;
6
+ `;
7
+ const s = o.div`
8
+ position: relative;
9
+ width: 18px;
10
+
11
+ &::after {
12
+ content: '';
13
+ position: absolute;
14
+ left: 0;
15
+ top: 0;
16
+ transform: ${({ $isPositive: t }) => t ? "rotate(0deg)" : "rotate(180deg)"};
17
+ width: 0;
18
+ height: 0;
19
+ border-left: 7px solid transparent;
20
+ border-right: 7px solid transparent;
21
+ border-bottom: 10px solid
22
+ ${({ theme: t, $isPositive: r }) => r ? t.colors.GREEN_6 : t.colors.RED};
23
+ }
24
+ `;
25
+ export {
26
+ s as ArrowIcon
27
+ };
28
+ //# sourceMappingURL=score-badge-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score-badge-styled.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-badge/score-badge-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const ScoreContainer = styled(FlexView)`\n align-items: center;\n gap: 4px;\n`;\n\nexport const ArrowIcon = styled.div<{ $isPositive: boolean; $renderInHeader: boolean }>`\n position: relative;\n width: 18px;\n\n &::after {\n content: '';\n position: absolute;\n left: 0;\n top: 0;\n transform: ${({ $isPositive }) => ($isPositive ? 'rotate(0deg)' : 'rotate(180deg)')};\n width: 0;\n height: 0;\n border-left: 7px solid transparent;\n border-right: 7px solid transparent;\n border-bottom: 10px solid\n ${({ theme, $isPositive }) => ($isPositive ? theme.colors.GREEN_6 : theme.colors.RED)};\n }\n`;\n"],"names":["styled","FlexView","ArrowIcon","$isPositive","theme"],"mappings":";;AAI8BA,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAKtC,MAAMC,IAAYF,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBASf,CAAC,EAAE,aAAAG,EAAA,MAAmBA,IAAc,iBAAiB,gBAAiB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAM/E,CAAC,EAAE,OAAAC,GAAO,aAAAD,EAAY,MAAOA,IAAcC,EAAM,OAAO,UAAUA,EAAM,OAAO,GAAI;AAAA;AAAA;"}
@@ -0,0 +1,30 @@
1
+ import { jsxs as m, jsx as o, Fragment as $ } from "react/jsx-runtime";
2
+ import { memo as d } from "react";
3
+ import c from "../../../../ui/text/text.js";
4
+ import { ArrowIcon as f } from "./score-badge-styled.js";
5
+ import r from "../../../../ui/layout/flex-view.js";
6
+ import s from "../../../../ui/separator/separator.js";
7
+ const F = d(function({
8
+ score: l,
9
+ maxScore: n = 10,
10
+ scoreChange: t,
11
+ renderInHeader: i = !1
12
+ }) {
13
+ const a = t !== void 0 && t !== 0, e = t ? t > 0 : !1;
14
+ return /* @__PURE__ */ m(r, { $flexDirection: "row", $alignItems: "flex-end", children: [
15
+ /* @__PURE__ */ o(c, { $renderAs: i ? "ah2-bold" : "ac2", $color: "BLACK_1", children: l ? l.toFixed(1) : "-" }),
16
+ !!l && /* @__PURE__ */ o(r, { $marginBottom: i ? 5 : 2, children: /* @__PURE__ */ m(c, { $renderAs: i ? "ah4-bold" : "ac4", $color: "BLACK_1", children: [
17
+ "/",
18
+ n
19
+ ] }) }),
20
+ /* @__PURE__ */ o(s, { width: 8 }),
21
+ a && /* @__PURE__ */ m($, { children: [
22
+ /* @__PURE__ */ o(r, { $marginBottom: i ? -7 : 9, $alignSelf: "center", children: /* @__PURE__ */ o(f, { $isPositive: e, $renderInHeader: i }) }),
23
+ /* @__PURE__ */ o(r, { $marginBottom: i ? 10 : 2, children: /* @__PURE__ */ o(c, { $renderAs: "ac4", $color: e ? "GREEN_6" : "RED", children: Math.abs(t).toFixed(1) }) })
24
+ ] })
25
+ ] });
26
+ });
27
+ export {
28
+ F as default
29
+ };
30
+ //# sourceMappingURL=score-badge.js.map
@@ -0,0 +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 Text from '../../../../ui/text/text';\nimport type { IScoreBadgeProps } from './score-badge-types';\nimport * as Styled from './score-badge-styled';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\n\nconst ScoreBadge: FC<IScoreBadgeProps> = memo(function ScoreBadge({\n score,\n maxScore = 10,\n scoreChange,\n renderInHeader = false,\n}) {\n const hasChange = scoreChange !== undefined && scoreChange !== 0;\n const isPositive = scoreChange ? scoreChange > 0 : false;\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Text $renderAs={renderInHeader ? 'ah2-bold' : 'ac2'} $color=\"BLACK_1\">\n {score ? score.toFixed(1) : '-'}\n </Text>\n {!!score && (\n <FlexView $marginBottom={renderInHeader ? 5 : 2}>\n <Text $renderAs={renderInHeader ? 'ah4-bold' : 'ac4'} $color=\"BLACK_1\">\n /{maxScore}\n </Text>\n </FlexView>\n )}\n <Separator width={8} />\n {hasChange && (\n <>\n <FlexView $marginBottom={renderInHeader ? -7 : 9} $alignSelf=\"center\">\n <Styled.ArrowIcon $isPositive={isPositive} $renderInHeader={renderInHeader} />\n </FlexView>\n <FlexView $marginBottom={renderInHeader ? 10 : 2}>\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","hasChange","isPositive","jsxs","FlexView","jsx","Text","Separator","Fragment","Styled.ArrowIcon"],"mappings":";;;;;;AAQM,MAAAA,IAAmCC,EAAK,SAAoB;AAAA,EAChE,OAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,aAAAC;AAAA,EACA,gBAAAC,IAAiB;AACnB,GAAG;AACK,QAAAC,IAAYF,MAAgB,UAAaA,MAAgB,GACzDG,IAAaH,IAAcA,IAAc,IAAI;AAEnD,SACG,gBAAAI,EAAAC,GAAA,EAAS,gBAAe,OAAM,aAAY,YACzC,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAK,EAAA,WAAWN,IAAiB,aAAa,OAAO,QAAO,WAC1D,UAAAH,IAAQA,EAAM,QAAQ,CAAC,IAAI,KAC9B;AAAA,IACC,CAAC,CAACA,KACA,gBAAAQ,EAAAD,GAAA,EAAS,eAAeJ,IAAiB,IAAI,GAC5C,UAAA,gBAAAG,EAACG,KAAK,WAAWN,IAAiB,aAAa,OAAO,QAAO,WAAU,UAAA;AAAA,MAAA;AAAA,MACnEF;AAAA,IAAA,EAAA,CACJ,EACF,CAAA;AAAA,IAEF,gBAAAO,EAACE,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IACpBN,KAEG,gBAAAE,EAAAK,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAH,EAACD,GAAS,EAAA,eAAeJ,IAAiB,KAAK,GAAG,YAAW,UAC3D,UAAC,gBAAAK,EAAAI,GAAA,EAAiB,aAAaP,GAAY,iBAAiBF,EAAgB,CAAA,GAC9E;AAAA,MACA,gBAAAK,EAACD,KAAS,eAAeJ,IAAiB,KAAK,GAC7C,UAAA,gBAAAK,EAACC,KAAK,WAAU,OAAM,QAAQJ,IAAa,YAAY,OACpD,UAAK,KAAA,IAAIH,CAAW,EAAE,QAAQ,CAAC,EAAA,CAClC,EACF,CAAA;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
@@ -0,0 +1,9 @@
1
+ import r from "styled-components";
2
+ import e from "../../../../ui/layout/flex-view.js";
3
+ const i = r(e)`
4
+ border-bottom: 1px dashed ${({ theme: o }) => o.colors.BLACK_T_15};
5
+ `;
6
+ export {
7
+ i as Divider
8
+ };
9
+ //# sourceMappingURL=score-section-styled.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"score-section-styled.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-section/score-section-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nexport const Divider = styled(FlexView)`\n border-bottom: 1px dashed ${({ theme }) => theme.colors.BLACK_T_15};\n`;\n"],"names":["Divider","styled","FlexView","theme"],"mappings":";;AAIa,MAAAA,IAAUC,EAAOC,CAAQ;AAAA,8BACR,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;"}