@cuemath/leap 3.3.30-beta.1 → 3.3.30
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 +3 -9
- 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 +7 -13
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +30 -32
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +16 -17
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +4 -8
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +4 -5
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +145 -170
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +49 -61
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- 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 +53 -55
- 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 +43 -44
- 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 +0 -5
- 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 +51 -96
- 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 +63 -70
- 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 +39 -40
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/helper.js +53 -69
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +130 -150
- 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 +112 -103
- package/dist/features/trial-session/trial-session-view.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 +5 -45
- package/dist/index.js +106 -116
- 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/features/parent-dashboard/api/cancel-subscription.js +0 -9
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -96
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -85
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -59
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -93
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -66
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +0 -12
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -76
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-constants.js +0 -6
- package/dist/features/student-username/add/add-student-username-constants.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-helpers.js +0 -6
- package/dist/features/student-username/add/add-student-username-helpers.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-styled.js +0 -10
- package/dist/features/student-username/add/add-student-username-styled.js.map +0 -1
- package/dist/features/student-username/add/add-student-username.js +0 -78
- package/dist/features/student-username/add/add-student-username.js.map +0 -1
- package/dist/features/student-username/add/api/update-username.js +0 -9
- package/dist/features/student-username/add/api/update-username.js.map +0 -1
- package/dist/features/student-username/add/api/username-availability.js +0 -10
- package/dist/features/student-username/add/api/username-availability.js.map +0 -1
- package/dist/features/student-username/add/hooks/use-check-username-availability.js +0 -41
- package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +0 -1
- package/dist/features/trial-session/api/teacher-availability.js +0 -9
- package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +0 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +0 -49
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +0 -1
- 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,52 +1,38 @@
|
|
|
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
|
-
|
|
20
|
-
grade: s ?? "",
|
|
21
|
-
courseStream: C.MATH,
|
|
22
|
-
preferenceCategory: $.LEVEL
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as E, useMemo as T, useCallback as _, useEffect as b } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as p } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { COURSE_STREAMS as x, PREFERENCE_CATEGORY as S } from "../../../milestone/constants.js";
|
|
5
|
+
import { getPreferencesFromConfig as A } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import l from "../../../ui/image/image.js";
|
|
7
|
+
import w from "../../../ui/layout/flex-view.js";
|
|
8
|
+
import k from "../../../ui/separator/separator.js";
|
|
9
|
+
import B from "../../../ui/text/text.js";
|
|
10
|
+
import { useTrialSessionContext as I } from "../../context/use-trial-session-context.js";
|
|
11
|
+
import R from "../slide-header/index.js";
|
|
12
|
+
import { studentLevels as N } from "./student-feedback-constants.js";
|
|
13
|
+
import { Container as F, FeedbackWrapper as O, BalloonWrapper as X, Feedback as G, InlineText as H } from "./student-feedback-styled.js";
|
|
14
|
+
const J = E(() => {
|
|
15
|
+
const { formData: h, milestoneConfig: s, updateSlideConfig: c, updateButtonState: d } = I(), { grade: m, personalizedLevel: r = [] } = h || {}, f = r.length > 0, o = T(
|
|
16
|
+
() => A(s, {
|
|
17
|
+
grade: m ?? "",
|
|
18
|
+
courseStream: x.MATH,
|
|
19
|
+
preferenceCategory: S.LEVEL
|
|
23
20
|
}),
|
|
24
|
-
[
|
|
25
|
-
),
|
|
26
|
-
() => b(a, {
|
|
27
|
-
grade: s ?? "",
|
|
28
|
-
courseStream: C.MATH,
|
|
29
|
-
preferenceCategory: $.POSITION
|
|
30
|
-
}),
|
|
31
|
-
[s, a]
|
|
32
|
-
), l = t ? x : k, N = v(
|
|
21
|
+
[m, s]
|
|
22
|
+
), g = _(
|
|
33
23
|
(i) => {
|
|
34
|
-
|
|
35
|
-
personalizedPosition: [i],
|
|
36
|
-
personalizedLevel: [U[i]]
|
|
37
|
-
} : { personalizedLevel: [i] };
|
|
38
|
-
m(n);
|
|
24
|
+
c({ personalizedLevel: [i] });
|
|
39
25
|
},
|
|
40
|
-
[
|
|
26
|
+
[c]
|
|
41
27
|
);
|
|
42
|
-
return
|
|
43
|
-
|
|
44
|
-
}, [
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
/* @__PURE__ */ e(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */
|
|
49
|
-
|
|
28
|
+
return b(() => {
|
|
29
|
+
d("right", { isDisabled: !f, isLoading: !1 });
|
|
30
|
+
}, [f, d]), /* @__PURE__ */ t(F, { children: [
|
|
31
|
+
/* @__PURE__ */ e(k, { height: 60 }),
|
|
32
|
+
/* @__PURE__ */ e(R, {}),
|
|
33
|
+
/* @__PURE__ */ t(O, { $flexGapX: 1, $gapX: 2.25, $gutterX: 3.125, children: [
|
|
34
|
+
/* @__PURE__ */ t(
|
|
35
|
+
X,
|
|
50
36
|
{
|
|
51
37
|
$flexDirection: "row",
|
|
52
38
|
$justifyContent: "space-between",
|
|
@@ -54,20 +40,20 @@ const he = P(() => {
|
|
|
54
40
|
$gutterX: 0.75,
|
|
55
41
|
children: [
|
|
56
42
|
/* @__PURE__ */ e(
|
|
57
|
-
|
|
43
|
+
l,
|
|
58
44
|
{
|
|
59
45
|
withLoader: !0,
|
|
60
|
-
src:
|
|
46
|
+
src: p.GREEN_BALLOON,
|
|
61
47
|
width: 28,
|
|
62
48
|
height: 34,
|
|
63
49
|
alt: "balloon"
|
|
64
50
|
}
|
|
65
51
|
),
|
|
66
52
|
/* @__PURE__ */ e(
|
|
67
|
-
|
|
53
|
+
l,
|
|
68
54
|
{
|
|
69
55
|
withLoader: !0,
|
|
70
|
-
src:
|
|
56
|
+
src: p.GREEN_BALLOON,
|
|
71
57
|
width: 28,
|
|
72
58
|
height: 34,
|
|
73
59
|
alt: "balloon"
|
|
@@ -76,70 +62,39 @@ const he = P(() => {
|
|
|
76
62
|
]
|
|
77
63
|
}
|
|
78
64
|
),
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
autoplay: o
|
|
84
|
-
};
|
|
85
|
-
return /* @__PURE__ */ r(
|
|
86
|
-
J,
|
|
65
|
+
o && o.length > 0 && o.map((i) => {
|
|
66
|
+
const { id: a, label: u } = i, { title: C, description: $, icon: L } = N[u.toLowerCase()] || {}, n = r == null ? void 0 : r.includes(a);
|
|
67
|
+
return /* @__PURE__ */ t(
|
|
68
|
+
G,
|
|
87
69
|
{
|
|
88
70
|
$flexDirection: "row",
|
|
89
71
|
$alignItems: "center",
|
|
90
72
|
$justifyContent: "flex-start",
|
|
91
73
|
$flexGapX: 1.25,
|
|
92
|
-
onClick: () =>
|
|
74
|
+
onClick: () => g(a),
|
|
93
75
|
$gutterX: 0.75,
|
|
94
76
|
$gapX: 1,
|
|
95
|
-
$background:
|
|
77
|
+
$background: n ? "BLACK_T_87" : "WHITE_1",
|
|
96
78
|
$borderColor: "BLACK_T_87",
|
|
97
79
|
children: [
|
|
98
|
-
|
|
99
|
-
|
|
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,
|
|
80
|
+
/* @__PURE__ */ e(l, { withLoader: !0, src: L, height: 64, width: 64, alt: "icon" }),
|
|
81
|
+
/* @__PURE__ */ e(w, { $flex: 1, children: /* @__PURE__ */ t(
|
|
82
|
+
B,
|
|
128
83
|
{
|
|
129
84
|
className: "feedback-title",
|
|
130
85
|
$renderAs: "ac3-black",
|
|
131
|
-
$color:
|
|
86
|
+
$color: n ? "WHITE_T_87" : "BLACK_T_87",
|
|
132
87
|
children: [
|
|
133
|
-
|
|
88
|
+
C,
|
|
134
89
|
":",
|
|
135
90
|
" ",
|
|
136
91
|
/* @__PURE__ */ e(
|
|
137
|
-
|
|
92
|
+
H,
|
|
138
93
|
{
|
|
139
94
|
className: "feedback-desc",
|
|
140
95
|
$renderAs: "ab2",
|
|
141
|
-
$color:
|
|
142
|
-
children:
|
|
96
|
+
$color: n ? "WHITE_T_60" : "BLACK_T_60",
|
|
97
|
+
children: $
|
|
143
98
|
}
|
|
144
99
|
)
|
|
145
100
|
]
|
|
@@ -147,13 +102,13 @@ const he = P(() => {
|
|
|
147
102
|
) })
|
|
148
103
|
]
|
|
149
104
|
},
|
|
150
|
-
|
|
105
|
+
a
|
|
151
106
|
);
|
|
152
107
|
})
|
|
153
108
|
] })
|
|
154
109
|
] });
|
|
155
110
|
});
|
|
156
111
|
export {
|
|
157
|
-
|
|
112
|
+
J as default
|
|
158
113
|
};
|
|
159
114
|
//# 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 { 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,IAAo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AAA;AAAA,cAGZ,IAAA,gBAAAjB,EAACK,GAAM,EAAA,YAAU,IAAC,KAAKQ,GAAM,QAAQ,IAAI,OAAO,IAAI,KAAI,OAAO,CAAA;AAAA,cAEhE,gBAAAb,EAAAqB,GAAA,EAAS,OAAO,GACd,cAEG,gBAAAvB,EAAAwB,GAAA,EAAA,UAAA;AAAA,gBAAA,gBAAAtB;AAAA,kBAACuB;AAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,WAAU;AAAA,oBACV,QAAQR,IAAa,eAAe;AAAA,oBAEnC,UAAAP;AAAA,kBAAA;AAAA,gBACH;AAAA,gBACA,gBAAAR;AAAA,kBAACuB;AAAA,kBAAA;AAAA,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
|
+
{"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,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|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useGetStudentProfileSummary as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as H, useMemo as L, useCallback as k, useEffect as d } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as f } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { GOAL_CATEGORY as $ } from "../../../milestone/constants.js";
|
|
5
|
+
import N from "../../../ui/error/error.js";
|
|
6
|
+
import U from "../../../ui/image/image.js";
|
|
7
|
+
import C from "../../../ui/layout/flex-view.js";
|
|
8
|
+
import v from "../../../ui/loader/app-loader/app-loader.js";
|
|
9
|
+
import M from "../../../ui/separator/separator.js";
|
|
10
|
+
import I from "../../../ui/text/text.js";
|
|
11
|
+
import { useGetStudentProfileSummary as W } 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 K } 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 y, AbsoluteImage as Y, ImageWrapper as q } from "./student-profile-styled.js";
|
|
18
|
+
import { getDummyProfileImage as J, getMilestoneGoalName as A } from "./student-profile-utils.js";
|
|
19
|
+
const he = H(() => {
|
|
20
20
|
const {
|
|
21
|
-
isTeacher:
|
|
21
|
+
isTeacher: o,
|
|
22
22
|
studentId: u,
|
|
23
|
-
formData:
|
|
24
|
-
slideConfig:
|
|
25
|
-
milestoneConfig:
|
|
26
|
-
updateSlideConfig:
|
|
27
|
-
updateButtonState:
|
|
28
|
-
} = X(), { showProfileHighlights: r } =
|
|
29
|
-
name:
|
|
23
|
+
formData: b,
|
|
24
|
+
slideConfig: G,
|
|
25
|
+
milestoneConfig: c,
|
|
26
|
+
updateSlideConfig: p,
|
|
27
|
+
updateButtonState: g
|
|
28
|
+
} = X(), { showProfileHighlights: r } = G, {
|
|
29
|
+
name: O,
|
|
30
30
|
goals: t = [],
|
|
31
|
-
studentProfile:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} =
|
|
35
|
-
school_success_goal:
|
|
36
|
-
test_prep_goal:
|
|
31
|
+
studentProfile: i,
|
|
32
|
+
personalizedLevel: h = [],
|
|
33
|
+
personalizedObjectives: P = []
|
|
34
|
+
} = b || {}, { dummyProfileImageIndex: x, profileSummary: R } = i || {}, T = J(x), m = L(() => t && t.length > 0 ? {
|
|
35
|
+
school_success_goal: A(t, $.SCHOOL_SUCCESS),
|
|
36
|
+
test_prep_goal: A(t, $.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: w,
|
|
40
|
+
isProcessing: l,
|
|
41
|
+
isProcessed: _,
|
|
42
|
+
isProcessingFailed: D
|
|
43
|
+
} = W(), { profile_summary: E } = w || {}, s = k(() => {
|
|
44
|
+
m && S(u, m);
|
|
45
|
+
}, [S, m, u]);
|
|
46
|
+
d(() => {
|
|
47
|
+
g("right", { isDisabled: l, isLoading: !1 });
|
|
48
|
+
}, [l, g]), d(() => {
|
|
49
|
+
o && !i && !r && s();
|
|
50
|
+
}, [s, o, i, r]), d(() => {
|
|
51
|
+
o && _ && !r && p({
|
|
52
52
|
studentProfile: {
|
|
53
53
|
profileSummary: E || "",
|
|
54
54
|
dummyProfileImageIndex: Math.floor(Math.random() * 6)
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
}, [
|
|
58
|
-
const
|
|
57
|
+
}, [_, o, r, E, p]);
|
|
58
|
+
const B = L(
|
|
59
59
|
() => [
|
|
60
60
|
{
|
|
61
|
-
title: "
|
|
62
|
-
description: `Catching up: ${
|
|
63
|
-
|
|
64
|
-
_
|
|
65
|
-
).map((o) => o.preference_description)}`,
|
|
66
|
-
illustration: c.KNOWLEDGE_BLUE,
|
|
61
|
+
title: "Studnet Level",
|
|
62
|
+
description: `Catching up: ${h[0]}`,
|
|
63
|
+
illustration: f.KNOWLEDGE_BLUE,
|
|
67
64
|
background: "BLUE_1"
|
|
68
65
|
},
|
|
69
66
|
{
|
|
70
|
-
illustration:
|
|
67
|
+
illustration: f.ARROW_BOARD_GREEN,
|
|
71
68
|
background: "GREEN_1",
|
|
72
69
|
title: "Goals",
|
|
73
|
-
description:
|
|
74
|
-
|
|
70
|
+
description: K(
|
|
71
|
+
c,
|
|
75
72
|
P
|
|
76
|
-
).map((
|
|
73
|
+
).map((n) => n.preference_name)
|
|
77
74
|
},
|
|
78
75
|
{
|
|
79
|
-
illustration:
|
|
76
|
+
illustration: f.BOOK_CHECKED_PURPLE,
|
|
80
77
|
background: "PURPLE_1",
|
|
81
78
|
title: "Learning Plan",
|
|
82
79
|
description: t.map(
|
|
83
|
-
(
|
|
80
|
+
(n) => `${z[n.goal_category]}: ${n.milestone_name}`
|
|
84
81
|
)
|
|
85
82
|
}
|
|
86
83
|
],
|
|
87
|
-
[t,
|
|
84
|
+
[t, c, h, P]
|
|
88
85
|
);
|
|
89
|
-
return
|
|
90
|
-
/* @__PURE__ */ e(
|
|
86
|
+
return D ? /* @__PURE__ */ e(N, { height: "70vh", onTryAgain: s }) : l || !i && !r ? /* @__PURE__ */ e(v, { height: "100vh" }) : /* @__PURE__ */ a(V, { children: [
|
|
87
|
+
/* @__PURE__ */ e(M, { height: 60 }),
|
|
91
88
|
/* @__PURE__ */ e(j, { marginBottom: r ? 50 : 100 }),
|
|
92
|
-
r ? /* @__PURE__ */
|
|
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: [
|
|
89
|
+
r ? /* @__PURE__ */ e(y, { $width: 650, children: /* @__PURE__ */ e(F, { profileHighlights: B }) }) : /* @__PURE__ */ a(y, { $widthX: 46.875, children: [
|
|
97
90
|
/* @__PURE__ */ e(Y, {}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
91
|
+
/* @__PURE__ */ a(
|
|
92
|
+
C,
|
|
100
93
|
{
|
|
101
94
|
$width: "100%",
|
|
102
95
|
$heightX: 21.875,
|
|
@@ -108,10 +101,10 @@ const he = N(() => {
|
|
|
108
101
|
$borderColor: "BLACK_T_87",
|
|
109
102
|
$borderRadiusX: 0.5,
|
|
110
103
|
children: [
|
|
111
|
-
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */ e(
|
|
114
|
-
/* @__PURE__ */ e(
|
|
104
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(U, { withLoader: !0, height: 200, width: 200, src: T }) }),
|
|
105
|
+
/* @__PURE__ */ a(C, { $flexGap: 16, children: [
|
|
106
|
+
/* @__PURE__ */ e(I, { $renderAs: "ac2-black", children: O }),
|
|
107
|
+
/* @__PURE__ */ e(I, { $renderAs: "ab1", children: R || "" })
|
|
115
108
|
] })
|
|
116
109
|
]
|
|
117
110
|
}
|
|
@@ -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 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,KAA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EAAAM,GAAA,EAAY,cAAcpC,IAAwB,KAAK,KAAK;AAAA,IAC5DA,IACE,gBAAAiC,EAAAI,GAAA,EAAsB,QAAQ,KAC7B,UAAA;AAAA,MAAA,gBAAAP,EAACQ,KAAyB,mBAAAd,GAAsC;AAAA,MAChE,gBAAAM,EAACK,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,MACvB,gBAAAL,EAACS,KAAK,WAAU,OAAM,QAAO,cAAa,QAAO,UAAS,UAE1D,mCAAA,CAAA;AAAA,IAAA,EACF,CAAA,IAEC,gBAAAN,EAAAI,GAAA,EAAsB,SAAS,QAC9B,UAAA;AAAA,MAAC,gBAAAP,EAAAU,GAAA,EAAqB;AAAA,MACtB,gBAAAP;AAAA,QAACQ;AAAA,QAAA;AAAA,UACC,QAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,gBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAX,EAACY,GAAA,EACC,UAAA,gBAAAZ,EAACa,GAAM,EAAA,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKnC,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAyB,EAACQ,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAX,EAAAS,GAAA,EAAK,WAAU,aAAa,UAAKtC,GAAA;AAAA,cACjC,gBAAA6B,EAAAS,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 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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B,gBAAAN;AAAA,QAACO;AAAA,QAAA;AAAA,UACC,QAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,WAAW;AAAA,UACX,UAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,gBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAV,EAACW,GAAA,EACC,UAAA,gBAAAX,EAACY,GAAM,EAAA,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKlC,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAyB,EAACO,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAV,EAAAa,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,53 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GIF as
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as y, useMemo as $, useCallback as b } from "react";
|
|
3
|
+
import { GIF as G } 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 I } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import x from "../../../ui/image/image.js";
|
|
7
|
+
import L 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 A from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as R } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as D } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { updateGoalInFormData as j } from "../../helper.js";
|
|
13
|
+
import k from "../slide-header/index.js";
|
|
14
|
+
import { Container as O, ContentWrapper as w, ImageWrapper as F, InputContainer as N } from "./test-prep-styled.js";
|
|
15
|
+
const Z = y(() => {
|
|
16
|
+
const { milestoneConfig: n, formData: c, updateSlideConfig: a, trialHomeData: d } = D(), { demo_info: f } = d, { stream: i, region_data: g } = f || {}, { opportunity_country: m = "US" } = g || {}, { grade: s, goals: e } = c || {}, u = $(
|
|
17
|
+
() => I(n, {
|
|
18
|
+
countryCode: m,
|
|
19
|
+
grade: s ?? "",
|
|
20
20
|
goalCategory: r.TEST_PREP,
|
|
21
21
|
courseStream: i,
|
|
22
22
|
enrollmentType: "ONLINE"
|
|
23
23
|
}),
|
|
24
|
-
[
|
|
25
|
-
), { goal_code:
|
|
26
|
-
(t,
|
|
24
|
+
[m, s, n, i]
|
|
25
|
+
), { goal_code: h } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, T = b(
|
|
26
|
+
(t, _) => {
|
|
27
27
|
if (!t) {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
28
|
+
const E = e == null ? void 0 : e.filter(
|
|
29
|
+
(P) => P.goal_category !== r.TEST_PREP
|
|
30
30
|
);
|
|
31
|
-
|
|
31
|
+
a({ goals: E });
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const { label:
|
|
34
|
+
const { label: C } = _, S = j(e, r.TEST_PREP, {
|
|
35
35
|
goal_code: t,
|
|
36
|
-
milestone_name:
|
|
37
|
-
milestone_date_ts:
|
|
38
|
-
publish: l
|
|
36
|
+
milestone_name: C,
|
|
37
|
+
milestone_date_ts: R()
|
|
39
38
|
});
|
|
40
|
-
|
|
39
|
+
a({ goals: S });
|
|
41
40
|
},
|
|
42
|
-
[e,
|
|
41
|
+
[e, a]
|
|
43
42
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
43
|
+
return /* @__PURE__ */ l(O, { children: [
|
|
45
44
|
/* @__PURE__ */ o(p, { height: 60 }),
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ o(
|
|
45
|
+
/* @__PURE__ */ o(k, {}),
|
|
46
|
+
/* @__PURE__ */ l(w, { $flexDirection: "row", $justifyContent: "center", children: [
|
|
47
|
+
/* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(x, { withLoader: !0, height: 402, width: 302, src: G.TEST_PREP, className: "image" }) }),
|
|
49
48
|
/* @__PURE__ */ o(
|
|
50
|
-
|
|
49
|
+
N,
|
|
51
50
|
{
|
|
52
51
|
$flexGap: 40,
|
|
53
52
|
$justifyContent: "center",
|
|
@@ -56,15 +55,15 @@ const te = G(() => {
|
|
|
56
55
|
$gapX: 2.5,
|
|
57
56
|
$gutterX: 2.5,
|
|
58
57
|
children: /* @__PURE__ */ o(
|
|
59
|
-
|
|
58
|
+
L,
|
|
60
59
|
{
|
|
61
60
|
renderAs: "primary",
|
|
62
61
|
label: "Select a Test",
|
|
63
|
-
value:
|
|
64
|
-
options:
|
|
62
|
+
value: h,
|
|
63
|
+
options: u,
|
|
65
64
|
shape: "borderLess",
|
|
66
65
|
theme: "dark",
|
|
67
|
-
onChange:
|
|
66
|
+
onChange: T,
|
|
68
67
|
isTransparent: !0
|
|
69
68
|
}
|
|
70
69
|
)
|
|
@@ -72,10 +71,10 @@ const te = G(() => {
|
|
|
72
71
|
)
|
|
73
72
|
] }),
|
|
74
73
|
/* @__PURE__ */ o(p, { heightX: 1 }),
|
|
75
|
-
/* @__PURE__ */ o(
|
|
74
|
+
/* @__PURE__ */ o(A, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
76
75
|
] });
|
|
77
76
|
});
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
Z as default
|
|
80
79
|
};
|
|
81
80
|
//# sourceMappingURL=test-prep.js.map
|