@cuemath/leap 3.3.37-m → 3.3.37
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 +4 -1
- 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 +35 -29
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +13 -3
- 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 +43 -34
- 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 +140 -101
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +20 -16
- 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 +20 -21
- 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/hooks/use-chapter-page-journey/use-download-block-journey.js +86 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +140 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +1 -0
- 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 +400 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/constants.js +28 -15
- 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 +23 -16
- 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 +13 -7
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +74 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-constants.js +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps.js +5 -5
- package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +1 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +28 -22
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +34 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +137 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +20 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +19 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-status/session-status-styled.js +2 -2
- package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status.js +124 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/session-summary-constants.js +18 -12
- package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +54 -0
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/summary-card/summary-card-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +72 -0
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions.js +14 -14
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +1 -0
- 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 +48 -46
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +71 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +119 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +58 -0
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +16 -17
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +4 -8
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +45 -4
- 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 +197 -174
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/stickers/sticker-selector/sticker-selector.js +57 -58
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +17 -32
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +56 -40
- 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/api/teacher-availability.js +9 -0
- package/dist/features/trial-session/api/teacher-availability.js.map +1 -0
- package/dist/features/trial-session/comps/class-preference/class-preference.js +74 -58
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +28 -0
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +1 -0
- package/dist/features/trial-session/comps/learning-plan/index.js +47 -45
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +41 -40
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +59 -57
- 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 +41 -40
- 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 +5 -0
- 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 +96 -51
- 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 +70 -63
- 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 +43 -44
- 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 +41 -40
- 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 +60 -61
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/features/trial-session/helper.js +76 -61
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +49 -0
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -0
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +174 -144
- 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 +99 -110
- 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 +45 -13
- 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 +95 -144
- package/dist/index.js +292 -301
- package/dist/index.js.map +1 -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/package.json +2 -3
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +0 -12
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +0 -1
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +0 -32
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +0 -1
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js +0 -72
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +0 -1
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js +0 -34
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js.map +0 -1
- package/dist/features/stickers/stickers-effects/constants.js +0 -26
- package/dist/features/stickers/stickers-effects/constants.js.map +0 -1
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js +0 -28
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js.map +0 -1
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js +0 -12
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js +0 -6
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +0 -29
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +0 -132
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +0 -11
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +0 -19
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +0 -127
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +0 -53
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +0 -56
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -10
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -9
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInSeconds.js +0 -11
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +0 -1
- package/dist/static/trophy.a8ea85ef.json +0 -6813
- /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
- /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-types.js +0 -0
|
@@ -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 N, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as X, useMemo as l, useCallback as m } from "react";
|
|
3
|
+
import { useTheme as Y } from "styled-components";
|
|
4
4
|
import { ILLUSTRATIONS as u } from "../../../../../assets/illustrations/illustrations.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
5
|
+
import j from "../../../../../assets/line-icons/icons/cuemath-logo.js";
|
|
6
|
+
import B from "../../../../ui/buttons/button/button.js";
|
|
7
|
+
import H 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 V } from "../../../../ui/theme/constants.js";
|
|
12
|
+
import { COUNTRY_FLAGS as F } from "../teacher-intro-constants.js";
|
|
13
|
+
import { formatCountryList as K } from "./teacher-profile-helpers.js";
|
|
14
|
+
import { GridItem as P, ProfileWrapper as q, CueLogoWrapper as z, PositionedAsset1 as Q, PositionedAsset2 as J, PositionedAsset3 as Z, PositionedAsset4 as ee, ProfilePicture as re, GridContainer as te } from "./teacher-profile-styled.js";
|
|
15
|
+
const ne = Object.values(F), oe = X(({ teacherProfile: y }) => {
|
|
16
16
|
const {
|
|
17
|
-
degree:
|
|
17
|
+
degree: S,
|
|
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: D,
|
|
22
|
+
years_of_experience: G,
|
|
23
|
+
number_of_students_taught: R,
|
|
24
24
|
first_name: g,
|
|
25
25
|
last_name: O,
|
|
26
26
|
teacher_profile_url: n
|
|
27
|
-
} =
|
|
27
|
+
} = y || {}, {
|
|
28
28
|
degree_name: $,
|
|
29
29
|
field_of_study: h,
|
|
30
30
|
degree_code: C
|
|
31
|
-
} =
|
|
31
|
+
} = S || {}, b = Y(), e = l(() => b.device <= V.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]), v = l(() => $ && h, [$, h]), k = m(() => {
|
|
35
35
|
n && window.open(n, "_blank");
|
|
36
|
-
}, [n]), _ = m(() => n ? /* @__PURE__ */ t(
|
|
36
|
+
}, [n]), _ = m(() => n ? /* @__PURE__ */ t(N, { children: [
|
|
37
37
|
/* @__PURE__ */ r(x, { heightX: 1.5 }),
|
|
38
38
|
/* @__PURE__ */ r(
|
|
39
|
-
|
|
39
|
+
B,
|
|
40
40
|
{
|
|
41
41
|
label: "View profile",
|
|
42
42
|
renderAs: "secondary",
|
|
@@ -52,7 +52,7 @@ const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
52
52
|
mobileLabel: f,
|
|
53
53
|
valueRenderAs: L = "ah3-black"
|
|
54
54
|
}) => /* @__PURE__ */ t(
|
|
55
|
-
|
|
55
|
+
P,
|
|
56
56
|
{
|
|
57
57
|
$flex: e ? 1 : 0,
|
|
58
58
|
$justifyContent: e ? "flex-start" : "center",
|
|
@@ -67,10 +67,10 @@ const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
67
67
|
}
|
|
68
68
|
),
|
|
69
69
|
[e]
|
|
70
|
-
),
|
|
70
|
+
), U = m(() => {
|
|
71
71
|
if (!E) return null;
|
|
72
72
|
if (e) {
|
|
73
|
-
const a =
|
|
73
|
+
const a = K(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 oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
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 = ne.find((W) => W.name === a), { flag_icon: f = "", label: L = "", name: M } = T || {};
|
|
94
94
|
return /* @__PURE__ */ t(s, { $flexDirection: "row", $flexGap: 4, children: [
|
|
95
|
-
/* @__PURE__ */ r(
|
|
95
|
+
/* @__PURE__ */ r(H, { src: f, width: 30, height: 20, withLoader: !1 }),
|
|
96
96
|
/* @__PURE__ */ r(c, { $renderAs: "ab3-black", children: L })
|
|
97
|
-
] },
|
|
97
|
+
] }, M || a);
|
|
98
98
|
}) })
|
|
99
99
|
] });
|
|
100
100
|
}, [
|
|
@@ -113,7 +113,7 @@ const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
113
113
|
$background: "WHITE_3",
|
|
114
114
|
children: [
|
|
115
115
|
/* @__PURE__ */ t(
|
|
116
|
-
|
|
116
|
+
q,
|
|
117
117
|
{
|
|
118
118
|
$gapX: e ? 1 : 1.5,
|
|
119
119
|
$gutterX: 1,
|
|
@@ -121,21 +121,21 @@ const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
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(z, { children: /* @__PURE__ */ r(j, { width: 54, height: 8, color: b.colors.REAL_BLACK }) }),
|
|
125
|
+
/* @__PURE__ */ r(Q, { src: u.STAR_OUTLINED }),
|
|
126
|
+
/* @__PURE__ */ r(J, { src: u.HEART_OUTLINED }),
|
|
127
|
+
/* @__PURE__ */ r(Z, { src: u.EQUAL_OUTLINED }),
|
|
128
|
+
/* @__PURE__ */ r(ee, { src: u.TROPHY_OUTLINED }),
|
|
129
129
|
/* @__PURE__ */ r(
|
|
130
|
-
|
|
130
|
+
re,
|
|
131
131
|
{
|
|
132
132
|
withLoader: !0,
|
|
133
|
-
src:
|
|
133
|
+
src: D,
|
|
134
134
|
width: e ? 154 : 238,
|
|
135
135
|
height: e ? 154 : 238
|
|
136
136
|
}
|
|
137
137
|
),
|
|
138
|
-
w && /* @__PURE__ */ t(
|
|
138
|
+
w && /* @__PURE__ */ t(N, { 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 oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
143
143
|
]
|
|
144
144
|
}
|
|
145
145
|
),
|
|
146
|
-
/* @__PURE__ */ t(
|
|
146
|
+
/* @__PURE__ */ t(te, { children: [
|
|
147
147
|
A({
|
|
148
|
-
value: `${
|
|
148
|
+
value: `${G}+`,
|
|
149
149
|
label: "Yrs of Teaching Experience",
|
|
150
150
|
mobileLabel: "Years of Teaching"
|
|
151
151
|
}),
|
|
152
152
|
A({
|
|
153
|
-
value: `${
|
|
153
|
+
value: `${R}+`,
|
|
154
154
|
label: "Students Taught"
|
|
155
155
|
}),
|
|
156
|
-
|
|
156
|
+
v && 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
|
+
P,
|
|
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: U()
|
|
170
170
|
}
|
|
171
171
|
)
|
|
172
172
|
] })
|
|
@@ -174,9 +174,8 @@ const oe = Object.values(K), y = Y(({ teacherProfile: S }) => {
|
|
|
174
174
|
}
|
|
175
175
|
);
|
|
176
176
|
});
|
|
177
|
-
|
|
178
|
-
const _e = y;
|
|
177
|
+
oe.displayName = "TeacherProfile";
|
|
179
178
|
export {
|
|
180
|
-
|
|
179
|
+
oe as default
|
|
181
180
|
};
|
|
182
181
|
//# 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","TeacherProfile$1"],"mappings":";;;;;;;;;;;;;;AAmBA,MAAMA,KAAmB,OAAO,OAAOC,CAAa,GAE9CC,IAA2CC,EAAK,CAAC,EAAE,gBA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b,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,EAAe,cAAc;AAE7B,MAAA6D,KAAe7D;"}
|
|
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,QAAQ,CAACJ,EAAM,MAAM,CAAC,GAC3EK,IAAeF,EAAQ,MAAMb,KAAe,SAASA,GAAa,EAAE,IAAI,GAAG,CAACA,CAAW,CAAC,GACxFgB,IAAcH;AAAA,IAClB,MAAOT,IAAY,GAAGA,CAAS,IAAIC,CAAQ,GAAG,SAAS;AAAA,IACvD,CAACD,GAAWC,CAAQ;AAAA,EAAA,GAGhBY,IAAeJ,EAAQ,MACvBE,IAAqB,gBAErB,CAAChB,KAAc,CAACC,IAAoB,KAEjC,IAAID,MAAe,MAAM,KAAK,GAAG,GAAGA,CAAU,OAAOC,CAAW,IACtE,CAACe,GAAcf,GAAaD,CAAU,CAAC,GAEpCmB,IAAoBL,EAAQ,MAAMf,KAAaA,EAAU,SAAS,GAAG,CAACA,CAAS,CAAC,GAEhFqB,IAAgBN,EAAQ,MAAMN,KAAcC,GAAc,CAACD,GAAYC,CAAY,CAAC,GAEpFY,IAAoBC,EAA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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,52 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { GIF as
|
|
1
|
+
import { jsxs as c, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as $, useMemo as G, useCallback as L } from "react";
|
|
3
|
+
import { GIF as A } 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 { updateGoalInFormData as
|
|
13
|
-
import
|
|
14
|
-
import { Container as
|
|
15
|
-
const
|
|
16
|
-
const { milestoneConfig:
|
|
17
|
-
() => I(
|
|
7
|
+
import R from "../../../ui/inputs/searchable-select-input/searchable-select-input.js";
|
|
8
|
+
import d from "../../../ui/separator/separator.js";
|
|
9
|
+
import D from "../../../ui/text/text.js";
|
|
10
|
+
import { epochTimestampAfterOneYear as j } from "../../../utils/utils.js";
|
|
11
|
+
import { useTrialSessionContext as k } from "../../context/use-trial-session-context.js";
|
|
12
|
+
import { isPLASource as O, updateGoalInFormData as w } from "../../helper.js";
|
|
13
|
+
import F from "../slide-header/index.js";
|
|
14
|
+
import { Container as N, ContentWrapper as W, ImageWrapper as X, InputContainer as B } from "./test-prep-styled.js";
|
|
15
|
+
const te = $(() => {
|
|
16
|
+
const { milestoneConfig: i, formData: f, updateSlideConfig: a, trialHomeData: g } = k(), { demo_info: u, intel_student: n } = g, { stream: s, region_data: h } = u || {}, { opportunity_country: m = "US" } = h || {}, { grade: l, goals: e } = f || {}, p = O(n == null ? void 0 : n.source), T = G(
|
|
17
|
+
() => I(i, {
|
|
18
18
|
countryCode: m,
|
|
19
|
-
grade:
|
|
19
|
+
grade: l ?? "",
|
|
20
20
|
goalCategory: r.TEST_PREP,
|
|
21
|
-
courseStream:
|
|
21
|
+
courseStream: s,
|
|
22
22
|
enrollmentType: "ONLINE"
|
|
23
23
|
}),
|
|
24
|
-
[m,
|
|
25
|
-
), { goal_code:
|
|
26
|
-
(t,
|
|
24
|
+
[m, l, i, s]
|
|
25
|
+
), { goal_code: _ } = (e == null ? void 0 : e.find((t) => t.goal_category === r.TEST_PREP)) ?? {}, C = L(
|
|
26
|
+
(t, P) => {
|
|
27
27
|
if (!t) {
|
|
28
|
-
const
|
|
29
|
-
(
|
|
28
|
+
const b = e == null ? void 0 : e.filter(
|
|
29
|
+
(y) => y.goal_category !== r.TEST_PREP
|
|
30
30
|
);
|
|
31
|
-
a({ goals:
|
|
31
|
+
a({ goals: b });
|
|
32
32
|
return;
|
|
33
33
|
}
|
|
34
|
-
const { label:
|
|
34
|
+
const { label: S } = P, E = w(e, r.TEST_PREP, {
|
|
35
35
|
goal_code: t,
|
|
36
|
-
milestone_name:
|
|
37
|
-
milestone_date_ts:
|
|
36
|
+
milestone_name: S,
|
|
37
|
+
milestone_date_ts: j(),
|
|
38
|
+
publish: p
|
|
38
39
|
});
|
|
39
|
-
a({ goals:
|
|
40
|
+
a({ goals: E });
|
|
40
41
|
},
|
|
41
|
-
[e, a]
|
|
42
|
+
[e, p, a]
|
|
42
43
|
);
|
|
43
|
-
return /* @__PURE__ */
|
|
44
|
-
/* @__PURE__ */ o(
|
|
45
|
-
/* @__PURE__ */ o(
|
|
46
|
-
/* @__PURE__ */
|
|
47
|
-
/* @__PURE__ */ o(
|
|
44
|
+
return /* @__PURE__ */ c(N, { children: [
|
|
45
|
+
/* @__PURE__ */ o(d, { height: 60 }),
|
|
46
|
+
/* @__PURE__ */ o(F, {}),
|
|
47
|
+
/* @__PURE__ */ c(W, { $flexDirection: "row", $justifyContent: "center", children: [
|
|
48
|
+
/* @__PURE__ */ o(X, { children: /* @__PURE__ */ o(x, { withLoader: !0, height: 402, width: 302, src: A.TEST_PREP, className: "image" }) }),
|
|
48
49
|
/* @__PURE__ */ o(
|
|
49
|
-
|
|
50
|
+
B,
|
|
50
51
|
{
|
|
51
52
|
$flexGap: 40,
|
|
52
53
|
$justifyContent: "center",
|
|
@@ -55,26 +56,26 @@ const Z = y(() => {
|
|
|
55
56
|
$gapX: 2.5,
|
|
56
57
|
$gutterX: 2.5,
|
|
57
58
|
children: /* @__PURE__ */ o(
|
|
58
|
-
|
|
59
|
+
R,
|
|
59
60
|
{
|
|
60
61
|
renderAs: "primary",
|
|
61
62
|
label: "Select a Test",
|
|
62
|
-
value:
|
|
63
|
-
options:
|
|
63
|
+
value: _,
|
|
64
|
+
options: T,
|
|
64
65
|
shape: "borderLess",
|
|
65
66
|
theme: "dark",
|
|
66
|
-
onChange:
|
|
67
|
+
onChange: C,
|
|
67
68
|
isTransparent: !0
|
|
68
69
|
}
|
|
69
70
|
)
|
|
70
71
|
}
|
|
71
72
|
)
|
|
72
73
|
] }),
|
|
73
|
-
/* @__PURE__ */ o(
|
|
74
|
-
/* @__PURE__ */ o(
|
|
74
|
+
/* @__PURE__ */ o(d, { heightX: 1 }),
|
|
75
|
+
/* @__PURE__ */ o(D, { $renderAs: "ub3", $align: "center", children: "This is optional and can be skipped." })
|
|
75
76
|
] });
|
|
76
77
|
});
|
|
77
78
|
export {
|
|
78
|
-
|
|
79
|
+
te as default
|
|
79
80
|
};
|
|
80
81
|
//# 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 type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(() => {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo || {};\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { grade, goals } = formData || {};\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: 'ONLINE',\n }),\n [countryCode, 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 if (!value) {\n const goalsWithoutTestPrep = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.TEST_PREP,\n );\n\n updateSlideConfig({ goals: goalsWithoutTestPrep });\n\n return;\n }\n\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 });\n\n updateSlideConfig({ goals: updatedGoals });\n },\n [goals, updateSlideConfig],\n );\n\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader />\n <Styled.ContentWrapper $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","stream","regionData","countryCode","grade","goals","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutTestPrep","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,
|
|
1
|
+
{"version":3,"file":"test-prep.js","sources":["../../../../../src/features/trial-session/comps/test-prep/test-prep.tsx"],"sourcesContent":["import type { ISelectOption } from '../../../ui/inputs/base-select-input/base-select-input-types';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { GOAL_CATEGORY } from '../../../milestone/constants';\nimport { getGoalsFromConfig } from '../../../milestone/create/milestone-create-helpers';\nimport Image from '../../../ui/image/image';\nimport SearchableSelectInput from '../../../ui/inputs/searchable-select-input/searchable-select-input';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { epochTimestampAfterOneYear } from '../../../utils/utils';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport { isPLASource, updateGoalInFormData } from '../../helper';\nimport SlideHeader from '../slide-header';\nimport * as Styled from './test-prep-styled';\n\nconst TestPrep = memo(() => {\n const { milestoneConfig, formData, updateSlideConfig, trialHomeData } = useTrialSessionContext();\n\n const { demo_info: demoInfo, intel_student: intelStudent } = trialHomeData;\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: 'ONLINE',\n }),\n [countryCode, 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 if (!value) {\n const goalsWithoutTestPrep = goals?.filter(\n goal => goal.goal_category !== GOAL_CATEGORY.TEST_PREP,\n );\n\n updateSlideConfig({ goals: goalsWithoutTestPrep });\n\n return;\n }\n\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","stream","regionData","countryCode","grade","goals","isPLA","isPLASource","goalsList","useMemo","getGoalsFromConfig","GOAL_CATEGORY","selectedGoal","goal","handleGoalChange","useCallback","value","option","goalsWithoutTestPrep","label","updatedGoals","updateGoalInFormData","epochTimestampAfterOneYear","jsxs","Styled.Container","jsx","Separator","SlideHeader","Styled.ContentWrapper","Styled.ImageWrapper","Image","GIF","Styled.InputContainer","SearchableSelectInput","Text"],"mappings":";;;;;;;;;;;;;;AAiBM,MAAAA,KAAWC,EAAK,MAAM;AAC1B,QAAM,EAAE,iBAAAC,GAAiB,UAAAC,GAAU,mBAAAC,GAAmB,eAAAC,EAAA,IAAkBC,KAElE,EAAE,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GAAY,EAAA;AAAA,sBACZC,GAAA,EAAsB,gBAAe,OAAM,iBAAgB,UAC1D,UAAA;AAAA,MAAA,gBAAAH,EAACI,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EAAM,YAAU,IAAC,QAAQ,KAAK,OAAO,KAAK,KAAKC,EAAI,WAAW,WAAU,QAAQ,CAAA,GACnF;AAAA,MACA,gBAAAN;AAAA,QAACO;AAAAA,QAAA;AAAA,UACC,UAAU;AAAA,UACV,iBAAgB;AAAA,UAChB,aAAY;AAAA,UACZ,cAAa;AAAA,UACb,OAAO;AAAA,UACP,UAAU;AAAA,UAEV,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,OAAM;AAAA,cACN,OAAOrB;AAAA,cACP,SAASJ;AAAA,cACT,OAAM;AAAA,cACN,OAAM;AAAA,cACN,UAAUM;AAAA,cACV,eAAa;AAAA,YAAA;AAAA,UACf;AAAA,QAAA;AAAA,MACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAW,EAACC,GAAU,EAAA,SAAS,EAAG,CAAA;AAAA,sBACtBQ,GAAK,EAAA,WAAU,OAAM,QAAO,UAAS,UAEtC,wCAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,60 +1,59 @@
|
|
|
1
|
-
import { jsxs as s, Fragment as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { getTimeStrInFormatHMS as
|
|
4
|
-
import { useWebViewGames as
|
|
5
|
-
import { WebView as
|
|
1
|
+
import { jsxs as s, Fragment as K, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { memo as Q, useRef as X, useState as ee, useMemo as h, useCallback as m, useEffect as re } from "react";
|
|
3
|
+
import { getTimeStrInFormatHMS as te } from "../../../../helpers/date-time.js";
|
|
4
|
+
import { useWebViewGames as ae } from "../../../circle-games/games/web-view/hooks/use-webview-games.js";
|
|
5
|
+
import { WebView as ie } from "../../../circle-games/games/web-view/web-view.js";
|
|
6
6
|
import v from "../../../ui/layout/flex-view.js";
|
|
7
7
|
import E from "../../../ui/separator/separator.js";
|
|
8
8
|
import d from "../../../ui/text/text.js";
|
|
9
|
-
import { useTrialSessionContext as
|
|
10
|
-
import { TrialPageId as
|
|
11
|
-
import { TrialCircleGameLaunchScreen as
|
|
12
|
-
import { GameContainer as le, GameWrapper as
|
|
9
|
+
import { useTrialSessionContext as oe } from "../../context/use-trial-session-context.js";
|
|
10
|
+
import { TrialPageId as y } from "../../trial-session-constants.js";
|
|
11
|
+
import { TrialCircleGameLaunchScreen as ne } from "./trial-circle-game-launch-screen/trial-circle-game-launch-screen.js";
|
|
12
|
+
import { GameContainer as le, GameWrapper as ce, GameLaunchOverlay as se } from "./trial-circle-game-styled.js";
|
|
13
13
|
import { ProjectType as e } from "../../../circle-games/games/web-view/enums/project-type-enum.js";
|
|
14
14
|
import S from "../../../../node_modules/uuid/dist/esm-browser/v4.js";
|
|
15
|
-
const
|
|
16
|
-
[
|
|
17
|
-
[
|
|
18
|
-
[
|
|
19
|
-
},
|
|
20
|
-
const { slideConfig: b, trialGameUrl: j, circleGames: A, formData: k, handleInfoMessage: $, updateSlideConfig: o } =
|
|
21
|
-
showCircleGameScreen:
|
|
15
|
+
const me = {
|
|
16
|
+
[y.CIRCLE_GAME]: e.GAME,
|
|
17
|
+
[y.CIRCLE_PUZZLE]: e.PUZZLE,
|
|
18
|
+
[y.CIRCLE_SKILL]: e.LESSON
|
|
19
|
+
}, Pe = Q(() => {
|
|
20
|
+
const { slideConfig: b, trialGameUrl: j, circleGames: A, formData: k, handleInfoMessage: $, updateSlideConfig: o } = oe(), {
|
|
21
|
+
showCircleGameScreen: g = !0,
|
|
22
22
|
isCircleGamePlayed: u = !1,
|
|
23
|
-
isCirclePuzzleSolved:
|
|
23
|
+
isCirclePuzzleSolved: c = !1,
|
|
24
24
|
isCircleSkillCompleted: p = !1,
|
|
25
|
-
accuracyStr:
|
|
25
|
+
accuracyStr: C = "",
|
|
26
26
|
totalTimeTaken: G = 0,
|
|
27
27
|
matchmakingId: f
|
|
28
|
-
} = k || {}, I =
|
|
28
|
+
} = k || {}, I = X(null), { playGame: P } = ae({ webViewRef: I }), [T, L] = ee(!0), { header: U, id: M } = b, r = me[M], { circleConfig: O, playerDetails: W } = A, { games: l, puzzles: n, lessons: a } = O ?? {}, _ = h(() => ({
|
|
29
29
|
[e.GAME]: u,
|
|
30
|
-
[e.PUZZLE]:
|
|
30
|
+
[e.PUZZLE]: c,
|
|
31
31
|
[e.LESSON]: p
|
|
32
|
-
}), [u,
|
|
32
|
+
}), [u, c, p]), w = h(() => {
|
|
33
33
|
const i = {
|
|
34
|
-
[e.GAME]: u ?
|
|
35
|
-
[e.PUZZLE]:
|
|
34
|
+
[e.GAME]: u ? l.game_card : l.tutorial,
|
|
35
|
+
[e.PUZZLE]: c ? n.game_card : n.tutorial,
|
|
36
36
|
[e.LESSON]: p ? a.game_card : a.tutorial
|
|
37
37
|
};
|
|
38
38
|
return r ? i[r] : "";
|
|
39
39
|
}, [
|
|
40
40
|
r,
|
|
41
|
-
|
|
42
|
-
|
|
41
|
+
l.game_card,
|
|
42
|
+
l.tutorial,
|
|
43
43
|
n.game_card,
|
|
44
44
|
n.tutorial,
|
|
45
45
|
a.game_card,
|
|
46
46
|
a.tutorial,
|
|
47
47
|
u,
|
|
48
|
-
|
|
48
|
+
c,
|
|
49
49
|
p
|
|
50
|
-
]), x = h(() => r === e.PUZZLE &&
|
|
51
|
-
id:
|
|
50
|
+
]), x = h(() => r === e.PUZZLE && c ? "You've solved it!" : "", [r, c]), { circle_username: D, userId: H, grade: N, user_avatar: R, playerType: Z } = W ?? {}, z = {
|
|
51
|
+
id: H,
|
|
52
52
|
username: D,
|
|
53
|
-
grade:
|
|
53
|
+
grade: N,
|
|
54
54
|
avatar: R,
|
|
55
|
-
playerType: Z
|
|
56
|
-
|
|
57
|
-
}, B = h(() => {
|
|
55
|
+
playerType: Z
|
|
56
|
+
}, F = h(() => {
|
|
58
57
|
const i = {
|
|
59
58
|
joinByRoomId: f,
|
|
60
59
|
enableCloseButton: !1,
|
|
@@ -63,8 +62,8 @@ const de = {
|
|
|
63
62
|
};
|
|
64
63
|
return r === e.GAME ? {
|
|
65
64
|
...i,
|
|
66
|
-
projectId:
|
|
67
|
-
variant:
|
|
65
|
+
projectId: l.project_id,
|
|
66
|
+
variant: l.variant,
|
|
68
67
|
projectType: e.GAME
|
|
69
68
|
} : r === e.PUZZLE ? {
|
|
70
69
|
...i,
|
|
@@ -82,15 +81,15 @@ const de = {
|
|
|
82
81
|
targetQuestions: a.target_questions,
|
|
83
82
|
projectType: e.LESSON
|
|
84
83
|
};
|
|
85
|
-
}, [
|
|
86
|
-
|
|
87
|
-
}, []),
|
|
88
|
-
|
|
89
|
-
}, [r, o]),
|
|
84
|
+
}, [l, n, a, r, f]), B = m(() => {
|
|
85
|
+
L(!1);
|
|
86
|
+
}, []), V = m(() => {
|
|
87
|
+
L(!0), (r === e.GAME || r === e.PUZZLE || r === e.LESSON) && o({ showCircleGameScreen: !0, matchmakingId: S() });
|
|
88
|
+
}, [r, o]), q = m(() => {
|
|
90
89
|
o({ showCircleGameScreen: !1, accuracyStr: "", totalTimeTaken: 0 });
|
|
91
|
-
}, [o]),
|
|
90
|
+
}, [o]), Y = m(
|
|
92
91
|
(i) => {
|
|
93
|
-
|
|
92
|
+
L(!0), r === e.LESSON ? o({
|
|
94
93
|
accuracyStr: i.value,
|
|
95
94
|
totalTimeTaken: i.timeSpent,
|
|
96
95
|
isCircleSkillCompleted: !0,
|
|
@@ -107,52 +106,52 @@ const de = {
|
|
|
107
106
|
});
|
|
108
107
|
},
|
|
109
108
|
[o, r]
|
|
110
|
-
),
|
|
109
|
+
), J = m(() => C && G ? /* @__PURE__ */ s(K, { children: [
|
|
111
110
|
/* @__PURE__ */ s(v, { $flexDirection: "row", children: [
|
|
112
111
|
/* @__PURE__ */ t(d, { $renderAs: "ab2", $color: "WHITE", children: "Finished in" }),
|
|
113
112
|
/* @__PURE__ */ t(E, { width: 5 }),
|
|
114
|
-
/* @__PURE__ */ t(d, { $renderAs: "ab2-bold", $color: "WHITE", children:
|
|
113
|
+
/* @__PURE__ */ t(d, { $renderAs: "ab2-bold", $color: "WHITE", children: te(G) })
|
|
115
114
|
] }),
|
|
116
115
|
/* @__PURE__ */ t(E, { height: 20 }),
|
|
117
116
|
/* @__PURE__ */ s(v, { $flexDirection: "row", children: [
|
|
118
117
|
/* @__PURE__ */ t(d, { $renderAs: "ab2", $color: "WHITE", children: "Accuracy:" }),
|
|
119
118
|
/* @__PURE__ */ t(E, { width: 5 }),
|
|
120
|
-
/* @__PURE__ */ t(d, { $renderAs: "ab2-bold", $color: "WHITE", children:
|
|
119
|
+
/* @__PURE__ */ t(d, { $renderAs: "ab2-bold", $color: "WHITE", children: C })
|
|
121
120
|
] })
|
|
122
|
-
] }) : null, [
|
|
123
|
-
return
|
|
124
|
-
!
|
|
125
|
-
}, [
|
|
121
|
+
] }) : null, [C, G]);
|
|
122
|
+
return re(() => {
|
|
123
|
+
!T && !g && P();
|
|
124
|
+
}, [g, P, T]), /* @__PURE__ */ s(le, { children: [
|
|
126
125
|
/* @__PURE__ */ t(E, { height: 16 }),
|
|
127
126
|
/* @__PURE__ */ t(d, { $renderAs: "ah3-bold", $color: "WHITE_T_87", $align: "center", $marginBottom: 16, children: U }),
|
|
128
|
-
/* @__PURE__ */ s(
|
|
129
|
-
|
|
130
|
-
|
|
127
|
+
/* @__PURE__ */ s(ce, { children: [
|
|
128
|
+
g && /* @__PURE__ */ t(se, { children: /* @__PURE__ */ t(
|
|
129
|
+
ne,
|
|
131
130
|
{
|
|
132
131
|
assetUrl: w,
|
|
133
132
|
assetUrlType: w.endsWith("mp4") ? "video" : "lottie",
|
|
134
133
|
descriptionHeader: x,
|
|
135
134
|
playerType: Z,
|
|
136
|
-
isLoading:
|
|
135
|
+
isLoading: T,
|
|
137
136
|
isGamePlayed: (r && _[r]) ?? !1,
|
|
138
|
-
onPlay:
|
|
139
|
-
custEle: r === e.LESSON ?
|
|
137
|
+
onPlay: q,
|
|
138
|
+
custEle: r === e.LESSON ? J() : void 0,
|
|
140
139
|
celebrationText: r && _[r] ? "WELL DONE!" : ""
|
|
141
140
|
}
|
|
142
141
|
) }),
|
|
143
142
|
f && /* @__PURE__ */ t(
|
|
144
|
-
|
|
143
|
+
ie,
|
|
145
144
|
{
|
|
146
145
|
ref: I,
|
|
147
146
|
height: "100%",
|
|
148
147
|
width: "100%",
|
|
149
148
|
baseUrl: j,
|
|
150
|
-
playerDetails:
|
|
151
|
-
projectDetails:
|
|
152
|
-
onGameLoad:
|
|
153
|
-
onBack:
|
|
149
|
+
playerDetails: z,
|
|
150
|
+
projectDetails: F,
|
|
151
|
+
onGameLoad: B,
|
|
152
|
+
onBack: V,
|
|
154
153
|
handleInfoMessage: $,
|
|
155
|
-
onGamePlayFinish:
|
|
154
|
+
onGamePlayFinish: Y,
|
|
156
155
|
parentDomain: window.location.origin
|
|
157
156
|
},
|
|
158
157
|
f
|
|
@@ -161,6 +160,6 @@ const de = {
|
|
|
161
160
|
] });
|
|
162
161
|
});
|
|
163
162
|
export {
|
|
164
|
-
|
|
163
|
+
Pe as default
|
|
165
164
|
};
|
|
166
165
|
//# sourceMappingURL=trial-circle-game.js.map
|