@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.
Files changed (186) hide show
  1. package/dist/features/chapters-v2/utils/node-card-utils.js +24 -24
  2. package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
  3. package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -1
  4. package/dist/features/cue-canvas/sidebar/sidebar.js +4 -4
  5. package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -1
  6. package/dist/features/cue-canvas/toolbar/toolbar.js +21 -17
  7. package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
  8. package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js +23 -13
  9. package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
  10. package/dist/features/homework/homework-card-view.js +43 -43
  11. package/dist/features/homework/homework-card-view.js.map +1 -1
  12. package/dist/features/homework/homework-card.js +44 -46
  13. package/dist/features/homework/homework-card.js.map +1 -1
  14. package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -1
  15. package/dist/features/homework/hw-card-list/hw-card-list-view.js +39 -41
  16. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  17. package/dist/features/journey/tracking-id/tracking-id-student.js +1 -1
  18. package/dist/features/journey/tracking-id/tracking-id-student.js.map +1 -1
  19. package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js +43 -43
  20. package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js.map +1 -1
  21. package/dist/features/milestone/create/api/milestone-config.js.map +1 -1
  22. package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +1 -1
  23. package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -1
  24. package/dist/features/sheets/constants/sheet.js +1 -0
  25. package/dist/features/sheets/constants/sheet.js.map +1 -1
  26. package/dist/features/sheets/utils/is-v3-worksheet.js +3 -2
  27. package/dist/features/sheets/utils/is-v3-worksheet.js.map +1 -1
  28. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js +1 -1
  29. package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -1
  30. package/dist/features/trial-session/api/trial-home.js +10 -16
  31. package/dist/features/trial-session/api/trial-home.js.map +1 -1
  32. package/dist/features/trial-session/api/trial-session-report.js +16 -0
  33. package/dist/features/trial-session/api/trial-session-report.js.map +1 -0
  34. package/dist/features/trial-session/api/trial-topics.js +9 -0
  35. package/dist/features/trial-session/api/trial-topics.js.map +1 -0
  36. package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +62 -50
  37. package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
  38. package/dist/features/trial-session/comps/class-preference/class-preference-styled.js +5 -14
  39. package/dist/features/trial-session/comps/class-preference/class-preference-styled.js.map +1 -1
  40. package/dist/features/trial-session/comps/class-preference/class-preference.js +55 -53
  41. package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
  42. package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js +3 -2
  43. package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js.map +1 -1
  44. package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js +27 -27
  45. package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map +1 -1
  46. package/dist/features/trial-session/comps/learning-session/learning-session-styled.js +19 -18
  47. package/dist/features/trial-session/comps/learning-session/learning-session-styled.js.map +1 -1
  48. package/dist/features/trial-session/comps/learning-session/learning-session.js +34 -43
  49. package/dist/features/trial-session/comps/learning-session/learning-session.js.map +1 -1
  50. package/dist/features/trial-session/comps/navigation-bar/index.js +56 -58
  51. package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
  52. package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +29 -6
  53. package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
  54. package/dist/features/trial-session/comps/offering-information/offering-information.js +74 -64
  55. package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
  56. package/dist/features/trial-session/comps/school-goals/school-goals-styled.js +10 -9
  57. package/dist/features/trial-session/comps/school-goals/school-goals-styled.js.map +1 -1
  58. package/dist/features/trial-session/comps/school-goals/school-goals-view.js +40 -39
  59. package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
  60. package/dist/features/trial-session/comps/school-goals/school-goals.js +39 -37
  61. package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
  62. package/dist/features/trial-session/comps/session-insights/session-insights-styled.js +12 -20
  63. package/dist/features/trial-session/comps/session-insights/session-insights-styled.js.map +1 -1
  64. package/dist/features/trial-session/comps/session-insights/session-insights.js +64 -63
  65. package/dist/features/trial-session/comps/session-insights/session-insights.js.map +1 -1
  66. package/dist/features/trial-session/comps/session-overview/session-overview-styled.js +13 -12
  67. package/dist/features/trial-session/comps/session-overview/session-overview-styled.js.map +1 -1
  68. package/dist/features/trial-session/comps/session-overview/session-overview-utils.js +21 -5
  69. package/dist/features/trial-session/comps/session-overview/session-overview-utils.js.map +1 -1
  70. package/dist/features/trial-session/comps/session-overview/session-overview.js +20 -20
  71. package/dist/features/trial-session/comps/session-overview/session-overview.js.map +1 -1
  72. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js +61 -0
  73. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js.map +1 -0
  74. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js +5 -0
  75. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js.map +1 -0
  76. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js +135 -0
  77. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js.map +1 -0
  78. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js +53 -0
  79. package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js.map +1 -0
  80. package/dist/features/trial-session/comps/session-report/report-404/report-404.js +15 -16
  81. package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -1
  82. package/dist/features/trial-session/comps/session-report/session-report.js +35 -33
  83. package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
  84. package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js +9 -16
  85. package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js.map +1 -1
  86. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +39 -37
  87. package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
  88. package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js +10 -9
  89. package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js.map +1 -1
  90. package/dist/features/trial-session/comps/student-info/student-info-constants.js +35 -0
  91. package/dist/features/trial-session/comps/student-info/student-info-constants.js.map +1 -0
  92. package/dist/features/trial-session/comps/student-info/student-info-helpers.js +12 -0
  93. package/dist/features/trial-session/comps/student-info/student-info-helpers.js.map +1 -0
  94. package/dist/features/trial-session/comps/student-info/student-info-styled.js +26 -11
  95. package/dist/features/trial-session/comps/student-info/student-info-styled.js.map +1 -1
  96. package/dist/features/trial-session/comps/student-info/student-info.js +113 -78
  97. package/dist/features/trial-session/comps/student-info/student-info.js.map +1 -1
  98. package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +3 -12
  99. package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
  100. package/dist/features/trial-session/comps/student-personalization/student-personalization.js +34 -33
  101. package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
  102. package/dist/features/trial-session/comps/student-profile/student-profile.js +45 -44
  103. package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
  104. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +9 -8
  105. package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
  106. package/dist/features/trial-session/comps/test-prep/test-prep-styled.js +11 -19
  107. package/dist/features/trial-session/comps/test-prep/test-prep-styled.js.map +1 -1
  108. package/dist/features/trial-session/comps/test-prep/test-prep.js +31 -29
  109. package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
  110. package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js +42 -0
  111. package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js.map +1 -0
  112. package/dist/features/trial-session/comps/topic-selection/topic-selection.js +84 -0
  113. package/dist/features/trial-session/comps/topic-selection/topic-selection.js.map +1 -0
  114. package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js +21 -0
  115. package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js.map +1 -0
  116. package/dist/features/trial-session/comps/whiteboard/whiteboard.js +99 -0
  117. package/dist/features/trial-session/comps/whiteboard/whiteboard.js.map +1 -0
  118. package/dist/features/trial-session/comps/worksheet/worksheet.js +35 -33
  119. package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
  120. package/dist/features/trial-session/context/trial-session-context.js +2 -0
  121. package/dist/features/trial-session/context/trial-session-context.js.map +1 -1
  122. package/dist/features/trial-session/helper.js +70 -64
  123. package/dist/features/trial-session/helper.js.map +1 -1
  124. package/dist/features/trial-session/hooks/use-trial-session-navigation.js +201 -164
  125. package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
  126. package/dist/features/trial-session/right-panel/right-panel-styled.js +8 -8
  127. package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
  128. package/dist/features/trial-session/right-panel/slide-components-map.js +42 -36
  129. package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
  130. package/dist/features/trial-session/trial-session-constants.js +22 -18
  131. package/dist/features/trial-session/trial-session-constants.js.map +1 -1
  132. package/dist/features/trial-session/trial-session-types.js.map +1 -1
  133. package/dist/features/trial-session/trial-session-view.js +82 -77
  134. package/dist/features/trial-session/trial-session-view.js.map +1 -1
  135. package/dist/features/trial-session/trial-session.js +38 -38
  136. package/dist/features/trial-session/trial-session.js.map +1 -1
  137. package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
  138. package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
  139. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +12 -12
  140. package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
  141. package/dist/features/ui/theme/clrs.js +1 -0
  142. package/dist/features/ui/theme/clrs.js.map +1 -1
  143. package/dist/features/worksheet/worksheet/mocks/activity.js +6 -0
  144. package/dist/features/worksheet/worksheet/mocks/activity.js.map +1 -0
  145. package/dist/features/worksheet/worksheet/mocks/signed-requests.js +5 -0
  146. package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +1 -0
  147. package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +57 -0
  148. package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +1 -0
  149. package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +263 -0
  150. package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +1 -0
  151. package/dist/features/worksheet/worksheet/stories/worksheet-student.js +177 -0
  152. package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +1 -0
  153. package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +267 -0
  154. package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +1 -0
  155. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +2 -6
  156. package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
  157. package/dist/features/worksheet/worksheet/worksheet-helpers.js +38 -37
  158. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  159. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js +36 -35
  160. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-computed-properties.js.map +1 -1
  161. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js +61 -58
  162. package/dist/features/worksheet/worksheet/worksheet-store/helpers/get-questions-from-items.js.map +1 -1
  163. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  164. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +35 -28
  165. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  166. package/dist/index.d.ts +13 -5
  167. package/dist/index.js +1 -1
  168. package/dist/node_modules/query-string/base.js +1 -1
  169. package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
  170. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  171. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  172. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  173. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  174. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  175. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  176. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
  177. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  178. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  179. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  180. package/dist/types/models/worksheet.js +1 -1
  181. package/dist/types/models/worksheet.js.map +1 -1
  182. package/package.json +1 -1
  183. package/dist/node_modules/decode-uri-component/index.js.map +0 -1
  184. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  185. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
  186. /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -1,37 +1,38 @@
