@cuemath/leap 3.3.1 → 3.3.2-link.0

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 (53) hide show
  1. package/dist/assets/gif/gif.js +3 -0
  2. package/dist/assets/gif/gif.js.map +1 -1
  3. package/dist/assets/illustrations/illustrations.js +1 -0
  4. package/dist/assets/illustrations/illustrations.js.map +1 -1
  5. package/dist/features/milestone/constants.js +12 -10
  6. package/dist/features/milestone/constants.js.map +1 -1
  7. package/dist/features/trial-session/api/course-stream.js.map +1 -1
  8. package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +66 -60
  9. package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
  10. package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +12 -12
  11. package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
  12. package/dist/features/trial-session/comps/session-report/report-404/report-404.js +34 -0
  13. package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -0
  14. package/dist/features/trial-session/comps/session-report/{report-card.js → report-information/report-card.js} +2 -2
  15. package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -0
  16. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +29 -0
  17. package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -0
  18. package/dist/features/trial-session/comps/session-report/report-information/report-information.js +107 -0
  19. package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -0
  20. package/dist/features/trial-session/comps/session-report/session-report-styled.js +6 -29
  21. package/dist/features/trial-session/comps/session-report/session-report-styled.js.map +1 -1
  22. package/dist/features/trial-session/comps/session-report/session-report.js +44 -174
  23. package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
  24. package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +20 -5
  25. package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
  26. package/dist/features/trial-session/comps/student-personalization/student-personalization.js +59 -126
  27. package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
  28. package/dist/features/trial-session/comps/student-profile/constant.js +10 -0
  29. package/dist/features/trial-session/comps/student-profile/constant.js.map +1 -0
  30. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js +38 -0
  31. package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -0
  32. package/dist/features/trial-session/comps/student-profile/student-profile.js +93 -46
  33. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  34. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +65 -63
  35. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  36. package/dist/features/trial-session/right-panel/slide-components-map.js +32 -32
  37. package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
  38. package/dist/features/trial-session/trial-session-constants.js +3 -3
  39. package/dist/features/trial-session/trial-session-constants.js.map +1 -1
  40. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  41. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list-styled.js +9 -6
  42. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list-styled.js.map +1 -1
  43. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +30 -29
  44. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
  45. package/dist/index.d.ts +65 -0
  46. package/dist/index.js +226 -220
  47. package/dist/index.js.map +1 -1
  48. package/dist/static/personalization.7a6c33e8.svg +1 -0
  49. package/dist/static/personalized-session.b4fd7df8.gif +0 -0
  50. package/dist/static/regular-practice.b15f24d9.gif +0 -0
  51. package/dist/static/stepup.321df6ed.gif +0 -0
  52. package/package.json +2 -3
  53. package/dist/features/trial-session/comps/session-report/report-card.js.map +0 -1
