@cuemath/leap 3.3.26-j.6 → 3.3.26-jj1

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 (94) hide show
  1. package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
  2. package/dist/features/circle-games/sign-up/sign-up.js +6 -6
  3. package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
  4. package/dist/features/homework/hw-card-list/hw-card-list-view.js +17 -17
  5. package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
  6. package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +2 -2
  7. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +22 -28
  8. package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
  9. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
  10. package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
  11. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +44 -44
  12. package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
  13. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +11 -9
  14. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
  15. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js +6 -6
  16. package/dist/features/parent-dashboard/modals/tutor-change/tutor-change.js.map +1 -1
  17. package/dist/features/parent-dashboard/parent-dashboard-constants.js +4 -44
  18. package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
  19. package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
  20. package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
  21. package/dist/features/parent-dashboard/parent-dashboard-view.js +175 -176
  22. package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
  23. package/dist/features/student-details/class-details/class-details-utils.js +6 -6
  24. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-constants.js +1 -1
  25. package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
  26. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-styled.js +1 -1
  27. package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
  28. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps.js +5 -5
  29. package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
  30. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
  31. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
  32. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +132 -0
  33. package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
  34. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
  35. package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
  36. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
  37. package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
  38. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-status/session-status-styled.js +2 -2
  39. package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
  40. package/dist/features/trial-session/comps/pla/session-status/session-status.js +127 -0
  41. package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
  42. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/session-summary-constants.js +2 -2
  43. package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
  44. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +53 -0
  45. package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
  46. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/summary-card/summary-card-styled.js +1 -1
  47. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
  48. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
  49. package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
  50. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
  51. package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
  52. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
  53. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
  54. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +101 -0
  55. package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
  56. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +44 -43
  57. package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
  58. package/dist/index.d.ts +75 -35
  59. package/dist/index.js +291 -282
  60. package/dist/index.js.map +1 -1
  61. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
  62. package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
  63. package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
  64. package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
  65. package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
  66. package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
  67. package/package.json +1 -1
  68. package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +0 -1
  69. package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +0 -1
  70. package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +0 -1
  71. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +0 -34
  72. package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +0 -1
  73. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +0 -137
  74. package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +0 -1
  75. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +0 -20
  76. package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +0 -1
  77. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +0 -19
  78. package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +0 -1
  79. package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +0 -1
  80. package/dist/features/parent-dashboard/comps/session-status/session-status.js +0 -124
  81. package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +0 -1
  82. package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +0 -1
  83. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +0 -53
  84. package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +0 -1
  85. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +0 -1
  86. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +0 -63
  87. package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +0 -1
  88. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
  89. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
  90. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
  91. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js +0 -96
  92. package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +0 -1
  93. /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
  94. /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-types.js +0 -0
@@ -1,8 +1,8 @@
1
1
  import { jsxs as i, jsx as r } from "react/jsx-runtime";
2
- import { memo as R, useState as p, useRef as w, useCallback as u, useEffect as A } from "react";
2
+ import { memo as R, useState as h, useRef as w, useCallback as u, useEffect as A } from "react";
3
3
  import { useTheme as E } from "styled-components";
4
4
  import O from "../../../auth/comps/pill-button/pill-button.js";
5
- import h from "../../../ui/buttons/text-button/text-button.js";
5
+ import p from "../../../ui/buttons/text-button/text-button.js";
6
6
  import I from "../../../ui/layout/flex-view.js";
7
7
  import X from "../../../ui/modals/use-modal-actions.js";
8
8
  import S from "../../../ui/modals/use-modal-params.js";
@@ -11,10 +11,10 @@ import { EDeviceType as k } from "../../../ui/theme/constants.js";
11
11
  import { changeTutorReasons as M, TUTOR_CHANGE_REASON_IDS as v } from "./tutor-change-constants.js";
12
12
  import { Container as B, OuterWrapper as H, ContentWrapper as _, StyledTextArea as D, FooterWrapper as y } from "./tutor-change-styled.js";