1
1
  import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
- import { memo as p, useMemo as f, useCallback as u, useEffect as h } from "react";
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 g, PREFERENCE_CATEGORY as S } from "../../../milestone/constants.js";
5
- import { getPreferencesFromConfig as E } from "../../../milestone/create/milestone-create-helpers.js";
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 x from "../../../ui/inputs/checkbox-input-list/checkbox-input-list.js";
8
- import A from "../../../ui/layout/flex-view.js";
9
- import $ from "../../../ui/separator/separator.js";
10
- import L from "../../../ui/text/text.js";
11
- import { useTrialSessionContext as O } from "../../context/use-trial-session-context.js";
12
- import R from "../slide-header/index.js";
13
- import { Container as T, ContentWrapper as j, ImageWrapper as I } from "./student-personalization-styled.js";
14
- const H = p(function() {
15
- const { formData: m, milestoneConfig: r, updateSlideConfig: t, updateButtonState: i } = O(), { grade: n, personalizedObjectives: a = [] } = m || {}, s = a.length > 0, l = f(
16
- () => E(r, {
17
- grade: n ?? "",
18
- courseStream: g.MATH,
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
- [n, r]
22
- ), d = u(
23
- (c) => {
24
- t({ personalizedObjectives: c });
22
+ [a, r]
23
+ ), d = h(
24
+ (f) => {
25
+ i({ personalizedObjectives: f });
25
26
  },
26
- [t]
27
+ [i]
27
28
  );
28
- return h(() => {
29
- i("right", { isDisabled: !s, isLoading: !1 });
30
- }, [s, i]), /* @__PURE__ */ o(T, { children: [
31
- /* @__PURE__ */ e($, { height: 60 }),
32
- /* @__PURE__ */ e(R, {}),
33
- /* @__PURE__ */ o(j, { $width: 750, $flexDirection: "row", $justifyContent: "center", children: [
34
- /* @__PURE__ */ e(I, { children: /* @__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
- A,
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(L, { $renderAs: "ab2-bold", $color: "BLACK_1", children: "What would you like your child to work on?" }),
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
- x,
56
+ $,
56
57
  {
57
58
  size: "small",
58
59
  renderAs: "black",
59
- options: l,
60
- value: a,
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
- H as default
73
+ W as default
73
74
  };
74
75
  //# sourceMappingURL=student-personalization.js.map
@@ -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 <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $width={750} $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 </Styled.ContentWrapper>\n </Styled.Container>\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","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","ILLUSTRATIONS","FlexView","Text","CheckboxInputList"],"mappings":";;;;;;;;;;;;;AAcM,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,GAGvC,gBAAAc,EAACC,GAAA,EACC,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAU,QAAQ,GAAI,CAAA;AAAA,sBACtBC,GAAY,EAAA;AAAA,IACb,gBAAAJ,EAACK,GAAA,EAAsB,QAAQ,KAAK,gBAAe,OAAM,iBAAgB,UACvE,UAAA;AAAA,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,QAACS;AAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,cAAa;AAAA,UACb,aAAY;AAAA,UACZ,UAAU;AAAA,UACV,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAP,EAACQ,GAAK,EAAA,WAAU,YAAW,QAAO,WAAU,UAE5C,8CAAA;AAAA,YACA,gBAAAR;AAAA,cAACS;AAAA,cAAA;AAAA,gBACC,MAAK;AAAA,gBACL,UAAS;AAAA,gBACT,SAASpB;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
+ {"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 N, useMemo as C, useCallback as U, useEffect as f } from "react";
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 W from "../../../ui/error/error.js";
6
- import v from "../../../ui/image/image.js";
7
- import A from "../../../ui/layout/flex-view.js";
8
- import K from "../../../ui/loader/app-loader/app-loader.js";
9
- import I from "../../../ui/separator/separator.js";
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 M } from "../../api/student-profile-summary.js";
12
- import { useTrialSessionContext as X } from "../../context/use-trial-session-context.js";
13
- import { getFormattedStudentPersonalizedPreference as y } from "../../helper.js";
14
- import j from "../slide-header/index.js";
15
- import { GOAL_MAPPING as z } from "./constant.js";
16
- import F from "./student-profile-highlights/student-profile-highlights.js";
17
- import { Container as V, ContentWrapper as b, AbsoluteImage as Y, ImageWrapper as q } from "./student-profile-styled.js";
18
- import { getDummyProfileImage as J, getMilestoneGoalName as G } from "./student-profile-utils.js";
19
- const Pe = N(function() {
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: T,
25
+ slideConfig: R,
25
26
  milestoneConfig: m,
26
27
  updateSlideConfig: g,
27
28
  updateButtonState: h
28
- } = X(), { showProfileHighlights: r } = T, {
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: R, profileSummary: w } = a || {}, B = J(R), l = C(() => t && t.length > 0 ? {
35
- school_success_goal: G(t, L.SCHOOL_SUCCESS),
36
- test_prep_goal: G(t, L.TEST_PREP)
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: D,
40
+ data: N,
40
41
  isProcessing: s,
41
- isProcessed: $,
42
- isProcessingFailed: H
43
- } = M(), { profile_summary: E } = D || {}, d = U(() => {
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 && $ && !r && g({
52
+ n && E && !r && g({
52
53
  studentProfile: {
53
- profileSummary: E || "",
54
+ profileSummary: $ || "",
54
55
  dummyProfileImageIndex: Math.floor(Math.random() * 6)
55
56
  }
56
57
  });
57
- }, [$, n, r, E, g]);
58
- const k = C(
58
+ }, [E, n, r, $, g]);
59
+ const W = C(
59
60
  () => [
60
61
  {
61
62
  title: "Student Level",
62
- description: `Catching up: ${y(
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: y(
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) => `${z[o.goal_category]}: ${o.milestone_name}`
84
+ (o) => `${F[o.goal_category]}: ${o.milestone_name}`
84
85
  )
85
86
  }
86
87
  ],
87
88
  [t, m, P, _]
88
89
  );
89
- return H ? /* @__PURE__ */ e(W, { height: "70vh", onTryAgain: d }) : s || !a && !r ? /* @__PURE__ */ e(K, { height: "100vh" }) : /* @__PURE__ */ i(V, { children: [
90
- /* @__PURE__ */ e(I, { height: 60 }),
91
- /* @__PURE__ */ e(j, { marginBottom: r ? 50 : 100 }),
92
- r ? /* @__PURE__ */ i(b, { $width: 650, children: [
93
- /* @__PURE__ */ e(F, { profileHighlights: k }),
94
- /* @__PURE__ */ e(I, { height: 16 }),
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(b, { $widthX: 46.875, children: [
97
- /* @__PURE__ */ e(Y, {}),
97
+ ] }) : /* @__PURE__ */ i(y, { $width: G, children: [
98
+ /* @__PURE__ */ e(q, {}),
98
99
  /* @__PURE__ */ i(
99
- A,
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(q, { children: /* @__PURE__ */ e(v, { withLoader: !0, height: 200, width: 200, src: B }) }),
112
- /* @__PURE__ */ i(A, { $flexGap: 16, children: [
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: w || "" })
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
- Pe as default
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,MACEC,EAA4B,GAC1B,E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AAAyB,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,IACA,aAAAC;AAAA,IACA,oBA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KpC,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 n } from "react";
3
- import m from "../../../ui/separator/separator.js";
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
- const j = n(function() {
10
- const { slideConfig: e } = f(), { renderAVIn: o, teacher_profile: t } = e || {};
11
- return o === "right" ? /* @__PURE__ */ r(a, {}) : /* @__PURE__ */ i(c, { children: [
12
- /* @__PURE__ */ r(m, { height: 60 }),
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: 750, children: /* @__PURE__ */ r(s, { teacherProfile: t }) })
15
+ /* @__PURE__ */ r(h, { $width: l, children: /* @__PURE__ */ r(s, { teacherProfile: t }) })
15
16
  ] });
16
17
  });
17
18
  export {
18
- j as default
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={750}>\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","TeacherProfile"],"mappings":";;;;;;;;AASM,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,QAAQ,KAC7B,UAAA,gBAAAN,EAACO,GAAe,EAAA,gBAAAR,EAAgC,CAAA,GAClD;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
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 o from "styled-components";
1
+ import t from "styled-components";
2
2
  import r from "../../../ui/layout/flex-view.js";
3
- const n = o.div`
4
- width: 100%;
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: ${t.layout.gutter * 18.75}px;
13
- height: ${t.layout.gutter * 25}px;
14
- border: 1px solid ${t.colors.BLACK_1};
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: -${t.layout.gutter * 0.15625}px;
19
- left: -${t.layout.gutter * 0.125}px;
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
- ), l = o(r)`
18
+ ), p = t(r)`
25
19
  flex-grow: 1;
26
20
  border-left: none;
27
21
  `;
28
22
  export {
29
- n as Container,
30
- p as ContentWrapper,
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 Container = styled.div`\n width: 100%;\n height: 100%;\n`;\n\nconst ContentWrapper = styled(FlexView)`\n width: 750px;\n margin: auto;\n`;\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 { Container, ContentWrapper, ImageWrapper, InputContainer };\n"],"names":["Container","styled","ContentWrapper","FlexView","ImageWrapper","theme","InputContainer"],"mappings":";;AAIA,MAAMA,IAAYC,EAAO;AAAA;AAAA;AAAA,GAKnBC,IAAiBD,EAAOE,CAAQ;AAAA;AAAA;AAAA,GAKhCC,IAAeH,EAAO;AAAA,EAC1B,CAAC,EAAE,OAAAI,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,IAAiBL,EAAOE,CAAQ;AAAA;AAAA;AAAA;"}
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 $, useMemo as G, useCallback as A } from "react";
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 I from "../../../ui/image/image.js";
7
- import D from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
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 R from "../../../ui/text/text.js";
10
- import { epochTimestampAfterOneYear as j } from "../../../utils/utils.js";
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 w, updateGoalInFormData as F } from "../../helper.js";
13
- import O from "../slide-header/index.js";
14
- import { Container as X, ContentWrapper as B, ImageWrapper as H, InputContainer as U } from "./test-prep-styled.js";
15
- const re = $(function() {
16
- const { milestoneConfig: a, formData: g, updateSlideConfig: i, trialHomeData: u } = k(), { demo_info: h, intel_student: t, student: T } = u, { enrollment_type: s } = T || {}, { stream: m, region_data: _ } = h || {}, { opportunity_country: l = "US" } = _ || {}, { grade: p, goals: o } = g || {}, c = w(t == null ? void 0 : t.source), C = G(
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: p ?? "",
21
+ grade: c ?? "",
20
22
  goalCategory: n.TEST_PREP,
21
23
  courseStream: m,
22
24
  enrollmentType: s
23
25
  }),
24
- [l, s, p, a, m]
25
- ), { goal_code: S } = (o == null ? void 0 : o.find((r) => r.goal_category === n.TEST_PREP)) ?? {}, P = A(
26
- (r, b) => {
27
- const { label: y } = b, E = F(o, n.TEST_PREP, {
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: j(),
31
- publish: c
32
+ milestone_date_ts: w(),
33
+ publish: p
32
34
  });
33
- i({ goals: E });
35
+ i({ goals: b });
34
36
  },
35
- [o, c, i]
37
+ [o, p, i]
36
38
  );
37
- return /* @__PURE__ */ d(X, { children: [
39
+ return /* @__PURE__ */ d(g, { $justifyContent: "center", $alignItems: "center", children: [
38
40
  /* @__PURE__ */ e(f, { height: 60 }),
39
- /* @__PURE__ */ e(O, {}),
40
- /* @__PURE__ */ d(B, { $flexDirection: "row", $justifyContent: "center", children: [
41
- /* @__PURE__ */ e(H, { children: /* @__PURE__ */ e(I, { withLoader: !0, height: 402, width: 302, src: L.TEST_PREP, className: "image" }) }),
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
- U,
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
- D,
54
+ R,
53
55
  {
54
56
  renderAs: "primary",
55
57
  label: "Select a Test",
56
58
  value: S,
57
- options: C,
59
+ options: P,
58
60
  shape: "borderLess",
59
61
  theme: "dark",
60
- onChange: P,
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(R, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
70
+ /* @__PURE__ */ e(j, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
69
71
  ] });
70
72
  });
71
73
  export {
72
- re as default
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 <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $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 </Styled.ContentWrapper>\n <Separator heightX={1} />\n <Text $renderAs=\"ub3\" $align=\"center\">\n This is optional and can be skipped.\n </Text>\n </Styled.Container>\n );\n});\n\nexport default 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","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAgBM,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,OAAAE,GAAO,OAAAC,MAAUZ,KAAY,CAAA,GAC/Ba,IAAQC,EAAYT,KAAA,gBAAAA,EAAc,MAAM,GAExCU,IAAYC;AAAA,IAChB,MACEC,EAAmBlB,GAAiB;AAAA,MAClC,aAAAW;AAAA,MACA,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;AAAA,cACT,OAAM;AAAA,cACN,OAAM;AAAA,cACN,UAAUM;AAAA,cACV,eAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAU,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
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,OAAAE,GAAO,OAAAC,MAAUZ,KAAY,CAAA,GAC/Ba,IAAQC,EAAYT,KAAA,gBAAAA,EAAc,MAAM,GAExCU,IAAYC;AAAA,IAChB,MACEC,EAAmBlB,GAAiB;AAAA,MAClC,aAAAW;AAAA,MACA,OAAOC,KAAS;AAAA,MAChB,cAAcO,EAAc;AAAA,MAC5B,cAAcV;AAAA,MACd,gBAAAD;AAAA,IAAA,CACD;AAAA,IACH,CAACG,GAAaH,GAAgBI,GAAOZ,GAAiBS,CAAM;AAAA,EAAA,GAGxD,EAAE,WAAWW,OACjBP,KAAA,gBAAAA,EAAO,KAAK,CAAQQ,MAAAA,EAAK,kBAAkBF,EAAc,eAAc,CAAA,GAEnEG,IAAmBC;AAAA,IACvB,CAACC,GAAeC,MAA2C;AACnD,YAAA,EAAE,OAAAC,EAAU,IAAAD,GAEZE,IAAeC,EAAqBf,GAAOM,EAAc,WAAW;AAAA,QACxE,WAAWK;AAAA,QACX,gBAAgBE;AAAA,QAChB,mBAAmBG,EAA2B;AAAA,QAC9C,SAASf;AAAA,MAAA,CACV;AAEiB,MAAAZ,EAAA,EAAE,OAAOyB,EAAA,CAAc;AAAA,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