@cuemath/leap 3.3.30 → 3.3.31

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.
Files changed (53) hide show
  1. package/dist/features/auth/pla-signup/pla-analytics-events.js +4 -2
  2. package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
  3. package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
  4. package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
  5. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
  6. package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
  7. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +74 -0
  8. package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
  9. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +31 -29
  10. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  11. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
  12. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
  13. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
  14. package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
  15. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
  16. package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
  17. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
  18. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
  19. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +71 -0
  20. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
  21. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +119 -0
  22. package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
  23. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +58 -0
  24. package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
  25. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
  26. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  27. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
  28. package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
  29. package/dist/features/parent-dashboard/parent-dashboard-constants.js +5 -4
  30. package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
  31. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  32. package/dist/features/parent-dashboard/parent-dashboard-view.js +173 -149
  33. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  34. package/dist/index.d.ts +27 -1
  35. package/dist/index.js +140 -132
  36. package/dist/index.js.map +1 -1
  37. package/dist/node_modules/query-string/base.js +1 -1
  38. package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
  39. package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
  40. package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
  41. package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
  42. package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
  43. package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
  44. package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
  45. package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
  46. package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
  47. package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
  48. package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
  49. package/package.json +2 -3
  50. package/dist/node_modules/decode-uri-component/index.js.map +0 -1
  51. package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
  52. package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
  53. /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