13
13
  const G = () => {
14
- const { device: f } = E(), [n, C] = p(""), [l, $] = p(""), o = f <= k.MOBILE, { closeModal: c } = X(), a = w(null), { onContinue: m, demoId: d } = S(), x = u((e) => C(e), []), b = u((e) => {
14
+ const { device: f } = E(), [n, C] = h(""), [l, $] = h(""), o = f <= k.MOBILE, { closeModal: c } = X(), a = w(null), { onContinue: m, demoId: d } = S(), x = u((e) => C(e), []), b = u((e) => {
15
15
  $(e.target.value);
16
16
  }, []), t = n === v.OTHER, T = !n || t && !l.trim(), g = u(() => {
17
- c(), m(d, n, t ? l : "");
17
+ c(), m({ demoId: d, reason: n, otherReason: t ? l : "" });
18
18
  }, [c, m, d, n, t, l]);
19
19
  return A(() => {
20
20
  var e, s;
@@ -66,7 +66,7 @@ const G = () => {
66
66
  $flexColumnGapX: 1.5,
67
67
  children: [
68
68
  /* @__PURE__ */ r(
69
- h,
69
+ p,
70
70
  {
71
71
  label: "Continue",
72
72
  onClick: g,
@@ -74,7 +74,7 @@ const G = () => {
74
74
  disabled: T
75
75
  }
76
76
  ),
77
- /* @__PURE__ */ r(h, { label: "Close", onClick: c, color: "WHITE" })
77
+ /* @__PURE__ */ r(p, { label: "Close", onClick: c, color: "WHITE" })
78
78
  ]
79
79
  }
80
80
  )
@@ -1 +1 @@
1
- {"version":3,"file":"tutor-change.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change.tsx"],"sourcesContent":["import type { ITutorChangeModalParams } from './tutor-change-types';\n\nimport { memo, useCallback, useEffect, useRef, useState, type ChangeEvent } 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 Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { TUTOR_CHANGE_REASON_IDS, changeTutorReasons } from './tutor-change-constants';\nimport * as Styled from './tutor-change-styled';\n\nconst TutorChange = () => {\n const { device } = useTheme();\n const [reason, setReason] = useState('');\n const [otherReason, setOtherReason] = useState('');\n const isMobile = device <= EDeviceType.MOBILE;\n const { closeModal } = useModalActions();\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const { onContinue, demoId } = useModalParams<ITutorChangeModalParams>();\n const handleSelectReason = useCallback((id: string) => setReason(id), []);\n\n const handleOtherReasonChange = useCallback((event: ChangeEvent<HTMLTextAreaElement>) => {\n setOtherReason(event.target.value);\n }, []);\n const isOtherReasonSelected = reason === TUTOR_CHANGE_REASON_IDS.OTHER;\n const isSubmitDisabled = !reason || (isOtherReasonSelected && !otherReason.trim());\n\n const handleContinue = useCallback(() => {\n closeModal();\n onContinue(demoId, reason, isOtherReasonSelected ? otherReason : '');\n }, [closeModal, onContinue, demoId, reason, isOtherReasonSelected, otherReason]);\n\n useEffect(() => {\n if (isOtherReasonSelected && textAreaRef.current) {\n textAreaRef.current?.scrollIntoView({ behavior: 'smooth' });\n textAreaRef.current?.focus();\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 What didn't work well with the current tutor?\n </Text>\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 {changeTutorReasons.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=\"Continue\"\n onClick={handleContinue}\n color=\"WHITE\"\n disabled={isSubmitDisabled}\n />\n <TextButton label=\"Close\" onClick={closeModal} color=\"WHITE\" />\n </Styled.FooterWrapper>\n </Styled.Container>\n );\n};\n\nexport default memo(TutorChange);\n"],"names":["TutorChange","device","useTheme","reason","setReason","useState","otherReason","setOtherReason","isMobile","EDeviceType","closeModal","useModalActions","textAreaRef","useRef","onContinue","demoId","useModalParams","handleSelectReason","useCallback","id","handleOtherReasonChange","event","isOtherReasonSelected","TUTOR_CHANGE_REASON_IDS","isSubmitDisabled","handleContinue","useEffect","_a","_b","jsxs","Styled.Container","Styled.OuterWrapper","jsx","FlexView","Text","Styled.ContentWrapper","changeTutorReasons","label","PillButton","Styled.StyledTextArea","Styled.FooterWrapper","TextButton","tutorChange","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAMA,IAAc,MAAM;AAClB,QAAA,EAAE,QAAAC,MAAWC,KACb,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAE,GACjC,CAACC,GAAaC,CAAc,IAAIF,EAAS,EAAE,GAC3CG,IAAWP,KAAUQ,EAAY,QACjC,EAAE,YAAAC,MAAeC,KACjBC,IAAcC,EAAmC,IAAI,GACrD,EAAE,YAAAC,GAAY,QAAAC,EAAO,IAAIC,EAAwC,GACjEC,IAAqBC,EAAY,CAACC,MAAef,EAAUe,CAAE,GAAG,CAAA,CAAE,GAElEC,IAA0BF,EAAY,CAACG,MAA4C;AACxE,IAAAd,EAAAc,EAAM,OAAO,KAAK;AAAA,EACnC,GAAG,CAAE,CAAA,GACCC,IAAwBnB,MAAWoB,EAAwB,OAC3DC,IAAmB,CAACrB,KAAWmB,KAAyB,CAAChB,EAAY,QAErEmB,IAAiBP,EAAY,MAAM;AAC5B,IAAAR,KACXI,EAAWC,GAAQZ,GAAQmB,IAAwBhB,IAAc,EAAE;AAAA,EAAA,GAClE,CAACI,GAAYI,GAAYC,GAAQZ,GAAQmB,GAAuBhB,CAAW,CAAC;AAE/E,SAAAoB,EAAU,MAAM;;AACV,IAAAJ,KAAyBV,EAAY,aACvCe,IAAAf,EAAY,YAAZ,QAAAe,EAAqB,eAAe,EAAE,UAAU,SAAU,KAC1DC,IAAAhB,EAAY,YAAZ,QAAAgB,EAAqB;AAAA,EACvB,GACC,CAACN,CAAqB,CAAC,GAGxB,gBAAAO,EAACC,GAAA,EAAiB,aAAY,WAAU,QAAO,QAAO,cAAa,WACjE,UAAA;AAAA,IAAA,gBAAAD,EAACE,GAAA,EAAoB,OAAO,GAC1B,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAS,UAAUzB,IAAW,IAAI,KAAK,OAAOA,IAAW,MAAM,KAC9D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3C,CAAW;"}
1
+ {"version":3,"file":"tutor-change.js","sources":["../../../../../src/features/parent-dashboard/modals/tutor-change/tutor-change.tsx"],"sourcesContent":["import type { ITutorChangeModalParams } from './tutor-change-types';\n\nimport { memo, useCallback, useEffect, useRef, useState, type ChangeEvent } 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 Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { TUTOR_CHANGE_REASON_IDS, changeTutorReasons } from './tutor-change-constants';\nimport * as Styled from './tutor-change-styled';\n\nconst TutorChange = () => {\n const { device } = useTheme();\n const [reason, setReason] = useState('');\n const [otherReason, setOtherReason] = useState('');\n const isMobile = device <= EDeviceType.MOBILE;\n const { closeModal } = useModalActions();\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const { onContinue, demoId } = useModalParams<ITutorChangeModalParams>();\n const handleSelectReason = useCallback((id: string) => setReason(id), []);\n\n const handleOtherReasonChange = useCallback((event: ChangeEvent<HTMLTextAreaElement>) => {\n setOtherReason(event.target.value);\n }, []);\n const isOtherReasonSelected = reason === TUTOR_CHANGE_REASON_IDS.OTHER;\n const isSubmitDisabled = !reason || (isOtherReasonSelected && !otherReason.trim());\n\n const handleContinue = useCallback(() => {\n closeModal();\n onContinue({ demoId, reason, otherReason: isOtherReasonSelected ? otherReason : '' });\n }, [closeModal, onContinue, demoId, reason, isOtherReasonSelected, otherReason]);\n\n useEffect(() => {\n if (isOtherReasonSelected && textAreaRef.current) {\n textAreaRef.current?.scrollIntoView({ behavior: 'smooth' });\n textAreaRef.current?.focus();\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 What didn't work well with the current tutor?\n </Text>\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 {changeTutorReasons.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=\"Continue\"\n onClick={handleContinue}\n color=\"WHITE\"\n disabled={isSubmitDisabled}\n />\n <TextButton label=\"Close\" onClick={closeModal} color=\"WHITE\" />\n </Styled.FooterWrapper>\n </Styled.Container>\n );\n};\n\nexport default memo(TutorChange);\n"],"names":["TutorChange","device","useTheme","reason","setReason","useState","otherReason","setOtherReason","isMobile","EDeviceType","closeModal","useModalActions","textAreaRef","useRef","onContinue","demoId","useModalParams","handleSelectReason","useCallback","id","handleOtherReasonChange","event","isOtherReasonSelected","TUTOR_CHANGE_REASON_IDS","isSubmitDisabled","handleContinue","useEffect","_a","_b","jsxs","Styled.Container","Styled.OuterWrapper","jsx","FlexView","Text","Styled.ContentWrapper","changeTutorReasons","label","PillButton","Styled.StyledTextArea","Styled.FooterWrapper","TextButton","tutorChange","memo"],"mappings":";;;;;;;;;;;;AAeA,MAAM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
3
2
  small: 40,
4
3
  medium: 40,
5
4
  large: 80,
@@ -9,7 +8,7 @@ const l = {
9
8
  large: 24,
10
9
  extraLarge: 80
11
10
  }
12
- }, E = {
11
+ }, e = {
13
12
  small: 16,
14
13
  medium: 24,
15
14
  large: 40,
@@ -19,48 +18,9 @@ const l = {
19
18
  large: 22,
20
19
  extraLarge: 40
21
20
  }
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
- isOnlyTrialDone: !1,
39
- isRegularClassDone: !1,
40
- isTrialDone: !1,
41
- isSubscriptionCancelled: !1,
42
- isCardDeclined: !1,
43
- cardOnFileNotAvailable: !1,
44
- isTutorNoShow: !1,
45
- isStudentNoShow: !1,
46
- completedSessions: 0,
47
- nextSessionEnd: 0,
48
- nextSessionStart: 0,
49
- upcomingSessions: [],
50
- teacherName: "",
51
- showLoading: !0,
52
- demoId: "",
53
- userAttemptId: "",
54
- isProcessingFailed: !1,
55
- canChangeTutor: !1,
56
- showPLAIntroduction: !1
57
21
  };
58
22
  export {
59
- S as DEFAULT_LOADING_STATE,
60
- l as DESKTOP_SPACING,
61
- E as MOBILE_SPACING,
62
- t as PLA_INTRO_ELIGIBLE_STATES,
63
- T as SUBSCRIPTION_CANCELLED_STATES,
64
- s as TRIAL_COMPLETED_STATES
23
+ a as DESKTOP_SPACING,
24
+ e as MOBILE_SPACING
65
25
  };
66
26
  //# 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":["export 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"],"names":["DESKTOP_SPACING","MOBILE_SPACING"],"mappings":"AAQO,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;"}
@@ -1,6 +1,6 @@
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 || {});
1
+ var N = /* @__PURE__ */ ((_) => (_.S_NO_SHOW = "S_NO_SHOW", _.T_NO_SHOW = "T_NO_SHOW", _))(N || {}), O = /* @__PURE__ */ ((_) => (_.STUDENT_PROFILE = "studentProfile", _.INSIGHTS = "insights", _.LEARNING_PLAN = "learningPlan", _))(O || {});
2
2
  export {
3
- e as EPLAState,
4
- T as ESummaryType
3
+ N as EClassStatus,
4
+ O 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 './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;\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) => void;\n onChangeTutor: (demoId: string) => 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;\n userAttemptId: string;\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 '../trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types';\nimport type { ReactElement } from 'react';\n\nexport enum EClassStatus {\n S_NO_SHOW = 'S_NO_SHOW',\n T_NO_SHOW = 'T_NO_SHOW',\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 demo_class_status: EClassStatus | null;\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 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 canChangeTutor: boolean;\n isSubscriptionCancelled: boolean;\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"],"names":["EClassStatus","ESummaryType"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,YAAY,aAFFA,IAAAA,KAAA,CAAA,CAAA,GA8DAC,sBAAAA,OACVA,EAAA,kBAAkB,kBAClBA,EAAA,WAAW,YACXA,EAAA,gBAAgB,gBAHNA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,209 +1,208 @@
1
- import { jsxs as o, jsx as r } from "react/jsx-runtime";
2
- import { memo as sr, useMemo as t, useCallback as f } from "react";
3
- import { useTheme as lr } from "styled-components";
4
- import cr from "../auth/pla-signup/onboarding-guide/onboarding-guide.js";
5
- import mr from "../auth/pla-signup/signup-header/signup-header.js";
6
- import Q from "../trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js";
7
- import hr from "../ui/buttons/button/button.js";
8
- import pr from "../ui/buttons/text-button/text-button.js";
9
- import ur from "../ui/error/error.js";
10
- import a from "../ui/layout/flex-view.js";
11
- import dr from "../ui/loader/app-loader/app-loader.js";
12
- import i from "../ui/separator/separator.js";
13
- import U from "../ui/text/text.js";
14
- import { EDeviceType as fr } from "../ui/theme/constants.js";
15
- import { invalidateParentHome as gr } from "./api/parent-home.js";
16
- import Sr from "./comps/compact-header/compact-header.js";
17
- import xr from "./comps/cuemath-app-features/cuemath-app-features.js";
18
- import Tr from "./comps/math-practice/math-practice.js";
19
- import Lr from "./comps/next-steps/next-steps.js";
20
- import br from "./comps/parent-dashboard-faqs/parent-dashboard-faqs.js";
21
- import Cr from "./comps/session-status/session-status.js";
22
- import Pr from "./comps/session-summary/session-summary.js";
23
- import Dr from "./comps/upcoming-sessions/upcoming-sessions.js";
24
- import $r from "./hooks/use-parent-home-data.js";
25
- import yr from "./hooks/use-student-profile-summary-data.js";
26
- import { MOBILE_SPACING as Ar, DESKTOP_SPACING as Mr } from "./parent-dashboard-constants.js";
27
- import { MathPracticeWrapper as Er, Container as Or, ContentWrapper as Hr } from "./parent-dashboard-styled.js";
28
- const ne = sr(
1
+ import { jsxs as o, jsx as e } from "react/jsx-runtime";
2
+ import { memo as Z, useCallback as t, useMemo as ee } from "react";
3
+ import { useTheme as re } from "styled-components";
4
+ import te from "../auth/pla-signup/onboarding-guide/onboarding-guide.js";
5
+ import oe from "../auth/pla-signup/signup-header/signup-header.js";
6
+ import ne from "../trial-session/comps/pla/next-steps/next-steps.js";
7
+ import ae from "../trial-session/comps/pla/session-status/session-status.js";
8
+ import ie from "../trial-session/comps/pla/session-summary/session-summary.js";
9
+ import se from "../trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js";
10
+ import q from "../trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js";
11
+ import le from "../ui/buttons/button/button.js";
12
+ import me from "../ui/buttons/text-button/text-button.js";
13
+ import ce from "../ui/error/error.js";
14
+ import n from "../ui/layout/flex-view.js";
15
+ import he from "../ui/loader/app-loader/app-loader.js";
16
+ import a from "../ui/separator/separator.js";
17
+ import G from "../ui/text/text.js";
18
+ import { EDeviceType as pe } from "../ui/theme/constants.js";
19
+ import { invalidateParentHome as de } from "./api/parent-home.js";
20
+ import ue from "./comps/compact-header/compact-header.js";
21
+ import fe from "./comps/cuemath-app-features/cuemath-app-features.js";
22
+ import ge from "./comps/math-practice/math-practice.js";
23
+ import Se from "./comps/parent-dashboard-faqs/parent-dashboard-faqs.js";
24
+ import xe from "./hooks/use-parent-home-data.js";
25
+ import be from "./hooks/use-student-profile-summary-data.js";
26
+ import { MOBILE_SPACING as Le, DESKTOP_SPACING as Ce } from "./parent-dashboard-constants.js";
27
+ import { MathPracticeWrapper as Te, Container as $e, ContentWrapper as Pe } from "./parent-dashboard-styled.js";
28
+ const Ye = Z(
29
29
  ({
30
- studentName: c,
30
+ studentName: l,
31
31
  studentId: m,
32
- onRescheduleDemo: S,
33
- onViewSummary: h,
34
- onGetStartedAgain: g,
35
- onChangeTutor: x,
36
- onSwitchUser: T,
37
- HeaderAvatar: V
32
+ onRescheduleDemo: f,
33
+ onViewSummary: c,
34
+ onGetStartedAgain: d,
35
+ onChangeTutor: g,
36
+ canChangeTutor: S,
37
+ onSwitchUser: x,
38
+ isSubscriptionCancelled: K,
39
+ HeaderAvatar: z
38
40
  }) => {
39
- const { device: Y } = lr(), p = Y <= fr.MOBILE, Z = $r(m), {
40
- isStudentNoShow: L,
41
- isTutorNoShow: b,
42
- teacherDetails: s,
43
- teacherName: C,
44
- completedSessions: P,
45
- nextSessionStart: D,
46
- nextSessionEnd: $,
47
- upcomingSessions: y,
48
- isTrialDone: n,
49
- isOnlyTrialDone: u,
50
- isRegularClassDone: d,
51
- showLoading: A = !1,
52
- demoId: l,
53
- isProcessingFailed: rr,
54
- userAttemptId: M,
55
- isSubscriptionCancelled: er,
56
- canChangeTutor: E,
57
- sessionDetails: O,
58
- cardOnFileNotAvailable: H,
59
- isCardDeclined: I
60
- } = Z, { summaryInfo: k, fetchSummaryData: w } = yr(m), e = t(
61
- () => p ? Ar : Mr,
62
- [p]
63
- ), F = t(() => p ? "100%" : 200, [p]), tr = f(() => {
64
- gr(m), w();
65
- }, [w, m]), W = f(() => {
66
- S(l);
67
- }, [l, S]), v = f(() => {
68
- l && x(l);
69
- }, [l, x]), B = f(
70
- (nr) => {
71
- h == null || h(nr, { ...k, userAttemptId: M });
41
+ const { device: N } = re(), u = N <= pe.MOBILE, {
42
+ teacherDetails: i,
43
+ teacherName: b,
44
+ completedSessions: L,
45
+ nextSessionStart: C,
46
+ nextSessionEnd: T,
47
+ classStatus: $,
48
+ upcomingSessions: P,
49
+ isDemoDone: s,
50
+ isOnlyOneSessionCompleted: A,
51
+ isMoreThanOneSessionCompleted: h,
52
+ showLoading: R = !1,
53
+ demoId: p,
54
+ isProcessingFailed: X,
55
+ userAttemptId: y
56
+ } = xe(m), { summaryInfo: D, fetchSummaryData: M } = be(m), J = t(() => {
57
+ de(m), M();
58
+ }, [M, m]), O = t(() => {
59
+ f(p);
60
+ }, [p, f]), E = t(() => {
61
+ g(p);
62
+ }, [p, g]), r = ee(
63
+ () => u ? Le : Ce,
64
+ [u]
65
+ ), I = t(
66
+ (Y) => {
67
+ c == null || c(Y, { ...D, userAttemptId: y ?? null });
72
68
  },
73
- [h, k, M]
74
- ), N = t(
75
- () => ({
76
- completedSessions: P,
77
- nextSessionStartTime: D,
78
- teacherName: C,
79
- isTutorNoShow: b,
80
- isStudentNoShow: L,
81
- nextSessionEndTime: $,
82
- studentName: c,
83
- onRescheduleClick: W,
84
- isTrialDone: n,
85
- isOnlyTrialDone: u
86
- }),
87
- [
88
- P,
89
- D,
90
- C,
91
- b,
92
- L,
93
- $,
94
- c,
95
- W,
96
- n,
97
- u
98
- ]
99
- ), _ = t(
100
- () => ({
101
- isTrialDone: n,
102
- studentName: c,
103
- onViewSummary: B
104
- }),
105
- [n, c, B]
106
- ), or = t(
107
- () => /* @__PURE__ */ o(a, { children: [
108
- /* @__PURE__ */ r(mr, {}),
109
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
110
- /* @__PURE__ */ r(cr, { orientation: "horizontal" }),
111
- g && /* @__PURE__ */ o(a, { children: [
112
- /* @__PURE__ */ r(i, { height: e.medium }),
113
- /* @__PURE__ */ r(
114
- hr,
69
+ [c, D, y]
70
+ ), k = u ? "100%" : 200, Q = t(
71
+ () => /* @__PURE__ */ o(n, { children: [
72
+ /* @__PURE__ */ e(oe, {}),
73
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
74
+ /* @__PURE__ */ e(te, { orientation: "horizontal" }),
75
+ d && /* @__PURE__ */ o(n, { children: [
76
+ /* @__PURE__ */ e(a, { height: r.medium }),
77
+ /* @__PURE__ */ e(
78
+ le,
115
79
  {
116
80
  label: "Get Started",
117
81
  renderAs: "yellow-dark",
118
82
  shape: "square",
119
- size: "small",
120
- width: F,
121
- onClick: g
83
+ width: k,
84
+ onClick: d
122
85
  }
123
86
  )
124
87
  ] })
125
88
  ] }),
126
- [e, F, g]
127
- ), j = t(
128
- () => /* @__PURE__ */ r(Cr, { ...N }),
129
- [N]
130
- ), q = t(() => !s || n ? null : /* @__PURE__ */ o(a, { children: [
131
- /* @__PURE__ */ r(i, { height: e.separator.large }),
132
- /* @__PURE__ */ r(Q, { teacherProfile: s })
133
- ] }), [s, n, e.separator.large]), z = t(() => d ? null : /* @__PURE__ */ o(a, { children: [
134
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
135
- /* @__PURE__ */ r(Pr, { ..._ })
136
- ] }), [d, e.separator.extraLarge, _]), G = t(() => E ? /* @__PURE__ */ o(a, { children: [
137
- /* @__PURE__ */ r(i, { height: e.separator.small }),
138
- /* @__PURE__ */ o(a, { $flexDirection: "row", $flexColumnGapX: 0.25, children: [
139
- /* @__PURE__ */ r(U, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE", children: "Not the right fit for your child?" }),
140
- /* @__PURE__ */ r(
141
- pr,
89
+ [r, k, d]
90
+ ), H = t(
91
+ () => /* @__PURE__ */ e(
92
+ ae,
93
+ {
94
+ completedSessions: L,
95
+ nextSessionStartTime: C,
96
+ teacherName: b,
97
+ status: $,
98
+ nextSessionEndTime: T,
99
+ studentName: l,
100
+ onRescheduleClick: O
101
+ }
102
+ ),
103
+ [
104
+ L,
105
+ C,
106
+ b,
107
+ $,
108
+ T,
109
+ l,
110
+ O
111
+ ]
112
+ ), F = t(() => !i || s ? null : /* @__PURE__ */ o(n, { children: [
113
+ /* @__PURE__ */ e(a, { height: r.separator.large }),
114
+ /* @__PURE__ */ e(q, { teacherProfile: i })
115
+ ] }), [i, s, r.separator.large]), W = t(() => h ? null : /* @__PURE__ */ o(n, { children: [
116
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
117
+ /* @__PURE__ */ e(
118
+ ie,
119
+ {
120
+ isDemoDone: s,
121
+ studentName: l,
122
+ onViewSummary: I
123
+ }
124
+ )
125
+ ] }), [
126
+ h,
127
+ r.separator.extraLarge,
128
+ s,
129
+ l,
130
+ I
131
+ ]), w = t(() => S ? /* @__PURE__ */ o(n, { children: [
132
+ /* @__PURE__ */ e(a, { height: r.separator.small }),
133
+ /* @__PURE__ */ o(n, { $flexDirection: "row", $flexColumnGapX: 0.25, children: [
134
+ /* @__PURE__ */ e(G, { $renderAs: "ub1", $renderOnMobileAs: "ub2", $color: "WHITE", children: "Not the right fit for your child?" }),
135
+ /* @__PURE__ */ e(
136
+ me,
142
137
  {
143
138
  color: "WHITE_1",
144
139
  sizeOnMobile: "small",
145
140
  label: "Try another tutor",
146
- onClick: v
141
+ onClick: E
147
142
  }
148
143
  )
149
144
  ] })
150
- ] }) : null, [E, e.separator.small, v]), K = t(() => s ? /* @__PURE__ */ o(a, { children: [
151
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
152
- /* @__PURE__ */ r(U, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Know your tutor" }),
153
- /* @__PURE__ */ r(i, { height: e.separator.medium }),
154
- /* @__PURE__ */ r(Q, { teacherProfile: s }),
155
- G
156
- ] }) : null, [s, e.separator, G]), R = t(() => u ? /* @__PURE__ */ o(a, { children: [
157
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
158
- /* @__PURE__ */ r(Lr, {}),
159
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
160
- /* @__PURE__ */ r(Dr, { sessions: y }),
161
- K
162
- ] }) : null, [u, e.separator.extraLarge, y, K]), X = t(() => n ? /* @__PURE__ */ o(a, { children: [
163
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
164
- /* @__PURE__ */ r(xr, {})
165
- ] }) : null, [n, e.separator.extraLarge]), J = t(() => d ? null : /* @__PURE__ */ o(a, { children: [
166
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
167
- /* @__PURE__ */ r(Er, { children: /* @__PURE__ */ r(Tr, { onSwitchUser: T }) })
168
- ] }), [d, e.separator.extraLarge, T]), ar = t(
169
- () => /* @__PURE__ */ o(a, { children: [
170
- j,
171
- q,
172
- z,
173
- R,
174
- X,
175
- J
145
+ ] }) : null, [S, r.separator.small, E]), B = t(() => i ? /* @__PURE__ */ o(n, { children: [
146
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
147
+ /* @__PURE__ */ e(G, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Know your tutor" }),
148
+ /* @__PURE__ */ e(a, { height: r.separator.medium }),
149
+ /* @__PURE__ */ e(q, { teacherProfile: i }),
150
+ w()
151
+ ] }) : null, [i, r.separator, w]), v = t(() => A ? /* @__PURE__ */ o(n, { children: [
152
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
153
+ /* @__PURE__ */ e(ne, {}),
154
+ /* @__PURE__ */ e(se, { sessions: P }),
155
+ B()
156
+ ] }) : null, [
157
+ A,
158
+ r.separator.extraLarge,
159
+ P,
160
+ B
161
+ ]), _ = t(() => s ? /* @__PURE__ */ o(n, { children: [
162
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
163
+ /* @__PURE__ */ e(fe, {})
164
+ ] }) : null, [s, r.separator.extraLarge]), j = t(() => h ? null : /* @__PURE__ */ o(n, { children: [
165
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
166
+ /* @__PURE__ */ e(Te, { children: /* @__PURE__ */ e(ge, { onSwitchUser: x }) })
167
+ ] }), [h, r.separator.extraLarge, x]), U = t(
168
+ () => /* @__PURE__ */ o(n, { children: [
169
+ H(),
170
+ F(),
171
+ W(),
172
+ v(),
173
+ _(),
174
+ j()
176
175
  ] }),
177
176
  [
178
- j,
179
- q,
180
- z,
181
- R,
182
- X,
183
- J
177
+ H,
178
+ F,
179
+ W,
180
+ v,
181
+ _,
182
+ j
184
183
  ]
185
- ), ir = t(
186
- () => /* @__PURE__ */ o(a, { children: [
187
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge }),
188
- /* @__PURE__ */ r(br, {}),
189
- /* @__PURE__ */ r(i, { height: e.separator.extraLarge })
184
+ ), V = t(
185
+ () => /* @__PURE__ */ o(n, { children: [
186
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge }),
187
+ /* @__PURE__ */ e(Se, {}),
188
+ /* @__PURE__ */ e(a, { height: r.separator.extraLarge })
190
189
  ] }),
191
- [e.separator.extraLarge]
190
+ [r.separator.extraLarge]
192
191
  );
193
- return t(() => I || H || !O || A, [H, I, O, A]) ? /* @__PURE__ */ r(dr, { height: "100dvh" }) : rr ? /* @__PURE__ */ r(a, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ r(ur, { theme: "dark", onTryAgain: tr }) }) : /* @__PURE__ */ o(Or, { children: [
194
- /* @__PURE__ */ r(Sr, { HeaderAvatar: V }),
192
+ return R ? /* @__PURE__ */ e(he, { height: "100dvh" }) : X ? /* @__PURE__ */ e(n, { $flex: 1, $alignItems: "center", $justifyContent: "center", children: /* @__PURE__ */ e(ce, { theme: "dark", onTryAgain: J }) }) : /* @__PURE__ */ o($e, { children: [
193
+ /* @__PURE__ */ e(ue, { HeaderAvatar: z }),
195
194
  /* @__PURE__ */ o(
196
- Hr,
195
+ Pe,
197
196
  {
198
197
  $flex: 1,
199
198
  $width: "100%",
200
199
  $height: "100%",
201
200
  $background: "BLACK_1",
202
- $gap: e.medium,
203
- $gutter: e.small,
201
+ $gap: r.medium,
202
+ $gutter: r.small,
204
203
  children: [
205
- er ? or : ar,
206
- ir
204
+ K ? Q() : U(),
205
+ V()
207
206
  ]
208
207
  }
209
208
  )
@@ -211,6 +210,6 @@ const ne = sr(
211
210
  }
212
211
  );
213
212
  export {
214
- ne as default
213
+ Ye as default
215
214
  };
216
215
  //# sourceMappingURL=parent-dashboard-view.js.map