@@ -0,0 +1,107 @@
1
+ import { jsxs as i, Fragment as f, jsx as e } from "react/jsx-runtime";
2
+ import { memo as w, useMemo as T } from "react";
3
+ import { ILLUSTRATIONS as R } from "../../../../../assets/illustrations/illustrations.js";
4
+ import { useUIContext as N } from "../../../../ui/context/context.js";
5
+ import C from "../../../../ui/image/image.js";
6
+ import a from "../../../../ui/layout/flex-view.js";
7
+ import $ from "../../../../ui/separator/separator.js";
8
+ import m from "../../../../ui/text/text.js";
9
+ import k from "../report-404/report-404.js";
10
+ import t from "./report-card.js";
11
+ import { ReportWrapper as E, TopicWrapper as M, TopicImage as O, InlineText as S } from "./report-information-styled.js";
12
+ const g = w((I) => {
13
+ const { sessionReports: _, studentName: b } = I, {
14
+ next_steps: v,
15
+ topic_data: p,
16
+ solved_with_help: o,
17
+ problems_attempted: r,
18
+ new_concepts_learnt: l,
19
+ solved_independently: n,
20
+ default_topic_image_url: x
21
+ } = _ || {}, { onEvent: A } = N(), d = T(() => r ? r === n || !o && n ? /* @__PURE__ */ i(f, { children: [
22
+ /* @__PURE__ */ e(t, { title: "Problems Attempted", value: r }),
23
+ /* @__PURE__ */ e(t, { title: "Solved without help", value: n }),
24
+ /* @__PURE__ */ e(
25
+ t,
26
+ {
27
+ title: "Performance",
28
+ value: `${Math.round(n / r * 100)}%`
29
+ }
30
+ )
31
+ ] }) : !o && !n ? /* @__PURE__ */ e(t, { title: "Problems Attempted", value: r }) : o && l ? /* @__PURE__ */ i(f, { children: [
32
+ /* @__PURE__ */ e(t, { title: "Problems Attempted", value: r }),
33
+ /* @__PURE__ */ e(t, { title: "Needed help in", value: l }),
34
+ /* @__PURE__ */ e(t, { title: "Improvement shown in", value: o }),
35
+ /* @__PURE__ */ e(
36
+ t,
37
+ {
38
+ title: "Improvement",
39
+ value: `${Math.round(o / l * 100)}%`
40
+ }
41
+ )
42
+ ] }) : null : null, [l, r, n, o]);
43
+ return d ? /* @__PURE__ */ i(a, { $borderColor: "BLACK_1", children: [
44
+ /* @__PURE__ */ e(E, { $flexDirection: "row", $height: 100, $background: "YELLOW_1", children: d }),
45
+ /* @__PURE__ */ e(M, { $flexDirection: "row", $background: "WHITE_1", children: p && p.length > 0 && p.map((c) => {
46
+ const {
47
+ topic_name: s,
48
+ topic_image: u,
49
+ summary: L,
50
+ is_attempted: h
51
+ } = c;
52
+ return u || A("TOPIC_THUMBNAIL_NOT_AVAILABLE", c), /* @__PURE__ */ i(
53
+ a,
54
+ {
55
+ $gap: 35,
56
+ $gutter: 29,
57
+ $flex: 1,
58
+ $alignItems: "center",
59
+ $opacity: h ? 1 : 0.4,
60
+ children: [
61
+ /* @__PURE__ */ e(
62
+ O,
63
+ {
64
+ $active: !!h,
65
+ src: u || x,
66
+ borderRadius: 96,
67
+ height: 96,
68
+ width: 96,
69
+ alt: "topic",
70
+ withLoader: !0
71
+ }
72
+ ),
73
+ /* @__PURE__ */ e($, { height: 12 }),
74
+ /* @__PURE__ */ e(m, { $renderAs: "ab3-black", $align: "center", children: s }),
75
+ /* @__PURE__ */ e($, { height: 2 }),
76
+ /* @__PURE__ */ e(m, { $renderAs: "ub3", $align: "center", children: L })
77
+ ]
78
+ },
79
+ s
80
+ );
81
+ }) }),
82
+ /* @__PURE__ */ i(
83
+ a,
84
+ {
85
+ $flexDirection: "row",
86
+ $background: "YELLOW_3",
87
+ $flexGap: 4,
88
+ $alignItems: "center",
89
+ $gap: 9,
90
+ $gutter: 8,
91
+ children: [
92
+ /* @__PURE__ */ e(C, { src: R.COMMUNITY_BULB, width: 80, height: 80, withLoader: !0, alt: "bulb" }),
93
+ /* @__PURE__ */ e(a, { $flex: 1, children: /* @__PURE__ */ i(m, { $renderAs: "ab2-black", children: [
94
+ "Next Steps: ",
95
+ /* @__PURE__ */ e(S, { $renderAs: "ab2", children: v })
96
+ ] }) })
97
+ ]
98
+ }
99
+ )
100
+ ] }) : /* @__PURE__ */ e(k, { studentName: b });
101
+ });
102
+ g.displayName = "ReportInformation";
103
+ const G = g;
104
+ export {
105
+ G as default
106
+ };
107
+ //# sourceMappingURL=report-information.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report-information.js","sources":["../../../../../../src/features/trial-session/comps/session-report/report-information/report-information.tsx"],"sourcesContent":["import type { TSessionReportData } from '../session-report-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport { useUIContext } from '../../../../ui/context/context';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport Report404 from '../report-404/report-404';\nimport ReportCard from './report-card';\nimport * as Styled from './report-information-styled';\n\ninterface IReportInformationProps {\n sessionReports: TSessionReportData;\n studentName: string;\n}\n\nconst ReportInformation: FC<IReportInformationProps> = memo(props => {\n const { sessionReports, studentName } = props;\n const {\n next_steps: nextSteps,\n topic_data: topicData,\n solved_with_help: solvedWithHelp,\n problems_attempted: problemsAttempted,\n new_concepts_learnt: newConceptsLearnt,\n solved_independently: solvedIndependently,\n default_topic_image_url: defaultTopicImage,\n } = sessionReports || {};\n\n const { onEvent: trackEvent } = useUIContext();\n\n const renderReportsInfoCard = useMemo(() => {\n if (!problemsAttempted) return null;\n\n if (problemsAttempted === solvedIndependently || (!solvedWithHelp && solvedIndependently)) {\n return (\n <>\n <ReportCard title=\"Problems Attempted\" value={problemsAttempted} />\n <ReportCard title=\"Solved without help\" value={solvedIndependently} />\n <ReportCard\n title=\"Performance\"\n value={`${Math.round((solvedIndependently / problemsAttempted) * 100)}%`}\n />\n </>\n );\n }\n\n if (!solvedWithHelp && !solvedIndependently) {\n return <ReportCard title=\"Problems Attempted\" value={problemsAttempted} />;\n }\n\n if (solvedWithHelp && newConceptsLearnt) {\n return (\n <>\n <ReportCard title=\"Problems Attempted\" value={problemsAttempted} />\n <ReportCard title=\"Needed help in\" value={newConceptsLearnt} />\n <ReportCard title=\"Improvement shown in\" value={solvedWithHelp} />\n <ReportCard\n title=\"Improvement\"\n value={`${Math.round((solvedWithHelp / newConceptsLearnt) * 100)}%`}\n />\n </>\n );\n }\n\n return null;\n }, [newConceptsLearnt, problemsAttempted, solvedIndependently, solvedWithHelp]);\n\n if (!renderReportsInfoCard) return <Report404 studentName={studentName} />;\n\n return (\n <FlexView $borderColor=\"BLACK_1\">\n <Styled.ReportWrapper $flexDirection=\"row\" $height={100} $background=\"YELLOW_1\">\n {renderReportsInfoCard}\n </Styled.ReportWrapper>\n <Styled.TopicWrapper $flexDirection=\"row\" $background=\"WHITE_1\">\n {topicData &&\n topicData.length > 0 &&\n topicData.map(topic => {\n const {\n topic_name: topicName,\n topic_image: topicImage,\n summary,\n is_attempted: isAttempted,\n } = topic;\n\n if (!topicImage) {\n trackEvent('TOPIC_THUMBNAIL_NOT_AVAILABLE', topic);\n }\n\n return (\n <FlexView\n key={topicName}\n $gap={35}\n $gutter={29}\n $flex={1}\n $alignItems=\"center\"\n $opacity={isAttempted ? 1 : 0.4}\n >\n <Styled.TopicImage\n $active={!!isAttempted}\n src={topicImage || defaultTopicImage}\n borderRadius={96}\n height={96}\n width={96}\n alt=\"topic\"\n withLoader\n />\n <Separator height={12} />\n <Text $renderAs=\"ab3-black\" $align=\"center\">\n {topicName}\n </Text>\n <Separator height={2} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n {summary}\n </Text>\n </FlexView>\n );\n })}\n </Styled.TopicWrapper>\n <FlexView\n $flexDirection=\"row\"\n $background=\"YELLOW_3\"\n $flexGap={4}\n $alignItems=\"center\"\n $gap={9}\n $gutter={8}\n >\n <Image src={ILLUSTRATIONS.COMMUNITY_BULB} width={80} height={80} withLoader alt=\"bulb\" />\n <FlexView $flex={1}>\n <Text $renderAs=\"ab2-black\">\n Next Steps: <Styled.InlineText $renderAs=\"ab2\">{nextSteps}</Styled.InlineText>\n </Text>\n </FlexView>\n </FlexView>\n </FlexView>\n );\n});\n\nReportInformation.displayName = 'ReportInformation';\n\nexport default ReportInformation;\n"],"names":["ReportInformation","memo","props","sessionReports","studentName","nextSteps","topicData","solvedWithHelp","problemsAttempted","newConceptsLearnt","solvedIndependently","defaultTopicImage","trackEvent","useUIContext","renderReportsInfoCard","useMemo","jsxs","Fragment","jsx","ReportCard","FlexView","Styled.ReportWrapper","Styled.TopicWrapper","topic","topicName","topicImage","summary","isAttempted","Styled.TopicImage","Separator","Text","Image","ILLUSTRATIONS","Styled.InlineText","Report404","ReportInformation$1"],"mappings":";;;;;;;;;;;AAoBA,MAAMA,IAAiDC,EAAK,CAASC,MAAA;AAC7D,QAAA,EAAE,gBAAAC,GAAgB,aAAAC,EAAgB,IAAAF,GAClC;AAAA,IACJ,YAAYG;AAAA,IACZ,YAAYC;AAAA,IACZ,kBAAkBC;AAAA,IAClB,oBAAoBC;AAAA,IACpB,qBAAqBC;AAAA,IACrB,sBAAsBC;AAAA,IACtB,yBAAyBC;AAAA,EAAA,IACvBR,KAAkB,CAAA,GAEhB,EAAE,SAASS,EAAW,IAAIC,EAAa,GAEvCC,IAAwBC,EAAQ,MAC/BP,IAEDA,MAAsBE,KAAwB,CAACH,KAAkBG,IAG/D,gBAAAM,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAW,EAAA,OAAM,sBAAqB,OAAOX,GAAmB;AAAA,IAChE,gBAAAU,EAAAC,GAAA,EAAW,OAAM,uBAAsB,OAAOT,GAAqB;AAAA,IACpE,gBAAAQ;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,OAAO,GAAG,KAAK,MAAOT,IAAsBF,IAAqB,GAAG,CAAC;AAAA,MAAA;AAAA,IACvE;AAAA,EACF,EAAA,CAAA,IAIA,CAACD,KAAkB,CAACG,IACd,gBAAAQ,EAAAC,GAAA,EAAW,OAAM,sBAAqB,OAAOX,EAAmB,CAAA,IAGtED,KAAkBE,IAGhB,gBAAAO,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,GAAW,EAAA,OAAM,sBAAqB,OAAOX,GAAmB;AAAA,IAChE,gBAAAU,EAAAC,GAAA,EAAW,OAAM,kBAAiB,OAAOV,GAAmB;AAAA,IA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;AAAA,YACA,gBAAAN,EAACW,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,8BACrBC,GAAK,EAAA,WAAU,OAAM,QAAO,UAC1B,UACHJ,GAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAvBKF;AAAA,MAAA;AAAA,IA0BV,CAAA,GACL;AAAA,IACA,gBAAAR;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,aAAY;AAAA,QACZ,UAAU;AAAA,QACV,aAAY;AAAA,QACZ,MAAM;AAAA,QACN,SAAS;AAAA,QAET,UAAA;AAAA,UAAC,gBAAAF,EAAAa,GAAA,EAAM,KAAKC,EAAc,gBAAgB,OAAO,IAAI,QAAQ,IAAI,YAAU,IAAC,KAAI,OAAO,CAAA;AAAA,4BACtFZ,GAAS,EAAA,OAAO,GACf,UAAC,gBAAAJ,EAAAc,GAAA,EAAK,WAAU,aAAY,UAAA;AAAA,YAAA;AAAA,8BACbG,GAAA,EAAkB,WAAU,OAAO,UAAU5B,GAAA;AAAA,UAAA,EAAA,CAC5D,EACF,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA,IAnEiC,gBAAAa,EAACgB,KAAU,aAAA9B,EAA0B,CAAA;AAqE1E,CAAC;AAEDJ,EAAkB,cAAc;AAEhC,MAAAmC,IAAenC;"}
@@ -1,37 +1,14 @@
1
- import r from "styled-components";
2
- import i from "../../../ui/image/image.js";
1
+ import o from "styled-components";
3
2
  import t from "../../../ui/layout/flex-view.js";
