@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,44 +1,44 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GOAL_CATEGORY as
|
|
4
|
-
import { getCategorizedCurriculumStandards as
|
|
5
|
-
import { getGradesFromConfig as
|
|
6
|
-
import { epochTimestampAfterOneYear as
|
|
7
|
-
import { useTrialSessionContext as
|
|
8
|
-
import { updateGoalInFormData as
|
|
9
|
-
import
|
|
10
|
-
const
|
|
1
|
+
import { jsx as w } from "react/jsx-runtime";
|
|
2
|
+
import { memo as B, useMemo as C, useCallback as m, useEffect as S } from "react";
|
|
3
|
+
import { GOAL_CATEGORY as s } from "../../../milestone/constants.js";
|
|
4
|
+
import { getCategorizedCurriculumStandards as R } from "../../../milestone/create/comps/class-details-step/class-details-utils.js";
|
|
5
|
+
import { getGradesFromConfig as Y, getGoalsFromConfig as j } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import { epochTimestampAfterOneYear as G } from "../../../utils/utils.js";
|
|
7
|
+
import { useTrialSessionContext as q } from "../../context/use-trial-session-context.js";
|
|
8
|
+
import { updateGoalInFormData as O } from "../../helper.js";
|
|
9
|
+
import v from "./school-goals-view.js";
|
|
10
|
+
const Z = B(() => {
|
|
11
11
|
const {
|
|
12
12
|
milestoneConfig: n,
|
|
13
|
-
formData:
|
|
13
|
+
formData: E,
|
|
14
14
|
updateSlideConfig: a,
|
|
15
|
-
updateButtonState:
|
|
15
|
+
updateButtonState: f,
|
|
16
16
|
onRemoveOptionalSlides: g,
|
|
17
|
-
trialHomeData:
|
|
18
|
-
} =
|
|
19
|
-
() =>
|
|
17
|
+
trialHomeData: L
|
|
18
|
+
} = q(), { name: p, grade: e, goals: t, curriculum: i, numberInNameError: N } = E || {}, { demo_info: I } = L, { stream: u, region_data: T } = I || {}, { opportunity_country: c = "US" } = T || {}, U = Y(n), b = C(
|
|
19
|
+
() => R(n, {
|
|
20
20
|
countryCode: c,
|
|
21
21
|
grade: e ?? "",
|
|
22
|
-
goalCategory:
|
|
23
|
-
courseStream:
|
|
22
|
+
goalCategory: s.SCHOOL_SUCCESS,
|
|
23
|
+
courseStream: u,
|
|
24
24
|
enrollmentType: "ONLINE",
|
|
25
25
|
flow: "CREATE"
|
|
26
26
|
}),
|
|
27
|
-
[n, c, e,
|
|
28
|
-
), d =
|
|
29
|
-
() =>
|
|
27
|
+
[n, c, e, u]
|
|
28
|
+
), d = C(
|
|
29
|
+
() => j(n, {
|
|
30
30
|
countryCode: c,
|
|
31
31
|
grade: e ?? "",
|
|
32
|
-
goalCategory:
|
|
33
|
-
courseStream:
|
|
34
|
-
curriculumStandard:
|
|
32
|
+
goalCategory: s.SCHOOL_SUCCESS,
|
|
33
|
+
courseStream: u,
|
|
34
|
+
curriculumStandard: i,
|
|
35
35
|
enrollmentType: "ONLINE"
|
|
36
36
|
}),
|
|
37
|
-
[n, c, e,
|
|
38
|
-
), { goal_code: _ } =
|
|
39
|
-
() => (t == null ? void 0 : t.find((o) => o.goal_category ===
|
|
37
|
+
[n, c, e, u, i]
|
|
38
|
+
), { goal_code: _ } = C(
|
|
39
|
+
() => (t == null ? void 0 : t.find((o) => o.goal_category === s.SCHOOL_SUCCESS)) ?? {},
|
|
40
40
|
[t]
|
|
41
|
-
),
|
|
41
|
+
), h = !!(p && e && i && _), r = m(
|
|
42
42
|
(o, l) => {
|
|
43
43
|
a({
|
|
44
44
|
[o]: l,
|
|
@@ -46,65 +46,63 @@ const oo = Y(() => {
|
|
|
46
46
|
});
|
|
47
47
|
},
|
|
48
48
|
[a]
|
|
49
|
-
),
|
|
49
|
+
), y = m(
|
|
50
50
|
(o) => {
|
|
51
51
|
a({ numberInNameError: !1 }), r("name", o.target.value);
|
|
52
52
|
},
|
|
53
53
|
[a, r]
|
|
54
|
-
),
|
|
54
|
+
), H = m(
|
|
55
55
|
(o, l) => {
|
|
56
|
-
const { label:
|
|
56
|
+
const { label: F } = l, x = O(t, s.SCHOOL_SUCCESS, {
|
|
57
57
|
goal_code: o,
|
|
58
|
-
milestone_name:
|
|
59
|
-
milestone_date_ts:
|
|
60
|
-
publish: C
|
|
58
|
+
milestone_name: F,
|
|
59
|
+
milestone_date_ts: G()
|
|
61
60
|
});
|
|
62
|
-
a({ goals:
|
|
61
|
+
a({ goals: x });
|
|
63
62
|
},
|
|
64
|
-
[t,
|
|
65
|
-
),
|
|
63
|
+
[t, a]
|
|
64
|
+
), D = m(
|
|
66
65
|
(o) => r("curriculum", o),
|
|
67
66
|
[r]
|
|
68
|
-
),
|
|
67
|
+
), A = m(
|
|
69
68
|
(o) => {
|
|
70
69
|
r("grade", o), r("curriculum", "");
|
|
71
70
|
},
|
|
72
71
|
[r]
|
|
73
72
|
);
|
|
74
|
-
return
|
|
75
|
-
|
|
76
|
-
}, [
|
|
73
|
+
return S(() => {
|
|
74
|
+
f("right", { isDisabled: !h, isLoading: !1 });
|
|
75
|
+
}, [h, f]), S(() => {
|
|
77
76
|
e && (g == null || g(e));
|
|
78
|
-
}, [e]),
|
|
77
|
+
}, [e]), S(() => {
|
|
79
78
|
const o = d.length === 1 ? d[0] : void 0;
|
|
80
79
|
if (o) {
|
|
81
|
-
const l =
|
|
80
|
+
const l = O(t, s.SCHOOL_SUCCESS, {
|
|
82
81
|
goal_code: o.id ?? "",
|
|
83
82
|
milestone_name: o.label ?? "",
|
|
84
|
-
milestone_date_ts:
|
|
85
|
-
publish: C
|
|
83
|
+
milestone_date_ts: G()
|
|
86
84
|
});
|
|
87
85
|
a({ goals: l });
|
|
88
86
|
}
|
|
89
|
-
}, [d]), /* @__PURE__ */
|
|
90
|
-
|
|
87
|
+
}, [d]), /* @__PURE__ */ w(
|
|
88
|
+
v,
|
|
91
89
|
{
|
|
92
|
-
name:
|
|
90
|
+
name: p,
|
|
93
91
|
grade: e,
|
|
94
|
-
grades:
|
|
92
|
+
grades: U,
|
|
95
93
|
goalsList: d,
|
|
96
|
-
curriculum:
|
|
94
|
+
curriculum: i,
|
|
97
95
|
selectedGoal: _,
|
|
98
96
|
numberInNameError: N,
|
|
99
|
-
curriculumStandards:
|
|
100
|
-
onNameChange:
|
|
101
|
-
onGoalChange:
|
|
102
|
-
onGradeChange:
|
|
103
|
-
onCurriculumChange:
|
|
97
|
+
curriculumStandards: b,
|
|
98
|
+
onNameChange: y,
|
|
99
|
+
onGoalChange: H,
|
|
100
|
+
onGradeChange: A,
|
|
101
|
+
onCurriculumChange: D
|
|
104
102
|
}
|
|
105
103
|
);
|
|
106
104
|
});
|
|
107
105
|
export {
|
|
108
|
-
|
|
106
|
+
Z as default
|
|
109
107
|
};
|
|
110
108
|
//# sourceMappingURL=school-goals.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"school-goals.js","sources":["../../../../../src/features/trial-session/comps/school-goals/school-goals.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport {\n getGoalsFromConfig,\n getGradesFromConfig,\n} from '../../../milestone/create/milestone-create-helpers';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SchoolGoalsView from './school-goals-view';\n\nconst SchoolGoals = memo(() => {\n const {\n milestoneConfig,\n formData,\n updateSlideConfig,\n updateButtonState,\n onRemoveOptionalSlides,\n trialHomeData,\n } = useTrialSessionContext();\n const { name, grade, goals, curriculum, numberInNameError } = formData || {};\n\n const { demo_info: demoInfo
|
|
1
|
+
{"version":3,"file":"school-goals.js","sources":["../../../../../src/features/trial-session/comps/school-goals/school-goals.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getCategorizedCurriculumStandards } from '../../../milestone/create/comps/class-details-step/class-details-utils';\nimport {\n getGoalsFromConfig,\n getGradesFromConfig,\n} from '../../../milestone/create/milestone-create-helpers';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SchoolGoalsView from './school-goals-view';\n\nconst SchoolGoals = memo(() => {\n const {\n milestoneConfig,\n formData,\n updateSlideConfig,\n updateButtonState,\n onRemoveOptionalSlides,\n trialHomeData,\n } = useTrialSessionContext();\n const { name, grade, goals, curriculum, numberInNameError } = formData || {};\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const grades = getGradesFromConfig(milestoneConfig);\n\n const curriculumStandards = useMemo(\n () =>\n getCategorizedCurriculumStandards(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n flow: 'CREATE',\n }),\n [milestoneConfig, countryCode, grade, stream],\n );\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.SCHOOL_SUCCESS,\n courseStream: stream,\n curriculumStandard: curriculum,\n enrollmentType: 'ONLINE',\n }),\n [milestoneConfig, countryCode, grade, stream, curriculum],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.SCHOOL_SUCCESS) ?? {},\n [goals],\n );\n\n const hasRequiredFields = Boolean(name && grade && curriculum && selectedGoal);\n\n const updateStudentInformation = useCallback(\n (key: string, value: string) => {\n updateSlideConfig({\n [key]: value,\n ...(key === 'grade' || key === 'curriculum' ? { goals: [] } : {}),\n });\n },\n [updateSlideConfig],\n );\n\n const handleNameChange = useCallback<\n NonNullable<React.InputHTMLAttributes<HTMLInputElement>['onChange']>\n >(\n event => {\n updateSlideConfig({ numberInNameError: false });\n updateStudentInformation('name', event.target.value);\n },\n [updateSlideConfig, updateStudentInformation],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n const handleCurriculumChange = useCallback(\n (value: string) => updateStudentInformation('curriculum', value),\n [updateStudentInformation],\n );\n\n const handleGradeChange = useCallback(\n (value: string) => {\n updateStudentInformation('grade', value);\n updateStudentInformation('curriculum', '');\n },\n [updateStudentInformation],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n useEffect(() => {\n if (grade) {\n onRemoveOptionalSlides?.(grade);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [grade]);\n\n useEffect(() => {\n // If there is only one goal in the list, set it as the selected goal\n // and update the form data with the goal code, milestone name, and date\n const defaultGoal = goalsList.length === 1 ? goalsList[0] : undefined;\n\n if (defaultGoal) {\n const goalToUpdate = updateGoalInFormData(goals, GOAL_CATEGORY.SCHOOL_SUCCESS, {\n goal_code: defaultGoal.id ?? '',\n milestone_name: defaultGoal.label ?? '',\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: goalToUpdate });\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [goalsList]);\n\n return (\n <SchoolGoalsView\n name={name}\n grade={grade}\n grades={grades}\n goalsList={goalsList}\n curriculum={curriculum}\n selectedGoal={selectedGoal}\n numberInNameError={numberInNameError}\n curriculumStandards={curriculumStandards}\n onNameChange={handleNameChange}\n onGoalChange={handleGoalChange}\n onGradeChange={handleGradeChange}\n onCurriculumChange={handleCurriculumChange}\n />\n );\n});\n\nexport default SchoolGoals;\n"],"names":["SchoolGoals","memo","milestoneConfig","formData","updateSlideConfig","updateButtonState","onRemoveOptionalSlides","trialHomeData","useTrialSessionContext","name","grade","goals","curriculum","numberInNameError","demoInfo","stream","regionData","countryCode","grades","getGradesFromConfig","curriculumStandards","useMemo","getCategorizedCurriculumStandards","GOAL_CATEGORY","goalsList","getGoalsFromConfig","selectedGoal","goal","hasRequiredFields","updateStudentInformation","useCallback","key","value","handleNameChange","event","handleGoalChange","option","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","handleCurriculumChange","handleGradeChange","useEffect","defaultGoal","goalToUpdate","jsx","SchoolGoalsView"],"mappings":"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"}
|
|
@@ -13,35 +13,35 @@ import { studentLevels as M } from "../student-feedback/student-feedback-constan
|
|
|
13
13
|
import N from "./report-information/report-information.js";
|
|
14
14
|
import { Container as j, ContentWrapper as w } from "./session-report-styled.js";
|
|
15
15
|
const D = E(() => {
|
|
16
|
-
const { formData:
|
|
16
|
+
const { formData: g, milestoneConfig: o } = v(), { name: s = "", grade: f, attemptId: i = "shg", personalizedLevel: e = [] } = g || {}, {
|
|
17
17
|
data: p,
|
|
18
18
|
get: d,
|
|
19
|
-
isProcessing:
|
|
20
|
-
isProcessingFailed:
|
|
21
|
-
} = b(),
|
|
19
|
+
isProcessing: l,
|
|
20
|
+
isProcessingFailed: u
|
|
21
|
+
} = b(), m = R(() => {
|
|
22
22
|
var r, c;
|
|
23
|
-
const
|
|
23
|
+
const n = ((c = (r = A(o, {
|
|
24
24
|
grade: f ?? "",
|
|
25
25
|
courseStream: T.MATH,
|
|
26
26
|
preferenceCategory: x.LEVEL
|
|
27
27
|
})) == null ? void 0 : r.find((h) => h.id === (e == null ? void 0 : e[0]))) == null ? void 0 : c.label) ?? "";
|
|
28
|
-
return M[
|
|
29
|
-
}, [f, o, e]),
|
|
28
|
+
return M[n.toLowerCase()];
|
|
29
|
+
}, [f, o, e]), a = S(() => {
|
|
30
30
|
var r;
|
|
31
|
-
const
|
|
31
|
+
const n = y(
|
|
32
32
|
o,
|
|
33
33
|
e
|
|
34
34
|
);
|
|
35
|
-
n && d(
|
|
36
|
-
student_level: ((r =
|
|
37
|
-
student_name: s
|
|
35
|
+
i && s && n.length > 0 && d(i, {
|
|
36
|
+
student_level: ((r = n[0]) == null ? void 0 : r.preference_name) ?? "",
|
|
37
|
+
student_name: s
|
|
38
38
|
});
|
|
39
|
-
}, [
|
|
39
|
+
}, [i, d, o, s, e]);
|
|
40
40
|
return P(() => {
|
|
41
|
-
|
|
42
|
-
}, [
|
|
41
|
+
a();
|
|
42
|
+
}, [a]), u ? /* @__PURE__ */ t(L, { height: "70vh", onTryAgain: a }) : l || !p ? /* @__PURE__ */ t(_, { height: "100vh" }) : /* @__PURE__ */ C(j, { children: [
|
|
43
43
|
/* @__PURE__ */ t(F, { height: 60 }),
|
|
44
|
-
/* @__PURE__ */ t(I, { textToInsert: (
|
|
44
|
+
/* @__PURE__ */ t(I, { textToInsert: (m == null ? void 0 : m.title) ?? "" }),
|
|
45
45
|
/* @__PURE__ */ t(w, { $width: 750, children: /* @__PURE__ */ t(N, { sessionReports: p, studentName: s }) })
|
|
46
46
|
] });
|
|
47
47
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-report.js","sources":["../../../../../src/features/trial-session/comps/session-report/session-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { COURSE_STREAMS, PREFERENCE_CATEGORY } from '../../../milestone/constants';\nimport { getPreferencesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport { useGetSessionReports } from '../../api/trial-home';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { studentLevels } from '../student-feedback/student-feedback-constants';\nimport ReportInformation from './report-information/report-information';\nimport * as Styled from './session-report-styled';\n\nconst SessionReport = memo(() => {\n const { formData, milestoneConfig } = useTrialSessionContext();\n const { name = '', grade, attemptId = 'shg', personalizedLevel = [] } = formData || {};\n\n const {\n data: sessionReports,\n get: getSessionReports,\n isProcessing,\n isProcessingFailed,\n } = useGetSessionReports();\n\n const selectedSessionLevel = useMemo(() => {\n const selectedLabel =\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.LEVEL,\n })?.find(sessionLevel => sessionLevel.id === personalizedLevel?.[0])?.label ?? '';\n\n return studentLevels[selectedLabel.toLowerCase()];\n }, [grade, milestoneConfig, personalizedLevel]);\n\n const fetchData = useCallback(() => {\n const studentLevel = getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedLevel,\n );\n\n if (attemptId) {\n getSessionReports(attemptId, {\n student_level: studentLevel[0]?.preference_name ?? '',\n student_name: name
|
|
1
|
+
{"version":3,"file":"session-report.js","sources":["../../../../../src/features/trial-session/comps/session-report/session-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { COURSE_STREAMS, PREFERENCE_CATEGORY } from '../../../milestone/constants';\nimport { getPreferencesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport { useGetSessionReports } from '../../api/trial-home';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { studentLevels } from '../student-feedback/student-feedback-constants';\nimport ReportInformation from './report-information/report-information';\nimport * as Styled from './session-report-styled';\n\nconst SessionReport = memo(() => {\n const { formData, milestoneConfig } = useTrialSessionContext();\n const { name = '', grade, attemptId = 'shg', personalizedLevel = [] } = formData || {};\n\n const {\n data: sessionReports,\n get: getSessionReports,\n isProcessing,\n isProcessingFailed,\n } = useGetSessionReports();\n\n const selectedSessionLevel = useMemo(() => {\n const selectedLabel =\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.LEVEL,\n })?.find(sessionLevel => sessionLevel.id === personalizedLevel?.[0])?.label ?? '';\n\n return studentLevels[selectedLabel.toLowerCase()];\n }, [grade, milestoneConfig, personalizedLevel]);\n\n const fetchData = useCallback(() => {\n const studentLevel = getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedLevel,\n );\n\n if (attemptId && name && studentLevel.length > 0) {\n getSessionReports(attemptId, {\n student_level: studentLevel[0]?.preference_name ?? '',\n student_name: name,\n });\n }\n }, [attemptId, getSessionReports, milestoneConfig, name, personalizedLevel]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !sessionReports) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader textToInsert={selectedSessionLevel?.title ?? ''} />\n <Styled.ContentWrapper $width={750}>\n <ReportInformation sessionReports={sessionReports} studentName={name} />\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n});\n\nSessionReport.displayName = 'SessionReport';\n\nexport default SessionReport;\n"],"names":["SessionReport","memo","formData","milestoneConfig","useTrialSessionContext","name","grade","attemptId","personalizedLevel","sessionReports","getSessionReports","isProcessing","isProcessingFailed","useGetSessionReports","selectedSessionLevel","useMemo","selectedLabel","_b","_a","getPreferencesFromConfig","COURSE_STREAMS","PREFERENCE_CATEGORY","sessionLevel","studentLevels","fetchData","useCallback","studentLevel","getFormattedStudentPersonalizedPreference","useEffect","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","ReportInformation"],"mappings":";;;;;;;;;;;;;;AAeM,MAAAA,IAAgBC,EAAK,MAAM;AAC/B,QAAM,EAAE,UAAAC,GAAU,iBAAAC,EAAgB,IAAIC,EAAuB,GACvD,EAAE,MAAAC,IAAO,IAAI,OAAAC,GAAO,WAAAC,IAAY,OAAO,mBAAAC,IAAoB,CAAC,EAAA,IAAMN,KAAY,IAE9E;AAAA,IACJ,MAAMO;AAAA,IACN,KAAKC;AAAA,IACL,cAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAuBC,EAAQ,MAAM;;AACnC,UAAAC,MACJC,KAAAC,IAAAC,EAAyBhB,GAAiB;AAAA,MACxC,OAAOG,KAAS;AAAA,MAChB,cAAcc,EAAe;AAAA,MAC7B,oBAAoBC,EAAoB;AAAA,IACzC,CAAA,MAJD,gBAAAH,EAII,KAAK,CAAgBI,MAAAA,EAAa,QAAOd,KAAA,gBAAAA,EAAoB,SAJjE,gBAAAS,EAIsE,UAAS;AAE1E,WAAAM,EAAcP,EAAc,YAAA,CAAa;AAAA,EAC/C,GAAA,CAACV,GAAOH,GAAiBK,CAAiB,CAAC,GAExCgB,IAAYC,EAAY,MAAM;;AAClC,UAAMC,IAAeC;AAAA,MACnBxB;AAAA,MACAK;AAAA,IAAA;AAGF,IAAID,KAAaF,KAAQqB,EAAa,SAAS,KAC7ChB,EAAkBH,GAAW;AAAA,MAC3B,iBAAeW,IAAAQ,EAAa,CAAC,MAAd,gBAAAR,EAAiB,oBAAmB;AAAA,MACnD,cAAcb;AAAA,IAAA,CACf;AAAA,EACH,GACC,CAACE,GAAWG,GAAmBP,GAAiBE,GAAMG,CAAiB,CAAC;AAM3E,SAJAoB,EAAU,MAAM;AACJ,IAAAJ;EAAA,GACT,CAACA,CAAS,CAAC,GAEVZ,IACM,gBAAAiB,EAAAC,GAAA,EAAM,QAAO,QAAO,YAAYN,EAAW,CAAA,IAGjDb,KAAgB,CAACF,IACZ,gBAAAoB,EAACE,GAAU,EAAA,QAAO,QAAQ,CAAA,IAIjC,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAJ,EAAAK,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,IACtB,gBAAAL,EAAAM,GAAA,EAAY,eAAcrB,KAAA,gBAAAA,EAAsB,UAAS,IAAI;AAAA,IAC9D,gBAAAe,EAACO,GAAA,EAAsB,QAAQ,KAC7B,UAAA,gBAAAP,EAACQ,GAAkB,EAAA,gBAAA5B,GAAgC,aAAaJ,EAAA,CAAM,EACxE,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;AAEDL,EAAc,cAAc;"}
|
|
@@ -1,56 +1,55 @@
|
|
|
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 c, useCallback as G } from "react";
|
|
3
|
+
import { GIF as S } from "../../../../assets/gif/gif.js";
|
|
4
4
|
import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
|
|
5
|
-
import { getGoalsFromConfig as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { epochTimestampAfterOneYear as
|
|
11
|
-
import { useTrialSessionContext as
|
|
12
|
-
import { updateGoalInFormData as
|
|
13
|
-
import
|
|
14
|
-
import { Container as
|
|
15
|
-
const
|
|
16
|
-
const { formData:
|
|
17
|
-
() =>
|
|
18
|
-
countryCode:
|
|
5
|
+
import { getGoalsFromConfig as b } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
+
import x from "../../../ui/image/image.js";
|
|
7
|
+
import H from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
|
+
import p from "../../../ui/separator/separator.js";
|
|
9
|
+
import L from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as R } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as A } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { updateGoalInFormData as M } from "../../helper.js";
|
|
13
|
+
import D from "../slide-header/index.js";
|
|
14
|
+
import { Container as j, ContentWrapper as k, ImageWrapper as w, InputContainer as O } from "./student-enrichment-styled.js";
|
|
15
|
+
const Z = y(() => {
|
|
16
|
+
const { formData: d, milestoneConfig: n, updateSlideConfig: a, trialHomeData: f } = A(), { grade: i, goals: e } = d || {}, { demo_info: g } = f, { stream: m, region_data: h } = g || {}, { opportunity_country: s = "US" } = h || {}, u = c(
|
|
17
|
+
() => b(n, {
|
|
18
|
+
countryCode: s,
|
|
19
19
|
grade: i ?? "",
|
|
20
20
|
goalCategory: r.ENRICHMENT,
|
|
21
|
-
courseStream:
|
|
21
|
+
courseStream: m,
|
|
22
22
|
enrollmentType: "ONLINE"
|
|
23
23
|
}),
|
|
24
|
-
[
|
|
25
|
-
), { goal_code:
|
|
24
|
+
[n, s, i, m]
|
|
25
|
+
), { goal_code: C } = c(
|
|
26
26
|
() => (e == null ? void 0 : e.find((t) => t.goal_category === r.ENRICHMENT)) ?? {},
|
|
27
27
|
[e]
|
|
28
|
-
),
|
|
29
|
-
(t,
|
|
28
|
+
), E = G(
|
|
29
|
+
(t, I) => {
|
|
30
30
|
if (!t) {
|
|
31
|
-
const
|
|
32
|
-
(
|
|
31
|
+
const T = e == null ? void 0 : e.filter(
|
|
32
|
+
($) => $.goal_category !== r.ENRICHMENT
|
|
33
33
|
);
|
|
34
|
-
|
|
34
|
+
a({ goals: T });
|
|
35
35
|
return;
|
|
36
36
|
}
|
|
37
|
-
const { label:
|
|
37
|
+
const { label: N } = I, _ = M(e, r.ENRICHMENT, {
|
|
38
38
|
goal_code: t,
|
|
39
|
-
milestone_name:
|
|
40
|
-
milestone_date_ts:
|
|
41
|
-
publish: l
|
|
39
|
+
milestone_name: N,
|
|
40
|
+
milestone_date_ts: R()
|
|
42
41
|
});
|
|
43
|
-
|
|
42
|
+
a({ goals: _ });
|
|
44
43
|
},
|
|
45
|
-
[e,
|
|
44
|
+
[e, a]
|
|
46
45
|
);
|
|
47
|
-
return /* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ o(
|
|
49
|
-
/* @__PURE__ */ o(
|
|
50
|
-
/* @__PURE__ */
|
|
51
|
-
/* @__PURE__ */ o(
|
|
46
|
+
return /* @__PURE__ */ l(j, { children: [
|
|
47
|
+
/* @__PURE__ */ o(p, { height: 60 }),
|
|
48
|
+
/* @__PURE__ */ o(D, {}),
|
|
49
|
+
/* @__PURE__ */ l(k, { $width: 750, $flexDirection: "row", $justifyContent: "center", children: [
|
|
50
|
+
/* @__PURE__ */ o(w, { children: /* @__PURE__ */ o(x, { withLoader: !0, height: 402, width: 302, src: S.ENRICHMENT, className: "image" }) }),
|
|
52
51
|
/* @__PURE__ */ o(
|
|
53
|
-
|
|
52
|
+
O,
|
|
54
53
|
{
|
|
55
54
|
$flexGap: 24,
|
|
56
55
|
$justifyContent: "center",
|
|
@@ -59,26 +58,26 @@ const te = G(() => {
|
|
|
59
58
|
$gapX: 2.5,
|
|
60
59
|
$gutterX: 2.5,
|
|
61
60
|
children: /* @__PURE__ */ o(
|
|
62
|
-
|
|
61
|
+
H,
|
|
63
62
|
{
|
|
64
63
|
renderAs: "primary",
|
|
65
64
|
label: "Select a Goal",
|
|
66
|
-
value:
|
|
67
|
-
options:
|
|
65
|
+
value: C,
|
|
66
|
+
options: u,
|
|
68
67
|
shape: "borderLess",
|
|
69
68
|
theme: "dark",
|
|
70
|
-
onChange:
|
|
69
|
+
onChange: E,
|
|
71
70
|
isTransparent: !0
|
|
72
71
|
}
|
|
73
72
|
)
|
|
74
73
|
}
|
|
75
74
|
)
|
|
76
75
|
] }),
|
|
77
|
-
/* @__PURE__ */ o(
|
|
78
|
-
/* @__PURE__ */ o(
|
|
76
|
+
/* @__PURE__ */ o(p, { heightX: 1 }),
|
|
77
|
+
/* @__PURE__ */ o(L, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
79
78
|
] });
|
|
80
79
|
});
|
|
81
80
|
export {
|
|
82
|
-
|
|
81
|
+
Z as default
|
|
83
82
|
};
|
|
84
83
|
//# sourceMappingURL=student-enrichment.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-enrichment.js","sources":["../../../../../src/features/trial-session/comps/student-enrichment/student-enrichment.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-enrichment-styled';\n\nconst StudentEnrichment = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n const { grade, goals } = formData || {};\n\n const { demo_info: demoInfo
|
|
1
|
+
{"version":3,"file":"student-enrichment.js","sources":["../../../../../src/features/trial-session/comps/student-enrichment/student-enrichment.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-enrichment-styled';\n\nconst StudentEnrichment = memo(() => {\n const { formData, milestoneConfig, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n const { grade, goals } = formData || {};\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.ENRICHMENT,\n courseStream: stream,\n enrollmentType: 'ONLINE',\n }),\n [milestoneConfig, countryCode, grade, stream],\n );\n\n const { goal_code: selectedGoal } = useMemo(\n () => goals?.find(goal => goal.goal_category === GOAL_CATEGORY.ENRICHMENT) ?? {},\n [goals],\n );\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n if (!value) {\n const goalsWithoutEnrichment = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.ENRICHMENT,\n );\n\n updateSlideConfig({ goals: goalsWithoutEnrichment });\n\n return;\n }\n\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.ENRICHMENT, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={750} $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.ENRICHMENT} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={24}\n $justifyContent=\"center\"\n $background=\"PURPLE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Select a Goal\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default StudentEnrichment;\n"],"names":["StudentEnrichment","memo","formData","milestoneConfig","updateSlideConfig","trialHomeData","useTrialSessionContext","grade","goals","demoInfo","stream","regionData","countryCode","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutEnrichment","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,IAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAClE,EAAE,OAAAC,GAAO,OAAAC,MAAUN,KAAY,CAAA,GAE/B,EAAE,WAAWO,EAAa,IAAAJ,GAC1B,EAAE,QAAAK,GAAQ,aAAaC,EAAW,IAAIF,KAAY,CAAA,GAClD,EAAE,qBAAqBG,IAAc,KAAK,IAAID,KAAc,CAAA,GAE5DE,IAAYC;AAAA,IAChB,MACEC,EAAmBZ,GAAiB;AAAA,MAClC,aAAAS;AAAA,MACA,OAAOL,KAAS;AAAA,MAChB,cAAcS,EAAc;AAAA,MAC5B,cAAcN;AAAA,MACd,gBAAgB;AAAA,IAAA,CACjB;AAAA,IACH,CAACP,GAAiBS,GAAaL,GAAOG,CAAM;AAAA,EAAA,GAGxC,EAAE,WAAWO,EAAA,IAAiBH;AAAA,IAClC,OAAMN,KAAA,gBAAAA,EAAO,KAAK,CAAAU,MAAQA,EAAK,kBAAkBF,EAAc,gBAAe,CAAC;AAAA,IAC/E,CAACR,CAAK;AAAA,EAAA,GAGFW,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACzD,UAAI,CAACD,GAAO;AACV,cAAME,IAAyBf,KAAA,gBAAAA,EAAO;AAAA,UACpC,CAAAU,MAAQA,EAAK,kBAAkBF,EAAc;AAAA;AAG7B,QAAAZ,EAAA,EAAE,OAAOmB,EAAA,CAAwB;AAEnD;AAAA,MACF;AAEM,YAAA,EAAE,OAAAC,EAAU,IAAAF,GAEZG,IAAeC,EAAqBlB,GAAOQ,EAAc,YAAY;AAAA,QACzE,WAAWK;AAAA,QACX,gBAAgBG;AAAA,QAChB,mBAAmBG,EAA2B;AAAA,MAAA,CAC/C;AAEiB,MAAAvB,EAAA,EAAE,OAAOqB,EAAA,CAAc;AAAA,IAC3C;AAAA,IACA,CAACjB,GAAOJ,CAAiB;AAAA,EAAA;AAIzB,SAAA,gBAAAwB,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,IACb,gBAAAJ,EAACK,GAAA,EAAsB,QAAQ,KAAK,gBAAe,OAAM,iBAAgB,UACvE,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EAAM,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKC,EAAI,YAAY,WAAU,QAAQ,CAAA,GACpF;AAAA,MACA,gBAAAN;AAAA,QAACO;AAAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAgB;AAAA,UAChB,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,OAAO;AAAA,UACP,UAAU;AAAA,UAEV,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,OAAM;AAAA,cACN,OAAOrB;AAAA,cACP,SAASJ;AAAA,cACT,OAAM;AAAA,cACN,OAAM;AAAA,cACN,UAAUM;AAAA,cACV,eAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAW,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -15,13 +15,8 @@ const n = {
|
|
|
15
15
|
description: "Student is ready to tackle challenging concepts and problems.",
|
|
16
16
|
icon: e.GREEN_FACE
|
|
17
17
|
}
|
|
18
|
-
}, i = {
|
|
19
|
-
"MATH.POS.PLA1": "MATH.LVL.BEGIN",
|
|
20
|
-
"MATH.POS.PLA2": "MATH.LVL.INTERMEDIATE",
|
|
21
|
-
"MATH.POS.PLA3": "MATH.LVL.ADVANCED"
|
|
22
18
|
};
|
|
23
19
|
export {
|
|
24
|
-
i as PREFERENCE_CODE_MAP,
|
|
25
20
|
n as studentLevels
|
|
26
21
|
};
|
|
27
22
|
//# sourceMappingURL=student-feedback-constants.js.map
|
package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-feedback-constants.js","sources":["../../../../../src/features/trial-session/comps/student-feedback/student-feedback-constants.ts"],"sourcesContent":["import { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\n\nexport const studentLevels: Record<string, { title: string; description: string; icon: string }> = {\n beginner: {\n title: 'Basic',\n description: 'Student needs to focus on foundational concepts and skills',\n icon: ILLUSTRATIONS.ORANGE_FACE,\n },\n intermediate: {\n title: 'Intermediate',\n description: 'Student is comfortable with the basics, and is ready to apply them in problems',\n icon: ILLUSTRATIONS.YELLOW_FACE,\n },\n advanced: {\n title: 'Advanced',\n description: 'Student is ready to tackle challenging concepts and problems.',\n icon: ILLUSTRATIONS.GREEN_FACE,\n },\n};\n
|
|
1
|
+
{"version":3,"file":"student-feedback-constants.js","sources":["../../../../../src/features/trial-session/comps/student-feedback/student-feedback-constants.ts"],"sourcesContent":["import { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\n\nexport const studentLevels: Record<string, { title: string; description: string; icon: string }> = {\n beginner: {\n title: 'Basic',\n description: 'Student needs to focus on foundational concepts and skills',\n icon: ILLUSTRATIONS.ORANGE_FACE,\n },\n intermediate: {\n title: 'Intermediate',\n description: 'Student is comfortable with the basics, and is ready to apply them in problems',\n icon: ILLUSTRATIONS.YELLOW_FACE,\n },\n advanced: {\n title: 'Advanced',\n description: 'Student is ready to tackle challenging concepts and problems.',\n icon: ILLUSTRATIONS.GREEN_FACE,\n },\n};\n"],"names":["studentLevels","ILLUSTRATIONS"],"mappings":";AAEO,MAAMA,IAAsF;AAAA,EACjG,UAAU;AAAA,IACR,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAMC,EAAc;AAAA,EACtB;AAAA,EACA,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAMA,EAAc;AAAA,EACtB;AAAA,EACA,UAAU;AAAA,IACR,OAAO;AAAA,IACP,aAAa;AAAA,IACb,MAAMA,EAAc;AAAA,EACtB;AACF;"}
|