@@ -0,0 +1,119 @@
1
+ import { jsxs as a, jsx as r, Fragment as M } from "react/jsx-runtime";
2
+ import { memo as k, useState as d, useRef as D, useMemo as F, useCallback as c, useEffect as U } from "react";
3
+ import { useTheme as y } from "styled-components";
4
+ import G from "../../../auth/comps/pill-button/pill-button.js";
5
+ import { PLA_ANALYTICS_EVENTS as R } from "../../../auth/pla-signup/pla-analytics-events.js";
6
+ import E from "../../../ui/buttons/text-button/text-button.js";
7
+ import { useUIContext as H } from "../../../ui/context/context.js";
8
+ import V from "../../../ui/layout/flex-view.js";
9
+ import j from "../../../ui/modals/use-modal-actions.js";
10
+ import K from "../../../ui/modals/use-modal-params.js";
11
+ import Y from "../../../ui/separator/separator.js";
12
+ import S from "../../../ui/text/text.js";
13
+ import { EDeviceType as q } from "../../../ui/theme/constants.js";
14
+ import { useCancelSubscriptionPatch as z } from "../../api/cancel-subscription.js";
15
+ import { cancellationReasonAfterTrial as J, cancellationReasonWithTutor as Q, cancellationReasonNoTutor as Z } from "./cancellation-reason-constant.js";
16
+ import { Container as ee, OuterWrapper as oe, ContentWrapper as re, StyledTextArea as te, FooterWrapper as ne, ErrorWrapper as ae } from "./cancellation-reason-styled.js";
17
+ const le = k(() => {
18
+ const { withTutor: p, isTrialDone: f, studentId: h, demoId: C, onCancelConfirmation: $ } = K(), { closeModal: g } = j(), { onEvent: m } = H(), [o, I] = d(""), [x, u] = d(!1), [l, b] = d(""), s = D(null), { device: O } = y(), t = O <= q.MOBILE, _ = F(() => f ? J : p ? Q : Z, [f, p]), { title: L, description: A, reasons: N } = _, w = c(
19
+ (e) => {
20
+ if (e) {
21
+ u(!0), m(R.SUBSCRIPTION_CANCELLATION_FAILED, {
22
+ reason: o,
23
+ error: e
24
+ });
25
+ return;
26
+ }
27
+ m(R.SUBSCRIPTION_CANCELLATION_SUCCESSFUL, {
28
+ reason: o
29
+ }), $();
30
+ },
31
+ [$, o, m]
32
+ ), { patch: T, isProcessing: X } = z({
33
+ onComplete: w
34
+ }), n = o === "other", v = X || !o || n && !l.trim(), P = c(() => {
35
+ T(h, {
36
+ reason: n ? l : o,
37
+ student_demo_id: C
38
+ });
39
+ }, [n, l, o, T, h, C]), W = c((e) => {
40
+ b(""), u(!1), I(e);
41
+ }, []), B = c((e) => {
42
+ u(!1), b(e.target.value);
43
+ }, []);
44
+ return U(() => {
45
+ var e, i;
46
+ n && s.current && ((e = s.current) == null || e.focus(), (i = s.current) == null || i.scrollIntoView({ behavior: "smooth" }));
47
+ }, [n]), /* @__PURE__ */ a(ee, { $background: "BLACK_2", $width: "100%", $borderColor: "BLACK_5", children: [
48
+ /* @__PURE__ */ a(oe, { $flex: 1, children: [
49
+ /* @__PURE__ */ a(V, { $gutterX: t ? 1 : 2.5, $gapX: t ? 1.5 : 2.5, children: [
50
+ /* @__PURE__ */ r(S, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: L }),
51
+ A ? /* @__PURE__ */ a(M, { children: [
52
+ /* @__PURE__ */ r(Y, { heightX: 0.25 }),
53
+ /* @__PURE__ */ r(S, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: A })
54
+ ] }) : null
55
+ ] }),
56
+ /* @__PURE__ */ a(
57
+ re,
58
+ {
59
+ $flex: 1,
60
+ $gutterX: t ? 1 : 2.5,
61
+ $gapX: t ? 1 : 2.5,
62
+ $width: "100%",
63
+ $alignItems: "flex-start",
64
+ $flexRowGapX: 1,
65
+ children: [
66
+ N.map(({ id: e, label: i }) => /* @__PURE__ */ r(
67
+ G,
68
+ {
69
+ selected: o === e,
70
+ label: i,
71
+ id: e,
72
+ onClick: W,
73
+ isTransparent: !0
74
+ },
75
+ e
76
+ )),
77
+ n && /* @__PURE__ */ r(
78
+ te,
79
+ {
80
+ placeholder: "Tell us more about your experience...",
81
+ id: "text-area",
82
+ ref: s,
83
+ value: l,
84
+ onChange: B
85
+ }
86
+ )
87
+ ]
88
+ }
89
+ )
90
+ ] }),
91
+ /* @__PURE__ */ a(
92
+ ne,
93
+ {
94
+ $position: "relative",
95
+ $gutterX: t ? 1 : 2.5,
96
+ $gapX: t ? 1.5 : 2.5,
97
+ $flexDirection: "row",
98
+ $flexColumnGapX: 1.5,
99
+ children: [
100
+ x ? /* @__PURE__ */ r(ae, { $renderAs: "ub3", $color: "ORANGE_4", $align: "left", children: "Something went wrong. Please try again." }) : null,
101
+ /* @__PURE__ */ r(
102
+ E,
103
+ {
104
+ label: "Cancel Subscription",
105
+ onClick: P,
106
+ color: "ORANGE_4",
107
+ disabled: v
108
+ }
109
+ ),
110
+ /* @__PURE__ */ r(E, { label: "Close", onClick: g, color: "WHITE" })
111
+ ]
112
+ }
113
+ )
114
+ ] });
115
+ }), Se = le;
116
+ export {
117
+ Se as default
118
+ };
119
+ //# 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 { PLA_ANALYTICS_EVENTS } from '../../../auth/pla-signup/pla-analytics-events';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport { useUIContext } from '../../../ui/context/context';\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 { useCancelSubscriptionPatch } from '../../api/cancel-subscription';\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, isTrialDone, studentId, demoId, onCancelConfirmation } =\n useModalParams<ICancelReasonProps>();\n const { closeModal } = useModalActions();\n const { onEvent: trackEvent } = useUIContext();\n\n const [reason, setReason] = useState('');\n const [isError, setIsError] = useState<boolean>(false);\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 (isTrialDone) return cancellationReasonAfterTrial;\n\n return withTutor ? cancellationReasonWithTutor : cancellationReasonNoTutor;\n }, [isTrialDone, withTutor]);\n const { title, description, reasons } = config;\n\n const handleCancelConfirmation = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n setIsError(true);\n trackEvent(PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_FAILED, {\n reason,\n error: errorMessage,\n });\n // Need to add analytics event for cancellation failure\n\n return;\n }\n\n trackEvent(PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_SUCCESSFUL, {\n reason,\n });\n onCancelConfirmation();\n },\n [onCancelConfirmation, reason, trackEvent],\n );\n\n const { patch: cancelSubscription, isProcessing } = useCancelSubscriptionPatch({\n onComplete: handleCancelConfirmation,\n });\n\n const isOtherReasonSelected = reason === 'other';\n const isSubmitDisabled =\n isProcessing || !reason || (isOtherReasonSelected && !otherReason.trim());\n\n const handleCancel = useCallback(() => {\n const cancellationReason = isOtherReasonSelected ? otherReason : reason;\n\n cancelSubscription(studentId, {\n reason: cancellationReason,\n student_demo_id: demoId,\n });\n }, [isOtherReasonSelected, otherReason, reason, cancelSubscription, studentId, demoId]);\n\n const handleSelectReason = useCallback((id: string) => {\n setOtherReason('');\n setIsError(false);\n setReason(id);\n }, []);\n\n const handleOtherReasonChange = useCallback((event: ChangeEvent<HTMLTextAreaElement>) => {\n setIsError(false);\n setOtherReason(event.target.value);\n }, []);\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 $position=\"relative\"\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1.5 : 2.5}\n $flexDirection=\"row\"\n $flexColumnGapX={1.5}\n >\n {isError ? (\n <Styled.ErrorWrapper $renderAs=\"ub3\" $color=\"ORANGE_4\" $align=\"left\">\n Something went wrong. Please try again.\n </Styled.ErrorWrapper>\n ) : null}\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","isTrialDone","studentId","demoId","onCancelConfirmation","useModalParams","closeModal","useModalActions","trackEvent","useUIContext","reason","setReason","useState","isError","setIsError","otherReason","setOtherReason","textAreaRef","useRef","device","useTheme","isMobile","EDeviceType","config","useMemo","cancellationReasonAfterTrial","cancellationReasonWithTutor","cancellationReasonNoTutor","title","description","reasons","handleCancelConfirmation","useCallback","errorMessage","PLA_ANALYTICS_EVENTS","cancelSubscription","isProcessing","useCancelSubscriptionPatch","isOtherReasonSelected","isSubmitDisabled","handleCancel","handleSelectReason","id","handleOtherReasonChange","event","useEffect","_a","_b","jsxs","Styled.Container","Styled.OuterWrapper","FlexView","jsx","Text","Fragment","Separator","Styled.ContentWrapper","label","PillButton","Styled.StyledTextArea","Styled.FooterWrapper","Styled.ErrorWrapper","TextButton","CancellationReason$1"],"mappings":"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"}
@@ -0,0 +1,58 @@
1
+ import { useCallback as l, useMemo as f } from "react";
2
+ import h from "../../../ui/modals/use-modal-actions.js";
3
+ import { invalidateParentHome as y } from "../../api/parent-home.js";
4
+ const V = ({
5
+ studentId: a,
6
+ demoId: t,
7
+ withTutor: o,
8
+ isTrialDone: e,
9
+ studentName: i,
10
+ billingDetails: d,
11
+ onChangeTutor: m,
12
+ onRescheduleDemo: p
13
+ }) => {
14
+ const { openModal: n } = h(), { payment_method_details: s } = d ?? {}, r = l(() => {
15
+ y(a), n("pla-cancellation-confirmation");
16
+ }, [n, a]), C = l(() => {
17
+ n("pla-cancellation-reason", {
18
+ withTutor: o,
19
+ studentId: a,
20
+ demoId: t,
21
+ isTrialDone: e,
22
+ onCancelConfirmation: r
23
+ });
24
+ }, [t, r, e, n, a, o]), c = l(() => {
25
+ n("pla-cancel-subscription", {
26
+ withTutor: o,
27
+ studentName: i,
28
+ isTrialDone: e,
29
+ onSwitchTutor: m,
30
+ onReschedule: p,
31
+ onCancel: C
32
+ });
33
+ }, [
34
+ n,
35
+ o,
36
+ i,
37
+ e,
38
+ m,
39
+ p,
40
+ C
41
+ ]), M = l(() => {
42
+ n("pla-view-payment-method", {
43
+ paymentMethodDetails: s,
44
+ onCancel: c
45
+ });
46
+ }, [c, n, s]);
47
+ return f(
48
+ () => ({
49
+ onCancelSubscription: c,
50
+ onViewPaymentMethod: M
51
+ }),
52
+ [c, M]
53
+ );
54
+ };
55
+ export {
56
+ V as usePLAModalHandlers
57
+ };
58
+ //# 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 } from '../../parent-dashboard-types';\n\nimport { useCallback, useMemo } from 'react';\n\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport { invalidateParentHome } from '../../api/parent-home';\n\ninterface IUsePLAModalHandlers {\n demoId: string | null;\n isTrialDone: boolean;\n studentId: string;\n studentName: string;\n withTutor: boolean;\n billingDetails: IBillingDetails | null;\n onRescheduleDemo: () => void;\n onChangeTutor: () => void;\n}\n\ninterface IUsePLAModalResponse {\n onCancelSubscription: () => void;\n onViewPaymentMethod: () => void;\n}\n\nexport const usePLAModalHandlers = ({\n studentId,\n demoId,\n withTutor,\n isTrialDone,\n studentName,\n billingDetails,\n onChangeTutor,\n onRescheduleDemo,\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 handleViewCancellationReason = useCallback(() => {\n openModal('pla-cancellation-reason', {\n withTutor,\n studentId,\n demoId,\n isTrialDone,\n onCancelConfirmation: handleCancelConfirmation,\n });\n }, [demoId, handleCancelConfirmation, isTrialDone, openModal, studentId, withTutor]);\n\n const handleCancelSubscription = useCallback(() => {\n openModal('pla-cancel-subscription', {\n withTutor,\n studentName,\n isTrialDone,\n onSwitchTutor: onChangeTutor,\n onReschedule: onRescheduleDemo,\n onCancel: handleViewCancellationReason,\n });\n }, [\n openModal,\n withTutor,\n studentName,\n isTrialDone,\n onChangeTutor,\n onRescheduleDemo,\n handleViewCancellationReason,\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","isTrialDone","studentName","billingDetails","onChangeTutor","onRescheduleDemo","openModal","useModalActions","paymentMethodDetails","handleCancelConfirmation","useCallback","invalidateParentHome","handleViewCancellationReason","handleCancelSubscription","handleViewPaymentMethod","useMemo"],"mappings":";;;AAuBO,MAAMA,IAAsB,CAAC;AAAA,EAClC,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,MAAkD;AAC1C,QAAA,EAAE,WAAAC,MAAcC,KAEhB,EAAE,wBAAwBC,MAAyBL,KAAkB,CAAA,GAErEM,IAA2BC,EAAY,MAAM;AACjD,IAAAC,EAAqBb,CAAS,GAC9BQ,EAAU,+BAA+B;AAAA,EAAA,GACxC,CAACA,GAAWR,CAAS,CAAC,GAEnBc,IAA+BF,EAAY,MAAM;AACrD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,WAAAF;AAAA,MACA,QAAAC;AAAA,MACA,aAAAE;AAAA,MACA,sBAAsBQ;AAAA,IAAA,CACvB;AAAA,EAAA,GACA,CAACV,GAAQU,GAA0BR,GAAaK,GAAWR,GAAWE,CAAS,CAAC,GAE7Ea,IAA2BH,EAAY,MAAM;AACjD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,aAAAE;AAAA,MACA,aAAAD;AAAA,MACA,eAAeG;AAAA,MACf,cAAcC;AAAA,MACd,UAAUO;AAAA,IAAA,CACX;AAAA,EAAA,GACA;AAAA,IACDN;AAAA,IACAN;AAAA,IACAE;AAAA,IACAD;AAAA,IACAG;AAAA,IACAC;AAAA,IACAO;AAAA,EAAA,CACD,GAEKE,IAA0BJ,EAAY,MAAM;AAChD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,sBAAAE;AAAA,MACA,UAAUK;AAAA,IAAA,CACX;AAAA,EACA,GAAA,CAACA,GAA0BP,GAAWE,CAAoB,CAAC;AAEvD,SAAAO;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 })}\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;"}
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;"}
@@ -19,7 +19,7 @@ const l = {
19
19
  large: 22,
20
20
  extraLarge: 40
21
21
  }
