@cuemath/leap 3.5.59 → 3.5.60-link0
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/chapters-v2/utils/node-card-utils.js +24 -24
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/sidebar.js +4 -4
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/toolbar.js +21 -17
- package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js +23 -13
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +43 -43
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +44 -46
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +39 -41
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/journey/tracking-id/tracking-id-student.js +1 -1
- package/dist/features/journey/tracking-id/tracking-id-student.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js +43 -43
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js.map +1 -1
- package/dist/features/milestone/create/api/milestone-config.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -1
- package/dist/features/sheets/constants/sheet.js +1 -0
- package/dist/features/sheets/constants/sheet.js.map +1 -1
- package/dist/features/sheets/utils/is-v3-worksheet.js +3 -2
- package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -1
- package/dist/features/trial-session/api/trial-home.js +10 -16
- package/dist/features/trial-session/api/trial-home.js.map +1 -1
- package/dist/features/trial-session/api/trial-session-report.js +16 -0
- package/dist/features/trial-session/api/trial-session-report.js.map +1 -0
- package/dist/features/trial-session/api/trial-topics.js +9 -0
- package/dist/features/trial-session/api/trial-topics.js.map +1 -0
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +62 -50
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js +5 -14
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +55 -53
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js +3 -2
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js.map +1 -1
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js +27 -27
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js +19 -18
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session.js +34 -43
- package/dist/features/trial-session/comps/learning-session/learning-session.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +56 -58
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +29 -6
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information.js +74 -64
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js +10 -9
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js +40 -39
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +39 -37
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js +12 -20
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights.js +64 -63
- package/dist/features/trial-session/comps/session-insights/session-insights.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js +13 -12
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js +21 -5
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview.js +20 -20
- package/dist/features/trial-session/comps/session-overview/session-overview.js.map +1 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js +61 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js +5 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js +135 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js +53 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js +15 -16
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +35 -33
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js +9 -16
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +39 -37
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js +10 -9
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info-constants.js +35 -0
- package/dist/features/trial-session/comps/student-info/student-info-constants.js.map +1 -0
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js +12 -0
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/student-info/student-info-styled.js +26 -11
- package/dist/features/trial-session/comps/student-info/student-info-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info.js +113 -78
- package/dist/features/trial-session/comps/student-info/student-info.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +3 -12
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js +34 -33
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +45 -44
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +9 -8
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js +11 -19
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +31 -29
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js +42 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js.map +1 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js +84 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js.map +1 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js +21 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js.map +1 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js +99 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js.map +1 -0
- package/dist/features/trial-session/comps/worksheet/worksheet.js +35 -33
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/context/trial-session-context.js +2 -0
- package/dist/features/trial-session/context/trial-session-context.js.map +1 -1
- package/dist/features/trial-session/helper.js +70 -64
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +201 -164
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/right-panel/right-panel-styled.js +8 -8
- package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
- package/dist/features/trial-session/right-panel/slide-components-map.js +42 -36
- package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
- package/dist/features/trial-session/trial-session-constants.js +22 -18
- package/dist/features/trial-session/trial-session-constants.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 +82 -77
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/trial-session/trial-session.js +38 -38
- package/dist/features/trial-session/trial-session.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +12 -12
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +1 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/mocks/activity.js +6 -0
- package/dist/features/worksheet/worksheet/mocks/activity.js.map +1 -0
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js +5 -0
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +57 -0
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +263 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js +177 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +267 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +2 -6
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +38 -37
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js +36 -35
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js +61 -58
- package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +35 -28
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/index.d.ts +13 -5
- package/dist/index.js +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/dist/types/models/worksheet.js +1 -1
- package/dist/types/models/worksheet.js.map +1 -1
- package/package.json +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
package/dist/features/trial-session/comps/student-personalization/student-personalization.js
CHANGED
|
@@ -1,37 +1,38 @@
|
|
|
1
1
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as p, useMemo as
|
|
2
|
+
import { memo as p, useMemo as u, useCallback as h, useEffect as g } from "react";
|
|
3
3
|
import { ILLUSTRATIONS as C } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
-
import { COURSE_STREAMS as
|
|
5
|
-
import { getPreferencesFromConfig as
|
|
4
|
+
import { COURSE_STREAMS as E, PREFERENCE_CATEGORY as S } from "../../../milestone/constants.js";
|
|
5
|
+
import { getPreferencesFromConfig as T } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
6
|
import b from "../../../ui/image/image.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useTrialSessionContext as
|
|
12
|
-
import
|
|
13
|
-
import {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
7
|
+
import $ from "../../../ui/inputs/checkbox-input-list/checkbox-input-list.js";
|
|
8
|
+
import t from "../../../ui/layout/flex-view.js";
|
|
9
|
+
import A from "../../../ui/separator/separator.js";
|
|
10
|
+
import I from "../../../ui/text/text.js";
|
|
11
|
+
import { useTrialSessionContext as x } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import L from "../slide-header/index.js";
|
|
13
|
+
import { ImageWrapper as O } from "./student-personalization-styled.js";
|
|
14
|
+
import { RIGHT_PANEL_CONTENT_WIDTH as R } from "../../trial-session-constants.js";
|
|
15
|
+
const W = p(function() {
|
|
16
|
+
const { formData: l, milestoneConfig: r, updateSlideConfig: i, updateButtonState: n } = x(), { grade: a, personalizedObjectives: s = [] } = l || {}, m = s.length > 0, c = u(
|
|
17
|
+
() => T(r, {
|
|
18
|
+
grade: a ?? "",
|
|
19
|
+
courseStream: E.MATH,
|
|
19
20
|
preferenceCategory: S.OBJECTIVES
|
|
20
21
|
}),
|
|
21
|
-
[
|
|
22
|
-
), d =
|
|
23
|
-
(
|
|
24
|
-
|
|
22
|
+
[a, r]
|
|
23
|
+
), d = h(
|
|
24
|
+
(f) => {
|
|
25
|
+
i({ personalizedObjectives: f });
|
|
25
26
|
},
|
|
26
|
-
[
|
|
27
|
+
[i]
|
|
27
28
|
);
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
}, [
|
|
31
|
-
/* @__PURE__ */ e(
|
|
32
|
-
/* @__PURE__ */ e(
|
|
33
|
-
/* @__PURE__ */ o(
|
|
34
|
-
/* @__PURE__ */ e(
|
|
29
|
+
return g(() => {
|
|
30
|
+
n("right", { isDisabled: !m, isLoading: !1 });
|
|
31
|
+
}, [m, n]), /* @__PURE__ */ o(t, { $justifyContent: "center", $alignItems: "center", children: [
|
|
32
|
+
/* @__PURE__ */ e(A, { height: 60 }),
|
|
33
|
+
/* @__PURE__ */ e(L, {}),
|
|
34
|
+
/* @__PURE__ */ o(t, { $width: R, $flexDirection: "row", $justifyContent: "center", children: [
|
|
35
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(
|
|
35
36
|
b,
|
|
36
37
|
{
|
|
37
38
|
withLoader: !0,
|
|
@@ -42,7 +43,7 @@ const H = p(function() {
|
|
|
42
43
|
}
|
|
43
44
|
) }),
|
|
44
45
|
/* @__PURE__ */ o(
|
|
45
|
-
|
|
46
|
+
t,
|
|
46
47
|
{
|
|
47
48
|
$flexGap: 24,
|
|
48
49
|
$borderColor: "BLACK_1",
|
|
@@ -50,14 +51,14 @@ const H = p(function() {
|
|
|
50
51
|
$gutterX: 1.5,
|
|
51
52
|
$justifyContent: "center",
|
|
52
53
|
children: [
|
|
53
|
-
/* @__PURE__ */ e(
|
|
54
|
+
/* @__PURE__ */ e(I, { $renderAs: "ab2-bold", $color: "BLACK_1", children: "What would you like your child to work on?" }),
|
|
54
55
|
/* @__PURE__ */ e(
|
|
55
|
-
|
|
56
|
+
$,
|
|
56
57
|
{
|
|
57
58
|
size: "small",
|
|
58
59
|
renderAs: "black",
|
|
59
|
-
options:
|
|
60
|
-
value:
|
|
60
|
+
options: c,
|
|
61
|
+
value: s,
|
|
61
62
|
onChange: d,
|
|
62
63
|
optionFlexGap: 16
|
|
63
64
|
}
|
|
@@ -69,6 +70,6 @@ const H = p(function() {
|
|
|
69
70
|
] });
|
|
70
71
|
});
|
|
71
72
|
export {
|
|
72
|
-
|
|
73
|
+
W as default
|
|
73
74
|
};
|
|
74
75
|
//# sourceMappingURL=student-personalization.js.map
|
package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-personalization.js","sources":["../../../../../src/features/trial-session/comps/student-personalization/student-personalization.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 CheckboxInputList from '../../../ui/inputs/checkbox-input-list/checkbox-input-list';\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 * as Styled from './student-personalization-styled';\n\nconst StudentPersonalization = memo(function StudentPersonalization() {\n const { formData, milestoneConfig, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { grade, personalizedObjectives = [] } = formData || {};\n\n const hasRequiredFields = Boolean(personalizedObjectives.length > 0);\n\n const objectivesList = useMemo(\n () =>\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.OBJECTIVES,\n }),\n [grade, milestoneConfig],\n );\n\n const handleChangeObjectives = useCallback(\n (value: string[]) => {\n updateSlideConfig({ personalizedObjectives: value });\n },\n [updateSlideConfig],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"student-personalization.js","sources":["../../../../../src/features/trial-session/comps/student-personalization/student-personalization.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 CheckboxInputList from '../../../ui/inputs/checkbox-input-list/checkbox-input-list';\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 * as Styled from './student-personalization-styled';\nimport { RIGHT_PANEL_CONTENT_WIDTH } from '../../trial-session-constants';\n\nconst StudentPersonalization = memo(function StudentPersonalization() {\n const { formData, milestoneConfig, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { grade, personalizedObjectives = [] } = formData || {};\n\n const hasRequiredFields = Boolean(personalizedObjectives.length > 0);\n\n const objectivesList = useMemo(\n () =>\n getPreferencesFromConfig(milestoneConfig, {\n grade: grade ?? '',\n courseStream: COURSE_STREAMS.MATH,\n preferenceCategory: PREFERENCE_CATEGORY.OBJECTIVES,\n }),\n [grade, milestoneConfig],\n );\n\n const handleChangeObjectives = useCallback(\n (value: string[]) => {\n updateSlideConfig({ personalizedObjectives: value });\n },\n [updateSlideConfig],\n );\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: !hasRequiredFields, isLoading: false });\n }, [hasRequiredFields, updateButtonState]);\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <Separator height={60} />\n <SlideHeader />\n <FlexView $width={RIGHT_PANEL_CONTENT_WIDTH} $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image\n withLoader\n height={402}\n width={302}\n className=\"image\"\n src={ILLUSTRATIONS.PERSONALIZATION}\n />\n </Styled.ImageWrapper>\n <FlexView\n $flexGap={24}\n $borderColor=\"BLACK_1\"\n $background=\"GREEN_1\"\n $gutterX={1.5}\n $justifyContent=\"center\"\n >\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_1\">\n What would you like your child to work on?\n </Text>\n <CheckboxInputList\n size=\"small\"\n renderAs=\"black\"\n options={objectivesList}\n value={personalizedObjectives}\n onChange={handleChangeObjectives}\n optionFlexGap={16}\n />\n </FlexView>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default StudentPersonalization;\n"],"names":["StudentPersonalization","memo","formData","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","grade","personalizedObjectives","hasRequiredFields","objectivesList","useMemo","getPreferencesFromConfig","COURSE_STREAMS","PREFERENCE_CATEGORY","handleChangeObjectives","useCallback","value","useEffect","jsxs","FlexView","jsx","Separator","SlideHeader","RIGHT_PANEL_CONTENT_WIDTH","Styled.ImageWrapper","Image","ILLUSTRATIONS","Text","CheckboxInputList"],"mappings":";;;;;;;;;;;;;;AAeM,MAAAA,IAAyBC,EAAK,WAAkC;AACpE,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,mBAAAC,EAAA,IACpDC,KAEI,EAAE,OAAAC,GAAO,wBAAAC,IAAyB,CAAG,EAAA,IAAIN,KAAY,CAAA,GAErDO,IAA4BD,EAAuB,SAAS,GAE5DE,IAAiBC;AAAA,IACrB,MACEC,EAAyBT,GAAiB;AAAA,MACxC,OAAOI,KAAS;AAAA,MAChB,cAAcM,EAAe;AAAA,MAC7B,oBAAoBC,EAAoB;AAAA,IAAA,CACzC;AAAA,IACH,CAACP,GAAOJ,CAAe;AAAA,EAAA,GAGnBY,IAAyBC;AAAA,IAC7B,CAACC,MAAoB;AACD,MAAAb,EAAA,EAAE,wBAAwBa,EAAA,CAAO;AAAA,IACrD;AAAA,IACA,CAACb,CAAiB;AAAA,EAAA;AAGpB,SAAAc,EAAU,MAAM;AACd,IAAAb,EAAkB,SAAS,EAAE,YAAY,CAACI,GAAmB,WAAW,IAAO;AAAA,EAAA,GAC9E,CAACA,GAAmBJ,CAAiB,CAAC,GAGtC,gBAAAc,EAAAC,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC7C,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,sBACZH,GAAS,EAAA,QAAQI,GAA2B,gBAAe,OAAM,iBAAgB,UAChF,UAAA;AAAA,MAAC,gBAAAH,EAAAI,GAAA,EACC,UAAA,gBAAAJ;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,YAAU;AAAA,UACV,QAAQ;AAAA,UACR,OAAO;AAAA,UACP,WAAU;AAAA,UACV,KAAKC,EAAc;AAAA,QAAA;AAAA,MAAA,GAEvB;AAAA,MACA,gBAAAR;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,cAAa;AAAA,UACb,aAAY;AAAA,UACZ,UAAU;AAAA,UACV,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAC,EAACO,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,8CAAA;AAAA,YACA,gBAAAP;AAAA,cAACQ;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,UAAS;AAAA,gBACT,SAASnB;AAAA,gBACT,OAAOF;AAAA,gBACP,UAAUO;AAAA,gBACV,eAAe;AAAA,cAAA;AAAA,YACjB;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,46 +1,47 @@
|
|
|
1
1
|
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as k, useMemo as C, useCallback as U, useEffect as f } from "react";
|
|
3
3
|
import { ILLUSTRATIONS as c } from "../../../../assets/illustrations/illustrations.js";
|
|
4
4
|
import { GOAL_CATEGORY as L } from "../../../milestone/constants.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
5
|
+
import v from "../../../ui/error/error.js";
|
|
6
|
+
import K from "../../../ui/image/image.js";
|
|
7
|
+
import I from "../../../ui/layout/flex-view.js";
|
|
8
|
+
import M from "../../../ui/loader/app-loader/app-loader.js";
|
|
9
|
+
import A from "../../../ui/separator/separator.js";
|
|
10
10
|
import u from "../../../ui/text/text.js";
|
|
11
|
-
import { useGetStudentProfileSummary as
|
|
12
|
-
import { useTrialSessionContext as
|
|
13
|
-
import { getFormattedStudentPersonalizedPreference as
|
|
14
|
-
import
|
|
15
|
-
import { GOAL_MAPPING as
|
|
16
|
-
import
|
|
17
|
-
import { Container as
|
|
18
|
-
import { getDummyProfileImage as
|
|
19
|
-
|
|
11
|
+
import { useGetStudentProfileSummary as X } from "../../api/student-profile-summary.js";
|
|
12
|
+
import { useTrialSessionContext as j } from "../../context/use-trial-session-context.js";
|
|
13
|
+
import { getFormattedStudentPersonalizedPreference as T } from "../../helper.js";
|
|
14
|
+
import z from "../slide-header/index.js";
|
|
15
|
+
import { GOAL_MAPPING as F } from "./constant.js";
|
|
16
|
+
import V from "./student-profile-highlights/student-profile-highlights.js";
|
|
17
|
+
import { Container as Y, ContentWrapper as y, AbsoluteImage as q, ImageWrapper as J } from "./student-profile-styled.js";
|
|
18
|
+
import { getDummyProfileImage as Q, getMilestoneGoalName as b } from "./student-profile-utils.js";
|
|
19
|
+
import { RIGHT_PANEL_CONTENT_WIDTH as G } from "../../trial-session-constants.js";
|
|
20
|
+
const Se = k(function() {
|
|
20
21
|
const {
|
|
21
22
|
isTeacher: n,
|
|
22
23
|
studentId: p,
|
|
23
24
|
formData: O,
|
|
24
|
-
slideConfig:
|
|
25
|
+
slideConfig: R,
|
|
25
26
|
milestoneConfig: m,
|
|
26
27
|
updateSlideConfig: g,
|
|
27
28
|
updateButtonState: h
|
|
28
|
-
} =
|
|
29
|
+
} = j(), { showProfileHighlights: r } = R, {
|
|
29
30
|
name: x,
|
|
30
31
|
goals: t = [],
|
|
31
32
|
studentProfile: a,
|
|
32
33
|
personalizedObjectives: P = [],
|
|
33
34
|
personalizedPosition: _ = []
|
|
34
|
-
} = O || {}, { dummyProfileImageIndex:
|
|
35
|
-
school_success_goal:
|
|
36
|
-
test_prep_goal:
|
|
35
|
+
} = O || {}, { dummyProfileImageIndex: w, profileSummary: D } = a || {}, H = Q(w), l = C(() => t && t.length > 0 ? {
|
|
36
|
+
school_success_goal: b(t, L.SCHOOL_SUCCESS),
|
|
37
|
+
test_prep_goal: b(t, L.TEST_PREP)
|
|
37
38
|
} : null, [t]), {
|
|
38
39
|
get: S,
|
|
39
|
-
data:
|
|
40
|
+
data: N,
|
|
40
41
|
isProcessing: s,
|
|
41
|
-
isProcessed:
|
|
42
|
-
isProcessingFailed:
|
|
43
|
-
} =
|
|
42
|
+
isProcessed: E,
|
|
43
|
+
isProcessingFailed: B
|
|
44
|
+
} = X(), { profile_summary: $ } = N || {}, d = U(() => {
|
|
44
45
|
l && S(p, l);
|
|
45
46
|
}, [S, l, p]);
|
|
46
47
|
f(() => {
|
|
@@ -48,18 +49,18 @@ const Pe = N(function() {
|
|
|
48
49
|
}, [s, h]), f(() => {
|
|
49
50
|
n && !a && !r && d();
|
|
50
51
|
}, [d, n, a, r]), f(() => {
|
|
51
|
-
n &&
|
|
52
|
+
n && E && !r && g({
|
|
52
53
|
studentProfile: {
|
|
53
|
-
profileSummary:
|
|
54
|
+
profileSummary: $ || "",
|
|
54
55
|
dummyProfileImageIndex: Math.floor(Math.random() * 6)
|
|
55
56
|
}
|
|
56
57
|
});
|
|
57
|
-
}, [
|
|
58
|
-
const
|
|
58
|
+
}, [E, n, r, $, g]);
|
|
59
|
+
const W = C(
|
|
59
60
|
() => [
|
|
60
61
|
{
|
|
61
62
|
title: "Student Level",
|
|
62
|
-
description: `Catching up: ${
|
|
63
|
+
description: `Catching up: ${T(
|
|
63
64
|
m,
|
|
64
65
|
_
|
|
65
66
|
).map((o) => o.preference_description)}`,
|
|
@@ -70,7 +71,7 @@ const Pe = N(function() {
|
|
|
70
71
|
illustration: c.ARROW_BOARD_GREEN,
|
|
71
72
|
background: "GREEN_1",
|
|
72
73
|
title: "Goals",
|
|
73
|
-
description:
|
|
74
|
+
description: T(
|
|
74
75
|
m,
|
|
75
76
|
P
|
|
76
77
|
).map((o) => o.preference_name)
|
|
@@ -80,23 +81,23 @@ const Pe = N(function() {
|
|
|
80
81
|
background: "PURPLE_1",
|
|
81
82
|
title: "Learning Plan",
|
|
82
83
|
description: t.map(
|
|
83
|
-
(o) => `${
|
|
84
|
+
(o) => `${F[o.goal_category]}: ${o.milestone_name}`
|
|
84
85
|
)
|
|
85
86
|
}
|
|
86
87
|
],
|
|
87
88
|
[t, m, P, _]
|
|
88
89
|
);
|
|
89
|
-
return
|
|
90
|
-
/* @__PURE__ */ e(
|
|
91
|
-
/* @__PURE__ */ e(
|
|
92
|
-
r ? /* @__PURE__ */ i(
|
|
93
|
-
/* @__PURE__ */ e(
|
|
94
|
-
/* @__PURE__ */ e(
|
|
90
|
+
return B ? /* @__PURE__ */ e(v, { height: "70vh", onTryAgain: d }) : s || !a && !r ? /* @__PURE__ */ e(M, { height: "100vh" }) : /* @__PURE__ */ i(Y, { children: [
|
|
91
|
+
/* @__PURE__ */ e(A, { height: 60 }),
|
|
92
|
+
/* @__PURE__ */ e(z, { marginBottom: r ? 50 : 100 }),
|
|
93
|
+
r ? /* @__PURE__ */ i(y, { $width: G - 100, children: [
|
|
94
|
+
/* @__PURE__ */ e(V, { profileHighlights: W }),
|
|
95
|
+
/* @__PURE__ */ e(A, { height: 16 }),
|
|
95
96
|
/* @__PURE__ */ e(u, { $renderAs: "ub3", $color: "BLACK_T_60", $align: "center", children: "We can always revisit this later" })
|
|
96
|
-
] }) : /* @__PURE__ */ i(
|
|
97
|
-
/* @__PURE__ */ e(
|
|
97
|
+
] }) : /* @__PURE__ */ i(y, { $width: G, children: [
|
|
98
|
+
/* @__PURE__ */ e(q, {}),
|
|
98
99
|
/* @__PURE__ */ i(
|
|
99
|
-
|
|
100
|
+
I,
|
|
100
101
|
{
|
|
101
102
|
$width: "100%",
|
|
102
103
|
$heightX: 21.875,
|
|
@@ -108,10 +109,10 @@ const Pe = N(function() {
|
|
|
108
109
|
$borderColor: "BLACK_T_87",
|
|
109
110
|
$borderRadiusX: 0.5,
|
|
110
111
|
children: [
|
|
111
|
-
/* @__PURE__ */ e(
|
|
112
|
-
/* @__PURE__ */ i(
|
|
112
|
+
/* @__PURE__ */ e(J, { children: /* @__PURE__ */ e(K, { withLoader: !0, height: 200, width: 200, src: H }) }),
|
|
113
|
+
/* @__PURE__ */ i(I, { $flexGap: 16, children: [
|
|
113
114
|
/* @__PURE__ */ e(u, { $renderAs: "ac2-black", children: x }),
|
|
114
|
-
/* @__PURE__ */ e(u, { $renderAs: "ab1", children:
|
|
115
|
+
/* @__PURE__ */ e(u, { $renderAs: "ab1", children: D || "" })
|
|
115
116
|
] })
|
|
116
117
|
]
|
|
117
118
|
}
|
|
@@ -120,6 +121,6 @@ const Pe = N(function() {
|
|
|
120
121
|
] });
|
|
121
122
|
});
|
|
122
123
|
export {
|
|
123
|
-
|
|
124
|
+
Se as default
|
|
124
125
|
};
|
|
125
126
|
//# sourceMappingURL=student-profile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\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 type { TColorNames } from '../../../ui/types';\nimport {\n useGetStudentProfileSummary,\n type IGetStudentProfileSummaryQuery,\n} 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(function StudentProfile() {\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":";;;;;;;;;;;;;;;;;;AA+BM,MAAAA,KAAiBC,EAAK,WAA0B;AAC9C,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,wBAAAC,IAAyB,CAAC;AAAA,IAC1B,sBAAAC,IAAuB,CAAC;AAAA,EAAA,IACtBX,KAAY,CAAA,GACV,EAAE,wBAAAY,GAAwB,gBAAAC,MAAmBJ,KAAkB,CAAA,GAC/DK,IAAoBC,EAAqBH,CAAsB,GAE/DI,IAAUC,EAA+C,MACzDT,KAASA,EAAM,SAAS,IACnB;AAAA,IACL,qBAAqBU,EAAqBV,GAAOW,EAAc,cAAc;AAAA,IAC7E,gBAAgBD,EAAqBV,GAAOW,EAAc,SAAS;AAAA,EAAA,IAIhE,MACN,CAACX,CAAK,CAAC,GAEJ;AAAA,IACJ,KAAKY;AAAA,IACL,MAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,oBAAAC;AAAA,MACE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ACrE;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 { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\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 type { TColorNames } from '../../../ui/types';\nimport {\n useGetStudentProfileSummary,\n type IGetStudentProfileSummaryQuery,\n} 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';\nimport { RIGHT_PANEL_CONTENT_WIDTH } from '../../trial-session-constants';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(function StudentProfile() {\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={RIGHT_PANEL_CONTENT_WIDTH - 100}>\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 $width={RIGHT_PANEL_CONTENT_WIDTH}>\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","RIGHT_PANEL_CONTENT_WIDTH","StudentProfileHighlights","Text","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image"],"mappings":";;;;;;;;;;;;;;;;;;;AAgCM,MAAAA,KAAiBC,EAAK,WAA0B;AAC9C,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,wBAAAC,IAAyB,CAAC;AAAA,IAC1B,sBAAAC,IAAuB,CAAC;AAAA,EAAA,IACtBX,KAAY,CAAA,GACV,EAAE,wBAAAY,GAAwB,gBAAAC,MAAmBJ,KAAkB,CAAA,GAC/DK,IAAoBC,EAAqBH,CAAsB,GAE/DI,IAAUC,EAA+C,MACzDT,KAASA,EAAM,SAAS,IACnB;AAAA,IACL,qBAAqBU,EAAqBV,GAAOW,EAAc,cAAc;AAAA,IAC7E,gBAAgBD,EAAqBV,GAAOW,EAAc,SAAS;AAAA,EAAA,IAIhE,MACN,CAACX,CAAK,CAAC,GAEJ;AAAA,IACJ,KAAKY;AAAA,IACL,MAAAC;AAAA,IACA,cAAAC;AAAA,I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Q,KAAK,OAAO,KAAK,KAAKpC,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAyB,EAACS,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAZ,EAAAU,GAAA,EAAK,WAAU,aAAa,UAAKvC,GAAA;AAAA,cACjC,gBAAA6B,EAAAU,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,20 +1,21 @@
|
|
|
1
1
|
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
2
|
+
import { memo as m } from "react";
|
|
3
|
+
import n from "../../../ui/separator/separator.js";
|
|
4
4
|
import { useTrialSessionContext as f } from "../../context/use-trial-session-context.js";
|
|
5
5
|
import a from "../communication-slide/index.js";
|
|
6
6
|
import p from "../slide-header/index.js";
|
|
7
7
|
import { Container as c, ContentWrapper as h } from "./teacher-intro-styled.js";
|
|
8
8
|
import s from "./teacher-profile/teacher-profile.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
import { RIGHT_PANEL_CONTENT_WIDTH as l } from "../../trial-session-constants.js";
|
|
10
|
+
const N = m(function() {
|
|
11
|
+
const { slideConfig: o } = f(), { renderAVIn: e, teacher_profile: t } = o || {};
|
|
12
|
+
return e === "right" ? /* @__PURE__ */ r(a, {}) : /* @__PURE__ */ i(c, { children: [
|
|
13
|
+
/* @__PURE__ */ r(n, { height: 60 }),
|
|
13
14
|
/* @__PURE__ */ r(p, {}),
|
|
14
|
-
/* @__PURE__ */ r(h, { $width:
|
|
15
|
+
/* @__PURE__ */ r(h, { $width: l, children: /* @__PURE__ */ r(s, { teacherProfile: t }) })
|
|
15
16
|
] });
|
|
16
17
|
});
|
|
17
18
|
export {
|
|
18
|
-
|
|
19
|
+
N as default
|
|
19
20
|
};
|
|
20
21
|
//# sourceMappingURL=teacher-intro.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teacher-intro.js","sources":["../../../../../src/features/trial-session/comps/teacher-intro/teacher-intro.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport Separator from '../../../ui/separator/separator';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport CommunicationSlide from '../communication-slide';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './teacher-intro-styled';\nimport TeacherProfile from './teacher-profile/teacher-profile';\n\nconst TeacherIntro = memo(function TeacherIntro() {\n const { slideConfig } = useTrialSessionContext();\n const { renderAVIn, teacher_profile: teacherProfile } = slideConfig || {};\n\n if (renderAVIn === 'right') return <CommunicationSlide />;\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={
|
|
1
|
+
{"version":3,"file":"teacher-intro.js","sources":["../../../../../src/features/trial-session/comps/teacher-intro/teacher-intro.tsx"],"sourcesContent":["import { memo } from 'react';\n\nimport Separator from '../../../ui/separator/separator';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport CommunicationSlide from '../communication-slide';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './teacher-intro-styled';\nimport TeacherProfile from './teacher-profile/teacher-profile';\nimport { RIGHT_PANEL_CONTENT_WIDTH } from '../../trial-session-constants';\n\nconst TeacherIntro = memo(function TeacherIntro() {\n const { slideConfig } = useTrialSessionContext();\n const { renderAVIn, teacher_profile: teacherProfile } = slideConfig || {};\n\n if (renderAVIn === 'right') return <CommunicationSlide />;\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={RIGHT_PANEL_CONTENT_WIDTH}>\n <TeacherProfile teacherProfile={teacherProfile} />\n </Styled.ContentWrapper>\n </Styled.Container>\n );\n});\n\nexport default TeacherIntro;\n"],"names":["TeacherIntro","memo","slideConfig","useTrialSessionContext","renderAVIn","teacherProfile","jsx","CommunicationSlide","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","RIGHT_PANEL_CONTENT_WIDTH","TeacherProfile"],"mappings":";;;;;;;;;AAUM,MAAAA,IAAeC,EAAK,WAAwB;AAC1C,QAAA,EAAE,aAAAC,MAAgBC,KAClB,EAAE,YAAAC,GAAY,iBAAiBC,EAAe,IAAIH,KAAe,CAAA;AAEvE,SAAIE,MAAe,UAAgB,gBAAAE,EAACC,GAAmB,CAAA,CAAA,IAGrD,gBAAAC,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,IACb,gBAAAL,EAACM,GAAA,EAAsB,QAAQC,GAC7B,UAAA,gBAAAP,EAACQ,GAAe,EAAA,gBAAAT,EAAgC,CAAA,GAClD;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,34 +1,26 @@
|
|
|
1
|
-
import
|
|
1
|
+
import t from "styled-components";
|
|
2
2
|
import r from "../../../ui/layout/flex-view.js";
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
height: 100%;
|
|
6
|
-
`, p = o(r)`
|
|
7
|
-
width: 750px;
|
|
8
|
-
margin: auto;
|
|
9
|
-
`, a = o.div(
|
|
10
|
-
({ theme: t }) => `
|
|
3
|
+
const l = t.div(
|
|
4
|
+
({ theme: o }) => `
|
|
11
5
|
position: relative;
|
|
12
|
-
width: ${
|
|
13
|
-
height: ${
|
|
14
|
-
border: 1px solid ${
|
|
6
|
+
width: ${o.layout.gutter * 18.75}px;
|
|
7
|
+
height: ${o.layout.gutter * 25}px;
|
|
8
|
+
border: 1px solid ${o.colors.BLACK_1};
|
|
15
9
|
overflow: hidden;
|
|
16
10
|
.image {
|
|
17
11
|
position: absolute;
|
|
18
|
-
top: -${
|
|
19
|
-
left: -${
|
|
12
|
+
top: -${o.layout.gutter * 0.15625}px;
|
|
13
|
+
left: -${o.layout.gutter * 0.125}px;
|
|
20
14
|
right: 0;
|
|
21
15
|
bottom: 0;
|
|
22
16
|
}
|
|
23
17
|
`
|
|
24
|
-
),
|
|
18
|
+
), p = t(r)`
|
|
25
19
|
flex-grow: 1;
|
|
26
20
|
border-left: none;
|
|
27
21
|
`;
|
|
28
22
|
export {
|
|
29
|
-
|
|
30
|
-
p as
|
|
31
|
-
a as ImageWrapper,
|
|
32
|
-
l as InputContainer
|
|
23
|
+
l as ImageWrapper,
|
|
24
|
+
p as InputContainer
|
|
33
25
|
};
|
|
34
26
|
//# sourceMappingURL=test-prep-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-prep-styled.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst
|
|
1
|
+
{"version":3,"file":"test-prep-styled.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst ImageWrapper = styled.div(\n ({ theme }) => `\n position: relative;\n width: ${theme.layout.gutter * 18.75}px;\n height: ${theme.layout.gutter * 25}px;\n border: 1px solid ${theme.colors.BLACK_1};\n overflow: hidden;\n .image {\n position: absolute;\n top: -${theme.layout.gutter * 0.15625}px;\n left: -${theme.layout.gutter * 0.125}px;\n right: 0;\n bottom: 0;\n }\n`,\n);\n\nconst InputContainer = styled(FlexView)`\n flex-grow: 1;\n border-left: none;\n`;\n\nexport { ImageWrapper, InputContainer };\n"],"names":["ImageWrapper","styled","theme","InputContainer","FlexView"],"mappings":";;AAIA,MAAMA,IAAeC,EAAO;AAAA,EAC1B,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA;AAAA,WAENA,EAAM,OAAO,SAAS,KAAK;AAAA,YAC1BA,EAAM,OAAO,SAAS,EAAE;AAAA,sBACdA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA,YAI9BA,EAAM,OAAO,SAAS,OAAO;AAAA,aAC5BA,EAAM,OAAO,SAAS,KAAK;AAAA;AAAA;AAAA;AAAA;AAKxC,GAEMC,IAAiBF,EAAOG,CAAQ;AAAA;AAAA;AAAA;"}
|
|
@@ -1,46 +1,48 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as G, useMemo as I, useCallback as A } from "react";
|
|
3
3
|
import { GIF as L } from "../../../../assets/gif/gif.js";
|
|
4
4
|
import { GOAL_CATEGORY as n } from "../../../milestone/constants.js";
|
|
5
5
|
import { getGoalsFromConfig as x } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
6
|
+
import D from "../../../ui/image/image.js";
|
|
7
|
+
import R from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
8
|
import f from "../../../ui/separator/separator.js";
|
|
9
|
-
import
|
|
10
|
-
import { epochTimestampAfterOneYear as
|
|
9
|
+
import j from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as w } from "../../../utils/utils.js";
|
|
11
11
|
import { useTrialSessionContext as k } from "../../context/use-trial-session-context.js";
|
|
12
|
-
import { isPLASource as
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
import { isPLASource as F, updateGoalInFormData as H } from "../../helper.js";
|
|
13
|
+
import N from "../slide-header/index.js";
|
|
14
|
+
import { ImageWrapper as O, InputContainer as X } from "./test-prep-styled.js";
|
|
15
|
+
import { RIGHT_PANEL_CONTENT_WIDTH as B } from "../../trial-session-constants.js";
|
|
16
|
+
import g from "../../../ui/layout/flex-view.js";
|
|
17
|
+
const ae = G(function() {
|
|
18
|
+
const { milestoneConfig: a, formData: u, updateSlideConfig: i, trialHomeData: h } = k(), { demo_info: T, intel_student: t, student: _ } = h, { enrollment_type: s } = _ || {}, { stream: m, region_data: C } = T || {}, { opportunity_country: l = "US" } = C || {}, { grade: c, goals: o } = u || {}, p = F(t == null ? void 0 : t.source), P = I(
|
|
17
19
|
() => x(a, {
|
|
18
20
|
countryCode: l,
|
|
19
|
-
grade:
|
|
21
|
+
grade: c ?? "",
|
|
20
22
|
goalCategory: n.TEST_PREP,
|
|
21
23
|
courseStream: m,
|
|
22
24
|
enrollmentType: s
|
|
23
25
|
}),
|
|
24
|
-
[l, s,
|
|
25
|
-
), { goal_code: S } = (o == null ? void 0 : o.find((r) => r.goal_category === n.TEST_PREP)) ?? {},
|
|
26
|
-
(r,
|
|
27
|
-
const { label: y } =
|
|
26
|
+
[l, s, c, a, m]
|
|
27
|
+
), { goal_code: S } = (o == null ? void 0 : o.find((r) => r.goal_category === n.TEST_PREP)) ?? {}, $ = A(
|
|
28
|
+
(r, E) => {
|
|
29
|
+
const { label: y } = E, b = H(o, n.TEST_PREP, {
|
|
28
30
|
goal_code: r,
|
|
29
31
|
milestone_name: y,
|
|
30
|
-
milestone_date_ts:
|
|
31
|
-
publish:
|
|
32
|
+
milestone_date_ts: w(),
|
|
33
|
+
publish: p
|
|
32
34
|
});
|
|
33
|
-
i({ goals:
|
|
35
|
+
i({ goals: b });
|
|
34
36
|
},
|
|
35
|
-
[o,
|
|
37
|
+
[o, p, i]
|
|
36
38
|
);
|
|
37
|
-
return /* @__PURE__ */ d(
|
|
39
|
+
return /* @__PURE__ */ d(g, { $justifyContent: "center", $alignItems: "center", children: [
|
|
38
40
|
/* @__PURE__ */ e(f, { height: 60 }),
|
|
39
|
-
/* @__PURE__ */ e(
|
|
40
|
-
/* @__PURE__ */ d(
|
|
41
|
-
/* @__PURE__ */ e(
|
|
41
|
+
/* @__PURE__ */ e(N, {}),
|
|
42
|
+
/* @__PURE__ */ d(g, { $width: B, $flexDirection: "row", $justifyContent: "center", children: [
|
|
43
|
+
/* @__PURE__ */ e(O, { children: /* @__PURE__ */ e(D, { withLoader: !0, height: 402, width: 302, src: L.TEST_PREP, className: "image" }) }),
|
|
42
44
|
/* @__PURE__ */ e(
|
|
43
|
-
|
|
45
|
+
X,
|
|
44
46
|
{
|
|
45
47
|
$flexGap: 40,
|
|
46
48
|
$justifyContent: "center",
|
|
@@ -49,15 +51,15 @@ const re = $(function() {
|
|
|
49
51
|
$gapX: 2.5,
|
|
50
52
|
$gutterX: 2.5,
|
|
51
53
|
children: /* @__PURE__ */ e(
|
|
52
|
-
|
|
54
|
+
R,
|
|
53
55
|
{
|
|
54
56
|
renderAs: "primary",
|
|
55
57
|
label: "Select a Test",
|
|
56
58
|
value: S,
|
|
57
|
-
options:
|
|
59
|
+
options: P,
|
|
58
60
|
shape: "borderLess",
|
|
59
61
|
theme: "dark",
|
|
60
|
-
onChange:
|
|
62
|
+
onChange: $,
|
|
61
63
|
isTransparent: !0
|
|
62
64
|
}
|
|
63
65
|
)
|
|
@@ -65,10 +67,10 @@ const re = $(function() {
|
|
|
65
67
|
)
|
|
66
68
|
] }),
|
|
67
69
|
/* @__PURE__ */ e(f, { heightX: 1 }),
|
|
68
|
-
/* @__PURE__ */ e(
|
|
70
|
+
/* @__PURE__ */ e(j, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
69
71
|
] });
|
|
70
72
|
});
|
|
71
73
|
export {
|
|
72
|
-
|
|
74
|
+
ae as default
|
|
73
75
|
};
|
|
74
76
|
//# sourceMappingURL=test-prep.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import { 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 type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\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 { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(function TestPrep() {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo, intel_student: intelStudent, student } = trialHomeData;\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { grade, goals } = formData || {};\n const isPLA = isPLASource(intelStudent?.source);\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.TEST_PREP,\n courseStream: stream,\n enrollmentType: enrollmentType,\n }),\n [countryCode, enrollmentType, grade, milestoneConfig, stream],\n );\n\n const { goal_code: selectedGoal } =\n goals?.find(goal => goal.goal_category === GOAL_CATEGORY.TEST_PREP) ?? {};\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.TEST_PREP, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, isPLA, updateSlideConfig],\n );\n\n return (\n <
|
|
1
|
+
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import { 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 type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\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 { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\nimport { RIGHT_PANEL_CONTENT_WIDTH } from '../../trial-session-constants';\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst TestPrep = memo(function TestPrep() {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo, intel_student: intelStudent, student } = trialHomeData;\n const { enrollment_type: enrollmentType } = student || {};\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { grade, goals } = formData || {};\n const isPLA = isPLASource(intelStudent?.source);\n\n const goalsList = useMemo(\n () =>\n getGoalsFromConfig(milestoneConfig, {\n countryCode,\n grade: grade ?? '',\n goalCategory: GOAL_CATEGORY.TEST_PREP,\n courseStream: stream,\n enrollmentType: enrollmentType,\n }),\n [countryCode, enrollmentType, grade, milestoneConfig, stream],\n );\n\n const { goal_code: selectedGoal } =\n goals?.find(goal => goal.goal_category === GOAL_CATEGORY.TEST_PREP) ?? {};\n\n const handleGoalChange = useCallback(\n (value: string, option: ISelectOption<string | number>) => {\n const { label } = option;\n\n const updatedGoals = updateGoalInFormData(goals, GOAL_CATEGORY.TEST_PREP, {\n goal_code: value,\n milestone_name: label,\n milestone_date_ts: epochTimestampAfterOneYear(),\n publish: isPLA,\n });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, isPLA, updateSlideConfig],\n );\n\n return (\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <Separator height={60} />\n <SlideHeader />\n <FlexView $width={RIGHT_PANEL_CONTENT_WIDTH} $flexDirection=\"row\" $justifyContent=\"center\">\n <Styled.ImageWrapper>\n <Image withLoader height={402} width={302} src={GIF.TEST_PREP} className=\"image\" />\n </Styled.ImageWrapper>\n <Styled.InputContainer\n $flexGap={40}\n $justifyContent=\"center\"\n $background=\"BLUE_1\"\n $borderColor=\"BLACK_1\"\n $gapX={2.5}\n $gutterX={2.5}\n >\n <SearchableSelectInput\n renderAs=\"primary\"\n label=\"Select a Test\"\n value={selectedGoal}\n options={goalsList}\n shape=\"borderLess\"\n theme=\"dark\"\n onChange={handleGoalChange}\n isTransparent\n />\n </Styled.InputContainer>\n </FlexView>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </FlexView>\n );\n});\n\nexport default TestPrep;\n"],"names":["TestPrep","memo","milestoneConfig","formData","updateSlideConfig","trialHomeData","useTrialSessionContext","demoInfo","intelStudent","student","enrollmentType","stream","regionData","countryCode","grade","goals","isPLA","isPLASource","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","FlexView","jsx","Separator","SlideHeader","RIGHT_PANEL_CONTENT_WIDTH","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;;;AAkBM,MAAAA,KAAWC,EAAK,WAAoB;AACxC,QAAM,EAAE,iBAAAC,GAAiB,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAElE,EAAE,WAAWC,GAAU,eAAeC,GAAc,SAAAC,EAAY,IAAAJ,GAChE,EAAE,iBAAiBK,MAAmBD,KAAW,CAAA,GACjD,EAAE,QAAAE,GAAQ,aAAaC,EAAW,IAAIL,KAAY,CAAA,GAClD,EAAE,qBAAqBM,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5D,EAAE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