@cuemath/leap 3.3.34 → 3.3.35
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/assets/gif/gif.js +1 -4
- package/dist/assets/gif/gif.js.map +1 -1
- package/dist/assets/illustrations/illustrations.js +1 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
- package/dist/features/auth/comps/otp-input/otp-input.js +29 -35
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +3 -12
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +34 -43
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +101 -140
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +16 -20
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +6 -6
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +21 -20
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/circle-games/sign-up/sign-up.js +6 -6
- package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +17 -17
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +0 -400
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/constants.js +15 -28
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +2 -2
- package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js +16 -23
- package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +7 -13
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +22 -28
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +46 -48
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +12 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +17 -16
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +8 -4
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +4 -45
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +174 -197
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +32 -0
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +1 -0
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js +72 -0
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +58 -57
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js +34 -0
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js.map +1 -0
- package/dist/features/stickers/stickers-effects/constants.js +26 -0
- package/dist/features/stickers/stickers-effects/constants.js.map +1 -0
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js +28 -0
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js.map +1 -0
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js +12 -0
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +32 -17
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js +6 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +40 -56
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -1
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/trial-session/comps/class-preference/class-preference.js +58 -74
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js +45 -47
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +40 -41
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-constants.js +1 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-styled.js +1 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps.js +5 -5
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +132 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-status/session-status-styled.js +2 -2
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +127 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/session-summary-constants.js +12 -18
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +53 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/summary-card/summary-card-styled.js +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions.js +14 -14
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/trial-session/comps/school-goals/school-goals.js +57 -59
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +40 -41
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +0 -5
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +51 -96
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +63 -70
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +44 -43
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +40 -41
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +61 -60
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/features/trial-session/helper.js +61 -76
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +144 -174
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +110 -99
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +13 -13
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +13 -45
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +31 -31
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/utils/utils.js +1 -1
- package/dist/features/utils/utils.js.map +1 -1
- package/dist/index.d.ts +142 -94
- package/dist/index.js +301 -292
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
- package/dist/static/trophy.a8ea85ef.json +6813 -0
- package/package.json +3 -2
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js +0 -86
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +0 -140
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +0 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +0 -9
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -74
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +0 -34
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +0 -137
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +0 -20
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +0 -19
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status.js +0 -124
- package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +0 -54
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +0 -72
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -85
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -71
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -119
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -58
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -76
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
- package/dist/features/trial-session/api/teacher-availability.js +0 -9
- package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +0 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +0 -49
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +0 -1
- package/dist/static/learning-session-grid-bg-mobile.8d2b7258.gif +0 -0
- package/dist/static/way-forward-grid-bg-mobile.374043d7.gif +0 -0
- package/dist/static/your-goals-grid-bg-mobile.62557024.gif +0 -0
- /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
- /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-types.js +0 -0
|
@@ -1,102 +1,95 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ILLUSTRATIONS as
|
|
4
|
-
import { GOAL_CATEGORY as
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import { useGetStudentProfileSummary as
|
|
1
|
+
import { jsx as e, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as H, useMemo as L, useCallback as k, useEffect as d } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as f } from "../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { GOAL_CATEGORY as $ } from "../../../milestone/constants.js";
|
|
5
|
+
import N from "../../../ui/error/error.js";
|
|
6
|
+
import U from "../../../ui/image/image.js";
|
|
7
|
+
import C from "../../../ui/layout/flex-view.js";
|
|
8
|
+
import v from "../../../ui/loader/app-loader/app-loader.js";
|
|
9
|
+
import M from "../../../ui/separator/separator.js";
|
|
10
|
+
import I from "../../../ui/text/text.js";
|
|
11
|
+
import { useGetStudentProfileSummary as W } from "../../api/student-profile-summary.js";
|
|
12
12
|
import { useTrialSessionContext as X } from "../../context/use-trial-session-context.js";
|
|
13
|
-
import { getFormattedStudentPersonalizedPreference as
|
|
13
|
+
import { getFormattedStudentPersonalizedPreference as K } from "../../helper.js";
|
|
14
14
|
import j from "../slide-header/index.js";
|
|
15
15
|
import { GOAL_MAPPING as z } from "./constant.js";
|
|
16
16
|
import F from "./student-profile-highlights/student-profile-highlights.js";
|
|
17
|
-
import { Container as V, ContentWrapper as
|
|
18
|
-
import { getDummyProfileImage as J, getMilestoneGoalName as
|
|
19
|
-
const he =
|
|
17
|
+
import { Container as V, ContentWrapper as y, AbsoluteImage as Y, ImageWrapper as q } from "./student-profile-styled.js";
|
|
18
|
+
import { getDummyProfileImage as J, getMilestoneGoalName as A } from "./student-profile-utils.js";
|
|
19
|
+
const he = H(() => {
|
|
20
20
|
const {
|
|
21
|
-
isTeacher:
|
|
21
|
+
isTeacher: o,
|
|
22
22
|
studentId: u,
|
|
23
|
-
formData:
|
|
24
|
-
slideConfig:
|
|
25
|
-
milestoneConfig:
|
|
26
|
-
updateSlideConfig:
|
|
27
|
-
updateButtonState:
|
|
28
|
-
} = X(), { showProfileHighlights: r } =
|
|
29
|
-
name:
|
|
23
|
+
formData: b,
|
|
24
|
+
slideConfig: G,
|
|
25
|
+
milestoneConfig: c,
|
|
26
|
+
updateSlideConfig: p,
|
|
27
|
+
updateButtonState: g
|
|
28
|
+
} = X(), { showProfileHighlights: r } = G, {
|
|
29
|
+
name: O,
|
|
30
30
|
goals: t = [],
|
|
31
|
-
studentProfile:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
} =
|
|
35
|
-
school_success_goal:
|
|
36
|
-
test_prep_goal:
|
|
31
|
+
studentProfile: i,
|
|
32
|
+
personalizedLevel: h = [],
|
|
33
|
+
personalizedObjectives: P = []
|
|
34
|
+
} = b || {}, { dummyProfileImageIndex: x, profileSummary: R } = i || {}, T = J(x), m = L(() => t && t.length > 0 ? {
|
|
35
|
+
school_success_goal: A(t, $.SCHOOL_SUCCESS),
|
|
36
|
+
test_prep_goal: A(t, $.TEST_PREP)
|
|
37
37
|
} : null, [t]), {
|
|
38
38
|
get: S,
|
|
39
|
-
data:
|
|
40
|
-
isProcessing:
|
|
41
|
-
isProcessed:
|
|
42
|
-
isProcessingFailed:
|
|
43
|
-
} =
|
|
44
|
-
|
|
45
|
-
}, [S,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
|
|
50
|
-
}, [
|
|
51
|
-
|
|
39
|
+
data: w,
|
|
40
|
+
isProcessing: l,
|
|
41
|
+
isProcessed: _,
|
|
42
|
+
isProcessingFailed: D
|
|
43
|
+
} = W(), { profile_summary: E } = w || {}, s = k(() => {
|
|
44
|
+
m && S(u, m);
|
|
45
|
+
}, [S, m, u]);
|
|
46
|
+
d(() => {
|
|
47
|
+
g("right", { isDisabled: l, isLoading: !1 });
|
|
48
|
+
}, [l, g]), d(() => {
|
|
49
|
+
o && !i && !r && s();
|
|
50
|
+
}, [s, o, i, r]), d(() => {
|
|
51
|
+
o && _ && !r && p({
|
|
52
52
|
studentProfile: {
|
|
53
53
|
profileSummary: E || "",
|
|
54
54
|
dummyProfileImageIndex: Math.floor(Math.random() * 6)
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
}, [
|
|
58
|
-
const
|
|
57
|
+
}, [_, o, r, E, p]);
|
|
58
|
+
const B = L(
|
|
59
59
|
() => [
|
|
60
60
|
{
|
|
61
|
-
title: "
|
|
62
|
-
description: `Catching up: ${
|
|
63
|
-
|
|
64
|
-
_
|
|
65
|
-
).map((o) => o.preference_description)}`,
|
|
66
|
-
illustration: c.KNOWLEDGE_BLUE,
|
|
61
|
+
title: "Studnet Level",
|
|
62
|
+
description: `Catching up: ${h[0]}`,
|
|
63
|
+
illustration: f.KNOWLEDGE_BLUE,
|
|
67
64
|
background: "BLUE_1"
|
|
68
65
|
},
|
|
69
66
|
{
|
|
70
|
-
illustration:
|
|
67
|
+
illustration: f.ARROW_BOARD_GREEN,
|
|
71
68
|
background: "GREEN_1",
|
|
72
69
|
title: "Goals",
|
|
73
|
-
description:
|
|
74
|
-
|
|
70
|
+
description: K(
|
|
71
|
+
c,
|
|
75
72
|
P
|
|
76
|
-
).map((
|
|
73
|
+
).map((n) => n.preference_name)
|
|
77
74
|
},
|
|
78
75
|
{
|
|
79
|
-
illustration:
|
|
76
|
+
illustration: f.BOOK_CHECKED_PURPLE,
|
|
80
77
|
background: "PURPLE_1",
|
|
81
78
|
title: "Learning Plan",
|
|
82
79
|
description: t.map(
|
|
83
|
-
(
|
|
80
|
+
(n) => `${z[n.goal_category]}: ${n.milestone_name}`
|
|
84
81
|
)
|
|
85
82
|
}
|
|
86
83
|
],
|
|
87
|
-
[t,
|
|
84
|
+
[t, c, h, P]
|
|
88
85
|
);
|
|
89
|
-
return
|
|
90
|
-
/* @__PURE__ */ e(
|
|
86
|
+
return D ? /* @__PURE__ */ e(N, { height: "70vh", onTryAgain: s }) : l || !i && !r ? /* @__PURE__ */ e(v, { height: "100vh" }) : /* @__PURE__ */ a(V, { children: [
|
|
87
|
+
/* @__PURE__ */ e(M, { height: 60 }),
|
|
91
88
|
/* @__PURE__ */ e(j, { marginBottom: r ? 50 : 100 }),
|
|
92
|
-
r ? /* @__PURE__ */
|
|
93
|
-
/* @__PURE__ */ e(F, { profileHighlights: k }),
|
|
94
|
-
/* @__PURE__ */ e(I, { height: 16 }),
|
|
95
|
-
/* @__PURE__ */ e(p, { $renderAs: "ub3", $color: "BLACK_T_60", $align: "center", children: "We can always revisit this later" })
|
|
96
|
-
] }) : /* @__PURE__ */ i(b, { $widthX: 46.875, children: [
|
|
89
|
+
r ? /* @__PURE__ */ e(y, { $width: 650, children: /* @__PURE__ */ e(F, { profileHighlights: B }) }) : /* @__PURE__ */ a(y, { $widthX: 46.875, children: [
|
|
97
90
|
/* @__PURE__ */ e(Y, {}),
|
|
98
|
-
/* @__PURE__ */
|
|
99
|
-
|
|
91
|
+
/* @__PURE__ */ a(
|
|
92
|
+
C,
|
|
100
93
|
{
|
|
101
94
|
$width: "100%",
|
|
102
95
|
$heightX: 21.875,
|
|
@@ -108,10 +101,10 @@ const he = N(() => {
|
|
|
108
101
|
$borderColor: "BLACK_T_87",
|
|
109
102
|
$borderRadiusX: 0.5,
|
|
110
103
|
children: [
|
|
111
|
-
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(
|
|
112
|
-
/* @__PURE__ */
|
|
113
|
-
/* @__PURE__ */ e(
|
|
114
|
-
/* @__PURE__ */ e(
|
|
104
|
+
/* @__PURE__ */ e(q, { children: /* @__PURE__ */ e(U, { withLoader: !0, height: 200, width: 200, src: T }) }),
|
|
105
|
+
/* @__PURE__ */ a(C, { $flexGap: 16, children: [
|
|
106
|
+
/* @__PURE__ */ e(I, { $renderAs: "ac2-black", children: O }),
|
|
107
|
+
/* @__PURE__ */ e(I, { $renderAs: "ab1", children: R || "" })
|
|
115
108
|
] })
|
|
116
109
|
]
|
|
117
110
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\nimport type { TColorNames } from '../../../ui/types';\nimport type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { GOAL_MAPPING } from './constant';\nimport StudentProfileHighlights from './student-profile-highlights/student-profile-highlights';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(() => {\n const {\n isTeacher,\n studentId,\n formData,\n slideConfig,\n milestoneConfig,\n updateSlideConfig,\n updateButtonState,\n } = useTrialSessionContext();\n const { showProfileHighlights } = slideConfig;\n\n const {\n name,\n goals = [],\n studentProfile,\n personalizedObjectives = [],\n personalizedPosition = [],\n } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile && !showProfileHighlights) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile, showProfileHighlights]);\n\n useEffect(() => {\n if (isTeacher && isProcessed && !showProfileHighlights) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, showProfileHighlights, studentProfileSummary, updateSlideConfig]);\n\n const profileHighlights: TProfileHighlight[] = useMemo(\n () => [\n {\n title: 'Student Level',\n description: `Catching up: ${getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedPosition,\n ).map(objectives => objectives.preference_description)}`,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedObjectives,\n ).map(objectives => objectives.preference_name),\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: goals.map(\n goal => `${GOAL_MAPPING[goal.goal_category as TGoalCategory]}: ${goal.milestone_name}`,\n ),\n },\n ],\n [goals, milestoneConfig, personalizedObjectives, personalizedPosition],\n );\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || (!studentProfile && !showProfileHighlights)) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={showProfileHighlights ? 50 : 100} />\n {showProfileHighlights ? (\n <Styled.ContentWrapper $width={650}>\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n <Separator height={16} />\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\" $align=\"center\">\n We can always revisit this later\n </Text>\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","slideConfig","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","showProfileHighlights","name","goals","studentProfile","personalizedObjectives","personalizedPosition","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","profileHighlights","getFormattedStudentPersonalizedPreference","objectives","ILLUSTRATIONS","goal","GOAL_MAPPING","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","StudentProfileHighlights","Text","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image"],"mappings":";;;;;;;;;;;;;;;;;;AA8BM,MAAAA,KAAiBC,EAAK,MAAM;AAC1B,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,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,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ACX,UAAU;AAAA,UACV,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,gBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAX,EAACY,GAAA,EACC,UAAA,gBAAAZ,EAACa,GAAM,EAAA,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKnC,EAAmB,CAAA,GACrE;AAAA,YACA,gBAAAyB,EAACQ,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,cAAC,gBAAAX,EAAAS,GAAA,EAAK,WAAU,aAAa,UAAKtC,GAAA;AAAA,cACjC,gBAAA6B,EAAAS,GAAA,EAAK,WAAU,OAAO,eAAkB,IAAG;AAAA,YAAA,GAC9C;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
1
|
+
{"version":3,"file":"student-profile.js","sources":["../../../../../src/features/trial-session/comps/student-profile/student-profile.tsx"],"sourcesContent":["import type { TGoalCategory } from '../../../milestone/create/milestone-create-types';\nimport type { TColorNames } from '../../../ui/types';\nimport type { IGetStudentProfileSummaryQuery } from '../../api/student-profile-summary';\n\nimport { memo, useCallback, useEffect, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetStudentProfileSummary } from '../../api/student-profile-summary';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { getFormattedStudentPersonalizedPreference } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport { GOAL_MAPPING } from './constant';\nimport StudentProfileHighlights from './student-profile-highlights/student-profile-highlights';\nimport * as Styled from './student-profile-styled';\nimport { getDummyProfileImage, getMilestoneGoalName } from './student-profile-utils';\n\ntype TProfileHighlight = {\n illustration: string;\n background: TColorNames;\n title: string;\n description: string | string[];\n};\n\nconst StudentProfile = memo(() => {\n const {\n isTeacher,\n studentId,\n formData,\n slideConfig,\n milestoneConfig,\n updateSlideConfig,\n updateButtonState,\n } = useTrialSessionContext();\n const { showProfileHighlights } = slideConfig;\n\n const {\n name,\n goals = [],\n studentProfile,\n personalizedLevel = [],\n personalizedObjectives = [],\n } = formData || {};\n const { dummyProfileImageIndex, profileSummary } = studentProfile || {};\n const dummyProfileImage = getDummyProfileImage(dummyProfileImageIndex);\n\n const payload = useMemo<IGetStudentProfileSummaryQuery | null>(() => {\n if (goals && goals.length > 0) {\n return {\n school_success_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.SCHOOL_SUCCESS),\n test_prep_goal: getMilestoneGoalName(goals, GOAL_CATEGORY.TEST_PREP),\n };\n }\n\n return null;\n }, [goals]);\n\n const {\n get: getStudentProfileSummary,\n data,\n isProcessing,\n isProcessed,\n isProcessingFailed,\n } = useGetStudentProfileSummary();\n const { profile_summary: studentProfileSummary } = data || {};\n\n const fetchData = useCallback(() => {\n if (payload) {\n getStudentProfileSummary(studentId, payload);\n }\n }, [getStudentProfileSummary, payload, studentId]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, updateButtonState]);\n\n useEffect(() => {\n if (isTeacher && !studentProfile && !showProfileHighlights) {\n fetchData();\n }\n }, [fetchData, isTeacher, studentProfile, showProfileHighlights]);\n\n useEffect(() => {\n if (isTeacher && isProcessed && !showProfileHighlights) {\n updateSlideConfig({\n studentProfile: {\n profileSummary: studentProfileSummary || '',\n dummyProfileImageIndex: Math.floor(Math.random() * 6),\n },\n });\n }\n }, [isProcessed, isTeacher, showProfileHighlights, studentProfileSummary, updateSlideConfig]);\n\n const profileHighlights: TProfileHighlight[] = useMemo(\n () => [\n {\n title: 'Studnet Level',\n description: `Catching up: ${personalizedLevel[0]}`,\n illustration: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n background: 'BLUE_1',\n },\n {\n illustration: ILLUSTRATIONS.ARROW_BOARD_GREEN,\n background: 'GREEN_1',\n title: 'Goals',\n description: getFormattedStudentPersonalizedPreference(\n milestoneConfig,\n personalizedObjectives,\n ).map(objectives => objectives.preference_name),\n },\n {\n illustration: ILLUSTRATIONS.BOOK_CHECKED_PURPLE,\n background: 'PURPLE_1',\n title: 'Learning Plan',\n description: goals.map(\n goal => `${GOAL_MAPPING[goal.goal_category as TGoalCategory]}: ${goal.milestone_name}`,\n ),\n },\n ],\n [goals, milestoneConfig, personalizedLevel, personalizedObjectives],\n );\n\n if (isProcessingFailed) {\n return <Error height=\"70vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || (!studentProfile && !showProfileHighlights)) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={showProfileHighlights ? 50 : 100} />\n {showProfileHighlights ? (\n <Styled.ContentWrapper $width={650}>\n <StudentProfileHighlights profileHighlights={profileHighlights} />\n </Styled.ContentWrapper>\n ) : (\n <Styled.ContentWrapper $widthX={46.875}>\n <Styled.AbsoluteImage />\n <FlexView\n $width=\"100%\"\n $heightX={21.875}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexGapX={1.5}\n $gutterX={1.5}\n $background=\"WHITE_2\"\n $borderColor=\"BLACK_T_87\"\n $borderRadiusX={0.5}\n >\n <Styled.ImageWrapper>\n <Image withLoader height={200} width={200} src={dummyProfileImage} />\n </Styled.ImageWrapper>\n <FlexView $flexGap={16}>\n <Text $renderAs=\"ac2-black\">{name}</Text>\n <Text $renderAs=\"ab1\">{profileSummary || ''}</Text>\n </FlexView>\n </FlexView>\n </Styled.ContentWrapper>\n )}\n </Styled.Container>\n );\n});\n\nexport default StudentProfile;\n"],"names":["StudentProfile","memo","isTeacher","studentId","formData","slideConfig","milestoneConfig","updateSlideConfig","updateButtonState","useTrialSessionContext","showProfileHighlights","name","goals","studentProfile","personalizedLevel","personalizedObjectives","dummyProfileImageIndex","profileSummary","dummyProfileImage","getDummyProfileImage","payload","useMemo","getMilestoneGoalName","GOAL_CATEGORY","getStudentProfileSummary","data","isProcessing","isProcessed","isProcessingFailed","useGetStudentProfileSummary","studentProfileSummary","fetchData","useCallback","useEffect","profileHighlights","ILLUSTRATIONS","getFormattedStudentPersonalizedPreference","objectives","goal","GOAL_MAPPING","jsx","Error","AppLoader","jsxs","Styled.Container","Separator","SlideHeader","Styled.ContentWrapper","StudentProfileHighlights","Styled.AbsoluteImage","FlexView","Styled.ImageWrapper","Image","Text"],"mappings":";;;;;;;;;;;;;;;;;;AA8BM,MAAAA,KAAiBC,EAAK,MAAM;AAC1B,QAAA;AAAA,IACJ,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,mBAAAC;AAAA,MACEC,EAAuB,GACrB,EAAE,uBAAAC,EAA0B,IAAAL,GAE5B;AAAA,IACJ,MAAAM;AAAA,IACA,OAAAC,IAAQ,CAAC;AAAA,IACT,gBAAAC;AAAA,IACA,mBAAAC,IAAoB,CAAC;AAAA,IACrB,wBAAAC,IAAyB,CAAC;AAAA,EAAA,IACxBX,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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,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { jsxs as t, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { useTheme as
|
|
1
|
+
import { jsxs as t, Fragment as P, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as Y, useMemo as l, useCallback as m } from "react";
|
|
3
|
+
import { useTheme as j } from "styled-components";
|
|
4
4
|
import { ILLUSTRATIONS as u } from "../../../../../assets/illustrations/illustrations.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import B from "../../../../../assets/line-icons/icons/cuemath-logo.js";
|
|
6
|
+
import H from "../../../../ui/buttons/button/button.js";
|
|
7
|
+
import V from "../../../../ui/image/image.js";
|
|
8
8
|
import s from "../../../../ui/layout/flex-view.js";
|
|
9
9
|
import x from "../../../../ui/separator/separator.js";
|
|
10
10
|
import c from "../../../../ui/text/text.js";
|
|
11
|
-
import { EDeviceType as
|
|
12
|
-
import { COUNTRY_FLAGS as
|
|
13
|
-
import { formatCountryList as
|
|
14
|
-
import { GridItem as
|
|
15
|
-
const
|
|
11
|
+
import { EDeviceType as F } from "../../../../ui/theme/constants.js";
|
|
12
|
+
import { COUNTRY_FLAGS as K } from "../teacher-intro-constants.js";
|
|
13
|
+
import { formatCountryList as q } from "./teacher-profile-helpers.js";
|
|
14
|
+
import { GridItem as N, ProfileWrapper as z, CueLogoWrapper as Q, PositionedAsset1 as J, PositionedAsset2 as Z, PositionedAsset3 as ee, PositionedAsset4 as re, ProfilePicture as te, GridContainer as ne } from "./teacher-profile-styled.js";
|
|
15
|
+
const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
16
16
|
const {
|
|
17
|
-
degree:
|
|
17
|
+
degree: D,
|
|
18
18
|
countries: o,
|
|
19
19
|
lower_grade: d,
|
|
20
20
|
higher_grade: i,
|
|
21
|
-
header_image:
|
|
22
|
-
years_of_experience:
|
|
23
|
-
number_of_students_taught:
|
|
21
|
+
header_image: G,
|
|
22
|
+
years_of_experience: R,
|
|
23
|
+
number_of_students_taught: v,
|
|
24
24
|
first_name: g,
|
|
25
25
|
last_name: O,
|
|
26
26
|
teacher_profile_url: n
|
|
27
|
-
} =
|
|
27
|
+
} = S || {}, {
|
|
28
28
|
degree_name: $,
|
|
29
29
|
field_of_study: h,
|
|
30
30
|
degree_code: C
|
|
31
|
-
} =
|
|
31
|
+
} = D || {}, b = j(), e = l(() => b.device <= F.MOBILE, [b.device]), I = l(() => i && parseInt(i, 10) > 8, [i]), w = l(
|
|
32
32
|
() => g ? `${g} ${O}`.trim() : "",
|
|
33
33
|
[g, O]
|
|
34
|
-
), p = l(() => I ? "High School" : !d || !i ? "" : ` ${d === "K" ? "" : "G"}${d} - G${i}`, [I, i, d]), E = l(() => o && o.length > 0, [o]),
|
|
34
|
+
), p = l(() => I ? "High School" : !d || !i ? "" : ` ${d === "K" ? "" : "G"}${d} - G${i}`, [I, i, d]), E = l(() => o && o.length > 0, [o]), U = l(() => $ && h, [$, h]), k = m(() => {
|
|
35
35
|
n && window.open(n, "_blank");
|
|
36
|
-
}, [n]), _ = m(() => n ? /* @__PURE__ */ t(
|
|
36
|
+
}, [n]), _ = m(() => n ? /* @__PURE__ */ t(P, { children: [
|
|
37
37
|
/* @__PURE__ */ r(x, { heightX: 1.5 }),
|
|
38
38
|
/* @__PURE__ */ r(
|
|
39
|
-
|
|
39
|
+
H,
|
|
40
40
|
{
|
|
41
41
|
label: "View profile",
|
|
42
42
|
renderAs: "secondary",
|
|
@@ -52,7 +52,7 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
52
52
|
mobileLabel: f,
|
|
53
53
|
valueRenderAs: L = "ah3-black"
|
|
54
54
|
}) => /* @__PURE__ */ t(
|
|
55
|
-
|
|
55
|
+
N,
|
|
56
56
|
{
|
|
57
57
|
$flex: e ? 1 : 0,
|
|
58
58
|
$justifyContent: e ? "flex-start" : "center",
|
|
@@ -67,10 +67,10 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
69
|
[e]
|
|
70
|
-
),
|
|
70
|
+
), M = m(() => {
|
|
71
71
|
if (!E) return null;
|
|
72
72
|
if (e) {
|
|
73
|
-
const a =
|
|
73
|
+
const a = q(o);
|
|
74
74
|
return /* @__PURE__ */ t(s, { $gapX: 0.75, children: [
|
|
75
75
|
/* @__PURE__ */ t(c, { $renderOnMobileAs: "ub3-bold", $renderAs: "ab3-black", children: [
|
|
76
76
|
"Teaching ",
|
|
@@ -90,11 +90,11 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
90
90
|
" kids in"
|
|
91
91
|
] }),
|
|
92
92
|
/* @__PURE__ */ r(s, { $flexDirection: "row", $flexGap: 16, $flexWrap: !0, children: o.map((a) => {
|
|
93
|
-
const T =
|
|
93
|
+
const T = oe.find((X) => X.name === a), { flag_icon: f = "", label: L = "", name: W } = T || {};
|
|
94
94
|
return /* @__PURE__ */ t(s, { $flexDirection: "row", $flexGap: 4, children: [
|
|
95
|
-
/* @__PURE__ */ r(
|
|
95
|
+
/* @__PURE__ */ r(V, { src: f, width: 30, height: 20, withLoader: !1 }),
|
|
96
96
|
/* @__PURE__ */ r(c, { $renderAs: "ab3-black", children: L })
|
|
97
|
-
] },
|
|
97
|
+
] }, W || a);
|
|
98
98
|
}) })
|
|
99
99
|
] });
|
|
100
100
|
}, [
|
|
@@ -113,7 +113,7 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
113
113
|
$background: "WHITE_3",
|
|
114
114
|
children: [
|
|
115
115
|
/* @__PURE__ */ t(
|
|
116
|
-
|
|
116
|
+
z,
|
|
117
117
|
{
|
|
118
118
|
$gapX: e ? 1 : 1.5,
|
|
119
119
|
$gutterX: 1,
|
|
@@ -121,21 +121,21 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
121
121
|
$alignItems: "center",
|
|
122
122
|
$justifyContent: "center",
|
|
123
123
|
children: [
|
|
124
|
-
e && /* @__PURE__ */ r(
|
|
125
|
-
/* @__PURE__ */ r(
|
|
126
|
-
/* @__PURE__ */ r(
|
|
127
|
-
/* @__PURE__ */ r(
|
|
128
|
-
/* @__PURE__ */ r(
|
|
124
|
+
e && /* @__PURE__ */ r(Q, { children: /* @__PURE__ */ r(B, { width: 54, height: 8, color: b.colors.REAL_BLACK }) }),
|
|
125
|
+
/* @__PURE__ */ r(J, { src: u.STAR_OUTLINED }),
|
|
126
|
+
/* @__PURE__ */ r(Z, { src: u.HEART_OUTLINED }),
|
|
127
|
+
/* @__PURE__ */ r(ee, { src: u.EQUAL_OUTLINED }),
|
|
128
|
+
/* @__PURE__ */ r(re, { src: u.TROPHY_OUTLINED }),
|
|
129
129
|
/* @__PURE__ */ r(
|
|
130
|
-
|
|
130
|
+
te,
|
|
131
131
|
{
|
|
132
132
|
withLoader: !0,
|
|
133
|
-
src:
|
|
133
|
+
src: G,
|
|
134
134
|
width: e ? 154 : 238,
|
|
135
135
|
height: e ? 154 : 238
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
|
-
w && /* @__PURE__ */ t(
|
|
138
|
+
w && /* @__PURE__ */ t(P, { children: [
|
|
139
139
|
/* @__PURE__ */ r(x, { heightX: e ? 0.75 : 1.5 }),
|
|
140
140
|
/* @__PURE__ */ r(c, { $renderAs: "ac2-black", $color: "BLACK_1", $align: "center", children: w })
|
|
141
141
|
] }),
|
|
@@ -143,30 +143,30 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
143
143
|
]
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
/* @__PURE__ */ t(
|
|
146
|
+
/* @__PURE__ */ t(ne, { children: [
|
|
147
147
|
A({
|
|
148
|
-
value: `${
|
|
148
|
+
value: `${R}+`,
|
|
149
149
|
label: "Yrs of Teaching Experience",
|
|
150
150
|
mobileLabel: "Years of Teaching"
|
|
151
151
|
}),
|
|
152
152
|
A({
|
|
153
|
-
value: `${
|
|
153
|
+
value: `${v}+`,
|
|
154
154
|
label: "Students Taught"
|
|
155
155
|
}),
|
|
156
|
-
|
|
156
|
+
U && A({
|
|
157
157
|
value: e && C ? C : $,
|
|
158
158
|
label: `In ${h}`,
|
|
159
159
|
mobileLabel: h,
|
|
160
160
|
valueRenderAs: "ab1-black"
|
|
161
161
|
}),
|
|
162
162
|
/* @__PURE__ */ r(
|
|
163
|
-
|
|
163
|
+
N,
|
|
164
164
|
{
|
|
165
165
|
$justifyContent: "center",
|
|
166
166
|
$gutter: 24,
|
|
167
167
|
$flexDirection: e ? "row" : "column",
|
|
168
168
|
$background: e ? "YELLOW_4" : "TRANSPARENT",
|
|
169
|
-
children:
|
|
169
|
+
children: M()
|
|
170
170
|
}
|
|
171
171
|
)
|
|
172
172
|
] })
|
|
@@ -174,8 +174,9 @@ const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
176
|
});
|
|
177
|
-
|
|
177
|
+
y.displayName = "TeacherProfile";
|
|
178
|
+
const _e = y;
|
|
178
179
|
export {
|
|
179
|
-
|
|
180
|
+
_e as default
|
|
180
181
|
};
|
|
181
182
|
//# sourceMappingURL=teacher-profile.js.map
|
package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"teacher-profile.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.tsx"],"sourcesContent":["import type { TTextVariants } from '../../../../ui/types';\nimport type { ITeacherProfileProps } from './teacher-profile-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport CuemathLogo from '../../../../../assets/line-icons/icons/cuemath-logo';\nimport Button from '../../../../ui/buttons/button/button';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { COUNTRY_FLAGS } from '../teacher-intro-constants';\nimport { formatCountryList } from './teacher-profile-helpers';\nimport * as Styled from './teacher-profile-styled';\n\nconst countryFlagArray = Object.values(COUNTRY_FLAGS);\n\nconst TeacherProfile: FC<ITeacherProfileProps> = memo(({ teacherProfile }) => {\n const {\n degree,\n countries,\n lower_grade: lowerGrade,\n higher_grade: higherGrade,\n header_image: headerImage,\n years_of_experience: yearsOfExperience,\n number_of_students_taught: numberOfStudentsTaught,\n first_name: firstName,\n last_name: lastName,\n teacher_profile_url: teacherProfileUrl,\n } = teacherProfile || {};\n\n const {\n degree_name: degreeName,\n field_of_study: fieldOfStudy,\n degree_code: degreeCode,\n } = degree || {};\n\n const theme = useTheme();\n const isMobile = useMemo(() => theme.device <= EDeviceType.MOBILE, [theme.device]);\n const isHighSchool = useMemo(() => higherGrade && parseInt(higherGrade, 10) > 8, [higherGrade]);\n const teacherName = useMemo(\n () => (firstName ? `${firstName} ${lastName}`.trim() : ''),\n [firstName, lastName],\n );\n\n const displayGrade = useMemo(() => {\n if (isHighSchool) return 'High School';\n\n if (!lowerGrade || !higherGrade) return '';\n\n return ` ${lowerGrade === 'K' ? '' : 'G'}${lowerGrade} - G${higherGrade}`;\n }, [isHighSchool, higherGrade, lowerGrade]);\n\n const hasValidCountries = useMemo(() => countries && countries.length > 0, [countries]);\n\n const hasDegreeInfo = useMemo(() => degreeName && fieldOfStudy, [degreeName, fieldOfStudy]);\n\n const handleViewProfile = useCallback(() => {\n if (teacherProfileUrl) {\n window.open(teacherProfileUrl, '_blank');\n }\n }, [teacherProfileUrl]);\n\n const renderViewProfileButton = useCallback(() => {\n if (!teacherProfileUrl) return null;\n\n return (\n <>\n <Separator heightX={1.5} />\n <Button\n label=\"View profile\"\n renderAs=\"secondary\"\n shape=\"square\"\n onClick={handleViewProfile}\n size=\"small\"\n />\n </>\n );\n }, [handleViewProfile, teacherProfileUrl]);\n\n const renderStatItem = useCallback(\n ({\n value,\n label,\n mobileLabel,\n valueRenderAs = 'ah3-black',\n }: {\n value?: string | number;\n label: string;\n mobileLabel?: string;\n valueRenderAs?: TTextVariants;\n }) => (\n <Styled.GridItem\n $flex={isMobile ? 1 : 0}\n $justifyContent={isMobile ? 'flex-start' : 'center'}\n $gutter={isMobile ? 8 : 24}\n $gapX={isMobile ? 0.75 : 0}\n $alignItems={isMobile ? 'center' : 'flex-start'}\n $background={isMobile ? 'YELLOW_3' : 'TRANSPARENT'}\n >\n <Text $renderAs={valueRenderAs} $renderOnMobileAs=\"ab2-black\">\n {value}\n </Text>\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $align={isMobile ? 'center' : 'left'}>\n {isMobile && mobileLabel ? mobileLabel : label}\n </Text>\n </Styled.GridItem>\n ),\n [isMobile],\n );\n\n const renderCountries = useCallback(() => {\n if (!hasValidCountries) return null;\n\n if (isMobile) {\n const formattedCountries = formatCountryList(countries!);\n\n return (\n <FlexView $gapX={0.75}>\n <Text $renderOnMobileAs=\"ub3-bold\" $renderAs=\"ab3-black\">\n Teaching {displayGrade} kids in {formattedCountries}.\n </Text>\n {renderViewProfileButton()}\n {teacherProfileUrl && <Separator heightX={0.75} />}\n </FlexView>\n );\n }\n\n return (\n <FlexView $flexDirection=\"column\" $flexGap={12}>\n <Text $renderAs=\"ab1-black\" $renderOnMobileAs=\"ub3-bold\">\n Teaching {displayGrade} kids in\n </Text>\n <FlexView $flexDirection=\"row\" $flexGap={16} $flexWrap>\n {countries!.map(country => {\n const match = countryFlagArray.find(item => item.name === country);\n const { flag_icon: flagIcon = '', label = '', name } = match || {};\n\n return (\n <FlexView key={name || country} $flexDirection=\"row\" $flexGap={4}>\n <Image src={flagIcon} width={30} height={20} withLoader={false} />\n <Text $renderAs=\"ab3-black\">{label}</Text>\n </FlexView>\n );\n })}\n </FlexView>\n </FlexView>\n );\n }, [\n hasValidCountries,\n isMobile,\n displayGrade,\n countries,\n renderViewProfileButton,\n teacherProfileUrl,\n ]);\n\n return (\n <FlexView\n $flexDirection={isMobile ? 'column' : 'row'}\n $borderColor=\"BLACK_T_87\"\n $background=\"WHITE_3\"\n >\n <Styled.ProfileWrapper\n $gapX={isMobile ? 1 : 1.5}\n $gutterX={1}\n $background=\"YELLOW_4\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {isMobile && (\n <Styled.CueLogoWrapper>\n <CuemathLogo width={54} height={8} color={theme.colors.REAL_BLACK} />\n </Styled.CueLogoWrapper>\n )}\n <Styled.PositionedAsset1 src={ILLUSTRATIONS.STAR_OUTLINED} />\n <Styled.PositionedAsset2 src={ILLUSTRATIONS.HEART_OUTLINED} />\n <Styled.PositionedAsset3 src={ILLUSTRATIONS.EQUAL_OUTLINED} />\n <Styled.PositionedAsset4 src={ILLUSTRATIONS.TROPHY_OUTLINED} />\n <Styled.ProfilePicture\n withLoader\n src={headerImage}\n width={isMobile ? 154 : 238}\n height={isMobile ? 154 : 238}\n />\n {teacherName && (\n <>\n <Separator heightX={isMobile ? 0.75 : 1.5} />\n <Text $renderAs=\"ac2-black\" $color=\"BLACK_1\" $align=\"center\">\n {teacherName}\n </Text>\n </>\n )}\n {!isMobile && renderViewProfileButton()}\n </Styled.ProfileWrapper>\n\n <Styled.GridContainer>\n {renderStatItem({\n value: `${yearsOfExperience}+`,\n label: 'Yrs of Teaching Experience',\n mobileLabel: 'Years of Teaching',\n })}\n {renderStatItem({\n value: `${numberOfStudentsTaught}+`,\n label: 'Students Taught',\n })}\n {hasDegreeInfo &&\n renderStatItem({\n value: isMobile && degreeCode ? degreeCode : degreeName,\n label: `In ${fieldOfStudy}`,\n mobileLabel: fieldOfStudy,\n valueRenderAs: 'ab1-black',\n })}\n <Styled.GridItem\n $justifyContent=\"center\"\n $gutter={24}\n $flexDirection={isMobile ? 'row' : 'column'}\n $background={isMobile ? 'YELLOW_4' : 'TRANSPARENT'}\n >\n {renderCountries()}\n </Styled.GridItem>\n </Styled.GridContainer>\n </FlexView>\n );\n});\n\nTeacherProfile.displayName = 'TeacherProfile';\n\nexport default TeacherProfile;\n"],"names":["countryFlagArray","COUNTRY_FLAGS","TeacherProfile","memo","teacherProfile","degree","countries","lowerGrade","higherGrade","headerImage","yearsOfExperience","numberOfStudentsTaught","firstName","lastName","teacherProfileUrl","degreeName","fieldOfStudy","degreeCode","theme","useTheme","isMobile","useMemo","EDeviceType","isHighSchool","teacherName","displayGrade","hasValidCountries","hasDegreeInfo","handleViewProfile","useCallback","renderViewProfileButton","jsxs","Fragment","jsx","Separator","Button","renderStatItem","value","label","mobileLabel","valueRenderAs","Styled.GridItem","Text","renderCountries","formattedCountries","formatCountryList","FlexView","country","match","item","flagIcon","name","Image","Styled.ProfileWrapper","Styled.CueLogoWrapper","CuemathLogo","Styled.PositionedAsset1","ILLUSTRATIONS","Styled.PositionedAsset2","Styled.PositionedAsset3","Styled.PositionedAsset4","Styled.ProfilePicture","Styled.GridContainer"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,KAAmB,OAAO,OAAOC,CAAa,GAE9CC,KAA2CC,EAAK,CAAC,EAAE,gBAAAC,QAAqB;AACtE,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAaC;AAAA,IACb,cAAcC;AAAA,IACd,cAAcC;AAAA,IACd,qBAAqBC;AAAA,IACrB,2BAA2BC;AAAA,IAC3B,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,qBAAqBC;AAAA,EAAA,IACnBV,KAAkB,CAAA,GAEhB;AAAA,IACJ,aAAaW;AAAA,IACb,gBAAgBC;AAAA,IAChB,aAAaC;AAAA,EAAA,IACXZ,KAAU,CAAA,GAERa,IAAQC,KACRC,IAAWC,EAAQ,MAAMH,EAAM,UAAUI,EAAY,QAA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AAxB;AAAA,gBAAC4B;AAAAA,gBAAA;AAAA,kBACC,YAAU;AAAA,kBACV,KAAKpD;AAAA,kBACL,OAAOW,IAAW,MAAM;AAAA,kBACxB,QAAQA,IAAW,MAAM;AAAA,gBAAA;AAAA,cAC3B;AAAA,cACCI,KAEG,gBAAAO,EAAAC,GAAA,EAAA,UAAA;AAAA,gBAAA,gBAAAC,EAACC,GAAU,EAAA,SAASd,IAAW,OAAO,KAAK;AAAA,gBAC3C,gBAAAa,EAACS,KAAK,WAAU,aAAY,QAAO,WAAU,QAAO,UACjD,UACHlB,EAAA,CAAA;AAAA,cAAA,GACF;AAAA,cAED,CAACJ,KAAYU,EAAwB;AAAA,YAAA;AAAA,UAAA;AAAA,QACxC;AAAA,QAEA,gBAAAC,EAAC+B,IAAA,EACE,UAAA;AAAA,UAAe1B,EAAA;AAAA,YACd,OAAO,GAAG1B,CAAiB;AAAA,YAC3B,OAAO;AAAA,YACP,aAAa;AAAA,UAAA,CACd;AAAA,UACA0B,EAAe;AAAA,YACd,OAAO,GAAGzB,CAAsB;AAAA,YAChC,OAAO;AAAA,UAAA,CACR;AAAA,UACAgB,KACCS,EAAe;AAAA,YACb,OAAOhB,KAAYH,IAAaA,IAAaF;AAAA,YAC7C,OAAO,MAAMC,CAAY;AAAA,YACzB,aAAaA;AAAA,YACb,eAAe;AAAA,UAAA,CAChB;AAAA,UACH,gBAAAiB;AAAA,YAACQ;AAAAA,YAAA;AAAA,cACC,iBAAgB;AAAA,cAChB,SAAS;AAAA,cACT,gBAAgBrB,IAAW,QAAQ;AAAA,cACnC,aAAaA,IAAW,aAAa;AAAA,cAEpC,UAAgBuB,EAAA;AAAA,YAAA;AAAA,UACnB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDzC,GAAe,cAAc;"}
|
|
1
|
+
{"version":3,"file":"teacher-profile.js","sources":["../../../../../../src/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.tsx"],"sourcesContent":["import type { TTextVariants } from '../../../../ui/types';\nimport type { ITeacherProfileProps } from './teacher-profile-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../../../assets/illustrations/illustrations';\nimport CuemathLogo from '../../../../../assets/line-icons/icons/cuemath-logo';\nimport Button from '../../../../ui/buttons/button/button';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport { COUNTRY_FLAGS } from '../teacher-intro-constants';\nimport { formatCountryList } from './teacher-profile-helpers';\nimport * as Styled from './teacher-profile-styled';\n\nconst countryFlagArray = Object.values(COUNTRY_FLAGS);\n\nconst TeacherProfile: FC<ITeacherProfileProps> = memo(({ teacherProfile }) => {\n const {\n degree,\n countries,\n lower_grade: lowerGrade,\n higher_grade: higherGrade,\n header_image: headerImage,\n years_of_experience: yearsOfExperience,\n number_of_students_taught: numberOfStudentsTaught,\n first_name: firstName,\n last_name: lastName,\n teacher_profile_url: teacherProfileUrl,\n } = teacherProfile || {};\n\n const {\n degree_name: degreeName,\n field_of_study: fieldOfStudy,\n degree_code: degreeCode,\n } = degree || {};\n\n const theme = useTheme();\n const isMobile = useMemo(() => theme.device <= EDeviceType.MOBILE, [theme.device]);\n const isHighSchool = useMemo(() => higherGrade && parseInt(higherGrade, 10) > 8, [higherGrade]);\n const teacherName = useMemo(\n () => (firstName ? `${firstName} ${lastName}`.trim() : ''),\n [firstName, lastName],\n );\n\n const displayGrade = useMemo(() => {\n if (isHighSchool) return 'High School';\n\n if (!lowerGrade || !higherGrade) return '';\n\n return ` ${lowerGrade === 'K' ? '' : 'G'}${lowerGrade} - G${higherGrade}`;\n }, [isHighSchool, higherGrade, lowerGrade]);\n\n const hasValidCountries = useMemo(() => countries && countries.length > 0, [countries]);\n\n const hasDegreeInfo = useMemo(() => degreeName && fieldOfStudy, [degreeName, fieldOfStudy]);\n\n const handleViewProfile = useCallback(() => {\n if (teacherProfileUrl) {\n window.open(teacherProfileUrl, '_blank');\n }\n }, [teacherProfileUrl]);\n\n const renderViewProfileButton = useCallback(() => {\n if (!teacherProfileUrl) return null;\n\n return (\n <>\n <Separator heightX={1.5} />\n <Button\n label=\"View profile\"\n renderAs=\"secondary\"\n shape=\"square\"\n onClick={handleViewProfile}\n size=\"small\"\n />\n </>\n );\n }, [handleViewProfile, teacherProfileUrl]);\n\n const renderStatItem = useCallback(\n ({\n value,\n label,\n mobileLabel,\n valueRenderAs = 'ah3-black',\n }: {\n value?: string | number;\n label: string;\n mobileLabel?: string;\n valueRenderAs?: TTextVariants;\n }) => (\n <Styled.GridItem\n $flex={isMobile ? 1 : 0}\n $justifyContent={isMobile ? 'flex-start' : 'center'}\n $gutter={isMobile ? 8 : 24}\n $gapX={isMobile ? 0.75 : 0}\n $alignItems={isMobile ? 'center' : 'flex-start'}\n $background={isMobile ? 'YELLOW_3' : 'TRANSPARENT'}\n >\n <Text $renderAs={valueRenderAs} $renderOnMobileAs=\"ab2-black\">\n {value}\n </Text>\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $align={isMobile ? 'center' : 'left'}>\n {isMobile && mobileLabel ? mobileLabel : label}\n </Text>\n </Styled.GridItem>\n ),\n [isMobile],\n );\n\n const renderCountries = useCallback(() => {\n if (!hasValidCountries) return null;\n\n if (isMobile) {\n const formattedCountries = formatCountryList(countries!);\n\n return (\n <FlexView $gapX={0.75}>\n <Text $renderOnMobileAs=\"ub3-bold\" $renderAs=\"ab3-black\">\n Teaching {displayGrade} kids in {formattedCountries}.\n </Text>\n {renderViewProfileButton()}\n {teacherProfileUrl && <Separator heightX={0.75} />}\n </FlexView>\n );\n }\n\n return (\n <FlexView $flexDirection=\"column\" $flexGap={12}>\n <Text $renderAs=\"ab1-black\" $renderOnMobileAs=\"ub3-bold\">\n Teaching {displayGrade} kids in\n </Text>\n <FlexView $flexDirection=\"row\" $flexGap={16} $flexWrap>\n {countries!.map(country => {\n const match = countryFlagArray.find(item => item.name === country);\n const { flag_icon: flagIcon = '', label = '', name } = match || {};\n\n return (\n <FlexView key={name || country} $flexDirection=\"row\" $flexGap={4}>\n <Image src={flagIcon} width={30} height={20} withLoader={false} />\n <Text $renderAs=\"ab3-black\">{label}</Text>\n </FlexView>\n );\n })}\n </FlexView>\n </FlexView>\n );\n }, [\n hasValidCountries,\n isMobile,\n displayGrade,\n countries,\n renderViewProfileButton,\n teacherProfileUrl,\n ]);\n\n return (\n <FlexView\n $flexDirection={isMobile ? 'column' : 'row'}\n $borderColor=\"BLACK_T_87\"\n $background=\"WHITE_3\"\n >\n <Styled.ProfileWrapper\n $gapX={isMobile ? 1 : 1.5}\n $gutterX={1}\n $background=\"YELLOW_4\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {isMobile && (\n <Styled.CueLogoWrapper>\n <CuemathLogo width={54} height={8} color={theme.colors.REAL_BLACK} />\n </Styled.CueLogoWrapper>\n )}\n <Styled.PositionedAsset1 src={ILLUSTRATIONS.STAR_OUTLINED} />\n <Styled.PositionedAsset2 src={ILLUSTRATIONS.HEART_OUTLINED} />\n <Styled.PositionedAsset3 src={ILLUSTRATIONS.EQUAL_OUTLINED} />\n <Styled.PositionedAsset4 src={ILLUSTRATIONS.TROPHY_OUTLINED} />\n <Styled.ProfilePicture\n withLoader\n src={headerImage}\n width={isMobile ? 154 : 238}\n height={isMobile ? 154 : 238}\n />\n {teacherName && (\n <>\n <Separator heightX={isMobile ? 0.75 : 1.5} />\n <Text $renderAs=\"ac2-black\" $color=\"BLACK_1\" $align=\"center\">\n {teacherName}\n </Text>\n </>\n )}\n {!isMobile && renderViewProfileButton()}\n </Styled.ProfileWrapper>\n\n <Styled.GridContainer>\n {renderStatItem({\n value: `${yearsOfExperience}+`,\n label: 'Yrs of Teaching Experience',\n mobileLabel: 'Years of Teaching',\n })}\n {renderStatItem({\n value: `${numberOfStudentsTaught}+`,\n label: 'Students Taught',\n })}\n {hasDegreeInfo &&\n renderStatItem({\n value: isMobile && degreeCode ? degreeCode : degreeName,\n label: `In ${fieldOfStudy}`,\n mobileLabel: fieldOfStudy,\n valueRenderAs: 'ab1-black',\n })}\n <Styled.GridItem\n $justifyContent=\"center\"\n $gutter={24}\n $flexDirection={isMobile ? 'row' : 'column'}\n $background={isMobile ? 'YELLOW_4' : 'TRANSPARENT'}\n >\n {renderCountries()}\n </Styled.GridItem>\n </Styled.GridContainer>\n </FlexView>\n );\n});\n\nTeacherProfile.displayName = 'TeacherProfile';\n\nexport default TeacherProfile;\n"],"names":["countryFlagArray","COUNTRY_FLAGS","TeacherProfile","memo","teacherProfile","degree","countries","lowerGrade","higherGrade","headerImage","yearsOfExperience","numberOfStudentsTaught","firstName","lastName","teacherProfileUrl","degreeName","fieldOfStudy","degreeCode","theme","useTheme","isMobile","useMemo","EDeviceType","isHighSchool","teacherName","displayGrade","hasValidCountries","hasDegreeInfo","handleViewProfile","useCallback","renderViewProfileButton","jsxs","Fragment","jsx","Separator","Button","renderStatItem","value","label","mobileLabel","valueRenderAs","Styled.GridItem","Text","renderCountries","formattedCountries","formatCountryList","FlexView","country","match","item","flagIcon","name","Image","Styled.ProfileWrapper","Styled.CueLogoWrapper","CuemathLogo","Styled.PositionedAsset1","ILLUSTRATIONS","Styled.PositionedAsset2","Styled.PositionedAsset3","Styled.PositionedAsset4","Styled.ProfilePicture","Styled.GridContainer","TeacherProfile$1"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,KAAmB,OAAO,OAAOC,CAAa,GAE9CC,IAA2CC,EAAK,CAAC,EAAE,gBAAAC,QAAqB;AACtE,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,aAAaC;AAAA,IACb,cAAcC;AAAA,IACd,cAAcC;AAAA,IACd,qBAAqBC;AAAA,IACrB,2BAA2BC;AAAA,IAC3B,YAAYC;AAAA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cAEpC,UAAgBuB,EAAA;AAAA,YAAA;AAAA,UACnB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;AAEDzC,EAAe,cAAc;AAE7B,MAAA6D,KAAe7D;"}
|
|
@@ -1,53 +1,52 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GIF as
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as y, useMemo as $, useCallback as b } from "react";
|
|
3
|
+
import { GIF as G } from "../../../../assets/gif/gif.js";
|
|
4
4
|
import { GOAL_CATEGORY as r } from "../../../milestone/constants.js";
|
|
5
5
|
import { getGoalsFromConfig as I } from "../../../milestone/create/milestone-create-helpers.js";
|
|
6
6
|
import x from "../../../ui/image/image.js";
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import { epochTimestampAfterOneYear as
|
|
11
|
-
import { useTrialSessionContext as
|
|
12
|
-
import {
|
|
13
|
-
import
|
|
14
|
-
import { Container as
|
|
15
|
-
const
|
|
16
|
-
const { milestoneConfig:
|
|
17
|
-
() => I(
|
|
7
|
+
import L from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
|
+
import p from "../../../ui/separator/separator.js";
|
|
9
|
+
import A from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as R } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as D } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { updateGoalInFormData as j } from "../../helper.js";
|
|
13
|
+
import k from "../slide-header/index.js";
|
|
14
|
+
import { Container as O, ContentWrapper as w, ImageWrapper as F, InputContainer as N } from "./test-prep-styled.js";
|
|
15
|
+
const Z = y(() => {
|
|
16
|
+
const { milestoneConfig: n, formData: c, updateSlideConfig: a, trialHomeData: d } = D(), { demo_info: f } = d, { stream: i, region_data: g } = f || {}, { opportunity_country: m = "US" } = g || {}, { grade: s, goals: e } = c || {}, u = $(
|
|
17
|
+
() => I(n, {
|
|
18
18
|
countryCode: m,
|
|
19
|
-
grade:
|
|
19
|
+
grade: s ?? "",
|
|
20
20
|
goalCategory: r.TEST_PREP,
|
|
21
|
-
courseStream:
|
|
21
|
+
courseStream: i,
|
|
22
22
|
enrollmentType: "ONLINE"
|
|
23
23
|
}),
|
|
24
|
-
[m,
|
|
25
|
-
), { goal_code:
|
|
26
|
-
(t,
|
|
24
|
+
[m, s, n, i]
|
|
25
|
+
), { goal_code: h } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, T = b(
|
|
26
|
+
(t, _) => {
|
|
27
27
|
if (!t) {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
28
|
+
const E = e == null ? void 0 : e.filter(
|
|
29
|
+
(P) => P.goal_category !== r.TEST_PREP
|
|
30
30
|
);
|
|
31
|
-
a({ goals:
|
|
31
|
+
a({ goals: E });
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const { label:
|
|
34
|
+
const { label: C } = _, S = j(e, r.TEST_PREP, {
|
|
35
35
|
goal_code: t,
|
|
36
|
-
milestone_name:
|
|
37
|
-
milestone_date_ts:
|
|
38
|
-
publish: p
|
|
36
|
+
milestone_name: C,
|
|
37
|
+
milestone_date_ts: R()
|
|
39
38
|
});
|
|
40
|
-
a({ goals:
|
|
39
|
+
a({ goals: S });
|
|
41
40
|
},
|
|
42
|
-
[e,
|
|
41
|
+
[e, a]
|
|
43
42
|
);
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */ o(
|
|
46
|
-
/* @__PURE__ */ o(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
-
/* @__PURE__ */ o(
|
|
43
|
+
return /* @__PURE__ */ l(O, { children: [
|
|
44
|
+
/* @__PURE__ */ o(p, { height: 60 }),
|
|
45
|
+
/* @__PURE__ */ o(k, {}),
|
|
46
|
+
/* @__PURE__ */ l(w, { $flexDirection: "row", $justifyContent: "center", children: [
|
|
47
|
+
/* @__PURE__ */ o(F, { children: /* @__PURE__ */ o(x, { withLoader: !0, height: 402, width: 302, src: G.TEST_PREP, className: "image" }) }),
|
|
49
48
|
/* @__PURE__ */ o(
|
|
50
|
-
|
|
49
|
+
N,
|
|
51
50
|
{
|
|
52
51
|
$flexGap: 40,
|
|
53
52
|
$justifyContent: "center",
|
|
@@ -56,26 +55,26 @@ const te = $(() => {
|
|
|
56
55
|
$gapX: 2.5,
|
|
57
56
|
$gutterX: 2.5,
|
|
58
57
|
children: /* @__PURE__ */ o(
|
|
59
|
-
|
|
58
|
+
L,
|
|
60
59
|
{
|
|
61
60
|
renderAs: "primary",
|
|
62
61
|
label: "Select a Test",
|
|
63
|
-
value:
|
|
64
|
-
options:
|
|
62
|
+
value: h,
|
|
63
|
+
options: u,
|
|
65
64
|
shape: "borderLess",
|
|
66
65
|
theme: "dark",
|
|
67
|
-
onChange:
|
|
66
|
+
onChange: T,
|
|
68
67
|
isTransparent: !0
|
|
69
68
|
}
|
|
70
69
|
)
|
|
71
70
|
}
|
|
72
71
|
)
|
|
73
72
|
] }),
|
|
74
|
-
/* @__PURE__ */ o(
|
|
75
|
-
/* @__PURE__ */ o(
|
|
73
|
+
/* @__PURE__ */ o(p, { heightX: 1 }),
|
|
74
|
+
/* @__PURE__ */ o(A, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
76
75
|
] });
|
|
77
76
|
});
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
Z as default
|
|
80
79
|
};
|
|
81
80
|
//# sourceMappingURL=test-prep.js.map
|