22
- }, T = [
22
+ }, t = [
23
23
  e.SUBSCRIPTION_CANCELLED_AFTER_PAYMENT,
24
24
  e.SUBSCRIPTION_CANCELLED_AFTER_TRIAL_BEFORE_PAYMENT,
25
25
  e.SUBSCRIPTION_CANCELLED_BEFORE_TRIAL
@@ -27,7 +27,7 @@ const l = {
27
27
  e.TRIAL_COMPLETED_PAYMENT_PENDING,
28
28
  e.TRIAL_COMPLETED_PAYMENT_SUCCESSFUL,
29
29
  e.REGULAR_CLASS_COMPLETED
30
- ], t = [
30
+ ], T = [
31
31
  e.CARD_ADDED_SEARCHING_TUTOR,
32
32
  e.CARD_ADDED_TUTOR_ASSIGNED,
33
33
  ...s
@@ -35,6 +35,7 @@ const l = {
35
35
  plaState: null,
36
36
  sessionDetails: null,
37
37
  teacherDetails: null,
38
+ billingDetails: null,
38
39
  isOnlyTrialDone: !1,
39
40
  isRegularClassDone: !1,
40
41
  isTrialDone: !1,
@@ -59,8 +60,8 @@ export {
59
60
  S as DEFAULT_LOADING_STATE,
60
61
  l as DESKTOP_SPACING,
61
62
  E as MOBILE_SPACING,
62
- t as PLA_INTRO_ELIGIBLE_STATES,
63
- T as SUBSCRIPTION_CANCELLED_STATES,
63
+ T as PLA_INTRO_ELIGIBLE_STATES,
64
+ t as SUBSCRIPTION_CANCELLED_STATES,
64
65
  s as TRIAL_COMPLETED_STATES
65
66
  };
66
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":["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 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,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
+ {"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 +1 @@
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\ninterface PaymentMethodDetails {\n brand: string;\n last_4_digits: string;\n type: string;\n exp_month: number;\n exp_year: number;\n}\n\ninterface IBillingDetails {\n amount: number;\n next_due_date: string;\n payment_method_details: PaymentMethodDetails;\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 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":"AA6DY,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;"}
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;"}