4
- import e from "../../../ui/text/text.js";
5
- const a = r.div`
3
+ const i = o.div`
6
4
  height: 100%;
7
5
  width: 100%;
8
6
  overflow: auto;
9
- `, c = r(t)`
7
+ `, n = o(t)`
10
8
  margin: auto;
11
- `, d = r(t)(
12
- ({ theme: o }) => `
13
- border-top: 1px solid ${o.colors.BLACK_1};
14
- border-bottom: 1px solid ${o.colors.BLACK_1};
15
- `
16
- ), m = r(t)(
17
- ({ theme: o }) => `
18
- & > div:not(:last-child) {
19
- border-right: 1px solid ${o.colors.BLACK_1};
20
- }
21
- `
22
- ), x = r(e)`
23
- display: inline;
24
- `, f = r(i)(
25
- ({ $active: o }) => `
26
- ${o ? "" : "filter: grayscale(100%);"}
27
- `
28
- );
9
+ `;
29
10
  export {
30
- a as Container,
31
- c as ContentWrapper,
32
- x as InlineText,
33
- m as ReportWrapper,
34
- f as TopicImage,
35
- d as TopicWrapper
11
+ i as Container,
12
+ n as ContentWrapper
36
13
  };
37
14
  //# sourceMappingURL=session-report-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-report-styled.js","sources":["../../../../../src/features/trial-session/comps/session-report/session-report-styled.tsx"],"sourcesContent":["import type { IImageProps } from '../../../ui/image/image-types';\n\nimport styled from 'styled-components';\n\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nconst Container = styled.div`\n height: 100%;\n width: 100%;\n overflow: auto;\n`;\n\nconst ContentWrapper = styled(FlexView)`\n margin: auto;\n`;\n\nconst TopicWrapper = styled(FlexView)(\n ({ theme }) => `\n border-top: 1px solid ${theme.colors.BLACK_1};\n border-bottom: 1px solid ${theme.colors.BLACK_1};\n`,\n);\n\nconst ReportWrapper = styled(FlexView)(\n ({ theme }) => `\n & > div:not(:last-child) {\n border-right: 1px solid ${theme.colors.BLACK_1};\n }\n`,\n);\n\nconst InlineText = styled(Text)`\n display: inline;\n`;\n\ninterface ITopicImage extends IImageProps {\n $active: boolean;\n}\n\nconst TopicImage = styled(Image)<ITopicImage>(\n ({ $active }) => `\n ${$active ? '' : 'filter: grayscale(100%);'}\n`,\n);\n\nexport { TopicWrapper, Container, ContentWrapper, InlineText, ReportWrapper, TopicImage };\n"],"names":["Container","styled","ContentWrapper","FlexView","TopicWrapper","theme","ReportWrapper","InlineText","Text","TopicImage","Image","$active"],"mappings":";;;;AAQA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMnBC,IAAiBD,EAAOE,CAAQ;AAAA;AAAA,GAIhCC,IAAeH,EAAOE,CAAQ;AAAA,EAClC,CAAC,EAAE,OAAAE,EAAA,MAAY;AAAA,2BACUA,EAAM,OAAO,OAAO;AAAA,8BACjBA,EAAM,OAAO,OAAO;AAAA;AAElD,GAEMC,IAAgBL,EAAOE,CAAQ;AAAA,EACnC,CAAC,EAAE,OAAAE,EAAA,MAAY;AAAA;AAAA,8BAEaA,EAAM,OAAO,OAAO;AAAA;AAAA;AAGlD,GAEME,IAAaN,EAAOO,CAAI;AAAA;AAAA,GAQxBC,IAAaR,EAAOS,CAAK;AAAA,EAC7B,CAAC,EAAE,SAAAC,EAAA,MAAc;AAAA,IACfA,IAAU,KAAK,0BAA0B;AAAA;AAE7C;"}
