@cuemath/leap 3.3.28 → 3.3.29-beta.0
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 +9 -3
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- 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 +8 -8
- package/dist/features/auth/signup/custom-input-field/custom-input-field.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/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/milestone-create-helpers.js +13 -7
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +96 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-constants.js +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps.js +5 -5
- package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +1 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +28 -22
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +34 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +137 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +20 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +19 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-status/session-status-styled.js +2 -2
- package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status.js +124 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/session-summary-constants.js +2 -2
- package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +53 -0
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/summary-card/summary-card-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +63 -0
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions.js +14 -14
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +48 -46
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +59 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +93 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +66 -0
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +45 -4
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +197 -173
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/student-username/add/add-student-username-constants.js +6 -0
- package/dist/features/student-username/add/add-student-username-constants.js.map +1 -0
- package/dist/features/student-username/add/add-student-username-helpers.js +6 -0
- package/dist/features/student-username/add/add-student-username-helpers.js.map +1 -0
- package/dist/features/student-username/add/add-student-username-styled.js +10 -0
- package/dist/features/student-username/add/add-student-username-styled.js.map +1 -0
- package/dist/features/student-username/add/add-student-username.js +78 -0
- package/dist/features/student-username/add/add-student-username.js.map +1 -0
- package/dist/features/student-username/add/api/update-username.js +9 -0
- package/dist/features/student-username/add/api/update-username.js.map +1 -0
- package/dist/features/student-username/add/api/username-availability.js +10 -0
- package/dist/features/student-username/add/api/username-availability.js.map +1 -0
- package/dist/features/student-username/add/hooks/use-check-username-availability.js +41 -0
- package/dist/features/student-username/add/hooks/use-check-username-availability.js.map +1 -0
- package/dist/features/trial-session/api/teacher-availability.js +9 -0
- package/dist/features/trial-session/api/teacher-availability.js.map +1 -0
- package/dist/features/trial-session/comps/class-preference/class-preference.js +61 -49
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +28 -0
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +1 -0
- package/dist/features/trial-session/comps/navigation-bar/index.js +24 -24
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +51 -50
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +39 -38
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +5 -0
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +96 -51
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +70 -63
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +43 -44
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +40 -39
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/helper.js +69 -53
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +49 -0
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -0
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +150 -130
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +103 -112
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/utils/utils.js +1 -1
- package/dist/features/utils/utils.js.map +1 -1
- package/dist/index.d.ts +77 -77
- package/dist/index.js +310 -309
- package/package.json +2 -3
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +0 -29
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +0 -132
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +0 -11
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +0 -19
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +0 -127
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +0 -53
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +0 -56
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -10
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -9
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInSeconds.js +0 -11
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +0 -1
- /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
- /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-types.js +0 -0
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { jsxs as n, jsx as o, Fragment as w } from "react/jsx-runtime";
|
|
2
|
+
import { memo as E, useState as f, useRef as W, useMemo as I, useCallback as c, useEffect as k } from "react";
|
|
3
|
+
import { useTheme as v } from "styled-components";
|
|
4
|
+
import B from "../../../auth/comps/pill-button/pill-button.js";
|
|
5
|
+
import h from "../../../ui/buttons/text-button/text-button.js";
|
|
6
|
+
import y from "../../../ui/layout/flex-view.js";
|
|
7
|
+
import D from "../../../ui/modals/use-modal-actions.js";
|
|
8
|
+
import F from "../../../ui/modals/use-modal-params.js";
|
|
9
|
+
import G from "../../../ui/separator/separator.js";
|
|
10
|
+
import $ from "../../../ui/text/text.js";
|
|
11
|
+
import { EDeviceType as H } from "../../../ui/theme/constants.js";
|
|
12
|
+
import { cancellationReasonAfterTrial as L, cancellationReasonWithTutor as _, cancellationReasonNoTutor as j } from "./cancellation-reason-constant.js";
|
|
13
|
+
import { Container as K, OuterWrapper as N, ContentWrapper as P, StyledTextArea as V, FooterWrapper as q } from "./cancellation-reason-styled.js";
|
|
14
|
+
const z = E(() => {
|
|
15
|
+
const { withTutor: m, completedSessions: u, onCancel: d } = F(), { closeModal: b } = D(), [l, C] = f(""), [a, x] = f(""), s = W(null), { device: R } = v(), r = R <= H.MOBILE, g = I(() => u > 0 ? L : m ? _ : j, [u, m]), { title: T, description: p, reasons: A } = g, X = c((e) => C(e), []), M = c((e) => {
|
|
16
|
+
x(e.target.value);
|
|
17
|
+
}, []), t = l === "other", O = !l || t && !a.trim(), S = c(() => {
|
|
18
|
+
d(t ? a : l);
|
|
19
|
+
}, [d, t, a, l]);
|
|
20
|
+
return k(() => {
|
|
21
|
+
var e, i;
|
|
22
|
+
t && s.current && ((e = s.current) == null || e.focus(), (i = s.current) == null || i.scrollIntoView({ behavior: "smooth" }));
|
|
23
|
+
}, [t]), /* @__PURE__ */ n(K, { $background: "BLACK_2", $width: "100%", $borderColor: "BLACK_5", children: [
|
|
24
|
+
/* @__PURE__ */ n(N, { $flex: 1, children: [
|
|
25
|
+
/* @__PURE__ */ n(y, { $gutterX: r ? 1 : 2.5, $gapX: r ? 1.5 : 2.5, children: [
|
|
26
|
+
/* @__PURE__ */ o($, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: T }),
|
|
27
|
+
p ? /* @__PURE__ */ n(w, { children: [
|
|
28
|
+
/* @__PURE__ */ o(G, { heightX: 0.25 }),
|
|
29
|
+
/* @__PURE__ */ o($, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: p })
|
|
30
|
+
] }) : null
|
|
31
|
+
] }),
|
|
32
|
+
/* @__PURE__ */ n(
|
|
33
|
+
P,
|
|
34
|
+
{
|
|
35
|
+
$flex: 1,
|
|
36
|
+
$gutterX: r ? 1 : 2.5,
|
|
37
|
+
$gapX: r ? 1 : 2.5,
|
|
38
|
+
$width: "100%",
|
|
39
|
+
$alignItems: "flex-start",
|
|
40
|
+
$flexRowGapX: 1,
|
|
41
|
+
children: [
|
|
42
|
+
A.map(({ id: e, label: i }) => /* @__PURE__ */ o(
|
|
43
|
+
B,
|
|
44
|
+
{
|
|
45
|
+
selected: l === e,
|
|
46
|
+
label: i,
|
|
47
|
+
id: e,
|
|
48
|
+
onClick: X,
|
|
49
|
+
isTransparent: !0
|
|
50
|
+
},
|
|
51
|
+
e
|
|
52
|
+
)),
|
|
53
|
+
t && /* @__PURE__ */ o(
|
|
54
|
+
V,
|
|
55
|
+
{
|
|
56
|
+
placeholder: "Tell us more about your experience...",
|
|
57
|
+
id: "text-area",
|
|
58
|
+
ref: s,
|
|
59
|
+
value: a,
|
|
60
|
+
onChange: M
|
|
61
|
+
}
|
|
62
|
+
)
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
)
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ n(
|
|
68
|
+
q,
|
|
69
|
+
{
|
|
70
|
+
$gutterX: r ? 1 : 2.5,
|
|
71
|
+
$gapX: r ? 1 : 2.5,
|
|
72
|
+
$flexDirection: "row",
|
|
73
|
+
$flexColumnGapX: 1.5,
|
|
74
|
+
children: [
|
|
75
|
+
/* @__PURE__ */ o(
|
|
76
|
+
h,
|
|
77
|
+
{
|
|
78
|
+
label: "Cancel Subscription",
|
|
79
|
+
onClick: S,
|
|
80
|
+
color: "ORANGE_4",
|
|
81
|
+
disabled: O
|
|
82
|
+
}
|
|
83
|
+
),
|
|
84
|
+
/* @__PURE__ */ o(h, { label: "Close", onClick: b, color: "WHITE" })
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] });
|
|
89
|
+
}), ie = z;
|
|
90
|
+
export {
|
|
91
|
+
ie as default
|
|
92
|
+
};
|
|
93
|
+
//# sourceMappingURL=cancellation-reason.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellation-reason.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.tsx"],"sourcesContent":["import type { ICancelReasonProps } from './cancel-reason-types';\nimport type { ChangeEvent } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport PillButton from '../../../auth/comps/pill-button/pill-button';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport {\n cancellationReasonAfterTrial,\n cancellationReasonNoTutor,\n cancellationReasonWithTutor,\n} from './cancellation-reason-constant';\nimport * as Styled from './cancellation-reason-styled';\n\nconst CancellationReason = memo(() => {\n const { withTutor, completedSessions, onCancel } = useModalParams<ICancelReasonProps>();\n const { closeModal } = useModalActions();\n\n const [reason, setReason] = useState('');\n const [otherReason, setOtherReason] = useState('');\n\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const config = useMemo(() => {\n if (completedSessions > 0) return cancellationReasonAfterTrial;\n\n return withTutor ? cancellationReasonWithTutor : cancellationReasonNoTutor;\n }, [completedSessions, withTutor]);\n const { title, description, reasons } = config;\n\n const handleSelectReason = useCallback((id: string) => setReason(id), []);\n\n const handleOtherReasonChange = useCallback((event: ChangeEvent<HTMLTextAreaElement>) => {\n setOtherReason(event.target.value);\n }, []);\n\n const isOtherReasonSelected = reason === 'other';\n const isSubmitDisabled = !reason || (isOtherReasonSelected && !otherReason.trim());\n\n const handleCancel = useCallback(() => {\n onCancel(isOtherReasonSelected ? otherReason : reason);\n }, [onCancel, isOtherReasonSelected, otherReason, reason]);\n\n useEffect(() => {\n if (isOtherReasonSelected && textAreaRef.current) {\n textAreaRef.current?.focus();\n textAreaRef.current?.scrollIntoView({ behavior: 'smooth' });\n }\n }, [isOtherReasonSelected]);\n\n return (\n <Styled.Container $background=\"BLACK_2\" $width=\"100%\" $borderColor=\"BLACK_5\">\n <Styled.OuterWrapper $flex={1}>\n <FlexView $gutterX={isMobile ? 1 : 2.5} $gapX={isMobile ? 1.5 : 2.5}>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {title}\n </Text>\n {description ? (\n <>\n <Separator heightX={0.25} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </>\n ) : null}\n </FlexView>\n <Styled.ContentWrapper\n $flex={1}\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1 : 2.5}\n $width={'100%'}\n $alignItems=\"flex-start\"\n $flexRowGapX={1}\n >\n {reasons.map(({ id, label }) => (\n <PillButton\n selected={reason === id}\n key={id}\n label={label}\n id={id}\n onClick={handleSelectReason}\n isTransparent\n />\n ))}\n {isOtherReasonSelected && (\n <Styled.StyledTextArea\n placeholder=\"Tell us more about your experience...\"\n id=\"text-area\"\n ref={textAreaRef}\n value={otherReason}\n onChange={handleOtherReasonChange}\n />\n )}\n </Styled.ContentWrapper>\n </Styled.OuterWrapper>\n <Styled.FooterWrapper\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1 : 2.5}\n $flexDirection=\"row\"\n $flexColumnGapX={1.5}\n >\n <TextButton\n label=\"Cancel Subscription\"\n onClick={handleCancel}\n color=\"ORANGE_4\"\n disabled={isSubmitDisabled}\n />\n\n <TextButton label=\"Close\" onClick={closeModal} color=\"WHITE\" />\n </Styled.FooterWrapper>\n </Styled.Container>\n );\n});\n\nexport default CancellationReason;\n"],"names":["CancellationReason","memo","withTutor","completedSessions","onCancel","useModalParams","closeModal","useModalActions","reason","setReason","useState","otherReason","setOtherReason","textAreaRef","useRef","device","useTheme","isMobile","EDeviceType","config","useMemo","cancellationReasonAfterTrial","cancellationReasonWithTutor","cancellationReasonNoTutor","title","description","reasons","handleSelectReason","useCallback","id","handleOtherReasonChange","event","isOtherReasonSelected","isSubmitDisabled","handleCancel","useEffect","_a","_b","jsxs","Styled.Container","Styled.OuterWrapper","FlexView","jsx","Text","Fragment","Separator","Styled.ContentWrapper","label","PillButton","Styled.StyledTextArea","Styled.FooterWrapper","TextButton","CancellationReason$1"],"mappings":"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"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { useCallback as o, useMemo as P } from "react";
|
|
2
|
+
import y from "../../../ui/modals/use-modal-actions.js";
|
|
3
|
+
import { useCancelSubscriptionPatch as _ } from "../../api/cancel-subscription.js";
|
|
4
|
+
import { invalidateParentHome as S } from "../../api/parent-home.js";
|
|
5
|
+
const H = ({
|
|
6
|
+
studentId: c,
|
|
7
|
+
demoId: a,
|
|
8
|
+
withTutor: e,
|
|
9
|
+
studentName: r,
|
|
10
|
+
billingDetails: f,
|
|
11
|
+
completedSessions: t,
|
|
12
|
+
onRescheduleDemo: p,
|
|
13
|
+
onChangeTutor: s
|
|
14
|
+
}) => {
|
|
15
|
+
const { openModal: n } = y(), { payment_method_details: m } = f ?? {}, M = o(() => {
|
|
16
|
+
S(c), n("pla-cancellation-confirmation");
|
|
17
|
+
}, [n, c]), { patch: C } = _({
|
|
18
|
+
onComplete: M
|
|
19
|
+
}), h = o(
|
|
20
|
+
(i) => {
|
|
21
|
+
i && C(c, {
|
|
22
|
+
reason: i,
|
|
23
|
+
student_demo_id: a
|
|
24
|
+
});
|
|
25
|
+
},
|
|
26
|
+
[C, c, a]
|
|
27
|
+
), u = o(() => n("pla-cancellation-reason", {
|
|
28
|
+
withTutor: e,
|
|
29
|
+
completedSessions: t,
|
|
30
|
+
onCancel: (i) => h(i)
|
|
31
|
+
}), [t, h, n, e]), l = o(() => {
|
|
32
|
+
n("pla-cancel-subscription", {
|
|
33
|
+
withTutor: e,
|
|
34
|
+
studentName: r,
|
|
35
|
+
completedSessions: t,
|
|
36
|
+
onSwitchTutor: () => s(a),
|
|
37
|
+
onReschedule: () => p(a),
|
|
38
|
+
onCancel: u
|
|
39
|
+
});
|
|
40
|
+
}, [
|
|
41
|
+
t,
|
|
42
|
+
a,
|
|
43
|
+
u,
|
|
44
|
+
s,
|
|
45
|
+
p,
|
|
46
|
+
n,
|
|
47
|
+
r,
|
|
48
|
+
e
|
|
49
|
+
]), b = o(() => {
|
|
50
|
+
n("pla-view-payment-method", {
|
|
51
|
+
paymentMethodDetails: m,
|
|
52
|
+
onCancel: l
|
|
53
|
+
});
|
|
54
|
+
}, [l, n, m]);
|
|
55
|
+
return P(
|
|
56
|
+
() => ({
|
|
57
|
+
onCancelSubscription: l,
|
|
58
|
+
onViewPaymentMethod: b
|
|
59
|
+
}),
|
|
60
|
+
[l, b]
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
export {
|
|
64
|
+
H as usePLAModalHandlers
|
|
65
|
+
};
|
|
66
|
+
//# sourceMappingURL=use-pla-model-handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-pla-model-handlers.js","sources":["../../../../../src/features/parent-dashboard/modals/hooks/use-pla-model-handlers.ts"],"sourcesContent":["import type { IBillingDetails, IParentDashboardProps } from '../../parent-dashboard-types';\n\nimport { useCallback, useMemo } from 'react';\n\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport { useCancelSubscriptionPatch } from '../../api/cancel-subscription';\nimport { invalidateParentHome } from '../../api/parent-home';\n\ninterface IUsePLAModalHandlers {\n demoId?: string | null;\n completedSessions: number;\n studentId: string;\n studentName: string;\n withTutor: boolean;\n billingDetails: IBillingDetails | null;\n onRescheduleDemo: IParentDashboardProps['onRescheduleDemo'];\n onChangeTutor: IParentDashboardProps['onChangeTutor'];\n}\n\ninterface IUsePLAModalResponse {\n onCancelSubscription: () => void;\n onViewPaymentMethod: () => void;\n}\n\nexport const usePLAModalHandlers = ({\n studentId,\n demoId,\n withTutor,\n studentName,\n billingDetails,\n completedSessions,\n onRescheduleDemo,\n onChangeTutor,\n}: IUsePLAModalHandlers): IUsePLAModalResponse => {\n const { openModal } = useModalActions();\n\n const { payment_method_details: paymentMethodDetails } = billingDetails ?? {};\n\n const handleCancelConfirmation = useCallback(() => {\n invalidateParentHome(studentId);\n openModal('pla-cancellation-confirmation');\n }, [openModal, studentId]);\n\n const { patch: cancelSubscription } = useCancelSubscriptionPatch({\n onComplete: handleCancelConfirmation,\n });\n\n const handleCancelSubscriptionPatch = useCallback(\n (cancellationReason: string) => {\n if (!cancellationReason) return;\n\n cancelSubscription(studentId, {\n reason: cancellationReason,\n student_demo_id: demoId,\n });\n },\n [cancelSubscription, studentId, demoId],\n );\n\n const handleViewCancellationReason = useCallback(() => {\n return openModal('pla-cancellation-reason', {\n withTutor,\n completedSessions,\n onCancel: (reason: string) => handleCancelSubscriptionPatch(reason),\n });\n }, [completedSessions, handleCancelSubscriptionPatch, openModal, withTutor]);\n\n const handleCancelSubscription = useCallback(() => {\n openModal('pla-cancel-subscription', {\n withTutor,\n studentName,\n completedSessions,\n onSwitchTutor: () => onChangeTutor(demoId),\n onReschedule: () => onRescheduleDemo(demoId),\n onCancel: handleViewCancellationReason,\n });\n }, [\n completedSessions,\n demoId,\n handleViewCancellationReason,\n onChangeTutor,\n onRescheduleDemo,\n openModal,\n studentName,\n withTutor,\n ]);\n\n const handleViewPaymentMethod = useCallback(() => {\n openModal('pla-view-payment-method', {\n paymentMethodDetails,\n onCancel: handleCancelSubscription,\n });\n }, [handleCancelSubscription, openModal, paymentMethodDetails]);\n\n return useMemo(\n () => ({\n onCancelSubscription: handleCancelSubscription,\n onViewPaymentMethod: handleViewPaymentMethod,\n }),\n [handleCancelSubscription, handleViewPaymentMethod],\n );\n};\n"],"names":["usePLAModalHandlers","studentId","demoId","withTutor","studentName","billingDetails","completedSessions","onRescheduleDemo","onChangeTutor","openModal","useModalActions","paymentMethodDetails","handleCancelConfirmation","useCallback","invalidateParentHome","cancelSubscription","useCancelSubscriptionPatch","handleCancelSubscriptionPatch","cancellationReason","handleViewCancellationReason","reason","handleCancelSubscription","handleViewPaymentMethod","useMemo"],"mappings":";;;;AAwBO,MAAMA,IAAsB,CAAC;AAAA,EAClC,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,eAAAC;AACF,MAAkD;AAC1C,QAAA,EAAE,WAAAC,MAAcC,KAEhB,EAAE,wBAAwBC,MAAyBN,KAAkB,CAAA,GAErEO,IAA2BC,EAAY,MAAM;AACjD,IAAAC,EAAqBb,CAAS,GAC9BQ,EAAU,+BAA+B;AAAA,EAAA,GACxC,CAACA,GAAWR,CAAS,CAAC,GAEnB,EAAE,OAAOc,EAAmB,IAAIC,EAA2B;AAAA,IAC/D,YAAYJ;AAAA,EAAA,CACb,GAEKK,IAAgCJ;AAAA,IACpC,CAACK,MAA+B;AAC9B,MAAKA,KAELH,EAAmBd,GAAW;AAAA,QAC5B,QAAQiB;AAAA,QACR,iBAAiBhB;AAAA,MAAA,CAClB;AAAA,IACH;AAAA,IACA,CAACa,GAAoBd,GAAWC,CAAM;AAAA,EAAA,GAGlCiB,IAA+BN,EAAY,MACxCJ,EAAU,2BAA2B;AAAA,IAC1C,WAAAN;AAAA,IACA,mBAAAG;AAAA,IACA,UAAU,CAACc,MAAmBH,EAA8BG,CAAM;AAAA,EAAA,CACnE,GACA,CAACd,GAAmBW,GAA+BR,GAAWN,CAAS,CAAC,GAErEkB,IAA2BR,EAAY,MAAM;AACjD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,aAAAC;AAAA,MACA,mBAAAE;AAAA,MACA,eAAe,MAAME,EAAcN,CAAM;AAAA,MACzC,cAAc,MAAMK,EAAiBL,CAAM;AAAA,MAC3C,UAAUiB;AAAA,IAAA,CACX;AAAA,EAAA,GACA;AAAA,IACDb;AAAA,IACAJ;AAAA,IACAiB;AAAA,IACAX;AAAA,IACAD;AAAA,IACAE;AAAA,IACAL;AAAA,IACAD;AAAA,EAAA,CACD,GAEKmB,IAA0BT,EAAY,MAAM;AAChD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,sBAAAE;AAAA,MACA,UAAUU;AAAA,IAAA,CACX;AAAA,EACA,GAAA,CAACA,GAA0BZ,GAAWE,CAAoB,CAAC;AAEvD,SAAAY;AAAA,IACL,OAAO;AAAA,MACL,sBAAsBF;AAAA,MACtB,qBAAqBC;AAAA,IAAA;AAAA,IAEvB,CAACD,GAA0BC,CAAuB;AAAA,EAAA;AAEtD;"}
|
|
@@ -11,19 +11,19 @@ const s = o(t)`
|
|
|
11
11
|
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
12
12
|
max-height: unset;
|
|
13
13
|
overflow-y: hidden;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
15
15
|
`, m = o(t)`
|
|
16
16
|
padding-top: 0;
|
|
17
17
|
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
18
18
|
max-height: 300px;
|
|
19
19
|
overflow-y: auto;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
`, x = o(t)`
|
|
22
22
|
padding-bottom: 24px;
|
|
23
23
|
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
24
24
|
border-top: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
|
|
25
25
|
padding-bottom: 40px;
|
|
26
|
-
}
|
|
26
|
+
}
|
|
27
27
|
`, c = o.textarea(({ theme: e }) => {
|
|
28
28
|
const {
|
|
29
29
|
colors: { WHITE: i, WHITE_T_38: r, BLACK_2: n, BLACK_5: a },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tutor-change-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 560px;\n }\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n }
|
|
1
|
+
{"version":3,"file":"tutor-change-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Container = styled(FlexView)`\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-width: 560px;\n }\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n }\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n padding-top: 0;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: 300px;\n overflow-y: auto;\n }\n`;\n\nexport const FooterWrapper = styled(FlexView)`\n padding-bottom: 24px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n border-top: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n padding-bottom: 40px;\n }\n`;\n\nexport const StyledTextArea = styled.textarea(({ theme }) => {\n const {\n colors: { WHITE, WHITE_T_38, BLACK_2, BLACK_5 },\n layout: { gutter },\n } = theme;\n\n return `border: 1px solid ${BLACK_5};\n width: 100%;\n min-height: ${gutter * 5}px;\n padding: 16px;\n background-color: ${BLACK_2};\n white-space: pre-line;\n font-family: 'Untitled Sans Regular';\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ${WHITE};\n resize: none;\n outline: none;\n &::placeholder {\n color: ${WHITE_T_38};\n }\n\n &:focus {\n outline: none;\n }\n`;\n});\n"],"names":["Container","styled","FlexView","theme","OuterWrapper","ContentWrapper","FooterWrapper","StyledTextArea","WHITE","WHITE_T_38","BLACK_2","BLACK_5","gutter"],"mappings":";;AAIa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA,YAC5B,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,IAC1D,CAAC,EAAE,OAAAA,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA,GAKvCC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCE,IAAiBJ,EAAOC,CAAQ;AAAA;AAAA,IAEzC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCG,IAAgBL,EAAOC,CAAQ;AAAA;AAAA,IAExC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA,kBAClC,CAAC,EAAE,OAAAA,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA;AAAA,GAKvDI,IAAiBN,EAAO,SAAS,CAAC,EAAE,OAAAE,QAAY;AACrD,QAAA;AAAA,IACJ,QAAQ,EAAE,OAAAK,GAAO,YAAAC,GAAY,SAAAC,GAAS,SAAAC,EAAQ;AAAA,IAC9C,QAAQ,EAAE,QAAAC,EAAO;AAAA,EACf,IAAAT;AAEJ,SAAO,qBAAqBQ,CAAO;AAAA;AAAA,gBAErBC,IAAS,CAAC;AAAA;AAAA,sBAEJF,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMlBF,CAAK;AAAA;AAAA;AAAA;AAAA,aAIHC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,CAAC;"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { jsxs as e, jsx as o, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
+
import { memo as h } from "react";
|
|
3
|
+
import { useTheme as p } from "styled-components";
|
|
4
|
+
import u from "../../../ui/buttons/text-button/text-button.js";
|
|
5
|
+
import t from "../../../ui/layout/flex-view.js";
|
|
6
|
+
import b from "../../../ui/modals/use-modal-params.js";
|
|
7
|
+
import n from "../../../ui/separator/separator.js";
|
|
8
|
+
import i from "../../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as f } from "../../../ui/theme/constants.js";
|
|
10
|
+
const g = h(() => {
|
|
11
|
+
const { paymentMethodDetails: l, onCancel: a } = b(), {
|
|
12
|
+
exp_month: c,
|
|
13
|
+
exp_year: d,
|
|
14
|
+
last_4_digits: s
|
|
15
|
+
} = l || {}, { device: m } = p(), r = m <= f.MOBILE;
|
|
16
|
+
return /* @__PURE__ */ e(t, { $gapX: r ? 2.25 : 2.5, $gutterX: r ? 1 : 2.5, $background: "BLACK_2", children: [
|
|
17
|
+
/* @__PURE__ */ o(
|
|
18
|
+
i,
|
|
19
|
+
{
|
|
20
|
+
$renderAs: "ah4-bold",
|
|
21
|
+
$renderOnMobileAs: "ac4-black",
|
|
22
|
+
$color: r ? "WHITE_T_60" : "WHITE",
|
|
23
|
+
children: r ? "Payment Method" : "View Payment Method"
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ o(n, { heightX: r ? 1 : 2.5 }),
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
t,
|
|
29
|
+
{
|
|
30
|
+
$flexDirection: "row",
|
|
31
|
+
$justifyContent: "flex-start",
|
|
32
|
+
$alignItems: "center",
|
|
33
|
+
$flexGapX: 0.5,
|
|
34
|
+
$gapX: 1,
|
|
35
|
+
$gutterX: 1,
|
|
36
|
+
$background: "BLACK_2",
|
|
37
|
+
$borderColor: "BLACK_5",
|
|
38
|
+
children: [
|
|
39
|
+
/* @__PURE__ */ o(t, { $widthX: 3, $heightX: 1.75, $background: "BLACK_4", $borderRadiusX: 0.25 }),
|
|
40
|
+
/* @__PURE__ */ e(t, { children: [
|
|
41
|
+
/* @__PURE__ */ e(i, { $renderAs: "ac4-black", $color: "WHITE", children: [
|
|
42
|
+
"•••• ",
|
|
43
|
+
s
|
|
44
|
+
] }),
|
|
45
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub3-bold", $color: "WHITE", children: [
|
|
46
|
+
"Card",
|
|
47
|
+
" ",
|
|
48
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", $inline: !0, children: [
|
|
49
|
+
"Exp: ",
|
|
50
|
+
c,
|
|
51
|
+
"/",
|
|
52
|
+
d
|
|
53
|
+
] })
|
|
54
|
+
] })
|
|
55
|
+
] })
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
r ? /* @__PURE__ */ e($, { children: [
|
|
60
|
+
/* @__PURE__ */ o(n, { heightX: 1.5 }),
|
|
61
|
+
/* @__PURE__ */ o(
|
|
62
|
+
u,
|
|
63
|
+
{
|
|
64
|
+
size: "small",
|
|
65
|
+
label: "Cancel subscription",
|
|
66
|
+
color: "WHITE_T_60",
|
|
67
|
+
onClick: a
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
] }) : null
|
|
71
|
+
] });
|
|
72
|
+
}), I = g;
|
|
73
|
+
export {
|
|
74
|
+
I as default
|
|
75
|
+
};
|
|
76
|
+
//# sourceMappingURL=view-payment-method.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"view-payment-method.js","sources":["../../../../../src/features/parent-dashboard/modals/view-payment-method/view-payment-method.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { type IViewPaymentMethodProps } from './view-payment-method-types';\n\nconst ViewPaymentMethod = memo(() => {\n const { paymentMethodDetails, onCancel } = useModalParams<IViewPaymentMethodProps>();\n\n const {\n exp_month: expMonth,\n exp_year: expYear,\n last_4_digits: last4Digits,\n } = paymentMethodDetails || {};\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView $gapX={isMobile ? 2.25 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text\n $renderAs=\"ah4-bold\"\n $renderOnMobileAs=\"ac4-black\"\n $color={isMobile ? 'WHITE_T_60' : 'WHITE'}\n >\n {isMobile ? 'Payment Method' : 'View Payment Method'}\n </Text>\n <Separator heightX={isMobile ? 1 : 2.5} />\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexGapX={0.5}\n $gapX={1}\n $gutterX={1}\n $background=\"BLACK_2\"\n $borderColor=\"BLACK_5\"\n >\n <FlexView $widthX={3} $heightX={1.75} $background=\"BLACK_4\" $borderRadiusX={0.25} />\n <FlexView>\n <Text $renderAs=\"ac4-black\" $color=\"WHITE\">\n •••• {last4Digits}\n </Text>\n <Text $renderAs=\"ub3-bold\" $color=\"WHITE\">\n Card{' '}\n <Text $renderAs=\"ub3\" $color=\"WHITE\" $inline>\n Exp: {expMonth}/{expYear}\n </Text>\n </Text>\n </FlexView>\n </FlexView>\n {isMobile ? (\n <>\n <Separator heightX={1.5} />\n <TextButton\n size=\"small\"\n label=\"Cancel subscription\"\n color=\"WHITE_T_60\"\n onClick={onCancel}\n />\n </>\n ) : null}\n </FlexView>\n );\n});\n\nexport default ViewPaymentMethod;\n"],"names":["ViewPaymentMethod","memo","paymentMethodDetails","onCancel","useModalParams","expMonth","expYear","last4Digits","device","useTheme","isMobile","EDeviceType","jsxs","FlexView","jsx","Text","Separator","Fragment","TextButton","ViewPaymentMethod$1"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,sBAAAC,GAAsB,UAAAC,EAAS,IAAIC,EAAwC,GAE7E;AAAA,IACJ,WAAWC;AAAA,IACX,UAAUC;AAAA,IACV,eAAeC;AAAA,EAAA,IACbL,KAAwB,CAAA,GAEtB,EAAE,QAAAM,MAAWC,KACbC,IAAWF,KAAUG,EAAY;AAGrC,SAAA,gBAAAC,EAACC,GAAS,EAAA,OAAOH,IAAW,OAAO,KAAK,UAAUA,IAAW,IAAI,KAAK,aAAY,WAChF,UAAA;AAAA,IAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,mBAAkB;AAAA,QAClB,QAAQL,IAAW,eAAe;AAAA,QAEjC,cAAW,mBAAmB;AAAA,MAAA;AAAA,IACjC;AAAA,IACC,gBAAAI,EAAAE,GAAA,EAAU,SAASN,IAAW,IAAI,KAAK;AAAA,IACxC,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,WAAW;AAAA,QACX,OAAO;AAAA,QACP,UAAU;AAAA,QACV,aAAY;AAAA,QACZ,cAAa;AAAA,QAEb,UAAA;AAAA,UAAC,gBAAAC,EAAAD,GAAA,EAAS,SAAS,GAAG,UAAU,MAAM,aAAY,WAAU,gBAAgB,KAAM,CAAA;AAAA,4BACjFA,GACC,EAAA,UAAA;AAAA,YAAA,gBAAAD,EAACG,GAAK,EAAA,WAAU,aAAY,QAAO,SAAQ,UAAA;AAAA,cAAA;AAAA,cACnCR;AAAA,YAAA,GACR;AAAA,YACC,gBAAAK,EAAAG,GAAA,EAAK,WAAU,YAAW,QAAO,SAAQ,UAAA;AAAA,cAAA;AAAA,cACnC;AAAA,gCACJA,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,SAAO,IAAC,UAAA;AAAA,gBAAA;AAAA,gBACrCV;AAAA,gBAAS;AAAA,gBAAEC;AAAA,cAAA,GACnB;AAAA,YAAA,GACF;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,IACCI,IAEG,gBAAAE,EAAAK,GAAA,EAAA,UAAA;AAAA,MAAC,gBAAAH,EAAAE,GAAA,EAAU,SAAS,IAAK,CAAA;AAAA,MACzB,gBAAAF;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAM;AAAA,UACN,OAAM;AAAA,UACN,SAASf;AAAA,QAAA;AAAA,MACX;AAAA,IAAA,EAAA,CACF,IACE;AAAA,EACN,EAAA,CAAA;AAEJ,CAAC,GAEDgB,IAAenB;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { EPLAState as e } from "./parent-dashboard-types.js";
|
|
2
|
+
const l = {
|
|
2
3
|
small: 40,
|
|
3
4
|
medium: 40,
|
|
4
5
|
large: 80,
|
|
@@ -8,7 +9,7 @@ const a = {
|
|
|
8
9
|
large: 24,
|
|
9
10
|
extraLarge: 80
|
|
10
11
|
}
|
|
11
|
-
},
|
|
12
|
+
}, E = {
|
|
12
13
|
small: 16,
|
|
13
14
|
medium: 24,
|
|
14
15
|
large: 40,
|
|
@@ -18,9 +19,49 @@ const a = {
|
|
|
18
19
|
large: 22,
|
|
19
20
|
extraLarge: 40
|
|
20
21
|
}
|
|
22
|
+
}, t = [
|
|
23
|
+
e.SUBSCRIPTION_CANCELLED_AFTER_PAYMENT,
|
|
24
|
+
e.SUBSCRIPTION_CANCELLED_AFTER_TRIAL_BEFORE_PAYMENT,
|
|
25
|
+
e.SUBSCRIPTION_CANCELLED_BEFORE_TRIAL
|
|
26
|
+
], s = [
|
|
27
|
+
e.TRIAL_COMPLETED_PAYMENT_PENDING,
|
|
28
|
+
e.TRIAL_COMPLETED_PAYMENT_SUCCESSFUL,
|
|
29
|
+
e.REGULAR_CLASS_COMPLETED
|
|
30
|
+
], T = [
|
|
31
|
+
e.CARD_ADDED_SEARCHING_TUTOR,
|
|
32
|
+
e.CARD_ADDED_TUTOR_ASSIGNED,
|
|
33
|
+
...s
|
|
34
|
+
], S = {
|
|
35
|
+
plaState: null,
|
|
36
|
+
sessionDetails: null,
|
|
37
|
+
teacherDetails: null,
|
|
38
|
+
billingDetails: null,
|
|
39
|
+
isOnlyTrialDone: !1,
|
|
40
|
+
isRegularClassDone: !1,
|
|
41
|
+
isTrialDone: !1,
|
|
42
|
+
isSubscriptionCancelled: !1,
|
|
43
|
+
isCardDeclined: !1,
|
|
44
|
+
cardOnFileNotAvailable: !1,
|
|
45
|
+
isTutorNoShow: !1,
|
|
46
|
+
isStudentNoShow: !1,
|
|
47
|
+
completedSessions: 0,
|
|
48
|
+
nextSessionEnd: 0,
|
|
49
|
+
nextSessionStart: 0,
|
|
50
|
+
upcomingSessions: [],
|
|
51
|
+
teacherName: "",
|
|
52
|
+
showLoading: !0,
|
|
53
|
+
demoId: "",
|
|
54
|
+
userAttemptId: "",
|
|
55
|
+
isProcessingFailed: !1,
|
|
56
|
+
canChangeTutor: !1,
|
|
57
|
+
showPLAIntroduction: !1
|
|
21
58
|
};
|
|
22
59
|
export {
|
|
23
|
-
|
|
24
|
-
|
|
60
|
+
S as DEFAULT_LOADING_STATE,
|
|
61
|
+
l as DESKTOP_SPACING,
|
|
62
|
+
E as MOBILE_SPACING,
|
|
63
|
+
T as PLA_INTRO_ELIGIBLE_STATES,
|
|
64
|
+
t as SUBSCRIPTION_CANCELLED_STATES,
|
|
65
|
+
s as TRIAL_COMPLETED_STATES
|
|
25
66
|
};
|
|
26
67
|
//# sourceMappingURL=parent-dashboard-constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-dashboard-constants.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-constants.ts"],"sourcesContent":["
|
|
1
|
+
{"version":3,"file":"parent-dashboard-constants.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-constants.ts"],"sourcesContent":["import { EPLAState, type IUseParentHomeDataReturn } from './parent-dashboard-types';\n\nexport const MODAL_KEYS = {\n STUDENT_PROFILE: 'studentProfile',\n INSIGHTS: 'insights',\n LEARNING_PLAN: 'learningPlan',\n CHANGE_TUTOR: 'pla-change-tutor',\n STUDENT_PROFILE_SUMMARY: 'student-profile-summary',\n} as const;\n\nexport const DESKTOP_SPACING = {\n small: 40,\n medium: 40,\n large: 80,\n separator: {\n small: 12,\n medium: 20,\n large: 24,\n extraLarge: 80,\n },\n} as const;\n\nexport const MOBILE_SPACING = {\n small: 16,\n medium: 24,\n large: 40,\n separator: {\n small: 8,\n medium: 16,\n large: 22,\n extraLarge: 40,\n },\n} as const;\n\nexport const SUBSCRIPTION_CANCELLED_STATES = [\n EPLAState.SUBSCRIPTION_CANCELLED_AFTER_PAYMENT,\n EPLAState.SUBSCRIPTION_CANCELLED_AFTER_TRIAL_BEFORE_PAYMENT,\n EPLAState.SUBSCRIPTION_CANCELLED_BEFORE_TRIAL,\n];\n\nexport const TRIAL_COMPLETED_STATES = [\n EPLAState.TRIAL_COMPLETED_PAYMENT_PENDING,\n EPLAState.TRIAL_COMPLETED_PAYMENT_SUCCESSFUL,\n EPLAState.REGULAR_CLASS_COMPLETED,\n];\n\nexport const PLA_INTRO_ELIGIBLE_STATES = [\n EPLAState.CARD_ADDED_SEARCHING_TUTOR,\n EPLAState.CARD_ADDED_TUTOR_ASSIGNED,\n ...TRIAL_COMPLETED_STATES,\n];\n\nexport const DEFAULT_LOADING_STATE: IUseParentHomeDataReturn = {\n plaState: null,\n sessionDetails: null,\n teacherDetails: null,\n billingDetails: null,\n isOnlyTrialDone: false,\n isRegularClassDone: false,\n isTrialDone: false,\n isSubscriptionCancelled: false,\n isCardDeclined: false,\n cardOnFileNotAvailable: false,\n isTutorNoShow: false,\n isStudentNoShow: false,\n completedSessions: 0,\n nextSessionEnd: 0,\n nextSessionStart: 0,\n upcomingSessions: [],\n teacherName: '',\n showLoading: true,\n demoId: '',\n userAttemptId: '',\n isProcessingFailed: false,\n canChangeTutor: false,\n showPLAIntroduction: false,\n};\n"],"names":["DESKTOP_SPACING","MOBILE_SPACING","SUBSCRIPTION_CANCELLED_STATES","EPLAState","TRIAL_COMPLETED_STATES","PLA_INTRO_ELIGIBLE_STATES","DEFAULT_LOADING_STATE"],"mappings":";AAUO,MAAMA,IAAkB;AAAA,EAC7B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,YAAY;AAAA,EACd;AACF,GAEaC,IAAiB;AAAA,EAC5B,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,YAAY;AAAA,EACd;AACF,GAEaC,IAAgC;AAAA,EAC3CC,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ,GAEaC,IAAyB;AAAA,EACpCD,EAAU;AAAA,EACVA,EAAU;AAAA,EACVA,EAAU;AACZ,GAEaE,IAA4B;AAAA,EACvCF,EAAU;AAAA,EACVA,EAAU;AAAA,EACV,GAAGC;AACL,GAEaE,IAAkD;AAAA,EAC7D,UAAU;AAAA,EACV,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,gBAAgB;AAAA,EAChB,iBAAiB;AAAA,EACjB,oBAAoB;AAAA,EACpB,aAAa;AAAA,EACb,yBAAyB;AAAA,EACzB,gBAAgB;AAAA,EAChB,wBAAwB;AAAA,EACxB,eAAe;AAAA,EACf,iBAAiB;AAAA,EACjB,mBAAmB;AAAA,EACnB,gBAAgB;AAAA,EAChB,kBAAkB;AAAA,EAClB,kBAAkB,CAAC;AAAA,EACnB,aAAa;AAAA,EACb,aAAa;AAAA,EACb,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,oBAAoB;AAAA,EACpB,gBAAgB;AAAA,EAChB,qBAAqB;AACvB;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
1
|
+
var T = /* @__PURE__ */ ((_) => (_.STUDENT_PROFILE = "studentProfile", _.INSIGHTS = "insights", _.LEARNING_PLAN = "learningPlan", _))(T || {}), e = /* @__PURE__ */ ((_) => (_.NO_CARD_ON_FILE = "no_card_on_file", _.CARD_ADDED_SEARCHING_TUTOR = "card_added_searching_tutor", _.CARD_ADDED_TUTOR_ASSIGNED = "card_added_tutor_assigned", _.TRIAL_TUTOR_NO_SHOW = "trial_tutor_no_show", _.TRIAL_STUDENT_NO_SHOW = "trial_student_no_show", _.TRIAL_COMPLETED_PAYMENT_PENDING = "trial_completed_payment_pending", _.TRIAL_COMPLETED_CARD_DECLINED = "trial_completed_card_declined", _.TRIAL_COMPLETED_PAYMENT_SUCCESSFUL = "trial_completed_payment_successful", _.REGULAR_CLASS_COMPLETED = "regular_class_completed", _.SUBSCRIPTION_CANCELLED_BEFORE_TRIAL = "cancelled_before_trial", _.SUBSCRIPTION_CANCELLED_AFTER_TRIAL_BEFORE_PAYMENT = "cancelled_after_trial_before_payment", _.SUBSCRIPTION_CANCELLED_AFTER_PAYMENT = "cancelled_after_payment", _))(e || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
e as EPLAState,
|
|
4
|
+
T as ESummaryType
|
|
5
5
|
};
|
|
6
6
|
//# sourceMappingURL=parent-dashboard-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parent-dashboard-types.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-types.ts"],"sourcesContent":["import type { TSession } from '
|
|
1
|
+
{"version":3,"file":"parent-dashboard-types.js","sources":["../../../src/features/parent-dashboard/parent-dashboard-types.ts"],"sourcesContent":["import type { TSession } from './comps/upcoming-sessions/upcoming-sessions-types';\nimport type { ReactElement } from 'react';\n\nexport interface ISessionDetails {\n completed_sessions: number;\n next_session_start: number;\n next_session_end: number;\n student_demo_id: string;\n upcoming_sessions: TSession[];\n user_attempt_id?: string;\n}\n\ninterface IDegreeInfo {\n degree_name: string;\n degree_code: string;\n field_of_study: string;\n}\nexport interface ITeacherDetails {\n first_name: string;\n last_name: string;\n years_of_experience: number;\n number_of_students_taught: number;\n lower_grade: string;\n higher_grade: string;\n degree: IDegreeInfo;\n countries: string[];\n teacher_profile_url: string;\n header_image: string;\n}\n\nexport interface IPaymentMethodDetails {\n brand: string;\n last_4_digits: string;\n type: string;\n exp_month: number;\n exp_year: number;\n}\n\nexport interface IBillingDetails {\n amount: number;\n cycle_frequency: string;\n next_due_date: string;\n payment_method_details: IPaymentMethodDetails;\n}\n\nexport interface IParentHome {\n pla_state: EPLAState;\n session_details: ISessionDetails;\n teacher_details: ITeacherDetails | null;\n billing_details: IBillingDetails;\n}\n\nexport interface IStudentProfileSummary {\n studentLevel: string;\n studentObjectives: string[] | string;\n learningPlan: string[] | string;\n levelPreference?: string;\n}\n\nexport interface IOnViewSummaryParams extends IStudentProfileSummary {\n userAttemptId?: string | null;\n}\nexport enum ESummaryType {\n STUDENT_PROFILE = 'studentProfile',\n INSIGHTS = 'insights',\n LEARNING_PLAN = 'learningPlan',\n}\n\nexport interface IParentDashboardProps {\n studentName: string;\n studentId: string;\n onRescheduleDemo: (demoId?: string | null) => void;\n onChangeTutor: (demoId?: string | null) => void;\n onGetStartedAgain?: () => void;\n onViewSummary?: (key: ESummaryType, summaryData: IOnViewSummaryParams) => void;\n onSwitchUser?: () => void;\n HeaderAvatar: ReactElement;\n}\n\nexport interface ISpacingConfig {\n small: number;\n medium: number;\n large: number;\n separator: {\n small: number;\n medium: number;\n large: number;\n extraLarge: number;\n };\n}\n\nexport enum EPLAState {\n // Initial Setup Phase\n NO_CARD_ON_FILE = 'no_card_on_file',\n CARD_ADDED_SEARCHING_TUTOR = 'card_added_searching_tutor',\n CARD_ADDED_TUTOR_ASSIGNED = 'card_added_tutor_assigned',\n TRIAL_TUTOR_NO_SHOW = 'trial_tutor_no_show',\n TRIAL_STUDENT_NO_SHOW = 'trial_student_no_show',\n\n // Post-Trial Payment Phase\n TRIAL_COMPLETED_PAYMENT_PENDING = 'trial_completed_payment_pending',\n TRIAL_COMPLETED_CARD_DECLINED = 'trial_completed_card_declined',\n TRIAL_COMPLETED_PAYMENT_SUCCESSFUL = 'trial_completed_payment_successful',\n\n // Active Subscription Phase\n REGULAR_CLASS_COMPLETED = 'regular_class_completed',\n\n // Cancellation States\n SUBSCRIPTION_CANCELLED_BEFORE_TRIAL = 'cancelled_before_trial',\n SUBSCRIPTION_CANCELLED_AFTER_TRIAL_BEFORE_PAYMENT = 'cancelled_after_trial_before_payment',\n SUBSCRIPTION_CANCELLED_AFTER_PAYMENT = 'cancelled_after_payment',\n}\n\nexport interface IUseParentHomeDataReturn {\n plaState: EPLAState | null;\n sessionDetails: ISessionDetails | null;\n teacherDetails: ITeacherDetails | null;\n billingDetails: IBillingDetails | null;\n completedSessions: number;\n nextSessionEnd: number;\n nextSessionStart: number;\n teacherName: string;\n upcomingSessions: TSession[];\n isTrialDone: boolean;\n isOnlyTrialDone: boolean;\n isRegularClassDone: boolean;\n isCardDeclined: boolean;\n isSubscriptionCancelled: boolean;\n cardOnFileNotAvailable: boolean;\n isTutorNoShow: boolean;\n isStudentNoShow: boolean;\n showLoading: boolean;\n demoId: string | null;\n userAttemptId: string | null;\n isProcessingFailed: boolean;\n canChangeTutor: boolean;\n showPLAIntroduction?: boolean;\n}\n"],"names":["ESummaryType","EPLAState"],"mappings":"AA8DY,IAAAA,sBAAAA,OACVA,EAAA,kBAAkB,kBAClBA,EAAA,WAAW,YACXA,EAAA,gBAAgB,gBAHNA,IAAAA,KAAA,CAAA,CAAA,GA6BAC,sBAAAA,OAEVA,EAAA,kBAAkB,mBAClBA,EAAA,6BAA6B,8BAC7BA,EAAA,4BAA4B,6BAC5BA,EAAA,sBAAsB,uBACtBA,EAAA,wBAAwB,yBAGxBA,EAAA,kCAAkC,mCAClCA,EAAA,gCAAgC,iCAChCA,EAAA,qCAAqC,sCAGrCA,EAAA,0BAA0B,2BAG1BA,EAAA,sCAAsC,0BACtCA,EAAA,oDAAoD,wCACpDA,EAAA,uCAAuC,2BAnB7BA,IAAAA,KAAA,CAAA,CAAA;"}
|