@cuemath/leap 3.3.5 → 3.3.6
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/illustrations/illustrations.js +3 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -0
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/constants/config.js +5 -0
- package/dist/constants/config.js.map +1 -0
- package/dist/features/auth/comps/otp-input/otp-input.js +19 -18
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button-styled.js +17 -17
- package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +1 -1
- package/dist/features/auth/comps/pill-button/pill-button.js +35 -33
- package/dist/features/auth/comps/pill-button/pill-button.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-item/user-item.js +32 -30
- package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/comps/user-list/user-list.js +20 -19
- package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js +9 -9
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-constants.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js +58 -29
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide-styled.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +78 -41
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js +37 -35
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper-styled.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js +76 -71
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +55 -50
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js +47 -25
- package/dist/features/auth/signup/custom-input-field/input-wrapper/input-wrapper.js.map +1 -1
- package/dist/features/milestone/constants.js +2 -1
- 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/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js +25 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js +15 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js +90 -0
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js +19 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js +32 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js +67 -0
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js.map +1 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js +42 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js +20 -0
- package/dist/features/parent-dashboard/comps/parent-dashboard-faqs/parent-dashboard-faqs.js.map +1 -0
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js +25 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js +43 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +49 -0
- 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 +131 -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/trial-session/comps/pla/session-status/session-status-styled.js +17 -0
- 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 +126 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js +52 -0
- 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 +52 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js +17 -0
- 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 +5 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js +17 -0
- 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 +5 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +96 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-information/report-card.js +31 -16
- package/dist/features/trial-session/comps/session-report/report-information/report-card.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js +21 -13
- package/dist/features/trial-session/comps/session-report/report-information/report-information-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js +166 -94
- package/dist/features/trial-session/comps/session-report/report-information/report-information.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js +46 -31
- package/dist/features/trial-session/comps/student-profile/student-profile-highlights/student-profile-highlights.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js +12 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +121 -42
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +174 -56
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/ui/buttons/icon-button/icon-button.js +32 -29
- package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
- package/dist/features/ui/modals/modal.js +30 -28
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/index.d.ts +95 -10
- package/dist/index.js +388 -368
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
- package/dist/node_modules/date-fns/fromUnixTime.js +9 -0
- package/dist/node_modules/date-fns/fromUnixTime.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/static/{book-checked-green.c275dbd9.svg → book-checked-green.0436b91e.svg} +1 -1
- package/dist/static/community-bulb-yellow-2.f89c30f9.svg +1 -0
- package/dist/static/learning-puzzle-bot.6fe93cf6.svg +1 -0
- package/dist/static/username-responsive.787b5515.json +1 -0
- package/package.json +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { h } from "../../../../../../node_modules/humanize-plus/dist/humanize.js";
|
|
2
|
+
import { useCallback as o, useMemo as T } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as r } from "../../../../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import { LOTTIE as c } from "../../../../../../assets/lottie/lottie.js";
|
|
5
|
+
import { CUEMATH_APP_URL as d } from "../../../../../../constants/config.js";
|
|
6
|
+
const m = ({
|
|
7
|
+
status: s,
|
|
8
|
+
completedSessions: i,
|
|
9
|
+
formattedSessionStart: e,
|
|
10
|
+
remainingTime: b,
|
|
11
|
+
isTeacherAssigned: t,
|
|
12
|
+
isFirstSessionCompleted: y,
|
|
13
|
+
isNoShowStatus: E,
|
|
14
|
+
teacherName: a,
|
|
15
|
+
studentName: S,
|
|
16
|
+
onRescheduleClick: n
|
|
17
|
+
}) => {
|
|
18
|
+
const p = o(() => {
|
|
19
|
+
window.open(d, "_blank");
|
|
20
|
+
}, []), u = o(() => {
|
|
21
|
+
n == null || n();
|
|
22
|
+
}, [n]), C = o(() => {
|
|
23
|
+
const l = s === "S_NO_SHOW";
|
|
24
|
+
return {
|
|
25
|
+
topSection: {
|
|
26
|
+
icon: r.CALENDAR_CROSS_ORANGE,
|
|
27
|
+
title: "Session Cancelled",
|
|
28
|
+
titleColor: "ORANGE_4",
|
|
29
|
+
titleStyle: "ac3",
|
|
30
|
+
titleTabletStyle: "ac4",
|
|
31
|
+
subtitleStyle: "ab1",
|
|
32
|
+
subtitleTabletStyle: "ab2",
|
|
33
|
+
subtitle: e,
|
|
34
|
+
description: l ? "We understand life is unpredictable and schedules change unexpectedly." : "We're sorry - our tutor couldn't attend your first session. This rarely happens, but tutors sometimes face unexpected circumstances.",
|
|
35
|
+
descriptionColor: "WHITE_1",
|
|
36
|
+
subtitleLineThrough: !0
|
|
37
|
+
},
|
|
38
|
+
bottomSection: {
|
|
39
|
+
icon: r.PLATFORM_PURPLE,
|
|
40
|
+
title: "Please Reschedule",
|
|
41
|
+
titleColor: "PURPLE_4",
|
|
42
|
+
titleStyle: "ac3",
|
|
43
|
+
titleTabletStyle: "ac4",
|
|
44
|
+
subtitleStyle: "ub1",
|
|
45
|
+
subtitleTabletStyle: "ub2",
|
|
46
|
+
subtitle: l ? "Please reschedule when it works better for you. Choose any available time slot, and we'll assign you a new tutor for your child." : "Since your first class didn't happen, we haven't activated your subscription. Choose any available time slot, and we'll assign a reliable tutor.",
|
|
47
|
+
action: {
|
|
48
|
+
label: "Reschedule",
|
|
49
|
+
onClick: u
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
}, [s, e, u]), _ = o(() => {
|
|
54
|
+
const l = i === 1 ? "First" : i.toString();
|
|
55
|
+
return {
|
|
56
|
+
topSection: {
|
|
57
|
+
icon: r.BOOK_CHECKED_GREEN,
|
|
58
|
+
title: `${l} ${h.pluralize(i, "session")} Completed!`,
|
|
59
|
+
titleColor: "GREEN_4",
|
|
60
|
+
titleStyle: "ac3",
|
|
61
|
+
titleTabletStyle: "ac4",
|
|
62
|
+
align: "center"
|
|
63
|
+
},
|
|
64
|
+
bottomSection: {
|
|
65
|
+
lottie: c.CALENDAR_HOUR_GLASS_ORANGE,
|
|
66
|
+
title: "Next Session",
|
|
67
|
+
titleColor: "ORANGE_4",
|
|
68
|
+
titleStyle: "ac3",
|
|
69
|
+
titleTabletStyle: "ac4",
|
|
70
|
+
subtitleStyle: "ab1",
|
|
71
|
+
subtitleTabletStyle: "ab2",
|
|
72
|
+
subtitle: `${e}
|
|
73
|
+
with ${a}`,
|
|
74
|
+
action: {
|
|
75
|
+
label: "Reschedule on the Cuemath app",
|
|
76
|
+
onClick: p
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
}, [i, e, a, p]), R = o(() => {
|
|
81
|
+
const l = b || "SESSION SCHEDULED", f = !!b;
|
|
82
|
+
return {
|
|
83
|
+
topSection: {
|
|
84
|
+
icon: r.CALENDAR_CHECK_GREEN,
|
|
85
|
+
title: l,
|
|
86
|
+
titleColor: "GREEN_4",
|
|
87
|
+
titleStyle: f ? "ub2" : "ac3",
|
|
88
|
+
titleTabletStyle: f ? "ub3" : "ac4",
|
|
89
|
+
subtitle: e,
|
|
90
|
+
subtitleStyle: "ab1",
|
|
91
|
+
subtitleTabletStyle: "ab2",
|
|
92
|
+
action: {
|
|
93
|
+
label: "Reschedule",
|
|
94
|
+
onClick: u
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
bottomSection: {
|
|
98
|
+
align: "center",
|
|
99
|
+
lottie: t ? c.TEACHER_FOUND : c.TEACHER_SEARCH,
|
|
100
|
+
title: t ? "Tutor Assigned!" : "",
|
|
101
|
+
titleColor: t ? "ORANGE_4" : "WHITE_1",
|
|
102
|
+
titleStyle: t ? "ac3" : "ab2",
|
|
103
|
+
titleTabletStyle: t ? "ac4" : "ab3",
|
|
104
|
+
subtitleStyle: "ub1",
|
|
105
|
+
subtitleTabletStyle: "ub2",
|
|
106
|
+
subtitle: t ? `From over 3000 expert tutors, we selected ${a} as the perfect match for ${S}!` : "Finding the perfect tutor for your child",
|
|
107
|
+
description: t ? "" : "This typically takes 24-48 hours. We'll notify you via email.",
|
|
108
|
+
maxWidth: t ? 368 : 383,
|
|
109
|
+
isLargeIcon: !0
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
}, [
|
|
113
|
+
b,
|
|
114
|
+
e,
|
|
115
|
+
t,
|
|
116
|
+
a,
|
|
117
|
+
S,
|
|
118
|
+
u
|
|
119
|
+
]);
|
|
120
|
+
return T(() => E ? C() : y ? _() : R(), [
|
|
121
|
+
E,
|
|
122
|
+
y,
|
|
123
|
+
C,
|
|
124
|
+
_,
|
|
125
|
+
R
|
|
126
|
+
]);
|
|
127
|
+
};
|
|
128
|
+
export {
|
|
129
|
+
m as default
|
|
130
|
+
};
|
|
131
|
+
//# sourceMappingURL=use-session-status-config.js.map
|
package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-session-status-config.js","sources":["../../../../../../../src/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.ts"],"sourcesContent":["import type { ISessionStatusConfig } from '../session-status-types';\n\nimport { pluralize } from 'humanize-plus';\nimport { useMemo, useCallback } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../../../assets/illustrations/illustrations';\nimport { LOTTIE } from '../../../../../../assets/lottie/lottie';\nimport { CUEMATH_APP_URL } from '../../../../../../constants/config';\n\ninterface IUseSessionStatusConfigProps {\n status: string | null;\n completedSessions: number;\n formattedSessionStart: string;\n remainingTime: string;\n isTeacherAssigned: boolean;\n isFirstSessionCompleted: boolean;\n isNoShowStatus: boolean;\n teacherName?: string;\n studentName?: string;\n onRescheduleClick?: () => void;\n}\n\nconst useSessionStatusConfig = ({\n status,\n completedSessions,\n formattedSessionStart,\n remainingTime,\n isTeacherAssigned,\n isFirstSessionCompleted,\n isNoShowStatus,\n teacherName,\n studentName,\n onRescheduleClick,\n}: IUseSessionStatusConfigProps) => {\n const handleRedirectToApp = useCallback(() => {\n window.open(CUEMATH_APP_URL, '_blank');\n }, []);\n\n const handleReschedule = useCallback(() => {\n onRescheduleClick?.();\n }, [onRescheduleClick]);\n\n // No show status configuration\n const createNoShowConfig = useCallback((): ISessionStatusConfig => {\n const isStudentNoShow = status === 'S_NO_SHOW';\n\n return {\n topSection: {\n icon: ILLUSTRATIONS.CALENDAR_CROSS_ORANGE,\n title: 'Session Cancelled',\n titleColor: 'ORANGE_4',\n titleStyle: 'ac3',\n titleTabletStyle: 'ac4',\n subtitleStyle: 'ab1',\n subtitleTabletStyle: 'ab2',\n subtitle: formattedSessionStart,\n description: isStudentNoShow\n ? 'We understand life is unpredictable and schedules change unexpectedly.'\n : `We're sorry - our tutor couldn't attend your first session. This rarely happens, but tutors sometimes face unexpected circumstances.`,\n descriptionColor: 'WHITE_1',\n subtitleLineThrough: true,\n },\n bottomSection: {\n icon: ILLUSTRATIONS.PLATFORM_PURPLE,\n title: 'Please Reschedule',\n titleColor: 'PURPLE_4',\n titleStyle: 'ac3',\n titleTabletStyle: 'ac4',\n subtitleStyle: 'ub1',\n subtitleTabletStyle: 'ub2',\n subtitle: isStudentNoShow\n ? \"Please reschedule when it works better for you. Choose any available time slot, and we'll assign you a new tutor for your child.\"\n : `Since your first class didn't happen, we haven't activated your subscription. Choose any available time slot, and we'll assign a reliable tutor.`,\n action: {\n label: 'Reschedule',\n onClick: handleReschedule,\n },\n },\n };\n }, [status, formattedSessionStart, handleReschedule]);\n\n // Completed session configuration\n const createCompletedConfig = useCallback((): ISessionStatusConfig => {\n const titleText = completedSessions === 1 ? 'First' : completedSessions.toString();\n\n return {\n topSection: {\n icon: ILLUSTRATIONS.BOOK_CHECKED_GREEN,\n title: `${titleText} ${pluralize(completedSessions, 'session')} Completed!`,\n titleColor: 'GREEN_4',\n titleStyle: 'ac3',\n titleTabletStyle: 'ac4',\n align: 'center',\n },\n bottomSection: {\n lottie: LOTTIE.CALENDAR_HOUR_GLASS_ORANGE,\n title: 'Next Session',\n titleColor: 'ORANGE_4',\n titleStyle: 'ac3',\n titleTabletStyle: 'ac4',\n subtitleStyle: 'ab1',\n subtitleTabletStyle: 'ab2',\n subtitle: `${formattedSessionStart}\\nwith ${teacherName}`,\n action: {\n label: 'Reschedule on the Cuemath app',\n onClick: handleRedirectToApp,\n },\n },\n };\n }, [completedSessions, formattedSessionStart, teacherName, handleRedirectToApp]);\n\n // Default session configuration\n const createDefaultConfig = useCallback((): ISessionStatusConfig => {\n const defaultTitle = remainingTime || 'SESSION SCHEDULED';\n const hasCountdown = Boolean(remainingTime);\n\n return {\n topSection: {\n icon: ILLUSTRATIONS.CALENDAR_CHECK_GREEN,\n title: defaultTitle,\n titleColor: 'GREEN_4',\n titleStyle: hasCountdown ? 'ub2' : 'ac3',\n titleTabletStyle: hasCountdown ? 'ub3' : 'ac4',\n subtitle: formattedSessionStart,\n subtitleStyle: 'ab1',\n subtitleTabletStyle: 'ab2',\n action: {\n label: 'Reschedule',\n onClick: handleReschedule,\n },\n },\n bottomSection: {\n align: 'center',\n lottie: isTeacherAssigned ? LOTTIE.TEACHER_FOUND : LOTTIE.TEACHER_SEARCH,\n title: isTeacherAssigned ? 'Tutor Assigned!' : '',\n titleColor: isTeacherAssigned ? 'ORANGE_4' : 'WHITE_1',\n titleStyle: isTeacherAssigned ? 'ac3' : 'ab2',\n titleTabletStyle: isTeacherAssigned ? 'ac4' : 'ab3',\n subtitleStyle: 'ub1',\n subtitleTabletStyle: 'ub2',\n subtitle: isTeacherAssigned\n ? `From over 3000 expert tutors, we selected ${teacherName} as the perfect match for ${studentName}!`\n : 'Finding the perfect tutor for your child',\n description: isTeacherAssigned\n ? ''\n : \"This typically takes 24-48 hours. We'll notify you via email.\",\n maxWidth: isTeacherAssigned ? 368 : 383,\n isLargeIcon: true,\n },\n };\n }, [\n remainingTime,\n formattedSessionStart,\n isTeacherAssigned,\n teacherName,\n studentName,\n handleReschedule,\n ]);\n\n // Main configuration selector\n const config = useMemo((): ISessionStatusConfig => {\n if (isNoShowStatus) {\n return createNoShowConfig();\n }\n\n if (isFirstSessionCompleted) {\n return createCompletedConfig();\n }\n\n return createDefaultConfig();\n }, [\n isNoShowStatus,\n isFirstSessionCompleted,\n createNoShowConfig,\n createCompletedConfig,\n createDefaultConfig,\n ]);\n\n return config;\n};\n\nexport default useSessionStatusConfig;\n"],"names":["useSessionStatusConfig","status","completedSessions","formattedSessionStart","remainingTime","isTeacherAssigned","isFirstSessionCompleted","isNoShowStatus","teacherName","studentName","onRescheduleClick","handleRedirectToApp","useCallback","CUEMATH_APP_URL","handleReschedule","createNoShowConfig","isStudentNoShow","ILLUSTRATIONS","createCompletedConfig","titleText","pluralize","LOTTIE","createDefaultConfig","defaultTitle","hasCountdown","useMemo"],"mappings":";;;;;AAsBA,MAAMA,IAAyB,CAAC;AAAA,EAC9B,QAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,uB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,IACAE;AAAA,IACAG;AAAA,IACAC;AAAA,IACAK;AAAA,EAAA,CACD;AAqBM,SAlBQW,EAAQ,MACjBlB,IACKQ,EAAmB,IAGxBT,IACKY,EAAsB,IAGxBI,EAAoB,GAC1B;AAAA,IACDf;AAAA,IACAD;AAAA,IACAS;AAAA,IACAG;AAAA,IACAI;AAAA,EAAA,CACD;AAGH;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-status-constants.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-status/session-status-constants.ts"],"sourcesContent":["export const COUNTDOWN_THRESHOLD = 48 * 3600; // 48 hours in seconds\nexport const COUNTDOWN_INTERVAL = 1000; // 1 second\n\nexport const renderSettings = {\n autoplay: true,\n loop: true,\n renderer: 'svg',\n};\n"],"names":["COUNTDOWN_THRESHOLD","COUNTDOWN_INTERVAL","renderSettings"],"mappings":"AAAO,MAAMA,IAAsB,QACtBC,IAAqB,KAErBC,IAAiB;AAAA,EAC5B,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { fromUnixTime as s } from "../../../../../node_modules/date-fns/fromUnixTime.js";
|
|
2
|
+
import { formatDate as n } from "../../../../../node_modules/date-fns/format.js";
|
|
3
|
+
function p(t, e) {
|
|
4
|
+
if (!t) return "";
|
|
5
|
+
const o = s(t), r = n(o, "EEE").toUpperCase(), i = n(o, "MMM d"), m = n(o, "h a");
|
|
6
|
+
return `${r} . ${i} . ${m}`;
|
|
7
|
+
}
|
|
8
|
+
const a = (t) => t.toString().padStart(2, "0"), $ = (t) => {
|
|
9
|
+
const e = Math.floor(t / 3600), o = Math.floor(t % 3600 / 60), r = t % 60;
|
|
10
|
+
return `Session starts in ${a(e)}h : ${a(o)}m : ${a(
|
|
11
|
+
r
|
|
12
|
+
)}s`;
|
|
13
|
+
};
|
|
14
|
+
export {
|
|
15
|
+
p as formatSessionDateTime,
|
|
16
|
+
$ as formatTimeRemaining,
|
|
17
|
+
a as padTime
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=session-status-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-status-helpers.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-status/session-status-helpers.ts"],"sourcesContent":["import { fromUnixTime, format } from 'date-fns';\n\n/**\n * Formats the session start and end times into a readable string.\n *\n * @param startTime - The start time of the session in Unix timestamp.\n * @param endTime - The end time of the session in Unix timestamp.\n * @returns A formatted string representing the session time or an empty string if inputs are invalid.\n */\nexport function formatSessionDateTime(startTime: number | null, endTime?: number | null): string {\n if (!startTime) return '';\n\n const start = fromUnixTime(startTime);\n\n const day = format(start, 'EEE').toUpperCase();\n const date = format(start, 'MMM d');\n const formattedStartTime = format(start, 'h a');\n const end = endTime ? fromUnixTime(endTime) : null;\n const formattedEndTime = end ? format(end, 'h a') : null;\n\n return `${day} . ${date} . ${formattedStartTime}${\n formattedEndTime ? ` - ${formattedEndTime}` : ''\n }`;\n}\n\nexport const padTime = (time: number): string => time.toString().padStart(2, '0');\n\nexport const formatTimeRemaining = (seconds: number): string => {\n const hours = Math.floor(seconds / 3600);\n const minutes = Math.floor((seconds % 3600) / 60);\n const remainingSeconds = seconds % 60;\n\n return `Session starts in ${padTime(hours)}h : ${padTime(minutes)}m : ${padTime(\n remainingSeconds,\n )}s`;\n};\n"],"names":["formatSessionDateTime","startTime","endTime","start","fromUnixTime","day","format","date","formattedStartTime","padTime","time","formatTimeRemaining","seconds","hours","minutes","remainingSeconds"],"mappings":";;AASgB,SAAAA,EAAsBC,GAA0BC,GAAiC;AAC3F,MAAA,CAACD,EAAkB,QAAA;AAEjB,QAAAE,IAAQC,EAAaH,CAAS,GAE9BI,IAAMC,EAAOH,GAAO,KAAK,EAAE,YAAY,GACvCI,IAAOD,EAAOH,GAAO,OAAO,GAC5BK,IAAqBF,EAAOH,GAAO,KAAK;AAIvC,SAAA,GAAGE,CAAG,MAAME,CAAI,MAAMC,CAAkB;AAGjD;AAEa,MAAAC,IAAU,CAACC,MAAyBA,EAAK,WAAW,SAAS,GAAG,GAAG,GAEnEC,IAAsB,CAACC,MAA4B;AAC9D,QAAMC,IAAQ,KAAK,MAAMD,IAAU,IAAI,GACjCE,IAAU,KAAK,MAAOF,IAAU,OAAQ,EAAE,GAC1CG,IAAmBH,IAAU;AAE5B,SAAA,qBAAqBH,EAAQI,CAAK,CAAC,OAAOJ,EAAQK,CAAO,CAAC,OAAOL;AAAA,IACtEM;AAAA,EACD,CAAA;AACH;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
import o from "../../../../ui/layout/flex-view.js";
|
|
3
|
+
import r from "../../../../ui/text/text.js";
|
|
4
|
+
const l = e(o)`
|
|
5
|
+
max-width: ${({ $maxWidth: t }) => `${typeof t == "number" ? `${t}px` : `${t}`}`};
|
|
6
|
+
`, m = e(r)`
|
|
7
|
+
text-decoration: ${({ $subtitleLineThrough: t }) => t ? "line-through" : "none"};
|
|
8
|
+
`, f = e(o)`
|
|
9
|
+
position: relative;
|
|
10
|
+
left: ${({ $isLargeLottie: t }) => t ? "-6px" : "0"};
|
|
11
|
+
`;
|
|
12
|
+
export {
|
|
13
|
+
l as ContentWrapper,
|
|
14
|
+
f as LottieWrapper,
|
|
15
|
+
m as SubTitle
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=session-status-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-status-styled.js","sources":["../../../../../../src/features/trial-session/comps/pla/session-status/session-status-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\nexport const ContentWrapper = styled(FlexView)<{ $maxWidth: number | string }>`\n max-width: ${({ $maxWidth }) =>\n `${typeof $maxWidth === 'number' ? `${$maxWidth}px` : `${$maxWidth}`}`};\n`;\n\nexport const SubTitle = styled(Text)<{ $subtitleLineThrough?: boolean }>`\n text-decoration: ${({ $subtitleLineThrough }) =>\n $subtitleLineThrough ? 'line-through' : 'none'};\n`;\n\nexport const LottieWrapper = styled(FlexView)<{ $isLargeLottie: boolean }>`\n position: relative;\n left: ${({ $isLargeLottie }) => ($isLargeLottie ? '-6px' : '0')};\n`;\n"],"names":["ContentWrapper","styled","FlexView","$maxWidth","SubTitle","Text","$subtitleLineThrough","LottieWrapper","$isLargeLottie"],"mappings":";;;AAKa,MAAAA,IAAiBC,EAAOC,CAAQ;AAAA,eAC9B,CAAC,EAAE,WAAAC,EAAU,MACxB,GAAG,OAAOA,KAAc,WAAW,GAAGA,CAAS,OAAO,GAAGA,CAAS,EAAE,EAAE;AAAA,GAG7DC,IAAWH,EAAOI,CAAI;AAAA,qBACd,CAAC,EAAE,sBAAAC,EAAA,MACpBA,IAAuB,iBAAiB,MAAM;AAAA,GAGrCC,IAAgBN,EAAOC,CAAQ;AAAA;AAAA,UAElC,CAAC,EAAE,gBAAAM,EAAA,MAAsBA,IAAiB,SAAS,GAAI;AAAA;"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { jsxs as t, jsx as e, Fragment as a } from "react/jsx-runtime";
|
|
2
|
+
import { memo as C, useMemo as w, useCallback as L } from "react";
|
|
3
|
+
import x from "../../../../ui/buttons/text-button/text-button.js";
|
|
4
|
+
import A from "../../../../ui/image/image.js";
|
|
5
|
+
import i from "../../../../ui/layout/flex-view.js";
|
|
6
|
+
import I from "../../../../ui/lottie-animation/lottie-animation.js";
|
|
7
|
+
import l from "../../../../ui/separator/separator.js";
|
|
8
|
+
import p from "../../../../ui/text/text.js";
|
|
9
|
+
import W from "./hooks/use-session-countdown.js";
|
|
10
|
+
import _ from "./hooks/use-session-status-config.js";
|
|
11
|
+
import { renderSettings as O } from "./session-status-constants.js";
|
|
12
|
+
import { formatSessionDateTime as X } from "./session-status-helpers.js";
|
|
13
|
+
import { LottieWrapper as y, ContentWrapper as H, SubTitle as M } from "./session-status-styled.js";
|
|
14
|
+
const k = ({
|
|
15
|
+
completedSessions: n,
|
|
16
|
+
nextSessionStartTime: m,
|
|
17
|
+
status: o = null,
|
|
18
|
+
teacherName: d,
|
|
19
|
+
studentName: S,
|
|
20
|
+
onRescheduleClick: f = () => {
|
|
21
|
+
}
|
|
22
|
+
}) => {
|
|
23
|
+
const $ = w(
|
|
24
|
+
() => ({
|
|
25
|
+
isTeacherAssigned: !!d,
|
|
26
|
+
isFirstSessionCompleted: n > 0,
|
|
27
|
+
formattedSessionStart: X(m),
|
|
28
|
+
isNoShowStatus: o === "S_NO_SHOW" || o === "T_NO_SHOW"
|
|
29
|
+
}),
|
|
30
|
+
[n, d, m, o]
|
|
31
|
+
), { isTeacherAssigned: b, isFirstSessionCompleted: h, formattedSessionStart: c, isNoShowStatus: s } = $, T = W(
|
|
32
|
+
m,
|
|
33
|
+
h,
|
|
34
|
+
s
|
|
35
|
+
), u = _({
|
|
36
|
+
status: o,
|
|
37
|
+
completedSessions: n,
|
|
38
|
+
formattedSessionStart: c,
|
|
39
|
+
remainingTime: T,
|
|
40
|
+
isTeacherAssigned: b,
|
|
41
|
+
isFirstSessionCompleted: h,
|
|
42
|
+
isNoShowStatus: s,
|
|
43
|
+
teacherName: d,
|
|
44
|
+
studentName: S,
|
|
45
|
+
onRescheduleClick: f
|
|
46
|
+
}), g = L(
|
|
47
|
+
(r) => /* @__PURE__ */ t(
|
|
48
|
+
i,
|
|
49
|
+
{
|
|
50
|
+
$flexDirection: "row",
|
|
51
|
+
$flexColumnGapX: r != null && r.isLargeIcon ? 0.75 : 1.5,
|
|
52
|
+
$alignItems: r.align || "flex-start",
|
|
53
|
+
children: [
|
|
54
|
+
/* @__PURE__ */ e(i, { children: r.icon ? /* @__PURE__ */ e(A, { src: r.icon, width: 64, height: 64 }) : /* @__PURE__ */ e(y, { $isLargeLottie: !!(r != null && r.isLargeIcon), children: /* @__PURE__ */ e(
|
|
55
|
+
I,
|
|
56
|
+
{
|
|
57
|
+
src: r.lottie,
|
|
58
|
+
settings: O,
|
|
59
|
+
width: r.isLargeIcon ? 75 : 64,
|
|
60
|
+
height: r.isLargeIcon ? 75 : 64
|
|
61
|
+
}
|
|
62
|
+
) }) }),
|
|
63
|
+
/* @__PURE__ */ t(H, { $maxWidth: r.maxWidth ?? "100%", $width: "100%", children: [
|
|
64
|
+
r.title && /* @__PURE__ */ e(
|
|
65
|
+
p,
|
|
66
|
+
{
|
|
67
|
+
$renderAs: r.titleStyle,
|
|
68
|
+
$color: r.titleColor,
|
|
69
|
+
$renderOnMobileAs: r.titleTabletStyle,
|
|
70
|
+
children: r.title
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
r.subtitle && /* @__PURE__ */ t(a, { children: [
|
|
74
|
+
/* @__PURE__ */ e(l, { height: 2 }),
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
M,
|
|
77
|
+
{
|
|
78
|
+
$renderAs: r.subtitleStyle,
|
|
79
|
+
$renderOnMobileAs: r.subtitleTabletStyle,
|
|
80
|
+
$color: "WHITE_1",
|
|
81
|
+
$whiteSpace: "pre-line",
|
|
82
|
+
$subtitleLineThrough: r.subtitleLineThrough,
|
|
83
|
+
children: r.subtitle
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
] }),
|
|
87
|
+
r.description && /* @__PURE__ */ t(a, { children: [
|
|
88
|
+
/* @__PURE__ */ e(l, { heightX: 0.5 }),
|
|
89
|
+
/* @__PURE__ */ e(i, { $width: "100%", children: /* @__PURE__ */ e(
|
|
90
|
+
p,
|
|
91
|
+
{
|
|
92
|
+
$renderAs: "ub2",
|
|
93
|
+
$renderOnMobileAs: "ub3",
|
|
94
|
+
$color: r.descriptionColor ?? "WHITE_T_60",
|
|
95
|
+
children: r.description
|
|
96
|
+
}
|
|
97
|
+
) })
|
|
98
|
+
] }),
|
|
99
|
+
r.action && /* @__PURE__ */ t(a, { children: [
|
|
100
|
+
/* @__PURE__ */ e(l, { heightX: 0.75 }),
|
|
101
|
+
/* @__PURE__ */ e(
|
|
102
|
+
x,
|
|
103
|
+
{
|
|
104
|
+
sizeOnMobile: "small",
|
|
105
|
+
label: r.action.label,
|
|
106
|
+
color: "WHITE_1",
|
|
107
|
+
onClick: r.action.onClick
|
|
108
|
+
}
|
|
109
|
+
)
|
|
110
|
+
] })
|
|
111
|
+
] })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
),
|
|
115
|
+
[]
|
|
116
|
+
);
|
|
117
|
+
return /* @__PURE__ */ t(i, { $flexDirection: "column", $justifyContent: "center", children: [
|
|
118
|
+
g(u.topSection),
|
|
119
|
+
/* @__PURE__ */ e(i, { $gutterX: 2, $gapX: 0.25, children: /* @__PURE__ */ e(l, { heightX: 3, background: "BLACK_5", width: 1 }) }),
|
|
120
|
+
g(u.bottomSection)
|
|
121
|
+
] });
|
|
122
|
+
}, P = C(k);
|
|
123
|
+
export {
|
|
124
|
+
P as default
|
|
125
|
+
};
|
|
126
|
+
//# 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 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 === 'S_NO_SHOW' || status === '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","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","memo"],"mappings":";;;;;;;;;;;;;AAgBA,MAAMA,IAAgB,CAAC;AAAA,EACrB,mBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,mBAAAC,IAAoB,MAAM;AAAA,EAAC;AAC7B,MAA2B;AACzB,QAAMC,IAAgBC;AAAA,IACpB,OAAO;AAAA,MACL,mBAAmB,CAAC,CAACJ;AAAA,MACrB,yBAAyBH,IAAoB;AAAA,MAC7C,uBAAuBQ,EAAsBP,CAAoB;AAAA,MACjE,gBAAgBC,MAAW,eAAeA,MAAW;AAAA,IAAA;AAAA,IAEvD,CAAC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,IAAAJ,EAAcF,EAAO,UAAU;AAAA,IAE/B,gBAAAO,EAAAD,GAAA,EAAS,UAAU,GAAG,OAAO,MAC5B,UAAA,gBAAAC,EAACQ,GAAU,EAAA,SAAS,GAAG,YAAW,WAAU,OAAO,EAAG,CAAA,GACxD;AAAA,IAECb,EAAcF,EAAO,aAAa;AAAA,EACrC,EAAA,CAAA;AAEJ,GAEekB,IAAAC,EAAKnC,CAAa;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { GIF as e } from "../../../../../assets/gif/gif.js";
|
|
2
|
+
const i = [
|
|
3
|
+
{
|
|
4
|
+
title: "introduction & goals",
|
|
5
|
+
description: "Get to know your tutor and discuss your goals and expectations",
|
|
6
|
+
image: e.YOUR_GOALS_GRID_BG,
|
|
7
|
+
textBG: "ORANGE_6",
|
|
8
|
+
ctaLabel: "View Profile"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
title: "interactive sessions",
|
|
12
|
+
description: "Watch your child learn concepts and tackle problems with their tutorʼs guidance.",
|
|
13
|
+
image: e.LEARNING_SESSION_GRID_BG,
|
|
14
|
+
textBG: "YELLOW_6",
|
|
15
|
+
ctaLabel: "View Insights"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
title: "way forward",
|
|
19
|
+
description: "Get insights on your child’s learning and plan the journey ahead",
|
|
20
|
+
image: e.WAY_FORWARD_GRID_BG,
|
|
21
|
+
textBG: "GREEN_6",
|
|
22
|
+
ctaLabel: "View Learning Plan"
|
|
23
|
+
}
|
|
24
|
+
], a = [
|
|
25
|
+
{
|
|
26
|
+
title: "created student profile",
|
|
27
|
+
key: "studentProfile",
|
|
28
|
+
image: e.YOUR_GOALS_GRID_BG,
|
|
29
|
+
textBG: "ORANGE_6",
|
|
30
|
+
ctaLabel: "View Profile"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
title: "Shared Learning insights",
|
|
34
|
+
key: "insights",
|
|
35
|
+
image: e.LEARNING_SESSION_GRID_BG,
|
|
36
|
+
textBG: "YELLOW_6",
|
|
37
|
+
ctaLabel: "View Insights"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
title: "Created learning plan",
|
|
41
|
+
description: "Get insights on your child’s learning and plan the journey ahead",
|
|
42
|
+
image: e.WAY_FORWARD_GRID_BG,
|
|
43
|
+
textBG: "GREEN_6",
|
|
44
|
+
ctaLabel: "View Learning Plan",
|
|
45
|
+
key: "learningPlan"
|
|
46
|
+
}
|
|
47
|
+
];
|
|
48
|
+
export {
|
|
49
|
+
a as sessionSummaryAfterDemo,
|
|
50
|
+
i as sessionSummaryData
|
|
51
|
+
};
|
|
52
|
+
//# sourceMappingURL=session-summary-constants.js.map
|
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';\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 key: 'studentProfile',\n image: GIF.YOUR_GOALS_GRID_BG,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'Shared Learning insights',\n key: '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 key: 'learningPlan',\n },\n];\n"],"names":["sessionSummaryData","GIF","sessionSummaryAfterDemo"],"mappings":";AAIO,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,KAAK;AAAA,IACL,OAAOD,EAAI;AAAA,IACX,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,KAAK;AAAA,IACL,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,IACV,KAAK;AAAA,EACP;AACF;"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as g, useCallback as l } from "react";
|
|
3
|
+
import { useTheme as $ } from "styled-components";
|
|
4
|
+
import a from "../../../../ui/layout/flex-view.js";
|
|
5
|
+
import b from "../../../../ui/separator/separator.js";
|
|
6
|
+
import x from "../../../../ui/text/text.js";
|
|
7
|
+
import { EDeviceType as v } from "../../../../ui/theme/constants.js";
|
|
8
|
+
import { sessionSummaryAfterDemo as C, sessionSummaryData as T } from "./session-summary-constants.js";
|
|
9
|
+
import W from "./summary-card/summary-card.js";
|
|
10
|
+
const S = g(({ isDemoDone: i, studentName: r, onViewSummary: o }) => {
|
|
11
|
+
const t = $().device <= v.MOBILE, p = l(
|
|
12
|
+
(e) => {
|
|
13
|
+
if (!e) return "";
|
|
14
|
+
if (e === "studentProfile")
|
|
15
|
+
return `We understood your goals and expectations to create ${r}'s profile.`;
|
|
16
|
+
if (e === "insights")
|
|
17
|
+
return `With tutor’s guidance ${r} solved problems, helping us assess their math proficiency.`;
|
|
18
|
+
if (e === "learningPlan")
|
|
19
|
+
return `The plan will keep evolving based on ${r}'s progress and evolving needs.`;
|
|
20
|
+
},
|
|
21
|
+
[r]
|
|
22
|
+
), c = l(
|
|
23
|
+
(e) => {
|
|
24
|
+
o == null || o(e);
|
|
25
|
+
},
|
|
26
|
+
[o]
|
|
27
|
+
);
|
|
28
|
+
return /* @__PURE__ */ u(a, { children: [
|
|
29
|
+
/* @__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?" }),
|
|
30
|
+
/* @__PURE__ */ s(b, { height: t ? 16 : 20 }),
|
|
31
|
+
/* @__PURE__ */ s(a, { $flexGapX: 1, $justifyContent: "center", $flexDirection: t ? "column" : "row", children: (i ? C : T).map(
|
|
32
|
+
({ title: e, description: m, image: f, textBG: d, ctaLabel: h, key: n }) => /* @__PURE__ */ s(
|
|
33
|
+
W,
|
|
34
|
+
{
|
|
35
|
+
title: e,
|
|
36
|
+
description: p(n) || m,
|
|
37
|
+
image: f,
|
|
38
|
+
textBG: d,
|
|
39
|
+
ctaLabel: h,
|
|
40
|
+
keyId: n,
|
|
41
|
+
isDemoDone: i,
|
|
42
|
+
onClick: c
|
|
43
|
+
},
|
|
44
|
+
e
|
|
45
|
+
)
|
|
46
|
+
) })
|
|
47
|
+
] });
|
|
48
|
+
}), D = S;
|
|
49
|
+
export {
|
|
50
|
+
D as default
|
|
51
|
+
};
|
|
52
|
+
//# 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 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 (key?: string) => {\n if (!key) return '';\n\n if (key === 'studentProfile') {\n return `We understood your goals and expectations to create ${studentName}'s profile.`;\n }\n\n if (key === 'insights') {\n return `With tutor’s guidance ${studentName} solved problems, helping us assess their math proficiency.`;\n }\n\n if (key === 'learningPlan') {\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: string) => {\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, key }) => (\n <SessionSummaryCard\n key={title}\n title={title}\n description={getDescription(key) || (description as string)}\n image={image}\n textBG={textBG}\n ctaLabel={ctaLabel}\n keyId={key}\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","key","handleClick","FlexView","jsx","Text","Separator","sessionSummaryAfterDemo","sessionSummaryData","title","description","image","textBG","ctaLabel","SessionSummaryCard","SessionSummary$1"],"mappings":";;;;;;;;;AAYA,MAAMA,IAAiBC,EAAK,CAAC,EAAE,YAAAC,GAAY,aAAAC,GAAa,eAAAC,QAA0C;AAE1F,QAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAiBC;AAAA,IACrB,CAACC,MAAiB;AACZ,UAAA,CAACA,EAAY,QAAA;AAEjB,UAAIA,MAAQ;AACV,eAAO,uDAAuDP,CAAW;AAG3E,UAAIO,MAAQ;AACV,eAAO,yBAAyBP,CAAW;AAG7C,UAAIO,MAAQ;AACV,eAAO,wCAAwCP,CAAW;AAAA,IAE9D;AAAA,IACA,CAACA,CAAW;AAAA,EAAA,GAGRQ,IAAcF;AAAA,IAClB,CAACC,MAAgB;AACf,MAAAN,KAAA,QAAAA,EAAgBM;AAAA,IAClB;AAAA,IACA,CAACN,CAAa;AAAA,EAAA;AAGhB,2BACGQ,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAC5D,UAAaZ,IAAA,qCAAqC,sCACrD;AAAA,IACC,gBAAAW,EAAAE,GAAA,EAAU,QAAQV,IAAW,KAAK,IAAI;AAAA,IACtC,gBAAAQ,EAAAD,GAAA,EAAS,WAAW,GAAG,iBAAgB,UAAS,gBAAgBP,IAAW,WAAW,OACnF,WAAaH,IAAAc,IAA0BC,GAAoB;AAAA,MAC3D,CAAC,EAAE,OAAAC,GAAO,aAAAC,GAAa,OAAAC,GAAO,QAAAC,GAAQ,UAAAC,GAAU,KAAAZ,QAC9C,gBAAAG;AAAA,QAACU;AAAA,QAAA;AAAA,UAEC,OAAAL;AAAA,UACA,aAAaV,EAAeE,CAAG,KAAMS;AAAA,UACrC,OAAAC;AAAA,UACA,QAAAC;AAAA,UACA,UAAAC;AAAA,UACA,OAAOZ;AAAA,UACP,YAAAR;AAAA,UACA,SAASS;AAAA,QAAA;AAAA,QARJO;AAAA,MASP;AAAA,IAAA,GAGN;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDM,IAAexB;"}
|
package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import e from "styled-components";
|
|
2
|
+
import n from "../../../../../ui/layout/flex-view.js";
|
|
3
|
+
const i = e(n)(({ theme: r }) => {
|
|
4
|
+
const { gutter: t } = r.layout, { WHITE_4: a } = r.colors;
|
|
5
|
+
return `
|
|
6
|
+
margin: 0;
|
|
7
|
+
padding: 0;
|
|
8
|
+
background-image: linear-gradient(${a} 1px, transparent 1px),
|
|
9
|
+
linear-gradient(90deg, ${a} 1px, transparent 1px);
|
|
10
|
+
background-size: ${t * 3.125}px ${t * 3.125}px;
|
|
11
|
+
position: relative;
|
|
12
|
+
`;
|
|
13
|
+
});
|
|
14
|
+
export {
|
|
15
|
+
i as ImageWrapper
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=summary-card-styled.js.map
|
|
@@ -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 i, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as p, useCallback as g } from "react";
|
|
3
|
+
import { useTheme as u } from "styled-components";
|
|
4
|
+
import b from "../../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import w from "../../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import x from "../../../../../ui/image/image.js";
|
|
7
|
+
import r from "../../../../../ui/layout/flex-view.js";
|
|
8
|
+
import C 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 E } from "./summary-card-styled.js";
|
|
12
|
+
const _ = p(
|
|
13
|
+
({
|
|
14
|
+
title: l,
|
|
15
|
+
description: a,
|
|
16
|
+
image: h,
|
|
17
|
+
textBG: t,
|
|
18
|
+
ctaLabel: $,
|
|
19
|
+
keyId: o,
|
|
20
|
+
isDemoDone: d,
|
|
21
|
+
onClick: c
|
|
22
|
+
}) => {
|
|
23
|
+
const s = u().device <= T.MOBILE, f = g(() => {
|
|
24
|
+
o && c && c(o);
|
|
25
|
+
}, [o, c]), m = /* @__PURE__ */ i(r, { $flex: 1, children: [
|
|
26
|
+
/* @__PURE__ */ e(E, { $height: 84, $width: "100%", $background: t, children: /* @__PURE__ */ e(x, { src: h, height: 84, width: "100%", withLoader: !1 }) }),
|
|
27
|
+
/* @__PURE__ */ i(r, { $gap: 12, $gutter: 16, $background: t, $flex: 1, children: [
|
|
28
|
+
/* @__PURE__ */ e(n, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "WHITE", children: l }),
|
|
29
|
+
/* @__PURE__ */ e(C, { height: s ? 8 : 12 }),
|
|
30
|
+
/* @__PURE__ */ e(n, { $renderAs: "ub3", $color: "WHITE", children: a })
|
|
31
|
+
] })
|
|
32
|
+
] }, l);
|
|
33
|
+
return d && o ? /* @__PURE__ */ i(r, { $flex: 1, children: [
|
|
34
|
+
m,
|
|
35
|
+
/* @__PURE__ */ e(w, { label: o, onClick: f, children: /* @__PURE__ */ e(r, { $background: t, children: /* @__PURE__ */ i(
|
|
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: $ }) }),
|
|
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 keyId,\n isDemoDone,\n onClick,\n }: ISessionSummaryCardProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const handleClick = useCallback(() => {\n if (keyId && onClick) onClick(keyId);\n }, [keyId, 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 && keyId ? (\n <FlexView $flex={1}>\n {CardContent}\n <Clickable label={keyId} 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","keyId","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,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MAC8B;AAExB,UAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAcC,EAAY,MAAM;AAChC,MAAAP,KAASE,KAASA,EAAQF,CAAK;AAAA,IAAA,GAClC,CAACA,GAAOE,CAAO,CAAC,GAEbM,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,IAClB,gBAAAS,EAAAC,GAAA,EAAS,OAAO,GACd,UAAA;AAAA,MAAAF;AAAA,MACD,gBAAAG,EAACK,KAAU,OAAOhB,GAAO,SAASM,GAChC,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;"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
import r from "../../../../ui/layout/flex-view.js";
|
|
3
|
+
const p = t(r)`
|
|
4
|
+
border-bottom: ${({ theme: o }) => `1px solid ${o.colors.BLACK_5}`};
|
|
5
|
+
min-height: 52px;
|
|
6
|
+
`, s = t(r)`
|
|
7
|
+
border-right: ${({ theme: o }) => `1px solid ${o.colors.BLACK_5}`};
|
|
8
|
+
`, d = t(r)`
|
|
9
|
+
padding-bottom: 0;
|
|
10
|
+
min-width: 22px;
|
|
11
|
+
`;
|
|
12
|
+
export {
|
|
13
|
+
d as DateWrapper,
|
|
14
|
+
s as DayLabel,
|
|
15
|
+
p as SessionRow
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=upcoming-sessions-styled.js.map
|
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\ntype 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;"}
|