1
+ {"version":3,"file":"session-report-styled.js","sources":["../../../../../src/features/trial-session/comps/session-report/session-report-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled.div`\n height: 100%;\n width: 100%;\n overflow: auto;\n`;\n\nconst ContentWrapper = styled(FlexView)`\n margin: auto;\n`;\n\nexport { Container, ContentWrapper };\n"],"names":["Container","styled","ContentWrapper","FlexView"],"mappings":";;AAIA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMnBC,IAAiBD,EAAOE,CAAQ;AAAA;AAAA;"}
@@ -1,182 +1,52 @@
1
- import { jsxs as t, Fragment as E, jsx as e } from "react/jsx-runtime";
2
- import { memo as W, useMemo as w, useCallback as B, useEffect as D } from "react";
3
- import { ILLUSTRATIONS as x } from "../../../../assets/illustrations/illustrations.js";
4
- import { COURSE_STREAMS as F, PREFERENCE_CATEGORY as H } from "../../../milestone/constants.js";
5
- import { getPreferencesFromConfig as U } from "../../../milestone/create/milestone-create-helpers.js";
6
- import { useUIContext as Y } from "../../../ui/context/context.js";
7
- import j from "../../../ui/error/error.js";
8
- import R from "../../../ui/image/image.js";
9
- import b from "../../../ui/layout/flex-view.js";
10
- import G from "../../../ui/loader/app-loader/app-loader.js";
11
- import A from "../../../ui/separator/separator.js";
12
- import h from "../../../ui/text/text.js";
13
- import { useGetSessionReports as K } from "../../api/trial-home.js";
14
- import { useTrialSessionContext as V } from "../../context/use-trial-session-context.js";
15
- import { getFormattedStudentPersonalizedPreference as q } from "../../helper.js";
16
- import z from "../slide-header/index.js";
17
- import { studentLevels as J } from "../student-feedback/student-feedback-constants.js";
18
- import o from "./report-card.js";
19
- import { Container as Q, ContentWrapper as S, ReportWrapper as X, TopicWrapper as Z, TopicImage as ee, InlineText as te } from "./session-report-styled.js";
20
- const Ce = W(() => {
21
- const { onEvent: P } = Y(), { formData: O, milestoneConfig: d } = V(), { name: p, grade: C, attemptId: u = "shg", personalizedLevel: a = [] } = O || {}, {
22
- data: I,
23
- get: L,
24
- isProcessing: k,
25
- isProcessingFailed: y
26
- } = K(), f = w(() => {
27
- var r, m;
28
- const i = ((m = (r = U(d, {
29
- grade: C ?? "",
30
- courseStream: F.MATH,
31
- preferenceCategory: H.LEVEL
32
- })) == null ? void 0 : r.find((_) => _.id === (a == null ? void 0 : a[0]))) == null ? void 0 : m.label) ?? "";
33
- return J[i.toLowerCase()];
34
- }, [C, d, a]), {
35
- next_steps: M,
36
- topic_data: g,
37
- solved_with_help: l,
38
- problems_attempted: n,
39
- new_concepts_learnt: c,
40
- solved_independently: s,
41
- default_topic_image_url: N
42
- } = I || {}, $ = B(() => {
1
+ import { jsx as t, jsxs as C } from "react/jsx-runtime";
2
+ import { memo as E, useMemo as R, useCallback as S, useEffect as P } from "react";
3
+ import { COURSE_STREAMS as T, PREFERENCE_CATEGORY as x } from "../../../milestone/constants.js";
4
+ import { getPreferencesFromConfig as A } from "../../../milestone/create/milestone-create-helpers.js";
5
+ import L from "../../../ui/error/error.js";
6
+ import _ from "../../../ui/loader/app-loader/app-loader.js";
7
+ import F from "../../../ui/separator/separator.js";
8
+ import { useGetSessionReports as b } from "../../api/trial-home.js";
9
+ import { useTrialSessionContext as v } from "../../context/use-trial-session-context.js";
10
+ import { getFormattedStudentPersonalizedPreference as y } from "../../helper.js";
11
+ import I from "../slide-header/index.js";
12
+ import { studentLevels as M } from "../student-feedback/student-feedback-constants.js";
13
+ import N from "./report-information/report-information.js";
14
+ import { Container as j, ContentWrapper as w } from "./session-report-styled.js";
15
+ const D = E(() => {
16
+ const { formData: g, milestoneConfig: o } = v(), { name: s = "", grade: f, attemptId: i = "shg", personalizedLevel: e = [] } = g || {}, {
17
+ data: p,
18
+ get: d,
19
+ isProcessing: l,
20
+ isProcessingFailed: u
21
+ } = b(), m = R(() => {
22
+ var r, c;
23
+ const n = ((c = (r = A(o, {
24
+ grade: f ?? "",
25
+ courseStream: T.MATH,
26
+ preferenceCategory: x.LEVEL
27
+ })) == null ? void 0 : r.find((h) => h.id === (e == null ? void 0 : e[0]))) == null ? void 0 : c.label) ?? "";
28
+ return M[n.toLowerCase()];
29
+ }, [f, o, e]), a = S(() => {
43
30
  var r;
44
- const i = q(
45
- d,
46
- a
31
+ const n = y(
32
+ o,
33
+ e
47
34
  );
48
- u && p && i.length > 0 && L(u, {
49
- student_level: ((r = i[0]) == null ? void 0 : r.preference_name) ?? "",
50
- student_name: p
35
+ i && s && n.length > 0 && d(i, {
36
+ student_level: ((r = n[0]) == null ? void 0 : r.preference_name) ?? "",
37
+ student_name: s
51
38
  });
52
- }, [u, L, d, p, a]);
53
- D(() => {
54
- $();
55
- }, [$]);
56
- const v = w(() => n ? n === s || !l && s ? /* @__PURE__ */ t(E, { children: [
57
- /* @__PURE__ */ e(o, { title: "Problems Attempted", value: n }),
58
- /* @__PURE__ */ e(o, { title: "Solved without help", value: s }),
59
- /* @__PURE__ */ e(
60
- o,
61
- {
62
- title: "Performance",
63
- value: `${Math.round(s / n * 100)}%`
64
- }
65
- )
66
- ] }) : !l && !s ? /* @__PURE__ */ e(o, { title: "Problems Attempted", value: n }) : l && c ? /* @__PURE__ */ t(E, { children: [
67
- /* @__PURE__ */ e(o, { title: "Problems Attempted", value: n }),
68
- /* @__PURE__ */ e(o, { title: "Needed help in", value: c }),
69
- /* @__PURE__ */ e(o, { title: "Improvement shown in", value: l }),
70
- /* @__PURE__ */ e(
71
- o,
72
- {
73
- title: "Improvement",
74
- value: `${Math.round(l / c * 100)}%`
75
- }
76
- )
77
- ] }) : null : null, [c, n, s, l]);
78
- return y ? /* @__PURE__ */ e(j, { height: "70vh", onTryAgain: $ }) : k || !I ? /* @__PURE__ */ e(G, { height: "100vh" }) : /* @__PURE__ */ t(Q, { children: [
79
- /* @__PURE__ */ e(A, { height: 60 }),
80
- /* @__PURE__ */ e(z, { textToInsert: (f == null ? void 0 : f.title) ?? "" }),
81
- v ? /* @__PURE__ */ t(S, { $width: 750, $borderColor: "BLACK_1", children: [
82
- /* @__PURE__ */ e(X, { $flexDirection: "row", $height: 100, $background: "YELLOW_1", children: v }),
83
- /* @__PURE__ */ e(Z, { $flexDirection: "row", $background: "WHITE_1", children: g && g.length > 0 && g.map((i) => {
84
- const {
85
- topic_name: r,
86
- topic_image: m,
87
- summary: _,
88
- is_attempted: T
89
- } = i;
90
- return m || P("TOPIC_THUMBNAIL_NOT_AVAILABLE", i), /* @__PURE__ */ t(
91
- b,
92
- {
93
- $gap: 35,
94
- $gutter: 29,
95
- $flex: 1,
96
- $alignItems: "center",
97
- $opacity: T ? 1 : 0.4,
98
- children: [
99
- /* @__PURE__ */ e(
100
- ee,
101
- {
102
- $active: !!T,
103
- src: m || N,
104
- borderRadius: 96,
105
- height: 96,
106
- width: 96,
107
- alt: "topic",
108
- withLoader: !0
109
- }
110
- ),
111
- /* @__PURE__ */ e(A, { height: 12 }),
112
- /* @__PURE__ */ e(h, { $renderAs: "ab3-black", $align: "center", children: r }),
113
- /* @__PURE__ */ e(A, { height: 2 }),
114
- /* @__PURE__ */ e(h, { $renderAs: "ub3", $align: "center", children: _ })
115
- ]
116
- },
117
- r
118
- );
119
- }) }),
120
- /* @__PURE__ */ t(
121
- b,
122
- {
123
- $flexDirection: "row",
124
- $background: "YELLOW_3",
125
- $flexGap: 4,
126
- $alignItems: "center",
127
- $gap: 9,
128
- $gutter: 8,
129
- children: [
130
- /* @__PURE__ */ e(
131
- R,
132
- {
133
- src: x.COMMUNITY_BULB,
134
- width: 80,
135
- height: 80,
136
- withLoader: !0,
137
- alt: "bulb"
138
- }
139
- ),
140
- /* @__PURE__ */ e(b, { $flex: 1, children: /* @__PURE__ */ t(h, { $renderAs: "ab2-black", children: [
141
- "Next Steps: ",
142
- /* @__PURE__ */ e(te, { $renderAs: "ab2", children: M })
143
- ] }) })
144
- ]
145
- }
146
- )
147
- ] }) : /* @__PURE__ */ t(
148
- S,
149
- {
150
- $width: 750,
151
- $height: 400,
152
- $borderColor: "BLACK_1",
153
- $justifyContent: "center",
154
- $alignItems: "center",
155
- $background: "WHITE_1",
156
- children: [
157
- /* @__PURE__ */ e(
158
- R,
159
- {
160
- src: x.REPORT_404,
161
- height: 152,
162
- width: 152,
163
- withLoader: !0,
164
- alt: "report-404"
165
- }
166
- ),
167
- /* @__PURE__ */ t(h, { $renderAs: "ab1-bold", $color: "BLACK_T_60", $align: "center", children: [
168
- "Oops! ",
169
- p,
170
- " didn’t attempt",
171
- /* @__PURE__ */ e("br", {}),
172
- "any problems."
173
- ] })
174
- ]
175
- }
176
- )
39
+ }, [i, d, o, s, e]);
40
+ return P(() => {
41
+ a();
42
+ }, [a]), u ? /* @__PURE__ */ t(L, { height: "70vh", onTryAgain: a }) : l || !p ? /* @__PURE__ */ t(_, { height: "100vh" }) : /* @__PURE__ */ C(j, { children: [
43
+ /* @__PURE__ */ t(F, { height: 60 }),
44
+ /* @__PURE__ */ t(I, { textToInsert: (m == null ? void 0 : m.title) ?? "" }),
45
+ /* @__PURE__ */ t(w, { $width: 750, children: /* @__PURE__ */ t(N, { sessionReports: p, studentName: s }) })
177
46
  ] });
178
47
  });
48
+ D.displayName = "SessionReport";
179
49
  export {
180
- Ce as default
50
+ D as default
181
51
  };
182
52
  //# sourceMappingURL=session-report.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"session-report.js","sources":["../../../../../src/features/trial-session/comps/session-report/session-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { COURSE_STREAMS, PREFERENCE_CATEGORY } from '../../../milestone/constants';\nimport { getPreferencesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport { useUIContext } from '../../../ui/context/context';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetSessionReports } from '../../api/trial-home';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { studentLevels } from '../student-feedback/student-feedback-constants';\nimport ReportCard from './report-card';\nimport * as Styled from './session-report-styled';\n\nconst SessionReport = memo(() => {\n const { onEvent: trackEvent } = useUIContext();\n const { formData, milestoneConfig } = useTrialSessionContext();\n const { name, grade, attemptId = 'shg', personalizedLevel = [] } = formData || {};\n\n const {\n data: sessionReports,\n get: getSessionReports,\n isProcessing,\n isProcessingFailed,\n } = useGetSessionReports();\n\n const selectedSessionLevel = useMemo(() => {\n const selectedLabel =\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.LEVEL,\n })?.find(sessionLevel => sessionLevel.id === personalizedLevel?.[0])?.label ?? '';\n\n return studentLevels[selectedLabel.toLowerCase()];\n }, [grade, milestoneConfig, personalizedLevel]);\n\n const {\n next_steps: nextSteps,\n topic_data: topicData,\n solved_with_help: solvedWithHelp,\n problems_attempted: problemsAttempted,\n new_concepts_learnt: newConceptsLearnt,\n solved_independently: solvedIndependently,\n default_topic_image_url: defaultTopicImage,\n } = sessionReports || {};\n\n const fetchData = useCallback(() => {\n const studentLevel = getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedLevel,\n );\n\n if (attemptId && name && studentLevel.length > 0) {\n getSessionReports(attemptId, {\n student_level: studentLevel[0]?.preference_name ?? '',\n student_name: name,\n });\n }\n }, [attemptId, getSessionReports, milestoneConfig, name, personalizedLevel]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n const renderReportsInfoCard = useMemo(() => {\n if (!problemsAttempted) return null;\n\n if (problemsAttempted === solvedIndependently || (!solvedWithHelp && solvedIndependently)) {\n return (\n <>\n <ReportCard title=\"Problems Attempted\" value={problemsAttempted} />\n <ReportCard title=\"Solved without help\" value={solvedIndependently} />\n <ReportCard\n title=\"Performance\"\n value={`${Math.round((solvedIndependently / problemsAttempted) * 100)}%`}\n />\n </>\n );\n }\n\n if (!solvedWithHelp && !solvedIndependently) {\n return <ReportCard title=\"Problems Attempted\" value={problemsAttempted} />;\n }\n\n if (solvedWithHelp && newConceptsLearnt) {\n return (\n <>\n <ReportCard title=\"Problems Attempted\" value={problemsAttempted} />\n <ReportCard title=\"Needed help in\" value={newConceptsLearnt} />\n <ReportCard title=\"Improvement shown in\" value={solvedWithHelp} />\n <ReportCard\n title=\"Improvement\"\n value={`${Math.round((solvedWithHelp / newConceptsLearnt) * 100)}%`}\n />\n </>\n );\n }\n\n return null;\n }, [newConceptsLearnt, problemsAttempted, solvedIndependently, solvedWithHelp]);\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !sessionReports) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader textToInsert={selectedSessionLevel?.title ?? ''} />\n {renderReportsInfoCard ? (\n <Styled.ContentWrapper $width={750} $borderColor=\"BLACK_1\">\n <Styled.ReportWrapper $flexDirection=\"row\" $height={100} $background=\"YELLOW_1\">\n {renderReportsInfoCard}\n </Styled.ReportWrapper>\n <Styled.TopicWrapper $flexDirection=\"row\" $background=\"WHITE_1\">\n {topicData &&\n topicData.length > 0 &&\n topicData.map(topic => {\n const {\n topic_name: topicName,\n topic_image: topicImage,\n summary,\n is_attempted: isAttempted,\n } = topic;\n\n if (!topicImage) {\n trackEvent('TOPIC_THUMBNAIL_NOT_AVAILABLE', topic);\n }\n\n return (\n <FlexView\n key={topicName}\n $gap={35}\n $gutter={29}\n $flex={1}\n $alignItems=\"center\"\n $opacity={isAttempted ? 1 : 0.4}\n >\n <Styled.TopicImage\n $active={!!isAttempted}\n src={topicImage || defaultTopicImage}\n borderRadius={96}\n height={96}\n width={96}\n alt=\"topic\"\n withLoader\n />\n <Separator height={12} />\n <Text $renderAs=\"ab3-black\" $align=\"center\">\n {topicName}\n </Text>\n <Separator height={2} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n {summary}\n </Text>\n </FlexView>\n );\n })}\n </Styled.TopicWrapper>\n <FlexView\n $flexDirection=\"row\"\n $background=\"YELLOW_3\"\n $flexGap={4}\n $alignItems=\"center\"\n $gap={9}\n $gutter={8}\n >\n <Image\n src={ILLUSTRATIONS.COMMUNITY_BULB}\n width={80}\n height={80}\n withLoader\n alt=\"bulb\"\n />\n <FlexView $flex={1}>\n <Text $renderAs=\"ab2-black\">\n Next Steps: <Styled.InlineText $renderAs=\"ab2\">{nextSteps}</Styled.InlineText>\n </Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper\n $width={750}\n $height={400}\n $borderColor=\"BLACK_1\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n >\n <Image\n src={ILLUSTRATIONS.REPORT_404}\n height={152}\n width={152}\n withLoader\n alt=\"report-404\"\n />\n <Text $renderAs=\"ab1-bold\" $color=\"BLACK_T_60\" $align=\"center\">\n Oops! {name} didn’t attempt\n <br />\n any problems.\n </Text>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default SessionReport;\n"],"names":["SessionReport","memo","trackEvent","useUIContext","formData","milestoneConfig","useTrialSessionContext","name","grade","attemptId","personalizedLevel","sessionReports","getSessionReports","isProcessing","isProcessingFailed","useGetSessionReports","selectedSessionLevel","useMemo","selectedLabel","_b","_a","getPreferencesFromConfig","COURSE_STREAMS","PREFERENCE_CATEGORY","sessionLevel","studentLevels","nextSteps","topicData","solvedWithHelp","problemsAttempted","newConceptsLearnt","solvedIndependently","defaultTopicImage","fetchData","useCallback","studentLevel","getFormattedStudentPersonalizedPreference","useEffect","renderReportsInfoCard","jsxs","Fragment","jsx","ReportCard","Error","AppLoader","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","Styled.ReportWrapper","Styled.TopicWrapper","topic","topicName","topicImage","summary","isAttempted","FlexView","Styled.TopicImage","Text","Image","ILLUSTRATIONS","Styled.InlineText"],"mappings":";;;;;;;;;;;;;;;;;;;AAoBM,MAAAA,KAAgBC,EAAK,MAAM;AAC/B,QAAM,EAAE,SAASC,EAAW,IAAIC,EAAa,GACvC,EAAE,UAAAC,GAAU,iBAAAC,EAAgB,IAAIC,EAAuB,GACvD,EAAE,MAAAC,GAAM,OAAAC,GAAO,WAAAC,IAAY,OAAO,mBAAAC,IAAoB,CAAC,EAAA,IAAMN,KAAY,IAEzE;AAAA,IACJ,MAAMO;AAAA,IACN,KAAKC;AAAA,IACL,cAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAuBC,EAAQ,MAAM;;AACnC,UAAAC,MACJC,KAAAC,IAAAC,EAAyBhB,GAAiB;AAAA,MACxC,OAAOG,KAAS;AAAA,MAChB,cAAcc,EAAe;AAAA,MAC7B,oBAAoBC,EAAoB;AAAA,IACzC,CAAA,MAJD,gBAAAH,EAII,KAAK,CAAgBI,MAAAA,EAAa,QAAOd,KAAA,gBAAAA,EAAoB,SAJjE,gBAAAS,EAIsE,UAAS;AAE1E,WAAAM,E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AA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,EAAA,CACF,IAEA,gBAAAa;AAAA,MAACS;AAAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,SAAS;AAAA,QACT,cAAa;AAAA,QACb,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,aAAY;AAAA,QAEZ,UAAA;AAAA,UAAA,gBAAAP;AAAA,YAACkB;AAAA,YAAA;AAAA,cACC,KAAKC,EAAc;AAAA,cACnB,QAAQ;AAAA,cACR,OAAO;AAAA,cACP,YAAU;AAAA,cACV,KAAI;AAAA,YAAA;AAAA,UACN;AAAA,4BACCF,GAAK,EAAA,WAAU,YAAW,QAAO,cAAa,QAAO,UAAS,UAAA;AAAA,YAAA;AAAA,YACtDnD;AAAA,YAAK;AAAA,8BACX,MAAG,EAAA;AAAA,YAAE;AAAA,UAAA,GAER;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"session-report.js","sources":["../../../../../src/features/trial-session/comps/session-report/session-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { COURSE_STREAMS, PREFERENCE_CATEGORY } from '../../../milestone/constants';\nimport { getPreferencesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport { useGetSessionReports } from '../../api/trial-home';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { studentLevels } from '../student-feedback/student-feedback-constants';\nimport ReportInformation from './report-information/report-information';\nimport * as Styled from './session-report-styled';\n\nconst SessionReport = memo(() => {\n const { formData, milestoneConfig } = useTrialSessionContext();\n const { name = '', grade, attemptId = 'shg', personalizedLevel = [] } = formData || {};\n\n const {\n data: sessionReports,\n get: getSessionReports,\n isProcessing,\n isProcessingFailed,\n } = useGetSessionReports();\n\n const selectedSessionLevel = useMemo(() => {\n const selectedLabel =\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.LEVEL,\n })?.find(sessionLevel => sessionLevel.id === personalizedLevel?.[0])?.label ?? '';\n\n return studentLevels[selectedLabel.toLowerCase()];\n }, [grade, milestoneConfig, personalizedLevel]);\n\n const fetchData = useCallback(() => {\n const studentLevel = getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedLevel,\n );\n\n if (attemptId && name && studentLevel.length > 0) {\n getSessionReports(attemptId, {\n student_level: studentLevel[0]?.preference_name ?? '',\n student_name: name,\n });\n }\n }, [attemptId, getSessionReports, milestoneConfig, name, personalizedLevel]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !sessionReports) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader textToInsert={selectedSessionLevel?.title ?? ''} />\n <Styled.ContentWrapper $width={750}>\n <ReportInformation sessionReports={sessionReports} studentName={name} />\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n});\n\nSessionReport.displayName = 'SessionReport';\n\nexport default SessionReport;\n"],"names":["SessionReport","memo","formData","milestoneConfig","useTrialSessionContext","name","grade","attemptId","personalizedLevel","sessionReports","getSessionReports","isProcessing","isProcessingFailed","useGetSessionReports","selectedSessionLevel","useMemo","selectedLabel","_b","_a","getPreferencesFromConfig","COURSE_STREAMS","PREFERENCE_CATEGORY","sessionLevel","studentLevels","fetchData","useCallback","studentLevel","getFormattedStudentPersonalizedPreference","useEffect","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","ReportInformation"],"mappings":";;;;;;;;;;;;;;AAeM,MA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,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAJ,EAAAK,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,IACtB,gBAAAL,EAAAM,GAAA,EAAY,eAAcrB,KAAA,gBAAAA,EAAsB,UAAS,IAAI;AAAA,IAC9D,gBAAAe,EAACO,GAAA,EAAsB,QAAQ,KAC7B,UAAA,gBAAAP,EAACQ,GAAkB,EAAA,gBAAA5B,GAAgC,aAAaJ,EAAA,CAAM,EACxE,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;AAEDL,EAAc,cAAc;"}
@@ -1,14 +1,29 @@
1
1
  import o from "styled-components";
2
- import t from "../../../ui/layout/flex-view.js";
3
- const i = o.div`
2
+ import r from "../../../ui/layout/flex-view.js";
3
+ const a = o.div`
4
4
  width: 100%;
5
5
  height: 100%;
6
6
  overflow: auto;
7
- `, n = o(t)`
7
+ `, e = o.div(
8
+ ({ theme: t }) => `
9
+ position: relative;
10
+ width: ${t.layout.gutter * 18.75}px;
11
+ height: ${t.layout.gutter * 25}px;
12
+ border: 1px solid ${t.colors.BLACK_1};
13
+ .image {
14
+ position: absolute;
15
+ top: -${t.layout.gutter * 0.15625}px;
16
+ left: -${t.layout.gutter * 0.125}px;
17
+ right: 0;
18
+ bottom: 0;
19
+ }
20
+ `
21
+ ), l = o(r)`
8
22
  margin: auto;
9
23
  `;
10
24
  export {
11
- i as Container,
12
- n as ContentWrapper
25
+ a as Container,
26
+ l as ContentWrapper,
27
+ e as ImageWrapper
13
28
  };
14
29
  //# sourceMappingURL=student-personalization-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"student-personalization-styled.js","sources":["../../../../../src/features/trial-session/comps/student-personalization/student-personalization-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n overflow: auto;\n`;\n\nconst ContentWrapper = styled(FlexView)`\n margin: auto;\n`;\n\nexport { Container, ContentWrapper };\n"],"names":["Container","styled","ContentWrapper","FlexView"],"mappings":";;AAIA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMnBC,IAAiBD,EAAOE,CAAQ;AAAA;AAAA;"}
1
+ {"version":3,"file":"student-personalization-styled.js","sources":["../../../../../src/features/trial-session/comps/student-personalization/student-personalization-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst Container = styled.div`\n width: 100%;\n height: 100%;\n overflow: auto;\n`;\n\nconst ImageWrapper = styled.div(\n ({ theme }) => `\n position: relative;\n width: ${theme.layout.gutter * 18.75}px;\n height: ${theme.layout.gutter * 25}px;\n border: 1px solid ${theme.colors.BLACK_1};\n .image {\n position: absolute;\n top: -${theme.layout.gutter * 0.15625}px;\n left: -${theme.layout.gutter * 0.125}px;\n right: 0;\n bottom: 0;\n }\n`,\n);\n\nconst ContentWrapper = styled(FlexView)`\n margin: auto;\n`;\n\nexport { Container, ContentWrapper, ImageWrapper };\n"],"names":["Container","styled","ImageWrapper","theme","ContentWrapper","FlexView"],"mappings":";;AAIA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA;AAAA,GAMnBC,IAAeD,EAAO;AAAA,EAC1B,CAAC,EAAE,OAAAE,EAAA,MAAY;AAAA;AAAA,WAENA,EAAM,OAAO,SAAS,KAAK;AAAA,YAC1BA,EAAM,OAAO,SAAS,EAAE;AAAA,sBACdA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA,YAG9BA,EAAM,OAAO,SAAS,OAAO;AAAA,aAC5BA,EAAM,OAAO,SAAS,KAAK;AAAA;AAAA;AAAA;AAAA;AAKxC,GAEMC,IAAiBH,EAAOI,CAAQ;AAAA;AAAA;"}