@cuemath/leap 3.3.32 → 3.3.33-m
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/line-icons/icons/chevron-right.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +2 -4
- 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/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 +36 -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/{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 +2 -2
- 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/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/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/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +73 -71
- package/dist/features/trial-session/trial-session-view.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/index.d.ts +144 -81
- 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/package.json +1 -1
- 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 -53
- 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 -63
- 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/{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
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as d } from "react/jsx-runtime";
|
|
2
|
+
import { memo as w, useMemo as L, useCallback as x } from "react";
|
|
3
|
+
import { EClassStatus as g } from "../../../../parent-dashboard/parent-dashboard-types.js";
|
|
4
|
+
import A from "../../../../ui/buttons/text-button/text-button.js";
|
|
5
|
+
import I from "../../../../ui/image/image.js";
|
|
6
|
+
import i from "../../../../ui/layout/flex-view.js";
|
|
7
|
+
import W from "../../../../ui/lottie-animation/lottie-animation.js";
|
|
8
|
+
import l from "../../../../ui/separator/separator.js";
|
|
9
|
+
import S from "../../../../ui/text/text.js";
|
|
10
|
+
import _ from "./hooks/use-session-countdown.js";
|
|
11
|
+
import O from "./hooks/use-session-status-config.js";
|
|
12
|
+
import { renderSettings as X } from "./session-status-constants.js";
|
|
13
|
+
import { formatSessionDateTime as y } from "./session-status-helpers.js";
|
|
14
|
+
import { LottieWrapper as H, ContentWrapper as M, SubTitle as k } from "./session-status-styled.js";
|
|
15
|
+
const E = ({
|
|
16
|
+
completedSessions: n,
|
|
17
|
+
nextSessionStartTime: m,
|
|
18
|
+
status: o = null,
|
|
19
|
+
teacherName: a,
|
|
20
|
+
studentName: f,
|
|
21
|
+
onRescheduleClick: $ = () => {
|
|
22
|
+
}
|
|
23
|
+
}) => {
|
|
24
|
+
const b = L(
|
|
25
|
+
() => ({
|
|
26
|
+
isTeacherAssigned: !!a,
|
|
27
|
+
isFirstSessionCompleted: n > 0,
|
|
28
|
+
formattedSessionStart: y(m),
|
|
29
|
+
isNoShowStatus: o === g.S_NO_SHOW || o === g.T_NO_SHOW
|
|
30
|
+
}),
|
|
31
|
+
[n, a, m, o]
|
|
32
|
+
), { isTeacherAssigned: c, isFirstSessionCompleted: h, formattedSessionStart: C, isNoShowStatus: s } = b, T = _(
|
|
33
|
+
m,
|
|
34
|
+
h,
|
|
35
|
+
s
|
|
36
|
+
), u = O({
|
|
37
|
+
status: o,
|
|
38
|
+
completedSessions: n,
|
|
39
|
+
formattedSessionStart: C,
|
|
40
|
+
remainingTime: T,
|
|
41
|
+
isTeacherAssigned: c,
|
|
42
|
+
isFirstSessionCompleted: h,
|
|
43
|
+
isNoShowStatus: s,
|
|
44
|
+
teacherName: a,
|
|
45
|
+
studentName: f,
|
|
46
|
+
onRescheduleClick: $
|
|
47
|
+
}), p = x(
|
|
48
|
+
(r) => /* @__PURE__ */ t(
|
|
49
|
+
i,
|
|
50
|
+
{
|
|
51
|
+
$flexDirection: "row",
|
|
52
|
+
$flexColumnGapX: r != null && r.isLargeIcon ? 0.75 : 1.5,
|
|
53
|
+
$alignItems: r.align || "flex-start",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ e(i, { children: r.icon ? /* @__PURE__ */ e(I, { src: r.icon, width: 64, height: 64 }) : /* @__PURE__ */ e(H, { $isLargeLottie: !!(r != null && r.isLargeIcon), children: /* @__PURE__ */ e(
|
|
56
|
+
W,
|
|
57
|
+
{
|
|
58
|
+
src: r.lottie,
|
|
59
|
+
settings: X,
|
|
60
|
+
width: r.isLargeIcon ? 75 : 64,
|
|
61
|
+
height: r.isLargeIcon ? 75 : 64
|
|
62
|
+
}
|
|
63
|
+
) }) }),
|
|
64
|
+
/* @__PURE__ */ t(M, { $maxWidth: r.maxWidth ?? "100%", $width: "100%", children: [
|
|
65
|
+
r.title && /* @__PURE__ */ e(
|
|
66
|
+
S,
|
|
67
|
+
{
|
|
68
|
+
$renderAs: r.titleStyle,
|
|
69
|
+
$color: r.titleColor,
|
|
70
|
+
$renderOnMobileAs: r.titleTabletStyle,
|
|
71
|
+
children: r.title
|
|
72
|
+
}
|
|
73
|
+
),
|
|
74
|
+
r.subtitle && /* @__PURE__ */ t(d, { children: [
|
|
75
|
+
/* @__PURE__ */ e(l, { height: 2 }),
|
|
76
|
+
/* @__PURE__ */ e(
|
|
77
|
+
k,
|
|
78
|
+
{
|
|
79
|
+
$renderAs: r.subtitleStyle,
|
|
80
|
+
$renderOnMobileAs: r.subtitleTabletStyle,
|
|
81
|
+
$color: "WHITE_1",
|
|
82
|
+
$whiteSpace: "pre-line",
|
|
83
|
+
$subtitleLineThrough: r.subtitleLineThrough,
|
|
84
|
+
children: r.subtitle
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }),
|
|
88
|
+
r.description && /* @__PURE__ */ t(d, { children: [
|
|
89
|
+
/* @__PURE__ */ e(l, { heightX: 0.5 }),
|
|
90
|
+
/* @__PURE__ */ e(i, { $width: "100%", children: /* @__PURE__ */ e(
|
|
91
|
+
S,
|
|
92
|
+
{
|
|
93
|
+
$renderAs: "ub2",
|
|
94
|
+
$renderOnMobileAs: "ub3",
|
|
95
|
+
$color: r.descriptionColor ?? "WHITE_T_60",
|
|
96
|
+
children: r.description
|
|
97
|
+
}
|
|
98
|
+
) })
|
|
99
|
+
] }),
|
|
100
|
+
r.action && /* @__PURE__ */ t(d, { children: [
|
|
101
|
+
/* @__PURE__ */ e(l, { heightX: 0.75 }),
|
|
102
|
+
/* @__PURE__ */ e(
|
|
103
|
+
A,
|
|
104
|
+
{
|
|
105
|
+
sizeOnMobile: "small",
|
|
106
|
+
label: r.action.label,
|
|
107
|
+
color: "WHITE_1",
|
|
108
|
+
onClick: r.action.onClick
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
] })
|
|
113
|
+
]
|
|
114
|
+
}
|
|
115
|
+
),
|
|
116
|
+
[]
|
|
117
|
+
);
|
|
118
|
+
return /* @__PURE__ */ t(i, { $flexDirection: "column", $justifyContent: "center", children: [
|
|
119
|
+
p(u.topSection),
|
|
120
|
+
/* @__PURE__ */ e(i, { $gutterX: 2, $gapX: 0.25, children: /* @__PURE__ */ e(l, { heightX: 3, background: "BLACK_5", width: 1 }) }),
|
|
121
|
+
p(u.bottomSection)
|
|
122
|
+
] });
|
|
123
|
+
}, R = w(E);
|
|
124
|
+
export {
|
|
125
|
+
R as default
|
|
126
|
+
};
|
|
127
|
+
//# sourceMappingURL=session-status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-status.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-status/session-status.tsx"],"sourcesContent":["import type { ISectionConfig, ISessionStatusProps } from './session-status-types';\n\nimport { useCallback, useMemo, memo } from 'react';\n\nimport { EClassStatus } from '../../../../parent-dashboard/parent-dashboard-types';\nimport TextButton from '../../../../ui/buttons/text-button/text-button';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport useSessionCountdown from './hooks/use-session-countdown';\nimport useSessionStatusConfig from './hooks/use-session-status-config';\nimport { renderSettings } from './session-status-constants';\nimport { formatSessionDateTime } from './session-status-helpers';\nimport * as Styled from './session-status-styled';\n\nconst SessionStatus = ({\n completedSessions,\n nextSessionStartTime,\n status = null,\n teacherName,\n studentName,\n onRescheduleClick = () => {},\n}: ISessionStatusProps) => {\n const derivedValues = useMemo(\n () => ({\n isTeacherAssigned: !!teacherName,\n isFirstSessionCompleted: completedSessions > 0,\n formattedSessionStart: formatSessionDateTime(nextSessionStartTime),\n isNoShowStatus: status === EClassStatus.S_NO_SHOW || status === EClassStatus.T_NO_SHOW,\n }),\n [completedSessions, teacherName, nextSessionStartTime, status],\n );\n\n const { isTeacherAssigned, isFirstSessionCompleted, formattedSessionStart, isNoShowStatus } =\n derivedValues;\n\n const remainingTime = useSessionCountdown(\n nextSessionStartTime,\n isFirstSessionCompleted,\n isNoShowStatus,\n );\n\n const config = useSessionStatusConfig({\n status,\n completedSessions,\n formattedSessionStart,\n remainingTime,\n isTeacherAssigned,\n isFirstSessionCompleted,\n isNoShowStatus,\n teacherName,\n studentName,\n onRescheduleClick,\n });\n\n const renderSection = useCallback(\n (section: ISectionConfig) => (\n <FlexView\n $flexDirection=\"row\"\n $flexColumnGapX={section?.isLargeIcon ? 0.75 : 1.5}\n $alignItems={section.align || 'flex-start'}\n >\n <FlexView>\n {section.icon ? (\n <Image src={section.icon} width={64} height={64} />\n ) : (\n <Styled.LottieWrapper $isLargeLottie={!!section?.isLargeIcon}>\n <LottieAnimation\n src={section.lottie!}\n settings={renderSettings}\n width={section.isLargeIcon ? 75 : 64}\n height={section.isLargeIcon ? 75 : 64}\n />\n </Styled.LottieWrapper>\n )}\n </FlexView>\n <Styled.ContentWrapper $maxWidth={section.maxWidth ?? '100%'} $width=\"100%\">\n {section.title && (\n <Text\n $renderAs={section.titleStyle}\n $color={section.titleColor}\n $renderOnMobileAs={section.titleTabletStyle}\n >\n {section.title}\n </Text>\n )}\n\n {section.subtitle && (\n <>\n <Separator height={2} />\n <Styled.SubTitle\n $renderAs={section.subtitleStyle!}\n $renderOnMobileAs={section.subtitleTabletStyle}\n $color=\"WHITE_1\"\n $whiteSpace=\"pre-line\"\n $subtitleLineThrough={section.subtitleLineThrough}\n >\n {section.subtitle}\n </Styled.SubTitle>\n </>\n )}\n\n {section.description && (\n <>\n <Separator heightX={0.5} />\n <FlexView $width=\"100%\">\n <Text\n $renderAs=\"ub2\"\n $renderOnMobileAs=\"ub3\"\n $color={section.descriptionColor ?? 'WHITE_T_60'}\n >\n {section.description}\n </Text>\n </FlexView>\n </>\n )}\n\n {section.action && (\n <>\n <Separator heightX={0.75} />\n <TextButton\n sizeOnMobile=\"small\"\n label={section.action.label}\n color=\"WHITE_1\"\n onClick={section.action.onClick}\n />\n </>\n )}\n </Styled.ContentWrapper>\n </FlexView>\n ),\n [],\n );\n\n return (\n <FlexView $flexDirection=\"column\" $justifyContent=\"center\">\n {renderSection(config.topSection)}\n\n <FlexView $gutterX={2} $gapX={0.25}>\n <Separator heightX={3} background=\"BLACK_5\" width={1} />\n </FlexView>\n\n {renderSection(config.bottomSection)}\n </FlexView>\n );\n};\n\nexport default memo(SessionStatus);\n"],"names":["SessionStatus","completedSessions","nextSessionStartTime","status","teacherName","studentName","onRescheduleClick","derivedValues","useMemo","formatSessionDateTime","EClassStatus","isTeacherAssigned","isFirstSessionCompleted","formattedSessionStart","isNoShowStatus","remainingTime","useSessionCountdown","config","useSessionStatusConfig","renderSection","useCallback","section","jsxs","FlexView","jsx","Image","Styled.LottieWrapper","LottieAnimation","renderSettings","Styled.ContentWrapper","Text","Fragment","Separator","Styled.SubTitle","TextButton","SessionStatus$1","memo"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { GIF as e } from "
|
|
2
|
-
import { ESummaryType as t } from "
|
|
1
|
+
import { GIF as e } from "../../../../../assets/gif/gif.js";
|
|
2
|
+
import { ESummaryType as t } from "../../../../parent-dashboard/parent-dashboard-types.js";
|
|
3
3
|
const n = [
|
|
4
4
|
{
|
|
5
5
|
title: "introduction & goals",
|
package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-summary-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary-constants.ts"],"sourcesContent":["import type { ISessionSummary } from './session-summary-types';\n\nimport { GIF } from '../../../../../assets/gif/gif';\nimport { ESummaryType } from '../../../../parent-dashboard/parent-dashboard-types';\n\nexport const sessionSummaryData: ISessionSummary[] = [\n {\n title: 'introduction & goals',\n description: 'Get to know your tutor and discuss your goals and expectations',\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'interactive sessions',\n description: 'Watch your child learn concepts and tackle problems with their tutorʼs guidance.',\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'way forward',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n },\n];\n\nexport const sessionSummaryAfterDemo: ISessionSummary[] = [\n {\n title: 'created student profile',\n type: ESummaryType.STUDENT_PROFILE,\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'Shared Learning insights',\n type: ESummaryType.INSIGHTS,\n image: GIF.LEARNING_SESSION_GRID_BG,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'Created learning plan',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n image: GIF.WAY_FORWARD_GRID_BG,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n type: ESummaryType.LEARNING_PLAN,\n },\n];\n"],"names":["sessionSummaryData","GIF","sessionSummaryAfterDemo","ESummaryType"],"mappings":";;AAKO,MAAMA,IAAwC;AAAA,EACnD;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOC,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,GAEaC,IAA6C;AAAA,EACxD;AAAA,IACE,OAAO;AAAA,IACP,MAAMC,EAAa;AAAA,IACnB,OAAOF,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,MAAME,EAAa;AAAA,IACnB,OAAOF,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,MAAME,EAAa;AAAA,EACrB;AACF;"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsxs as $, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as T, useCallback as l } from "react";
|
|
3
|
+
import { useTheme as b } from "styled-components";
|
|
4
|
+
import { ESummaryType as n } from "../../../../parent-dashboard/parent-dashboard-types.js";
|
|
5
|
+
import m from "../../../../ui/layout/flex-view.js";
|
|
6
|
+
import g from "../../../../ui/separator/separator.js";
|
|
7
|
+
import x from "../../../../ui/text/text.js";
|
|
8
|
+
import { EDeviceType as S } from "../../../../ui/theme/constants.js";
|
|
9
|
+
import { sessionSummaryAfterDemo as v, sessionSummaryData as E } from "./session-summary-constants.js";
|
|
10
|
+
import I from "./summary-card/summary-card.js";
|
|
11
|
+
const A = T(({ isDemoDone: i, studentName: r, onViewSummary: o }) => {
|
|
12
|
+
const a = b().device <= S.MOBILE, c = l(
|
|
13
|
+
(e) => {
|
|
14
|
+
if (!e) return "";
|
|
15
|
+
if (e === n.STUDENT_PROFILE)
|
|
16
|
+
return `We understood your goals and expectations to create ${r}'s profile.`;
|
|
17
|
+
if (e === n.INSIGHTS)
|
|
18
|
+
return `With tutor’s guidance ${r} solved problems, helping us assess their math proficiency.`;
|
|
19
|
+
if (e === n.LEARNING_PLAN)
|
|
20
|
+
return `The plan will keep evolving based on ${r}'s progress and evolving needs.`;
|
|
21
|
+
},
|
|
22
|
+
[r]
|
|
23
|
+
), p = l(
|
|
24
|
+
(e) => {
|
|
25
|
+
o == null || o(e);
|
|
26
|
+
},
|
|
27
|
+
[o]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ $(m, { children: [
|
|
30
|
+
/* @__PURE__ */ s(x, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: i ? "What happened in today’s session" : "What happens in the first session?" }),
|
|
31
|
+
/* @__PURE__ */ s(g, { height: a ? 16 : 20 }),
|
|
32
|
+
/* @__PURE__ */ s(m, { $flexGapX: 1, $justifyContent: "center", $flexDirection: a ? "column" : "row", children: (i ? v : E).map(
|
|
33
|
+
({ title: e, description: f, image: h, textBG: d, ctaLabel: u, type: t }) => /* @__PURE__ */ s(
|
|
34
|
+
I,
|
|
35
|
+
{
|
|
36
|
+
title: e,
|
|
37
|
+
description: t && c(t) || f,
|
|
38
|
+
image: h,
|
|
39
|
+
textBG: d,
|
|
40
|
+
ctaLabel: u,
|
|
41
|
+
type: t,
|
|
42
|
+
isDemoDone: i,
|
|
43
|
+
onClick: p
|
|
44
|
+
},
|
|
45
|
+
e
|
|
46
|
+
)
|
|
47
|
+
) })
|
|
48
|
+
] });
|
|
49
|
+
}), H = A;
|
|
50
|
+
export {
|
|
51
|
+
H as default
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=session-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-summary.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-summary/session-summary.tsx"],"sourcesContent":["import type { ISessionSummaryProps } from './session-summary-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport { ESummaryType } from '../../../../parent-dashboard/parent-dashboard-types';\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 { sessionSummaryAfterDemo, sessionSummaryData } from './session-summary-constants';\nimport SessionSummaryCard from './summary-card/summary-card';\n\nconst SessionSummary = memo(({ isDemoDone, studentName, onViewSummary }: ISessionSummaryProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const getDescription = useCallback(\n (type?: ESummaryType) => {\n if (!type) return '';\n\n if (type === ESummaryType.STUDENT_PROFILE) {\n return `We understood your goals and expectations to create ${studentName}'s profile.`;\n }\n\n if (type === ESummaryType.INSIGHTS) {\n return `With tutor’s guidance ${studentName} solved problems, helping us assess their math proficiency.`;\n }\n\n if (type === ESummaryType.LEARNING_PLAN) {\n return `The plan will keep evolving based on ${studentName}'s progress and evolving needs.`;\n }\n },\n [studentName],\n );\n\n const handleClick = useCallback(\n (key: ESummaryType) => {\n onViewSummary?.(key);\n },\n [onViewSummary],\n );\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {isDemoDone ? `What happened in today’s session` : `What happens in the first session?`}\n </Text>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $flexGapX={1} $justifyContent=\"center\" $flexDirection={isMobile ? 'column' : 'row'}>\n {(isDemoDone ? sessionSummaryAfterDemo : sessionSummaryData).map(\n ({ title, description, image, textBG, ctaLabel, type }) => (\n <SessionSummaryCard\n key={title}\n title={title}\n description={(type && getDescription(type)) || (description as string)}\n image={image}\n textBG={textBG}\n ctaLabel={ctaLabel}\n type={type}\n isDemoDone={isDemoDone}\n onClick={handleClick}\n />\n ),\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default SessionSummary;\n"],"names":["SessionSummary","memo","isDemoDone","studentName","onViewSummary","isMobile","useTheme","EDeviceType","getDescription","useCallback","type","ESummaryType","handleClick","key","FlexView","jsx","Text","Separator","sessionSummaryAfterDemo","sessionSummaryData","title","description","image","textBG","ctaLabel","SessionSummaryCard","SessionSummary$1"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAiBC,EAAK,CAAC,EAAE,YAAAC,GAAY,aAAAC,GAAa,eAAAC,QAA0C;AAE1F,QAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAiBC;AAAA,IACrB,CAACC,MAAwB;AACnB,UAAA,CAACA,EAAa,QAAA;AAEd,UAAAA,MAASC,EAAa;AACxB,eAAO,uDAAuDR,CAAW;AAGvE,UAAAO,MAASC,EAAa;AACxB,eAAO,yBAAyBR,CAAW;AAGzC,UAAAO,MAASC,EAAa;AACxB,eAAO,wCAAwCR,CAAW;AAAA,IAE9D;AAAA,IACA,CAACA,CAAW;AAAA,EAAA,GAGRS,IAAcH;AAAA,IAClB,CAACI,MAAsB;AACrB,MAAAT,KAAA,QAAAA,EAAgBS;AAAA,IAClB;AAAA,IACA,CAACT,CAAa;AAAA,EAAA;AAGhB,2BACGU,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAC5D,UAAad,IAAA,qCAAqC,sCACrD;AAAA,IACC,gBAAAa,EAAAE,GAAA,EAAU,QAAQZ,IAAW,KAAK,IAAI;AAAA,IACtC,gBAAAU,EAAAD,GAAA,EAAS,WAAW,GAAG,iBAAgB,UAAS,gBAAgBT,IAAW,WAAW,OACnF,WAAaH,IAAAgB,IAA0BC,GAAoB;AAAA,MAC3D,CAAC,EAAE,OAAAC,GAAO,aAAAC,GAAa,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,MAAAd,QAC9C,gBAAAK;AAAA,QAACU;AAAA,QAAA;AAAA,UAEC,OAAAL;AAAA,UACA,aAAcV,KAAQF,EAAeE,CAAI,KAAOW;AAAA,UAChD,OAAAC;AAAA,UACA,QAAAC;AAAA,UACA,UAAAC;AAAA,UACA,MAAAd;AAAA,UACA,YAAAR;AAAA,UACA,SAASU;AAAA,QAAA;AAAA,QARJQ;AAAA,MASP;AAAA,IAAA,GAGN;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDM,IAAe1B;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-card-styled.js","sources":["../../../../../../../src/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../../ui/layout/flex-view';\n\nconst ImageWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { WHITE_4 } = theme.colors;\n\n return `\n margin: 0;\n padding: 0;\n background-image: linear-gradient(${WHITE_4} 1px, transparent 1px),\n linear-gradient(90deg, ${WHITE_4} 1px, transparent 1px);\n background-size: ${gutter * 3.125}px ${gutter * 3.125}px;\n position: relative;\n `;\n});\n\nexport { ImageWrapper };\n"],"names":["ImageWrapper","styled","FlexView","theme","gutter","WHITE_4"],"mappings":";;AAIA,MAAMA,IAAeC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAC7C,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM,QACnB,EAAE,SAAAE,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA;AAAA;AAAA,wCAG+BE,CAAO;AAAA,+BAChBA,CAAO;AAAA,uBACfD,IAAS,KAAK,MAAMA,IAAS,KAAK;AAAA;AAAA;AAGzD,CAAC;"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as g, useCallback as p } from "react";
|
|
3
|
+
import { useTheme as u } from "styled-components";
|
|
4
|
+
import b from "../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import I from "../../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import w from "../../../../../ui/image/image.js";
|
|
7
|
+
import r from "../../../../../ui/layout/flex-view.js";
|
|
8
|
+
import x from "../../../../../ui/separator/separator.js";
|
|
9
|
+
import n from "../../../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as T } from "../../../../../ui/theme/constants.js";
|
|
11
|
+
import { ImageWrapper as k } from "./summary-card-styled.js";
|
|
12
|
+
const _ = g(
|
|
13
|
+
({
|
|
14
|
+
title: l,
|
|
15
|
+
description: a,
|
|
16
|
+
image: h,
|
|
17
|
+
textBG: c,
|
|
18
|
+
ctaLabel: d,
|
|
19
|
+
type: o,
|
|
20
|
+
isDemoDone: $,
|
|
21
|
+
onClick: i
|
|
22
|
+
}) => {
|
|
23
|
+
const s = u().device <= T.MOBILE, f = p(() => {
|
|
24
|
+
o && i && i(o);
|
|
25
|
+
}, [o, i]), m = /* @__PURE__ */ t(r, { $flex: 1, children: [
|
|
26
|
+
/* @__PURE__ */ e(k, { $height: 84, $width: "100%", $background: c, children: /* @__PURE__ */ e(w, { src: h, height: 84, width: "100%", withLoader: !1 }) }),
|
|
27
|
+
/* @__PURE__ */ t(r, { $gap: 12, $gutter: 16, $background: c, $flex: 1, children: [
|
|
28
|
+
/* @__PURE__ */ e(n, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "WHITE", children: l }),
|
|
29
|
+
/* @__PURE__ */ e(x, { height: s ? 8 : 12 }),
|
|
30
|
+
/* @__PURE__ */ e(n, { $renderAs: "ub3", $color: "WHITE", children: a })
|
|
31
|
+
] })
|
|
32
|
+
] }, l);
|
|
33
|
+
return $ && o && i ? /* @__PURE__ */ t(r, { $flex: 1, children: [
|
|
34
|
+
m,
|
|
35
|
+
/* @__PURE__ */ e(I, { label: o, onClick: f, children: /* @__PURE__ */ e(r, { $background: c, children: /* @__PURE__ */ t(
|
|
36
|
+
r,
|
|
37
|
+
{
|
|
38
|
+
$background: "BLACK_T_38",
|
|
39
|
+
$gapX: 0.5,
|
|
40
|
+
$gutterX: 0.5,
|
|
41
|
+
$flexDirection: "row",
|
|
42
|
+
$alignItems: "center",
|
|
43
|
+
$justifyContent: "space-between",
|
|
44
|
+
children: [
|
|
45
|
+
/* @__PURE__ */ e(r, { $gutterX: 0.5, $flexDirection: "row", $alignItems: "center", children: /* @__PURE__ */ e(n, { $renderAs: "ac4", $color: "WHITE_1", children: d }) }),
|
|
46
|
+
/* @__PURE__ */ e(b, { width: 24, height: 24, color: "WHITE" })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
) }) })
|
|
50
|
+
] }) : m;
|
|
51
|
+
}
|
|
52
|
+
);
|
|
53
|
+
export {
|
|
54
|
+
_ as default
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=summary-card.js.map
|
package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-card.js","sources":["../../../../../../../src/features/trial-session/comps/pla/session-summary/summary-card/summary-card.tsx"],"sourcesContent":["import type { ISessionSummaryCardProps } from './summary-card-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ChevronRightIcon from '../../../../../../assets/line-icons/icons/chevron-right';\nimport Clickable from '../../../../../ui/buttons/clickable/clickable';\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 * as Styled from './summary-card-styled';\n\nconst SessionSummaryCard = memo(\n ({\n title,\n description,\n image,\n textBG,\n ctaLabel,\n type,\n isDemoDone,\n onClick,\n }: ISessionSummaryCardProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const handleClick = useCallback(() => {\n if (type && onClick) onClick(type);\n }, [type, onClick]);\n\n const CardContent = (\n <FlexView key={title} $flex={1}>\n <Styled.ImageWrapper $height={84} $width=\"100%\" $background={textBG}>\n <Image src={image} height={84} width=\"100%\" withLoader={false} />\n </Styled.ImageWrapper>\n <FlexView $gap={12} $gutter={16} $background={textBG} $flex={1}>\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color=\"WHITE\">\n {title}\n </Text>\n <Separator height={isMobile ? 8 : 12} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </FlexView>\n </FlexView>\n );\n\n return isDemoDone && type && onClick ? (\n <FlexView $flex={1}>\n {CardContent}\n <Clickable label={type} onClick={handleClick}>\n <FlexView $background={textBG}>\n <FlexView\n $background=\"BLACK_T_38\"\n $gapX={0.5}\n $gutterX={0.5}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <FlexView $gutterX={0.5} $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n {ctaLabel}\n </Text>\n </FlexView>\n <ChevronRightIcon width={24} height={24} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n </Clickable>\n </FlexView>\n ) : (\n CardContent\n );\n },\n);\n\nexport default SessionSummaryCard;\n"],"names":["SessionSummaryCard","memo","title","description","image","textBG","ctaLabel","type","isDemoDone","onClick","isMobile","useTheme","EDeviceType","handleClick","useCallback","CardContent","jsxs","FlexView","jsx","Styled.ImageWrapper","Image","Text","Separator","Clickable","ChevronRightIcon"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAqBC;AAAA,EACzB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MAC8B;AAExB,UAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAcC,EAAY,MAAM;AAChC,MAAAP,KAAQE,KAASA,EAAQF,CAAI;AAAA,IAAA,GAChC,CAACA,GAAME,CAAO,CAAC,GAEZM,IACJ,gBAAAC,EAACC,GAAqB,EAAA,OAAO,GAC3B,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAoB,SAAS,IAAI,QAAO,QAAO,aAAad,GAC3D,4BAACe,GAAM,EAAA,KAAKhB,GAAO,QAAQ,IAAI,OAAM,QAAO,YAAY,GAAO,CAAA,GACjE;AAAA,MACA,gBAAAY,EAACC,KAAS,MAAM,IAAI,SAAS,IAAI,aAAaZ,GAAQ,OAAO,GAC3D,UAAA;AAAA,QAAA,gBAAAa,EAACG,KAAK,WAAU,aAAY,mBAAkB,aAAY,QAAO,SAC9D,UACHnB,EAAA,CAAA;AAAA,QACC,gBAAAgB,EAAAI,GAAA,EAAU,QAAQZ,IAAW,IAAI,IAAI;AAAA,0BACrCW,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHlB,GAAA;AAAA,MAAA,GACF;AAAA,IAAA,EAAA,GAZaD,CAaf;AAGF,WAAOM,KAAcD,KAAQE,IAC1B,gBAAAO,EAAAC,GAAA,EAAS,OAAO,GACd,UAAA;AAAA,MAAAF;AAAA,MACD,gBAAAG,EAACK,KAAU,OAAOhB,GAAM,SAASM,GAC/B,UAAA,gBAAAK,EAACD,GAAS,EAAA,aAAaZ,GACrB,UAAA,gBAAAW;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,aAAY;AAAA,UACZ,OAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAC,EAACD,GAAS,EAAA,UAAU,KAAK,gBAAe,OAAM,aAAY,UACxD,UAAC,gBAAAC,EAAAG,GAAA,EAAK,WAAU,OAAM,QAAO,WAC1B,YACH,CAAA,GACF;AAAA,8BACCG,GAAiB,EAAA,OAAO,IAAI,QAAQ,IAAI,OAAM,SAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,SAE3D,EACF,CAAA;AAAA,IAAA,EACF,CAAA,IAEAT;AAAA,EAEJ;AACF;"}
|
package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.ts"],"sourcesContent":["export const DAYS_TO_SHOW = 7;\n"],"names":["DAYS_TO_SHOW"],"mappings":"AAAO,MAAMA,IAAe;"}
|
package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-styled.js","sources":["../../../../../../src/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst SessionRow = styled(FlexView)`\n border-bottom: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n min-height: 52px;\n`;\n\nconst DayLabel = styled(FlexView)`\n border-right: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n`;\nconst DateWrapper = styled(FlexView)`\n padding-bottom: 0;\n min-width: 22px;\n`;\n\nexport { SessionRow, DayLabel, DateWrapper };\n"],"names":["SessionRow","styled","FlexView","theme","DayLabel","DateWrapper"],"mappings":";;AAIM,MAAAA,IAAaC,EAAOC,CAAQ;AAAA,mBACf,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA,GAI/DC,IAAWH,EAAOC,CAAQ;AAAA,kBACd,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAE9DE,IAAcJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;"}
|
package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-types.js","sources":["../../../../../../src/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.ts"],"sourcesContent":["export enum ESessionStatus {\n COMPLETED = 'COMPLETED',\n IN_FUTURE = 'IN FUTURE',\n}\n\nexport type TSession = {\n session_start: number;\n session_end: number;\n session_status: ESessionStatus;\n};\n\nexport interface IUpcomingSessionsProps {\n sessions?: TSession[];\n}\n"],"names":["ESessionStatus"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,YAAY,aAFFA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as C, useMemo as a, useCallback as A } from "react";
|
|
3
3
|
import { useTheme as w } from "styled-components";
|
|
4
|
-
import y from "
|
|
5
|
-
import { CUEMATH_APP_URL as x } from "
|
|
6
|
-
import D from "
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
4
|
+
import y from "../../../../../assets/line-icons/icons/check2.js";
|
|
5
|
+
import { CUEMATH_APP_URL as x } from "../../../../../constants/config.js";
|
|
6
|
+
import { MOBILE_SPACING as D, DESKTOP_SPACING as M } from "../../../../parent-dashboard/parent-dashboard-constants.js";
|
|
7
|
+
import S from "../../../../ui/buttons/text-button/text-button.js";
|
|
8
|
+
import n from "../../../../ui/layout/flex-view.js";
|
|
9
|
+
import p from "../../../../ui/separator/separator.js";
|
|
10
|
+
import i from "../../../../ui/text/text.js";
|
|
11
|
+
import { EDeviceType as H } from "../../../../ui/theme/constants.js";
|
|
12
12
|
import { DAYS_TO_SHOW as W } from "./upcoming-sessions-constants.js";
|
|
13
13
|
import { SessionRow as L, DayLabel as B, DateWrapper as O } from "./upcoming-sessions-styled.js";
|
|
14
14
|
import { ESessionStatus as T } from "./upcoming-sessions-types.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { addDays as U } from "../../../../../node_modules/date-fns/addDays.js";
|
|
16
|
+
import { isToday as k } from "../../../../../node_modules/date-fns/isToday.js";
|
|
17
|
+
import { formatDate as l } from "../../../../../node_modules/date-fns/format.js";
|
|
18
18
|
const P = ({ sessions: c = [] }) => {
|
|
19
|
-
const $ = w(), m = $.device <=
|
|
19
|
+
const $ = w(), m = $.device <= H.MOBILE, f = a(() => /* @__PURE__ */ new Date(), []), g = a(
|
|
20
20
|
() => new Map(
|
|
21
21
|
c.map((o) => [
|
|
22
22
|
l(new Date(o.session_start * 1e3), "yyyy-MM-dd"),
|
|
@@ -28,7 +28,7 @@ const P = ({ sessions: c = [] }) => {
|
|
|
28
28
|
() => Array.from({ length: W }, (o, s) => U(f, s)),
|
|
29
29
|
[f]
|
|
30
30
|
), u = a(
|
|
31
|
-
() => m ?
|
|
31
|
+
() => m ? D : M,
|
|
32
32
|
[m]
|
|
33
33
|
), E = A(() => {
|
|
34
34
|
window.open(x, "_blank");
|
|
@@ -40,7 +40,7 @@ const P = ({ sessions: c = [] }) => {
|
|
|
40
40
|
/* @__PURE__ */ e(p, { height: 4 }),
|
|
41
41
|
/* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexColumnGapX: 0.25, children: [
|
|
42
42
|
/* @__PURE__ */ e(i, { $renderAs: "ub1", $color: "WHITE_T_60", children: "For more details," }),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
43
|
+
/* @__PURE__ */ e(S, { label: "download the Cuemath app", onClick: E, color: "WHITE" })
|
|
44
44
|
] })
|
|
45
45
|
] }),
|
|
46
46
|
/* @__PURE__ */ e(p, { height: m ? 16 : 20 }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions.js","sources":["../../../../../../src/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.tsx"],"sourcesContent":["import type { ISpacingConfig } from '../../../../parent-dashboard/parent-dashboard-types';\nimport type { TColorNames } from '../../../../ui/types';\n\nimport { format, isToday, addDays } from 'date-fns';\nimport React, { useCallback, memo, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport { CUEMATH_APP_URL } from '../../../../../constants/config';\nimport {\n DESKTOP_SPACING,\n MOBILE_SPACING,\n} from '../../../../parent-dashboard/parent-dashboard-constants';\nimport TextButton from '../../../../ui/buttons/text-button/text-button';\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 { DAYS_TO_SHOW } from './upcoming-sessions-constants';\nimport * as Styled from './upcoming-sessions-styled';\nimport { ESessionStatus, type IUpcomingSessionsProps } from './upcoming-sessions-types';\n\nconst UpcomingSessions: React.FC<IUpcomingSessionsProps> = ({ sessions = [] }) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const today = useMemo(() => new Date(), []);\n const sessionsMap = useMemo(\n () =>\n new Map(\n sessions.map(session => [\n format(new Date(session.session_start * 1000), 'yyyy-MM-dd'),\n session,\n ]),\n ),\n [sessions],\n );\n\n const days = useMemo(\n () => Array.from({ length: DAYS_TO_SHOW }, (_, i) => addDays(today, i)),\n [today],\n );\n\n const spacing: ISpacingConfig = useMemo(\n () => (isMobile ? MOBILE_SPACING : DESKTOP_SPACING),\n [isMobile],\n );\n\n const handleOpenApp = useCallback(() => {\n window.open(CUEMATH_APP_URL, '_blank');\n }, []);\n\n if (sessions.length === 0) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Upcoming sessions\n </Text>\n <Separator height={4} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $color=\"WHITE_T_60\">\n For more details,\n </Text>\n <TextButton label=\"download the Cuemath app\" onClick={handleOpenApp} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $borderColor=\"BLACK_5\">\n {days.map(day => {\n const dateKey = format(day, 'yyyy-MM-dd');\n const session = sessionsMap.get(dateKey);\n const isTodayFlag = isToday(day);\n const isSessionCompleted = session?.session_status === ESessionStatus.COMPLETED;\n const defaultTimecellBg =\n session?.session_status === ESessionStatus.IN_FUTURE ? 'GREEN_6' : 'BLACK_1';\n const timeCellBg = isSessionCompleted ? 'WHITE_T_10' : defaultTimecellBg;\n\n return (\n <Styled.SessionRow key={dateKey} $flex={1} $flexDirection=\"row\">\n <Styled.DayLabel\n $width={80}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexColumnGapX={0.25}\n $gutterX={1}\n $gapX={0.5}\n >\n <Text $renderAs=\"ac4-black\" $color=\"WHITE_1\">\n {format(day, 'EEE').toUpperCase()}\n </Text>\n <Styled.DateWrapper\n $background={isTodayFlag ? 'WHITE' : 'TRANSPARENT'}\n $width={22}\n $height={22}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadius={11}\n $gutter={1}\n $gap={2}\n >\n <Text $renderAs=\"ab3-bold\" $color={isTodayFlag ? 'BLACK_1' : 'WHITE_1'}>\n {format(day, 'd')}\n </Text>\n </Styled.DateWrapper>\n </Styled.DayLabel>\n <FlexView\n $flex={1}\n $gutterX={1}\n $gap={14}\n $background={timeCellBg as TColorNames}\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n {session ? (\n <Text $renderAs=\"ab2\" $color={isSessionCompleted ? 'WHITE_T_38' : 'WHITE'}>\n {format(new Date(session.session_start * 1000), 'p')}\n </Text>\n ) : null}\n {isSessionCompleted && <Check2Icon color={theme.colors.WHITE_T_38} />}\n </FlexView>\n </Styled.SessionRow>\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(UpcomingSessions);\n"],"names":["UpcomingSessions","sessions","theme","useTheme","isMobile","EDeviceType","today","useMemo","sessionsMap","session","format","days","DAYS_TO_SHOW","_","i","addDays","spacing","MOBILE_SPACING","DESKTOP_SPACING","handleOpenApp","useCallback","CUEMATH_APP_URL","FlexView","jsx","Separator","Text","TextButton","day","dateKey","isTodayFlag","isToday","isSessionCompleted","ESessionStatus","defaultTimecellBg","timeCellBg","Styled.SessionRow","jsxs","Styled.DayLabel","Styled.DateWrapper","Check2Icon","UpcomingSessions$1","memo"],"mappings":"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"}
|
|
@@ -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
|