@cuemath/leap 3.3.31 → 3.3.32-j2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/auth/pla-signup/pla-analytics-events.js +7 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +8 -8
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +13 -7
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/student-username/add/add-student-username-constants.js +6 -0
- package/dist/features/student-username/add/add-student-username-constants.js.map +1 -0
- package/dist/features/student-username/add/add-student-username-helpers.js +6 -0
- package/dist/features/student-username/add/add-student-username-helpers.js.map +1 -0
- package/dist/features/student-username/add/add-student-username-styled.js +10 -0
- package/dist/features/student-username/add/add-student-username-styled.js.map +1 -0
- package/dist/features/student-username/add/add-student-username.js +78 -0
- package/dist/features/student-username/add/add-student-username.js.map +1 -0
- package/dist/features/student-username/add/api/update-username.js +9 -0
- package/dist/features/student-username/add/api/update-username.js.map +1 -0
- package/dist/features/student-username/add/api/username-availability.js +10 -0
- package/dist/features/student-username/add/api/username-availability.js.map +1 -0
- package/dist/features/student-username/add/hooks/use-check-username-availability.js +41 -0
- package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +1 -0
- package/dist/features/trial-session/api/teacher-availability.js +9 -0
- package/dist/features/trial-session/api/teacher-availability.js.map +1 -0
- package/dist/features/trial-session/comps/class-preference/class-preference.js +61 -49
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +28 -0
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +1 -0
- package/dist/features/trial-session/comps/navigation-bar/index.js +25 -25
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +55 -53
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +44 -43
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +5 -0
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +96 -51
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +70 -63
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +40 -39
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/helper.js +69 -53
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +49 -0
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -0
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +150 -130
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +103 -112
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +13 -13
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -1
- package/dist/features/utils/utils.js +1 -1
- package/dist/features/utils/utils.js.map +1 -1
- package/dist/index.d.ts +20 -4
- package/dist/index.js +32 -30
- package/dist/index.js.map +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/package.json +3 -2
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
|
@@ -1,38 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ILLUSTRATIONS as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
1
|
+
import { jsxs as r, jsx as e, Fragment as H } from "react/jsx-runtime";
|
|
2
|
+
import { memo as P, useMemo as E, useCallback as v, useEffect as D } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as _ } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { LOTTIE as W } from "../../../../assets/lottie/lottie.js";
|
|
5
|
+
import { COURSE_STREAMS as C, PREFERENCE_CATEGORY as $ } from "../../../milestone/constants.js";
|
|
6
|
+
import { getPreferencesFromConfig as b } from "../../../milestone/create/milestone-create-helpers.js";
|
|
7
|
+
import c from "../../../ui/image/image.js";
|
|
8
|
+
import X from "../../../ui/layout/flex-view.js";
|
|
9
|
+
import K from "../../../ui/lottie-animation/lottie-animation.js";
|
|
10
|
+
import y from "../../../ui/separator/separator.js";
|
|
11
|
+
import d from "../../../ui/text/text.js";
|
|
12
|
+
import { useTrialSessionContext as z } from "../../context/use-trial-session-context.js";
|
|
13
|
+
import { TrialPageId as G } from "../../trial-session-constants.js";
|
|
14
|
+
import M from "../slide-header/index.js";
|
|
15
|
+
import { studentLevels as j, PREFERENCE_CODE_MAP as U } from "./student-feedback-constants.js";
|
|
16
|
+
import { Container as V, FeedbackWrapper as q, BalloonWrapper as Y, Feedback as J, InlineText as Q } from "./student-feedback-styled.js";
|
|
17
|
+
const he = P(() => {
|
|
18
|
+
const { slideConfig: A, formData: S, milestoneConfig: a, updateSlideConfig: m, updateButtonState: p } = z(), { id: I } = A || {}, { grade: s, personalizedLevel: f = [], personalizedPosition: g = [] } = S || {}, t = I === G.STUDENT_LEVEL, h = t ? g.length > 0 : f.length > 0, k = E(
|
|
19
|
+
() => b(a, {
|
|
20
|
+
grade: s ?? "",
|
|
21
|
+
courseStream: C.MATH,
|
|
22
|
+
preferenceCategory: $.LEVEL
|
|
20
23
|
}),
|
|
21
|
-
[
|
|
22
|
-
),
|
|
24
|
+
[s, a]
|
|
25
|
+
), x = E(
|
|
26
|
+
() => b(a, {
|
|
27
|
+
grade: s ?? "",
|
|
28
|
+
courseStream: C.MATH,
|
|
29
|
+
preferenceCategory: $.POSITION
|
|
30
|
+
}),
|
|
31
|
+
[s, a]
|
|
32
|
+
), l = t ? x : k, N = v(
|
|
23
33
|
(i) => {
|
|
24
|
-
|
|
34
|
+
const n = t ? {
|
|
35
|
+
personalizedPosition: [i],
|
|
36
|
+
personalizedLevel: [U[i]]
|
|
37
|
+
} : { personalizedLevel: [i] };
|
|
38
|
+
m(n);
|
|
25
39
|
},
|
|
26
|
-
[
|
|
40
|
+
[t, m]
|
|
27
41
|
);
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */
|
|
35
|
-
|
|
42
|
+
return D(() => {
|
|
43
|
+
p("right", { isDisabled: !h, isLoading: !1 });
|
|
44
|
+
}, [h, p]), /* @__PURE__ */ r(V, { children: [
|
|
45
|
+
/* @__PURE__ */ e(y, { height: 60 }),
|
|
46
|
+
/* @__PURE__ */ e(M, {}),
|
|
47
|
+
/* @__PURE__ */ r(q, { $flexGapX: 1, $gapX: 2.25, $gutterX: 3.125, children: [
|
|
48
|
+
/* @__PURE__ */ r(
|
|
49
|
+
Y,
|
|
36
50
|
{
|
|
37
51
|
$flexDirection: "row",
|
|
38
52
|
$justifyContent: "space-between",
|
|
@@ -40,20 +54,20 @@ const J = E(() => {
|
|
|
40
54
|
$gutterX: 0.75,
|
|
41
55
|
children: [
|
|
42
56
|
/* @__PURE__ */ e(
|
|
43
|
-
|
|
57
|
+
c,
|
|
44
58
|
{
|
|
45
59
|
withLoader: !0,
|
|
46
|
-
src:
|
|
60
|
+
src: _.GREEN_BALLOON,
|
|
47
61
|
width: 28,
|
|
48
62
|
height: 34,
|
|
49
63
|
alt: "balloon"
|
|
50
64
|
}
|
|
51
65
|
),
|
|
52
66
|
/* @__PURE__ */ e(
|
|
53
|
-
|
|
67
|
+
c,
|
|
54
68
|
{
|
|
55
69
|
withLoader: !0,
|
|
56
|
-
src:
|
|
70
|
+
src: _.GREEN_BALLOON,
|
|
57
71
|
width: 28,
|
|
58
72
|
height: 34,
|
|
59
73
|
alt: "balloon"
|
|
@@ -62,39 +76,70 @@ const J = E(() => {
|
|
|
62
76
|
]
|
|
63
77
|
}
|
|
64
78
|
),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
79
|
+
l && l.length > 0 && l.map((i) => {
|
|
80
|
+
var u;
|
|
81
|
+
const { id: n, label: T, lottie: L, description: w } = i, { title: O, description: B, icon: R } = j[T.toLowerCase()] || {}, o = (u = t ? g : f) == null ? void 0 : u.includes(n), F = {
|
|
82
|
+
loop: !1,
|
|
83
|
+
autoplay: o
|
|
84
|
+
};
|
|
85
|
+
return /* @__PURE__ */ r(
|
|
86
|
+
J,
|
|
69
87
|
{
|
|
70
88
|
$flexDirection: "row",
|
|
71
89
|
$alignItems: "center",
|
|
72
90
|
$justifyContent: "flex-start",
|
|
73
91
|
$flexGapX: 1.25,
|
|
74
|
-
onClick: () =>
|
|
92
|
+
onClick: () => N(n),
|
|
75
93
|
$gutterX: 0.75,
|
|
76
94
|
$gapX: 1,
|
|
77
|
-
$background:
|
|
95
|
+
$background: o ? "BLACK_T_87" : "WHITE_1",
|
|
78
96
|
$borderColor: "BLACK_T_87",
|
|
79
97
|
children: [
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
|
|
82
|
-
|
|
98
|
+
L ? /* @__PURE__ */ e(
|
|
99
|
+
K,
|
|
100
|
+
{
|
|
101
|
+
src: W[L],
|
|
102
|
+
height: 64,
|
|
103
|
+
width: 64,
|
|
104
|
+
settings: F
|
|
105
|
+
}
|
|
106
|
+
) : /* @__PURE__ */ e(c, { withLoader: !0, src: R, height: 64, width: 64, alt: "icon" }),
|
|
107
|
+
/* @__PURE__ */ e(X, { $flex: 1, children: t ? /* @__PURE__ */ r(H, { children: [
|
|
108
|
+
/* @__PURE__ */ e(
|
|
109
|
+
d,
|
|
110
|
+
{
|
|
111
|
+
className: "feedback-title",
|
|
112
|
+
$renderAs: "ac3-black",
|
|
113
|
+
$color: o ? "WHITE_T_87" : "BLACK_T_87",
|
|
114
|
+
children: T
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ e(
|
|
118
|
+
d,
|
|
119
|
+
{
|
|
120
|
+
className: "feedback-desc",
|
|
121
|
+
$renderAs: "ab2",
|
|
122
|
+
$color: o ? "WHITE_T_87" : "BLACK_T_87",
|
|
123
|
+
children: w
|
|
124
|
+
}
|
|
125
|
+
)
|
|
126
|
+
] }) : /* @__PURE__ */ r(
|
|
127
|
+
d,
|
|
83
128
|
{
|
|
84
129
|
className: "feedback-title",
|
|
85
130
|
$renderAs: "ac3-black",
|
|
86
|
-
$color:
|
|
131
|
+
$color: o ? "WHITE_T_87" : "BLACK_T_87",
|
|
87
132
|
children: [
|
|
88
|
-
|
|
133
|
+
O,
|
|
89
134
|
":",
|
|
90
135
|
" ",
|
|
91
136
|
/* @__PURE__ */ e(
|
|
92
|
-
|
|
137
|
+
Q,
|
|
93
138
|
{
|
|
94
139
|
className: "feedback-desc",
|
|
95
140
|
$renderAs: "ab2",
|
|
96
|
-
$color:
|
|
97
|
-
children:
|
|
141
|
+
$color: o ? "WHITE_T_60" : "BLACK_T_60",
|
|
142
|
+
children: B
|
|
98
143
|
}
|
|
99
144
|
)
|
|
100
145
|
]
|
|
@@ -102,13 +147,13 @@ const J = E(() => {
|
|
|
102
147
|
) })
|
|
103
148
|
]
|
|
104
149
|
},
|
|
105
|
-
|
|
150
|
+
n
|
|
106
151
|
);
|
|
107
152
|
})
|
|
108
153
|
] })
|
|
109
154
|
] });
|
|
110
155
|
});
|
|
111
156
|
export {
|
|
112
|
-
|
|
157
|
+
he as default
|
|
113
158
|
};
|
|
114
159
|
//# sourceMappingURL=student-feedback.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-feedback.js","sources":["../../../../../src/features/trial-session/comps/student-feedback/student-feedback.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 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 { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport { studentLevels } from './student-feedback-constants';\nimport * as Styled from './student-feedback-styled';\n\nconst StudentFeedback = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { grade, personalizedLevel = [] } = formData || {};\n const hasRequiredFields = Boolean(personalizedLevel.length > 0);\n\n const levelList = useMemo(\n () =>\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.LEVEL,\n }),\n [grade, milestoneConfig],\n );\n\n const handleClick = useCallback(\n (id: string) => {\n updateSlideConfig({ personalizedLevel: [id] });\n },\n [updateSlideConfig],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.FeedbackWrapper $flexGapX={1} $gapX={2.25} $gutterX={3.125}>\n <Styled.BalloonWrapper\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $gutterX={0.75}\n >\n <Image\n withLoader\n src={ILLUSTRATIONS.GREEN_BALLOON}\n width={28}\n height={34}\n alt=\"balloon\"\n />\n <Image\n withLoader\n src={ILLUSTRATIONS.GREEN_BALLOON}\n width={28}\n height={34}\n alt=\"balloon\"\n />\n </Styled.BalloonWrapper>\n {levelList &&\n levelList.length > 0 &&\n levelList.map(level => {\n const { id, label } = level;\n const { title, description, icon } = studentLevels[label.toLowerCase()] || {};\n const isSelected = personalizedLevel?.includes(id);\n\n return (\n <Styled.Feedback\n key={id}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"flex-start\"\n $flexGapX={1.25}\n onClick={() => handleClick(id)}\n $gutterX={0.75}\n $gapX={1}\n $background={isSelected ? 'BLACK_T_87' : 'WHITE_1'}\n $borderColor=\"BLACK_T_87\"\n >\n <Image withLoader src={icon} height={64} width={64} alt=\"icon\" />\n <FlexView $flex={1}>\n <Text\n className=\"feedback-title\"\n $renderAs=\"ac3-black\"\n $color={isSelected ? 'WHITE_T_87' : 'BLACK_T_87'}\n >\n {title}:{' '}\n <Styled.InlineText\n className=\"feedback-desc\"\n $renderAs=\"ab2\"\n $color={isSelected ? 'WHITE_T_60' : 'BLACK_T_60'}\n >\n {description}\n </Styled.InlineText>\n </Text>\n </FlexView>\n </Styled.Feedback>\n );\n })}\n </Styled.FeedbackWrapper>\n </Styled.Container>\n );\n});\n\nexport default StudentFeedback;\n"],"names":["StudentFeedback","memo","formData","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","grade","personalizedLevel","hasRequiredFields","levelList","useMemo","getPreferencesFromConfig","COURSE_STREAMS","PREFERENCE_CATEGORY","handleClick","useCallback","id","useEffect","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.FeedbackWrapper","Styled.BalloonWrapper","Image","ILLUSTRATIONS","level","label","title","description","icon","studentLevels","isSelected","Styled.Feedback","FlexView","Text","Styled.InlineText"],"mappings":";;;;;;;;;;;;;AAcM,MAAAA,IAAkBC,EAAK,MAAM;AACjC,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,mBAAAC,EAAA,IACpDC,KAEI,EAAE,OAAAC,GAAO,mBAAAC,IAAoB,CAAG,EAAA,IAAIN,KAAY,CAAA,GAChDO,IAA4BD,EAAkB,SAAS,GAEvDE,IAAYC;AAAA,IAChB,MACEC,EAAyBT,GAAiB;AAAA,MACxC,OAAOI,KAAS;AAAA,MAChB,cAAcM,EAAe;AAAA,MAC7B,oBAAoBC,EAAoB;AAAA,IAAA,CACzC;AAAA,IACH,CAACP,GAAOJ,CAAe;AAAA,EAAA,GAGnBY,IAAcC;AAAA,IAClB,CAACC,MAAe;AACd,MAAAb,EAAkB,EAAE,mBAAmB,CAAC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AAA,YACf,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,WAAW;AAAA,YACX,SAAS,MAAMpB,EAAYE,CAAE;AAAA,YAC7B,UAAU;AAAA,YACV,OAAO;AAAA,YACP,aAAaiB,IAAa,eAAe;AAAA,YACzC,cAAa;AAAA,YAEb,UAAA;AAAA,cAAC,gBAAAb,EAAAK,GAAA,EAAM,YAAU,IAAC,KAAKM,GAAM,QAAQ,IAAI,OAAO,IAAI,KAAI,OAAO,CAAA;AAAA,cAC/D,gBAAAX,EAACe,GAAS,EAAA,OAAO,GACf,UAAA,gBAAAjB;AAAA,gBAACkB;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,WAAU;AAAA,kBACV,QAAQH,IAAa,eAAe;AAAA,kBAEnC,UAAA;AAAA,oBAAAJ;AAAA,oBAAM;AAAA,oBAAE;AAAA,oBACT,gBAAAT;AAAA,sBAACiB;AAAAA,sBAAA;AAAA,wBACC,WAAU;AAAA,wBACV,WAAU;AAAA,wBACV,QAAQJ,IAAa,eAAe;AAAA,wBAEnC,UAAAH;AAAA,sBAAA;AAAA,oBACH;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAAA,GAEJ;AAAA,YAAA;AAAA,UAAA;AAAA,UA3BKd;AAAA,QAAA;AAAA,MA4BP,CAEH;AAAA,IAAA,GACL;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"student-feedback.js","sources":["../../../../../src/features/trial-session/comps/student-feedback/student-feedback.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport { COURSE_STREAMS, PREFERENCE_CATEGORY } from '../../../milestone/constants';\nimport { getPreferencesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { TrialPageId } from '../../trial-session-constants';\nimport SlideHeader from '../slide-header';\nimport { PREFERENCE_CODE_MAP, studentLevels } from './student-feedback-constants';\nimport * as Styled from './student-feedback-styled';\n\nconst StudentFeedback = memo(() => {\n const { slideConfig, formData, milestoneConfig, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { id: slideId } = slideConfig || {};\n const { grade, personalizedLevel = [], personalizedPosition = [] } = formData || {};\n const isStudentLevel = slideId === TrialPageId.STUDENT_LEVEL;\n const hasRequiredFields = Boolean(\n isStudentLevel ? personalizedPosition.length > 0 : personalizedLevel.length > 0,\n );\n\n const levelList = useMemo(\n () =>\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.LEVEL,\n }),\n [grade, milestoneConfig],\n );\n\n const positionList = useMemo(\n () =>\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.POSITION,\n }),\n [grade, milestoneConfig],\n );\n\n const studentOptions = isStudentLevel ? positionList : levelList;\n\n const handleClick = useCallback(\n (id: string) => {\n const configToUpdate = isStudentLevel\n ? {\n personalizedPosition: [id],\n personalizedLevel: [PREFERENCE_CODE_MAP[id as keyof typeof PREFERENCE_CODE_MAP]],\n }\n : { personalizedLevel: [id] };\n\n updateSlideConfig(configToUpdate);\n },\n [isStudentLevel, updateSlideConfig],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.FeedbackWrapper $flexGapX={1} $gapX={2.25} $gutterX={3.125}>\n <Styled.BalloonWrapper\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $gutterX={0.75}\n >\n <Image\n withLoader\n src={ILLUSTRATIONS.GREEN_BALLOON}\n width={28}\n height={34}\n alt=\"balloon\"\n />\n <Image\n withLoader\n src={ILLUSTRATIONS.GREEN_BALLOON}\n width={28}\n height={34}\n alt=\"balloon\"\n />\n </Styled.BalloonWrapper>\n {studentOptions &&\n studentOptions.length > 0 &&\n studentOptions.map(level => {\n const { id, label, lottie, description: levelDescription } = level;\n const { title, description, icon } = studentLevels[label.toLowerCase()] || {};\n const isSelected = (\n isStudentLevel ? personalizedPosition : personalizedLevel\n )?.includes(id);\n\n const animationSettings = {\n loop: false,\n autoplay: isSelected,\n };\n\n return (\n <Styled.Feedback\n key={id}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"flex-start\"\n $flexGapX={1.25}\n onClick={() => handleClick(id)}\n $gutterX={0.75}\n $gapX={1}\n $background={isSelected ? 'BLACK_T_87' : 'WHITE_1'}\n $borderColor=\"BLACK_T_87\"\n >\n {lottie ? (\n <LottieAnimation\n src={LOTTIE[lottie]}\n height={64}\n width={64}\n settings={animationSettings}\n />\n ) : (\n <Image withLoader src={icon} height={64} width={64} alt=\"icon\" />\n )}\n <FlexView $flex={1}>\n {isStudentLevel ? (\n <>\n <Text\n className=\"feedback-title\"\n $renderAs=\"ac3-black\"\n $color={isSelected ? 'WHITE_T_87' : 'BLACK_T_87'}\n >\n {label}\n </Text>\n <Text\n className=\"feedback-desc\"\n $renderAs=\"ab2\"\n $color={isSelected ? 'WHITE_T_87' : 'BLACK_T_87'}\n >\n {levelDescription}\n </Text>\n </>\n ) : (\n <Text\n className=\"feedback-title\"\n $renderAs=\"ac3-black\"\n $color={isSelected ? 'WHITE_T_87' : 'BLACK_T_87'}\n >\n {title}:{' '}\n <Styled.InlineText\n className=\"feedback-desc\"\n $renderAs=\"ab2\"\n $color={isSelected ? 'WHITE_T_60' : 'BLACK_T_60'}\n >\n {description}\n </Styled.InlineText>\n </Text>\n )}\n </FlexView>\n </Styled.Feedback>\n );\n })}\n </Styled.FeedbackWrapper>\n </Styled.Container>\n );\n});\n\nexport default StudentFeedback;\n"],"names":["StudentFeedback","memo","slideConfig","formData","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","slideId","grade","personalizedLevel","personalizedPosition","isStudentLevel","TrialPageId","hasRequiredFields","levelList","useMemo","getPreferencesFromConfig","COURSE_STREAMS","PREFERENCE_CATEGORY","positionList","studentOptions","handleClick","useCallback","id","configToUpdate","PREFERENCE_CODE_MAP","useEffect","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.FeedbackWrapper","Styled.BalloonWrapper","Image","ILLUSTRATIONS","level","label","lottie","levelDescription","title","description","icon","studentLevels","isSelected","_a","animationSettings","Styled.Feedback","LottieAnimation","LOTTIE","FlexView","Fragment","Text","Styled.InlineText"],"mappings":";;;;;;;;;;;;;;;;AAiBM,MAAAA,KAAkBC,EAAK,MAAM;AACjC,QAAM,EAAE,aAAAC,GAAa,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,mBAAAC,EAAA,IACjEC,KAEI,EAAE,IAAIC,MAAYN,KAAe,CAAA,GACjC,EAAE,OAAAO,GAAO,mBAAAC,IAAoB,CAAC,GAAG,sBAAAC,IAAuB,GAAO,IAAAR,KAAY,IAC3ES,IAAiBJ,MAAYK,EAAY,eACzCC,IACJF,IAAiBD,EAAqB,SAAS,IAAID,EAAkB,SAAS,GAG1EK,IAAYC;AAAA,IAChB,MACEC,EAAyBb,GAAiB;AAAA,MACxC,OAAOK,KAAS;AAAA,MAChB,cAAcS,EAAe;AAAA,MAC7B,oBAAoBC,EAAoB;AAAA,IAAA,CACzC;AAAA,IACH,CAACV,GAAOL,CAAe;AAAA,EAAA,GAGnBgB,IAAeJ;AAAA,IACnB,MACEC,EAAyBb,GAAiB;AAAA,MACxC,OAAOK,KAAS;AAAA,MAChB,cAAcS,EAAe;AAAA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AA,oBACC,WAAU;AAAA,oBACV,WAAU;AAAA,oBACV,QAAQR,IAAa,eAAe;AAAA,oBAEnC,UAAAL;AAAA,kBAAA;AAAA,gBACH;AAAA,cAAA,EAAA,CACF,IAEA,gBAAAZ;AAAA,gBAACyB;AAAA,gBAAA;AAAA,kBACC,WAAU;AAAA,kBACV,WAAU;AAAA,kBACV,QAAQR,IAAa,eAAe;AAAA,kBAEnC,UAAA;AAAA,oBAAAJ;AAAA,oBAAM;AAAA,oBAAE;AAAA,oBACT,gBAAAX;AAAA,sBAACwB;AAAAA,sBAAA;AAAA,wBACC,WAAU;AAAA,wBACV,WAAU;AAAA,wBACV,QAAQT,IAAa,eAAe;AAAA,wBAEnC,UAAAH;AAAA,sBAAA;AAAA,oBACH;AAAA,kBAAA;AAAA,gBAAA;AAAA,cAAA,GAGN;AAAA,YAAA;AAAA,UAAA;AAAA,UAvDKlB;AAAA,QAAA;AAAA,MAwDP,CAEH;AAAA,IAAA,GACL;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,95 +1,102 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ILLUSTRATIONS as
|
|
4
|
-
import { GOAL_CATEGORY as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useGetStudentProfileSummary as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { memo as N, useMemo as C, useCallback as U, useEffect as f } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as c } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { GOAL_CATEGORY as L } from "../../../milestone/constants.js";
|
|
5
|
+
import W from "../../../ui/error/error.js";
|
|
6
|
+
import v from "../../../ui/image/image.js";
|
|
7
|
+
import A from "../../../ui/layout/flex-view.js";
|
|
8
|
+
import K from "../../../ui/loader/app-loader/app-loader.js";
|
|
9
|
+
import I from "../../../ui/separator/separator.js";
|
|
10
|
+
import p from "../../../ui/text/text.js";
|
|
11
|
+
import { useGetStudentProfileSummary as M } from "../../api/student-profile-summary.js";
|
|
12
12
|
import { useTrialSessionContext as X } from "../../context/use-trial-session-context.js";
|
|
13
|
-
import { getFormattedStudentPersonalizedPreference as
|
|
13
|
+
import { getFormattedStudentPersonalizedPreference as y } from "../../helper.js";
|
|
14
14
|
import j from "../slide-header/index.js";
|
|
15
15
|
import { GOAL_MAPPING as z } from "./constant.js";
|
|
16
16
|
import F from "./student-profile-highlights/student-profile-highlights.js";
|
|
17
|
-
import { Container as V, ContentWrapper as
|
|
18
|
-
import { getDummyProfileImage as J, getMilestoneGoalName as
|
|
19
|
-
const he =
|
|
17
|
+
import { Container as V, ContentWrapper as b, AbsoluteImage as Y, ImageWrapper as q } from "./student-profile-styled.js";
|
|
18
|
+
import { getDummyProfileImage as J, getMilestoneGoalName as G } from "./student-profile-utils.js";
|
|
19
|
+
const he = N(() => {
|
|
20
20
|
const {
|
|
21
|
-
isTeacher:
|
|
21
|
+
isTeacher: n,
|
|
22
22
|
studentId: u,
|
|
23
|
-
formData:
|
|
24
|
-
slideConfig:
|
|
25
|
-
milestoneConfig:
|
|
26
|
-
updateSlideConfig:
|
|
27
|
-
updateButtonState:
|
|
28
|
-
} = X(), { showProfileHighlights: r } =
|
|
29
|
-
name:
|
|
23
|
+
formData: O,
|
|
24
|
+
slideConfig: T,
|
|
25
|
+
milestoneConfig: m,
|
|
26
|
+
updateSlideConfig: g,
|
|
27
|
+
updateButtonState: h
|
|
28
|
+
} = X(), { showProfileHighlights: r } = T, {
|
|
29
|
+
name: x,
|
|
30
30
|
goals: t = [],
|
|
31
|
-
studentProfile:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} =
|
|
35
|
-
school_success_goal:
|
|
36
|
-
test_prep_goal:
|
|
31
|
+
studentProfile: a,
|
|
32
|
+
personalizedObjectives: P = [],
|
|
33
|
+
personalizedPosition: _ = []
|
|
34
|
+
} = O || {}, { dummyProfileImageIndex: R, profileSummary: w } = a || {}, B = J(R), l = C(() => t && t.length > 0 ? {
|
|
35
|
+
school_success_goal: G(t, L.SCHOOL_SUCCESS),
|
|
36
|
+
test_prep_goal: G(t, L.TEST_PREP)
|
|
37
37
|
} : null, [t]), {
|
|
38
38
|
get: S,
|
|
39
|
-
data:
|
|
40
|
-
isProcessing:
|
|
41
|
-
isProcessed:
|
|
42
|
-
isProcessingFailed:
|
|
43
|
-
} =
|
|
44
|
-
|
|
45
|
-
}, [S,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
|
|
39
|
+
data: D,
|
|
40
|
+
isProcessing: s,
|
|
41
|
+
isProcessed: $,
|
|
42
|
+
isProcessingFailed: H
|
|
43
|
+
} = M(), { profile_summary: E } = D || {}, d = U(() => {
|
|
44
|
+
l && S(u, l);
|
|
45
|
+
}, [S, l, u]);
|
|
46
|
+
f(() => {
|
|
47
|
+
h("right", { isDisabled: s, isLoading: !1 });
|
|
48
|
+
}, [s, h]), f(() => {
|
|
49
|
+
n && !a && !r && d();
|
|
50
|
+
}, [d, n, a, r]), f(() => {
|
|
51
|
+
n && $ && !r && g({
|
|
52
52
|
studentProfile: {
|
|
53
53
|
profileSummary: E || "",
|
|
54
54
|
dummyProfileImageIndex: Math.floor(Math.random() * 6)
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
}, [
|
|
58
|
-
const
|
|
57
|
+
}, [$, n, r, E, g]);
|
|
58
|
+
const k = C(
|
|
59
59
|
() => [
|
|
60
60
|
{
|
|
61
|
-
title: "
|
|
62
|
-
description: `Catching up: ${
|
|
63
|
-
|
|
61
|
+
title: "Student Level",
|
|
62
|
+
description: `Catching up: ${y(
|
|
63
|
+
m,
|
|
64
|
+
_
|
|
65
|
+
).map((o) => o.preference_description)}`,
|
|
66
|
+
illustration: c.KNOWLEDGE_BLUE,
|
|
64
67
|
background: "BLUE_1"
|
|
65
68
|
},
|
|
66
69
|
{
|
|
67
|
-
illustration:
|
|
70
|
+
illustration: c.ARROW_BOARD_GREEN,
|
|
68
71
|
background: "GREEN_1",
|
|
69
72
|
title: "Goals",
|
|
70
|
-
description:
|
|
71
|
-
|
|
73
|
+
description: y(
|
|
74
|
+
m,
|
|
72
75
|
P
|
|
73
|
-
).map((
|
|
76
|
+
).map((o) => o.preference_name)
|
|
74
77
|
},
|
|
75
78
|
{
|
|
76
|
-
illustration:
|
|
79
|
+
illustration: c.BOOK_CHECKED_PURPLE,
|
|
77
80
|
background: "PURPLE_1",
|
|
78
81
|
title: "Learning Plan",
|
|
79
82
|
description: t.map(
|
|
80
|
-
(
|
|
83
|
+
(o) => `${z[o.goal_category]}: ${o.milestone_name}`
|
|
81
84
|
)
|
|
82
85
|
}
|
|
83
86
|
],
|
|
84
|
-
[t,
|
|
87
|
+
[t, m, P, _]
|
|
85
88
|
);
|
|
86
|
-
return
|
|
87
|
-
/* @__PURE__ */ e(
|
|
89
|
+
return H ? /* @__PURE__ */ e(W, { height: "70vh", onTryAgain: d }) : s || !a && !r ? /* @__PURE__ */ e(K, { height: "100vh" }) : /* @__PURE__ */ i(V, { children: [
|
|
90
|
+
/* @__PURE__ */ e(I, { height: 60 }),
|
|
88
91
|
/* @__PURE__ */ e(j, { marginBottom: r ? 50 : 100 }),
|
|
89
|
-
r ? /* @__PURE__ */
|
|
92
|
+
r ? /* @__PURE__ */ i(b, { $width: 650, children: [
|
|
93
|
+
/* @__PURE__ */ e(F, { profileHighlights: k }),
|
|
94
|
+
/* @__PURE__ */ e(I, { height: 16 }),
|
|
95
|
+
/* @__PURE__ */ e(p, { $renderAs: "ub3", $color: "BLACK_T_60", $align: "center", children: "We can always revisit this later" })
|
|
96
|
+
] }) : /* @__PURE__ */ i(b, { $widthX: 46.875, children: [
|
|
90
97
|
/* @__PURE__ */ e(Y, {}),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
98
|
+
/* @__PURE__ */ i(
|
|
99
|
+
A,
|
|
93
100
|
{
|
|
94
101
|
$width: "100%",
|
|
95
102
|
$heightX: 21.875,
|
|
@@ -101,10 +108,10 @@ const he = H(() => {
|
|
|
101
108
|
$borderColor: "BLACK_T_87",
|
|
102
109
|
$borderRadiusX: 0.5,
|
|
103
110
|
children: [
|
|
104
|
-
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
|
|
105
|
-
/* @__PURE__ */
|
|
106
|
-
/* @__PURE__ */ e(
|
|
107
|
-
/* @__PURE__ */ e(
|
|
111
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(v, { withLoader: !0, height: 200, width: 200, src: B }) }),
|
|
112
|
+
/* @__PURE__ */ i(A, { $flexGap: 16, children: [
|
|
113
|
+
/* @__PURE__ */ e(p, { $renderAs: "ac2-black", children: x }),
|
|
114
|
+
/* @__PURE__ */ e(p, { $renderAs: "ab1", children: w || "" })
|
|
108
115
|
] })
|
|
109
116
|
]
|
|
110
117
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\nimport type { TColorNames } from '../../../ui/types';\nimport type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\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 { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { GOAL_MAPPING } from './constant';\nimport StudentProfileHighlights from './student-profile-highlights/student-profile-highlights';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(() => {\n const {\n isTeacher,\n studentId,\n formData,\n slideConfig,\n milestoneConfig,\n updateSlideConfig,\n updateButtonState,\n } = useTrialSessionContext();\n const { showProfileHighlights } = slideConfig;\n\n const {\n name,\n goals = [],\n studentProfile,\n personalizedLevel = [],\n personalizedObjectives = [],\n } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile && !showProfileHighlights) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile, showProfileHighlights]);\n\n useEffect(() => {\n if (isTeacher && isProcessed && !showProfileHighlights) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, showProfileHighlights, studentProfileSummary, updateSlideConfig]);\n\n const profileHighlights: TProfileHighlight[] = useMemo(\n () => [\n {\n title: 'Studnet Level',\n description: `Catching up: ${personalizedLevel[0]}`,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedObjectives,\n ).map(objectives => objectives.preference_name),\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: goals.map(\n goal => `${GOAL_MAPPING[goal.goal_category as TGoalCategory]}: ${goal.milestone_name}`,\n ),\n },\n ],\n [goals, milestoneConfig, personalizedLevel, personalizedObjectives],\n );\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || (!studentProfile && !showProfileHighlights)) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={showProfileHighlights ? 50 : 100} />\n {showProfileHighlights ? (\n <Styled.ContentWrapper $width={650}>\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","slideConfig","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","showProfileHighlights","name","goals","studentProfile","personalizedLevel","personalizedObjectives","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","profileHighlights","ILLUSTRATIONS","getFormattedStudentPersonalizedPreference","objectives","goal","GOAL_MAPPING","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","StudentProfileHighlights","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image","Text"],"mappings":";;;;;;;;;;;;;;;;;;AA8BM,MAAAA,KAAiBC,EAAK,MAAM;AAC1B,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,mBAAAC,IAAoB,CAAC;AAAA,IACrB,wBAAAC,IAAyB,CAAC;AAAA,EAAA,IACxBX,KAAY,CAAA,GACV,EAAE,wBAAAY,GAAwB,gBAAAC,MAAmBJ,KAAkB,CAAA,GAC/DK,IAAoBC,EAAqBH,CAAsB,GAE/DI,IAAUC,EAA+C,MACzDT,KAASA,EAAM,SAAS,IACnB;AAAA,IACL,qBAAqBU,EAAqBV,GAAOW,EAAc,cAAc;AAAA,IAC7E,gBAAgBD,EAAqBV,GAAOW,EAAc,SAAS;AAAA,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AAAa,GAAA,EAAK,WAAU,aAAa,UAAK1C,GAAA;AAAA,cACjC,gBAAA6B,EAAAa,GAAA,EAAK,WAAU,OAAO,eAAkB,IAAG;AAAA,YAAA,GAC9C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\nimport type { TColorNames } from '../../../ui/types';\nimport type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\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 { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { GOAL_MAPPING } from './constant';\nimport StudentProfileHighlights from './student-profile-highlights/student-profile-highlights';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(() => {\n const {\n isTeacher,\n studentId,\n formData,\n slideConfig,\n milestoneConfig,\n updateSlideConfig,\n updateButtonState,\n } = useTrialSessionContext();\n const { showProfileHighlights } = slideConfig;\n\n const {\n name,\n goals = [],\n studentProfile,\n personalizedObjectives = [],\n personalizedPosition = [],\n } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile && !showProfileHighlights) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile, showProfileHighlights]);\n\n useEffect(() => {\n if (isTeacher && isProcessed && !showProfileHighlights) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, showProfileHighlights, studentProfileSummary, updateSlideConfig]);\n\n const profileHighlights: TProfileHighlight[] = useMemo(\n () => [\n {\n title: 'Student Level',\n description: `Catching up: ${getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedPosition,\n ).map(objectives => objectives.preference_description)}`,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedObjectives,\n ).map(objectives => objectives.preference_name),\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: goals.map(\n goal => `${GOAL_MAPPING[goal.goal_category as TGoalCategory]}: ${goal.milestone_name}`,\n ),\n },\n ],\n [goals, milestoneConfig, personalizedObjectives, personalizedPosition],\n );\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || (!studentProfile && !showProfileHighlights)) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={showProfileHighlights ? 50 : 100} />\n {showProfileHighlights ? (\n <Styled.ContentWrapper $width={650}>\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n <Separator height={16} />\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\" $align=\"center\">\n We can always revisit this later\n </Text>\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","slideConfig","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","showProfileHighlights","name","goals","studentProfile","personalizedObjectives","personalizedPosition","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","profileHighlights","getFormattedStudentPersonalizedPreference","objectives","ILLUSTRATIONS","goal","GOAL_MAPPING","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","StudentProfileHighlights","Text","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image"],"mappings":";;;;;;;;;;;;;;;;;;AA8BM,MAAAA,KAAiBC,EAAK,MAAM;AAC1B,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,wBAAAC,IAAyB,CAAC;AAAA,IAC1B,sBAAAC,IAAuB,CAAC;AAAA,EAAA,IACtBX,KAAY,CAAA,GACV,EAAE,wBAAAY,GAAwB,gBAAAC,MAAmBJ,KAAkB,CAAA,GAC/DK,IAAoBC,EAAqBH,CAAsB,GAE/DI,IAAUC,EAA+C,MACzDT,KAASA,EAAM,SAAS,IACnB;AAAA,IACL,qBAAqBU,EAAqBV,GAAOW,EAAc,cAAc;AAAA,IAC7E,gBAAgBD,EAAqBV,GAAOW,EAAc,SAAS;AAAA,EAAA,IAIhE,MACN,CAACX,CAAK,CAAC,GAEJ;AAAA,IACJ,KAAKY;AAAA,IACL,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAA4B,GAC1B,EAAE,iBAAiBC,MAA0BL,KAAQ,CAAA,GAErDM,IAAYC,EAAY,MAAM;AAClC,IAAIZ,KACFI,EAAyBrB,GAAWiB,CAAO;AAAA,EAE5C,GAAA,CAACI,GAA0BJ,GA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,EAAK,WAAU,OAAO,eAAkB,IAAG;AAAA,YAAA,GAC9C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,52 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GIF as
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as G, useMemo as L, useCallback as A } from "react";
|
|
3
|
+
import { GIF as I } from "../../../../assets/gif/gif.js";
|
|
4
4
|
import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
|
|
5
|
-
import { getGoalsFromConfig as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import { getGoalsFromConfig as x } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import R from "../../../ui/image/image.js";
|
|
7
|
+
import D from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
8
|
import p from "../../../ui/separator/separator.js";
|
|
9
|
-
import
|
|
10
|
-
import { epochTimestampAfterOneYear as
|
|
11
|
-
import { useTrialSessionContext as
|
|
12
|
-
import { updateGoalInFormData as
|
|
13
|
-
import
|
|
14
|
-
import { Container as
|
|
15
|
-
const
|
|
16
|
-
const { milestoneConfig:
|
|
17
|
-
() =>
|
|
18
|
-
countryCode:
|
|
19
|
-
grade:
|
|
9
|
+
import j from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as k } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as O } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { updateGoalInFormData as w } from "../../helper.js";
|
|
13
|
+
import F from "../slide-header/index.js";
|
|
14
|
+
import { Container as N, ContentWrapper as W, ImageWrapper as X, InputContainer as B } from "./test-prep-styled.js";
|
|
15
|
+
const te = G(() => {
|
|
16
|
+
const { milestoneConfig: a, formData: d, updateSlideConfig: n, trialHomeData: f } = O(), { demo_info: g, intel_student: u } = f, { source: h } = u || {}, { stream: i, region_data: T } = g || {}, { opportunity_country: s = "US" } = T || {}, { grade: m, goals: e } = d || {}, l = h === "PLA", _ = L(
|
|
17
|
+
() => x(a, {
|
|
18
|
+
countryCode: s,
|
|
19
|
+
grade: m ?? "",
|
|
20
20
|
goalCategory: r.TEST_PREP,
|
|
21
21
|
courseStream: i,
|
|
22
22
|
enrollmentType: "ONLINE"
|
|
23
23
|
}),
|
|
24
|
-
[
|
|
25
|
-
), { goal_code:
|
|
26
|
-
(t,
|
|
24
|
+
[s, m, a, i]
|
|
25
|
+
), { goal_code: C } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, S = A(
|
|
26
|
+
(t, P) => {
|
|
27
27
|
if (!t) {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
28
|
+
const y = e == null ? void 0 : e.filter(
|
|
29
|
+
($) => $.goal_category !== r.TEST_PREP
|
|
30
30
|
);
|
|
31
|
-
|
|
31
|
+
n({ goals: y });
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const { label:
|
|
34
|
+
const { label: E } = P, b = w(e, r.TEST_PREP, {
|
|
35
35
|
goal_code: t,
|
|
36
|
-
milestone_name:
|
|
37
|
-
milestone_date_ts:
|
|
36
|
+
milestone_name: E,
|
|
37
|
+
milestone_date_ts: k(),
|
|
38
|
+
publish: l
|
|
38
39
|
});
|
|
39
|
-
|
|
40
|
+
n({ goals: b });
|
|
40
41
|
},
|
|
41
|
-
[e,
|
|
42
|
+
[e, l, n]
|
|
42
43
|
);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
+
return /* @__PURE__ */ c(N, { children: [
|
|
44
45
|
/* @__PURE__ */ o(p, { height: 60 }),
|
|
45
|
-
/* @__PURE__ */ o(
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ o(
|
|
46
|
+
/* @__PURE__ */ o(F, {}),
|
|
47
|
+
/* @__PURE__ */ c(W, { $flexDirection: "row", $justifyContent: "center", children: [
|
|
48
|
+
/* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(R, { withLoader: !0, height: 402, width: 302, src: I.TEST_PREP, className: "image" }) }),
|
|
48
49
|
/* @__PURE__ */ o(
|
|
49
|
-
|
|
50
|
+
B,
|
|
50
51
|
{
|
|
51
52
|
$flexGap: 40,
|
|
52
53
|
$justifyContent: "center",
|
|
@@ -55,15 +56,15 @@ const Z = y(() => {
|
|
|
55
56
|
$gapX: 2.5,
|
|
56
57
|
$gutterX: 2.5,
|
|
57
58
|
children: /* @__PURE__ */ o(
|
|
58
|
-
|
|
59
|
+
D,
|
|
59
60
|
{
|
|
60
61
|
renderAs: "primary",
|
|
61
62
|
label: "Select a Test",
|
|
62
|
-
value:
|
|
63
|
-
options:
|
|
63
|
+
value: C,
|
|
64
|
+
options: _,
|
|
64
65
|
shape: "borderLess",
|
|
65
66
|
theme: "dark",
|
|
66
|
-
onChange:
|
|
67
|
+
onChange: S,
|
|
67
68
|
isTransparent: !0
|
|
68
69
|
}
|
|
69
70
|
)
|
|
@@ -71,10 +72,10 @@ const Z = y(() => {
|
|
|
71
72
|
)
|
|
72
73
|
] }),
|
|
73
74
|
/* @__PURE__ */ o(p, { heightX: 1 }),
|
|
74
|
-
/* @__PURE__ */ o(
|
|
75
|
+
/* @__PURE__ */ o(j, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
75
76
|
] });
|
|
76
77
|
});
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
+
te as default
|
|
79
80
|
};
|
|
80
81
|
//# sourceMappingURL=test-prep.js.map
|