@cuemath/leap 3.5.64 → 3.5.66-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/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/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/timeline/daily-timeline/daily-timeline.js +40 -40
- package/dist/features/timeline/daily-timeline/daily-timeline.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/timeline/monthly-timeline/monthly-timeline-styled.js +8 -5
- package/dist/features/timeline/monthly-timeline/monthly-timeline-styled.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-timeline.js +35 -35
- package/dist/features/timeline/monthly-timeline/monthly-timeline.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 -13
- 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 +23 -4
- 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 +190 -158
- 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 +268 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +51 -32
- 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 +32 -30
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/index.d.ts +12 -6
- package/dist/index.js +148 -150
- package/dist/index.js.map +1 -1
- 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/features/sheets/utils/is-v3-worksheet.js +0 -55
- package/dist/features/sheets/utils/is-v3-worksheet.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
|
@@ -1,86 +1,121 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import D from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
9
|
-
import H from "../../../ui/inputs/select-input/select-input.js";
|
|
10
|
-
import W from "../../../ui/inputs/text-input/text-input.js";
|
|
11
|
-
import k from "../../../ui/separator/separator.js";
|
|
1
|
+
import { jsxs as n, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as L, useCallback as s, useEffect as w } from "react";
|
|
3
|
+
import { getGradesFromConfig as y } from "../../../milestone/create/milestone-create-helpers.js";
|
|
4
|
+
import A from "../../../ui/image/image.js";
|
|
5
|
+
import p from "../../../ui/inputs/select-input/select-input.js";
|
|
6
|
+
import S from "../../../ui/inputs/text-input/text-input.js";
|
|
7
|
+
import _ from "../../../ui/separator/separator.js";
|
|
12
8
|
import { useTrialSessionContext as v } from "../../context/use-trial-session-context.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
9
|
+
import N from "../slide-header/index.js";
|
|
10
|
+
import { AbsoluteImage as B, MetaTextWrapper as E } from "./student-info-styled.js";
|
|
11
|
+
import i from "../../../ui/layout/flex-view.js";
|
|
12
|
+
import { getDummyProfileImage as G } from "../student-profile/student-profile-utils.js";
|
|
13
|
+
import { RIGHT_PANEL_CONTENT_WIDTH as P } from "../../trial-session-constants.js";
|
|
14
|
+
import { getCourseOptions as k } from "./student-info-helpers.js";
|
|
15
|
+
const U = L(function() {
|
|
16
|
+
const { formData: g, milestoneConfig: h, updateSlideConfig: r, updateButtonState: m } = v(), { name: l, grade: o, course: d, studentProfile: f, numberInNameError: c } = g || {}, { dummyProfileImageIndex: C } = f || {}, b = y(h), I = G(C), a = k(Number(o)), u = !!(!(l && o && a.length > 0) || d), $ = s(
|
|
17
|
+
(t) => {
|
|
18
|
+
r({
|
|
19
|
+
name: t.target.value,
|
|
20
|
+
numberInNameError: !1
|
|
21
|
+
});
|
|
25
22
|
},
|
|
26
|
-
[
|
|
27
|
-
),
|
|
28
|
-
(
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
23
|
+
[r]
|
|
24
|
+
), x = s(
|
|
25
|
+
(t) => {
|
|
26
|
+
r({ grade: t, course: "" });
|
|
27
|
+
},
|
|
28
|
+
[r]
|
|
29
|
+
), T = s(
|
|
30
|
+
(t) => {
|
|
31
|
+
r({ course: t });
|
|
32
|
+
},
|
|
33
|
+
[r]
|
|
33
34
|
);
|
|
34
|
-
return
|
|
35
|
-
|
|
36
|
-
}, [u,
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
/* @__PURE__ */
|
|
39
|
-
/* @__PURE__ */
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
35
|
+
return w(() => {
|
|
36
|
+
m("right", { isDisabled: !u, isLoading: !1 });
|
|
37
|
+
}, [u, m]), /* @__PURE__ */ n(i, { $justifyContent: "center", $alignItems: "center", children: [
|
|
38
|
+
/* @__PURE__ */ e(_, { height: 60 }),
|
|
39
|
+
/* @__PURE__ */ e(N, { marginBottom: 100 }),
|
|
40
|
+
/* @__PURE__ */ n(
|
|
41
|
+
i,
|
|
42
|
+
{
|
|
43
|
+
$position: "relative",
|
|
44
|
+
$width: P - 100,
|
|
45
|
+
$flexDirection: "row",
|
|
46
|
+
$alignItems: "center",
|
|
47
|
+
$flexGapX: 2,
|
|
48
|
+
$gutterX: 1.5,
|
|
49
|
+
$gapX: 3.125,
|
|
50
|
+
$background: "WHITE_2",
|
|
51
|
+
$borderColor: "BLACK_T_87",
|
|
52
|
+
$borderRadiusX: 0.5,
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(B, {}),
|
|
55
|
+
/* @__PURE__ */ e(A, { withLoader: !0, height: 200, width: 200, src: I, borderColor: "BLACK_1" }),
|
|
56
|
+
/* @__PURE__ */ n(i, { $flexGap: 16, children: [
|
|
57
|
+
/* @__PURE__ */ e(
|
|
58
|
+
S,
|
|
59
|
+
{
|
|
60
|
+
renderAs: "primary",
|
|
61
|
+
label: "Name",
|
|
62
|
+
placeholder: "Student name",
|
|
63
|
+
value: l,
|
|
64
|
+
type: "text",
|
|
65
|
+
name: "name",
|
|
66
|
+
shape: "borderLess",
|
|
67
|
+
onChange: $,
|
|
68
|
+
width: "216px",
|
|
69
|
+
isTransparent: !0,
|
|
70
|
+
stickyLabel: !0,
|
|
71
|
+
errorMessage: c ? "Please enter a valid name" : void 0
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
/* @__PURE__ */ e(
|
|
75
|
+
p,
|
|
76
|
+
{
|
|
77
|
+
renderAs: "primary",
|
|
78
|
+
label: "Grade",
|
|
79
|
+
value: o,
|
|
80
|
+
options: b,
|
|
81
|
+
shape: "borderLess",
|
|
82
|
+
onChange: x,
|
|
83
|
+
theme: "dark",
|
|
84
|
+
widthX: 10,
|
|
85
|
+
isTransparent: !0
|
|
86
|
+
}
|
|
87
|
+
),
|
|
88
|
+
a.length > 0 ? /* @__PURE__ */ e(
|
|
89
|
+
p,
|
|
90
|
+
{
|
|
91
|
+
width: "216px",
|
|
92
|
+
renderAs: "primary",
|
|
93
|
+
label: "Course",
|
|
94
|
+
value: d,
|
|
95
|
+
options: a,
|
|
96
|
+
shape: "borderLess",
|
|
97
|
+
onChange: T,
|
|
98
|
+
theme: "dark",
|
|
99
|
+
isTransparent: !0
|
|
100
|
+
}
|
|
101
|
+
) : null
|
|
102
|
+
] }),
|
|
103
|
+
/* @__PURE__ */ e(
|
|
104
|
+
E,
|
|
105
|
+
{
|
|
106
|
+
$renderAs: "ub3-bold",
|
|
107
|
+
color: "BLACK_T_60",
|
|
108
|
+
$align: "right",
|
|
109
|
+
$width: "100%",
|
|
110
|
+
children: "We’ll solve questions from the selected grade"
|
|
111
|
+
}
|
|
112
|
+
)
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
)
|
|
81
116
|
] });
|
|
82
117
|
});
|
|
83
118
|
export {
|
|
84
|
-
|
|
119
|
+
U as default
|
|
85
120
|
};
|
|
86
121
|
//# sourceMappingURL=student-info.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-info.js","sources":["../../../../../src/features/trial-session/comps/student-info/student-info.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type InputHTMLAttributes } from 'react';\n\nimport {
|
|
1
|
+
{"version":3,"file":"student-info.js","sources":["../../../../../src/features/trial-session/comps/student-info/student-info.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, type InputHTMLAttributes } from 'react';\n\nimport { getGradesFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SelectInput from '../../../ui/inputs/select-input/select-input';\nimport TextInput from '../../../ui/inputs/text-input/text-input';\nimport Separator from '../../../ui/separator/separator';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './student-info-styled';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { getDummyProfileImage } from '../student-profile/student-profile-utils';\nimport { RIGHT_PANEL_CONTENT_WIDTH } from '../../trial-session-constants';\nimport { getCourseOptions } from './student-info-helpers';\n\nconst StudentInformation = memo(function StudentInformation() {\n const { formData, milestoneConfig, updateSlideConfig, updateButtonState } =\n useTrialSessionContext();\n\n const { name, grade, course, studentProfile, numberInNameError } = formData || {};\n const { dummyProfileImageIndex } = studentProfile || {};\n\n const grades = getGradesFromConfig(milestoneConfig);\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n const courses = getCourseOptions(Number(grade));\n const hasRequiredFields = Boolean(name && grade && courses.length > 0 ? course : true);\n\n const handleNameChange = useCallback<\n NonNullable<InputHTMLAttributes<HTMLInputElement>['onChange']>\n >(\n event => {\n updateSlideConfig({\n name: event.target.value,\n numberInNameError: false,\n });\n },\n [updateSlideConfig],\n );\n\n const handleGradeChange = useCallback(\n (value: string) => {\n updateSlideConfig({ grade: value, course: '' });\n },\n [updateSlideConfig],\n );\n\n const handleCourseChange = useCallback(\n (value: string) => {\n updateSlideConfig({ course: 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 marginBottom={100} />\n <FlexView\n $position=\"relative\"\n $width={RIGHT_PANEL_CONTENT_WIDTH - 100}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={2}\n $gutterX={1.5}\n $gapX={3.125}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.AbsoluteImage />\n <Image withLoader height={200} width={200} src={dummyProfileImage} borderColor=\"BLACK_1\" />\n\n <FlexView $flexGap={16}>\n <TextInput\n renderAs=\"primary\"\n label=\"Name\"\n placeholder=\"Student name\"\n value={name}\n type=\"text\"\n name=\"name\"\n shape=\"borderLess\"\n onChange={handleNameChange}\n width=\"216px\"\n isTransparent\n stickyLabel\n errorMessage={numberInNameError ? 'Please enter a valid name' : undefined}\n />\n <SelectInput\n renderAs=\"primary\"\n label=\"Grade\"\n value={grade}\n options={grades}\n shape=\"borderLess\"\n onChange={handleGradeChange}\n theme=\"dark\"\n widthX={10}\n isTransparent\n />\n {courses.length > 0 ? (\n <SelectInput\n width=\"216px\"\n renderAs=\"primary\"\n label=\"Course\"\n value={course}\n options={courses}\n shape=\"borderLess\"\n onChange={handleCourseChange}\n theme=\"dark\"\n isTransparent\n />\n ) : null}\n </FlexView>\n\n <Styled.MetaTextWrapper\n $renderAs=\"ub3-bold\"\n color=\"BLACK_T_60\"\n $align=\"right\"\n $width=\"100%\"\n >\n We’ll solve questions from the selected grade\n </Styled.MetaTextWrapper>\n </FlexView>\n </FlexView>\n );\n});\n\nexport default StudentInformation;\n"],"names":["StudentInformation","memo","formData","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","name","grade","course","studentProfile","numberInNameError","dummyProfileImageIndex","grades","getGradesFromConfig","dummyProfileImage","getDummyProfileImage","courses","getCourseOptions","hasRequiredFields","handleNameChange","useCallback","event","handleGradeChange","value","handleCourseChange","useEffect","jsxs","FlexView","jsx","Separator","SlideHeader","RIGHT_PANEL_CONTENT_WIDTH","Styled.AbsoluteImage","Image","TextInput","SelectInput","Styled.MetaTextWrapper"],"mappings":";;;;;;;;;;;;;;AAeM,MAAAA,IAAqBC,EAAK,WAA8B;AAC5D,QAAM,EAAE,UAAAC,GAAU,iBAAAC,GAAiB,mBAAAC,GAAmB,mBAAAC,EAAA,IACpDC,KAEI,EAAE,MAAAC,GAAM,OAAAC,GAAO,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UAAA;AAAA,YAAA;AAAA,UAED;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import o from "styled-components";
|
|
2
|
-
|
|
3
|
-
const a = o.div`
|
|
4
|
-
width: 100%;
|
|
5
|
-
height: 100%;
|
|
6
|
-
overflow: auto;
|
|
7
|
-
`, e = o.div(
|
|
2
|
+
const i = o.div(
|
|
8
3
|
({ theme: t }) => `
|
|
9
4
|
position: relative;
|
|
10
5
|
width: ${t.layout.gutter * 18.75}px;
|
|
@@ -18,12 +13,8 @@ const a = o.div`
|
|
|
18
13
|
bottom: 0;
|
|
19
14
|
}
|
|
20
15
|
`
|
|
21
|
-
)
|
|
22
|
-
margin: auto;
|
|
23
|
-
`;
|
|
16
|
+
);
|
|
24
17
|
export {
|
|
25
|
-
|
|
26
|
-
l as ContentWrapper,
|
|
27
|
-
e as ImageWrapper
|
|
18
|
+
i as ImageWrapper
|
|
28
19
|
};
|
|
29
20
|
//# sourceMappingURL=student-personalization-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-personalization-styled.js","sources":["../../../../../src/features/trial-session/comps/student-personalization/student-personalization-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\
|
|
1
|
+
{"version":3,"file":"student-personalization-styled.js","sources":["../../../../../src/features/trial-session/comps/student-personalization/student-personalization-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nconst ImageWrapper = styled.div(\n ({ theme }) => `\n position: relative;\n width: ${theme.layout.gutter * 18.75}px;\n height: ${theme.layout.gutter * 25}px;\n border: 1px solid ${theme.colors.BLACK_1};\n .image {\n position: absolute;\n top: -${theme.layout.gutter * 0.15625}px;\n left: -${theme.layout.gutter * 0.125}px;\n right: 0;\n bottom: 0;\n }\n`,\n);\n\nexport { ImageWrapper };\n"],"names":["ImageWrapper","styled","theme"],"mappings":";AAEA,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,YAG9BA,EAAM,OAAO,SAAS,OAAO;AAAA,aAC5BA,EAAM,OAAO,SAAS,KAAK;AAAA;AAAA;AAAA;AAAA;AAKxC;"}
|
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,UAA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AACO,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
|