@cuemath/leap 3.3.37-m → 3.3.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/gif/gif.js +4 -1
- package/dist/assets/gif/gif.js.map +1 -1
- package/dist/assets/illustrations/illustrations.js +1 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/chevron-right.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
- package/dist/features/auth/comps/otp-input/otp-input.js +35 -29
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +13 -3
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +43 -34
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +140 -101
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +20 -16
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js +6 -6
- package/dist/features/circle-games/game-launcher/api/get-content-for-today/get-circle-home-api.js.map +1 -1
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js +20 -21
- package/dist/features/circle-games/game-launcher/dal/use-get-circle-home-details-dal/use-get-circle-home-details-dal.js.map +1 -1
- package/dist/features/circle-games/games/web-view/web-view-types.js.map +1 -1
- package/dist/features/circle-games/sign-up/sign-up.js +6 -6
- package/dist/features/circle-games/sign-up/sign-up.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +17 -17
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js +86 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +1 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +140 -0
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +1 -0
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +400 -0
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/constants.js +28 -15
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/comps/goal-completion-date-selector/goal-completion-date-selector.js +6 -6
- package/dist/features/milestone/create/comps/sheets-list/sheets-list-styled.js +2 -2
- package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js +23 -16
- package/dist/features/milestone/create/comps/test-type-step/test-type-utils.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +13 -7
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +9 -0
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +1 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +20 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +74 -0
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-constants.js +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/next-steps/next-steps.js +5 -5
- package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +1 -0
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +28 -22
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +34 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +137 -0
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +20 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +19 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-status/session-status-styled.js +2 -2
- package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status.js +124 -0
- package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/session-summary-constants.js +18 -12
- package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +54 -0
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/session-summary/summary-card/summary-card-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +72 -0
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions.js +14 -14
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js +1 -1
- package/dist/features/parent-dashboard/hooks/use-fetch-parent-home.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +48 -46
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +21 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +85 -0
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +23 -0
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +55 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +71 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +119 -0
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +1 -0
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +58 -0
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +16 -17
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +4 -8
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +76 -0
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +1 -0
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +45 -4
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js +3 -3
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +197 -174
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/stickers/sticker-selector/sticker-selector.js +57 -58
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +17 -32
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects.js +56 -40
- package/dist/features/stickers/stickers-effects/stickers-effects.js.map +1 -1
- package/dist/features/student-details/class-details/class-details-utils.js +6 -6
- package/dist/features/trial-session/api/teacher-availability.js +9 -0
- package/dist/features/trial-session/api/teacher-availability.js.map +1 -0
- package/dist/features/trial-session/comps/class-preference/class-preference.js +74 -58
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +28 -0
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +1 -0
- package/dist/features/trial-session/comps/learning-plan/index.js +47 -45
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +41 -40
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +59 -57
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +15 -15
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +41 -40
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js +5 -0
- package/dist/features/trial-session/comps/student-feedback/student-feedback-constants.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js +96 -51
- package/dist/features/trial-session/comps/student-feedback/student-feedback.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +70 -63
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +43 -44
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +41 -40
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js +60 -61
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/features/trial-session/helper.js +76 -61
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +49 -0
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +1 -0
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +174 -144
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +99 -110
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +13 -13
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +45 -13
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +31 -31
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/utils/utils.js +1 -1
- package/dist/features/utils/utils.js.map +1 -1
- package/dist/index.d.ts +95 -144
- package/dist/index.js +292 -301
- package/dist/index.js.map +1 -1
- package/dist/static/learning-session-grid-bg-mobile.8d2b7258.gif +0 -0
- package/dist/static/way-forward-grid-bg-mobile.374043d7.gif +0 -0
- package/dist/static/your-goals-grid-bg-mobile.62557024.gif +0 -0
- package/package.json +2 -3
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +0 -12
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +0 -1
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +0 -32
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +0 -1
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js +0 -72
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +0 -1
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js +0 -34
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js.map +0 -1
- package/dist/features/stickers/stickers-effects/constants.js +0 -26
- package/dist/features/stickers/stickers-effects/constants.js.map +0 -1
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js +0 -28
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js.map +0 -1
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js +0 -12
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js.map +0 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js +0 -6
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +0 -29
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +0 -132
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +0 -11
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +0 -19
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +0 -127
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +0 -53
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +0 -56
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +0 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +0 -10
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +0 -9
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +0 -1
- package/dist/node_modules/date-fns/differenceInSeconds.js +0 -11
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +0 -1
- package/dist/static/trophy.a8ea85ef.json +0 -6813
- /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
- /package/dist/features/{trial-session/comps/pla → parent-dashboard/comps}/upcoming-sessions/upcoming-sessions-types.js +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-summary-constants.js","sources":["../../../../../src/features/parent-dashboard/comps/session-summary/session-summary-constants.ts"],"sourcesContent":["import type { ISessionSummary } from './session-summary-types';\n\nimport { GIF } from '../../../../assets/gif/gif';\nimport { ESummaryType } from '../../parent-dashboard-types';\n\nexport const sessionSummaryData: ISessionSummary[] = [\n {\n title: 'introduction & goals',\n description: 'Get to know your tutor and discuss your goals and expectations',\n bgImageSrc: GIF.YOUR_GOALS_GRID_BG,\n bgImageSrcMobile: GIF.YOUR_GOALS_GRID_BG_MOBILE,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'interactive sessions',\n description: 'Watch your child learn concepts and tackle problems with their tutorʼs guidance.',\n bgImageSrc: GIF.LEARNING_SESSION_GRID_BG,\n bgImageSrcMobile: GIF.LEARNING_SESSION_GRID_BG_MOBILE,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'way forward',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n bgImageSrc: GIF.WAY_FORWARD_GRID_BG,\n bgImageSrcMobile: GIF.WAY_FORWARD_GRID_BG_MOBILE,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n },\n];\n\nexport const sessionSummaryAfterDemo: ISessionSummary[] = [\n {\n title: 'created student profile',\n type: ESummaryType.STUDENT_PROFILE,\n bgImageSrc: GIF.YOUR_GOALS_GRID_BG,\n bgImageSrcMobile: GIF.YOUR_GOALS_GRID_BG_MOBILE,\n textBG: 'ORANGE_6',\n ctaLabel: 'View Profile',\n },\n {\n title: 'Shared Learning insights',\n type: ESummaryType.INSIGHTS,\n bgImageSrc: GIF.LEARNING_SESSION_GRID_BG,\n bgImageSrcMobile: GIF.LEARNING_SESSION_GRID_BG_MOBILE,\n textBG: 'YELLOW_6',\n ctaLabel: 'View Insights',\n },\n {\n title: 'Created learning plan',\n description: 'Get insights on your child’s learning and plan the journey ahead',\n bgImageSrc: GIF.WAY_FORWARD_GRID_BG,\n bgImageSrcMobile: GIF.WAY_FORWARD_GRID_BG_MOBILE,\n textBG: 'GREEN_6',\n ctaLabel: 'View Learning Plan',\n type: ESummaryType.LEARNING_PLAN,\n },\n];\n"],"names":["sessionSummaryData","GIF","sessionSummaryAfterDemo","ESummaryType"],"mappings":";;AAKO,MAAMA,IAAwC;AAAA,EACnD;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAYC,EAAI;AAAA,IAChB,kBAAkBA,EAAI;AAAA,IACtB,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAYA,EAAI;AAAA,IAChB,kBAAkBA,EAAI;AAAA,IACtB,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAYA,EAAI;AAAA,IAChB,kBAAkBA,EAAI;AAAA,IACtB,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AACF,GAEaC,IAA6C;AAAA,EACxD;AAAA,IACE,OAAO;AAAA,IACP,MAAMC,EAAa;AAAA,IACnB,YAAYF,EAAI;AAAA,IAChB,kBAAkBA,EAAI;AAAA,IACtB,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,MAAME,EAAa;AAAA,IACnB,YAAYF,EAAI;AAAA,IAChB,kBAAkBA,EAAI;AAAA,IACtB,QAAQ;AAAA,IACR,UAAU;AAAA,EACZ;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,YAAYA,EAAI;AAAA,IAChB,kBAAkBA,EAAI;AAAA,IACtB,QAAQ;AAAA,IACR,UAAU;AAAA,IACV,MAAME,EAAa;AAAA,EACrB;AACF;"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsxs as b, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as $, useCallback as a } from "react";
|
|
3
|
+
import { useTheme as x } from "styled-components";
|
|
4
|
+
import c from "../../../ui/layout/flex-view.js";
|
|
5
|
+
import S from "../../../ui/separator/separator.js";
|
|
6
|
+
import v from "../../../ui/text/text.js";
|
|
7
|
+
import { EDeviceType as E } from "../../../ui/theme/constants.js";
|
|
8
|
+
import { ESummaryType as n } from "../../parent-dashboard-types.js";
|
|
9
|
+
import { sessionSummaryAfterDemo as T, sessionSummaryData as I } from "./session-summary-constants.js";
|
|
10
|
+
import A from "./summary-card/summary-card.js";
|
|
11
|
+
const N = $(({ isTrialDone: i, studentName: r, onViewSummary: o }) => {
|
|
12
|
+
const m = x().device <= E.MOBILE, l = a(
|
|
13
|
+
(e) => {
|
|
14
|
+
if (!e) return "";
|
|
15
|
+
if (e === n.STUDENT_PROFILE)
|
|
16
|
+
return `We understood your goals and expectations to create ${r}'s profile.`;
|
|
17
|
+
if (e === n.INSIGHTS)
|
|
18
|
+
return `With tutor’s guidance ${r} solved problems, helping us assess their math proficiency.`;
|
|
19
|
+
if (e === n.LEARNING_PLAN)
|
|
20
|
+
return `The plan will keep evolving based on ${r}'s progress and evolving needs.`;
|
|
21
|
+
},
|
|
22
|
+
[r]
|
|
23
|
+
), p = a(
|
|
24
|
+
(e) => {
|
|
25
|
+
o == null || o(e);
|
|
26
|
+
},
|
|
27
|
+
[o]
|
|
28
|
+
);
|
|
29
|
+
return /* @__PURE__ */ b(c, { children: [
|
|
30
|
+
/* @__PURE__ */ s(v, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: i ? "What happened in today’s session" : "What happens in the first session?" }),
|
|
31
|
+
/* @__PURE__ */ s(S, { height: m ? 16 : 20 }),
|
|
32
|
+
/* @__PURE__ */ s(c, { $flexGapX: 1, $justifyContent: "center", $flexDirection: m ? "column" : "row", children: (i ? T : I).map(
|
|
33
|
+
({ title: e, description: f, bgImageSrc: h, textBG: d, ctaLabel: u, type: t, bgImageSrcMobile: g }) => /* @__PURE__ */ s(
|
|
34
|
+
A,
|
|
35
|
+
{
|
|
36
|
+
title: e,
|
|
37
|
+
description: t && l(t) || f,
|
|
38
|
+
imageSrc: h,
|
|
39
|
+
imageSrcMobile: g,
|
|
40
|
+
textBG: d,
|
|
41
|
+
ctaLabel: u,
|
|
42
|
+
type: t,
|
|
43
|
+
isTrialDone: i,
|
|
44
|
+
onClick: p
|
|
45
|
+
},
|
|
46
|
+
e
|
|
47
|
+
)
|
|
48
|
+
) })
|
|
49
|
+
] });
|
|
50
|
+
});
|
|
51
|
+
export {
|
|
52
|
+
N as default
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=session-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session-summary.js","sources":["../../../../../src/features/parent-dashboard/comps/session-summary/session-summary.tsx"],"sourcesContent":["import type { ISessionSummaryProps } from './session-summary-types';\n\nimport { memo, useCallback } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { ESummaryType } from '../../parent-dashboard-types';\nimport { sessionSummaryAfterDemo, sessionSummaryData } from './session-summary-constants';\nimport SessionSummaryCard from './summary-card/summary-card';\n\nconst SessionSummary = memo(({ isTrialDone, studentName, onViewSummary }: ISessionSummaryProps) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n const getDescription = useCallback(\n (type?: ESummaryType) => {\n if (!type) return '';\n\n if (type === ESummaryType.STUDENT_PROFILE) {\n return `We understood your goals and expectations to create ${studentName}'s profile.`;\n }\n\n if (type === ESummaryType.INSIGHTS) {\n return `With tutor’s guidance ${studentName} solved problems, helping us assess their math proficiency.`;\n }\n\n if (type === ESummaryType.LEARNING_PLAN) {\n return `The plan will keep evolving based on ${studentName}'s progress and evolving needs.`;\n }\n },\n [studentName],\n );\n\n const handleClick = useCallback(\n (key: ESummaryType) => {\n onViewSummary?.(key);\n },\n [onViewSummary],\n );\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {isTrialDone ? `What happened in today’s session` : `What happens in the first session?`}\n </Text>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $flexGapX={1} $justifyContent=\"center\" $flexDirection={isMobile ? 'column' : 'row'}>\n {(isTrialDone ? sessionSummaryAfterDemo : sessionSummaryData).map(\n ({ title, description, bgImageSrc, textBG, ctaLabel, type, bgImageSrcMobile }) => (\n <SessionSummaryCard\n key={title}\n title={title}\n description={(type && getDescription(type)) || (description as string)}\n imageSrc={bgImageSrc}\n imageSrcMobile={bgImageSrcMobile}\n textBG={textBG}\n ctaLabel={ctaLabel}\n type={type}\n isTrialDone={isTrialDone}\n onClick={handleClick}\n />\n ),\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default SessionSummary;\n"],"names":["SessionSummary","memo","isTrialDone","studentName","onViewSummary","isMobile","useTheme","EDeviceType","getDescription","useCallback","type","ESummaryType","handleClick","key","FlexView","jsx","Text","Separator","sessionSummaryAfterDemo","sessionSummaryData","title","description","bgImageSrc","textBG","ctaLabel","bgImageSrcMobile","SessionSummaryCard"],"mappings":";;;;;;;;;;AAaA,MAAMA,IAAiBC,EAAK,CAAC,EAAE,aAAAC,GAAa,aAAAC,GAAa,eAAAC,QAA0C;AAE3F,QAAAC,IADQC,IACS,UAAUC,EAAY,QAEvCC,IAAiBC;AAAA,IACrB,CAACC,MAAwB;AACnB,UAAA,CAACA,EAAa,QAAA;AAEd,UAAAA,MAASC,EAAa;AACxB,eAAO,uDAAuDR,CAAW;AAGvE,UAAAO,MAASC,EAAa;AACxB,eAAO,yBAAyBR,CAAW;AAGzC,UAAAO,MAASC,EAAa;AACxB,eAAO,wCAAwCR,CAAW;AAAA,IAE9D;AAAA,IACA,CAACA,CAAW;AAAA,EAAA,GAGRS,IAAcH;AAAA,IAClB,CAACI,MAAsB;AACrB,MAAAT,KAAA,QAAAA,EAAgBS;AAAA,IAClB;AAAA,IACA,CAACT,CAAa;AAAA,EAAA;AAGhB,2BACGU,GACC,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAAC,GAAA,EAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAC5D,UAAcd,IAAA,qCAAqC,sCACtD;AAAA,IACC,gBAAAa,EAAAE,GAAA,EAAU,QAAQZ,IAAW,KAAK,IAAI;AAAA,IACtC,gBAAAU,EAAAD,GAAA,EAAS,WAAW,GAAG,iBAAgB,UAAS,gBAAgBT,IAAW,WAAW,OACnF,WAAcH,IAAAgB,IAA0BC,GAAoB;AAAA,MAC5D,CAAC,EAAE,OAAAC,GAAO,aAAAC,GAAa,YAAAC,GAAY,QAAAC,GAAQ,UAAAC,GAAU,MAAAd,GAAM,kBAAAe,EAAA,MACzD,gBAAAV;AAAA,QAACW;AAAA,QAAA;AAAA,UAEC,OAAAN;AAAA,UACA,aAAcV,KAAQF,EAAeE,CAAI,KAAOW;AAAA,UAChD,UAAUC;AAAA,UACV,gBAAgBG;AAAA,UAChB,QAAAF;AAAA,UACA,UAAAC;AAAA,UACA,MAAAd;AAAA,UACA,aAAAR;AAAA,UACA,SAASU;AAAA,QAAA;AAAA,QATJQ;AAAA,MAUP;AAAA,IAAA,GAGN;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-card-styled.js","sources":["../../../../../../src/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../../ui/layout/flex-view';\n\nconst ImageWrapper = styled(FlexView)(({ theme }) => {\n const { gutter } = theme.layout;\n const { WHITE_4 } = theme.colors;\n\n return `\n margin: 0;\n padding: 0;\n background-image: linear-gradient(${WHITE_4} 1px, transparent 1px),\n linear-gradient(90deg, ${WHITE_4} 1px, transparent 1px);\n background-size: ${gutter * 3.125}px ${gutter * 3.125}px;\n position: relative;\n `;\n});\n\nexport { ImageWrapper };\n"],"names":["ImageWrapper","styled","FlexView","theme","gutter","WHITE_4"],"mappings":";;AAIA,MAAMA,IAAeC,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAC,QAAY;AAC7C,QAAA,EAAE,QAAAC,EAAO,IAAID,EAAM,QACnB,EAAE,SAAAE,EAAQ,IAAIF,EAAM;AAEnB,SAAA;AAAA;AAAA;AAAA,wCAG+BE,CAAO;AAAA,+BAChBA,CAAO;AAAA,uBACfD,IAAS,KAAK,MAAMA,IAAS,KAAK;AAAA;AAAA;AAGzD,CAAC;"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as I, useMemo as m, useCallback as k } from "react";
|
|
3
|
+
import { useTheme as w } from "styled-components";
|
|
4
|
+
import T from "../../../../../assets/line-icons/icons/chevron-right.js";
|
|
5
|
+
import E from "../../../../ui/buttons/clickable/clickable.js";
|
|
6
|
+
import x from "../../../../ui/image/image.js";
|
|
7
|
+
import c from "../../../../ui/layout/flex-view.js";
|
|
8
|
+
import A from "../../../../ui/separator/separator.js";
|
|
9
|
+
import d from "../../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as W } from "../../../../ui/theme/constants.js";
|
|
11
|
+
import { ImageWrapper as v } from "./summary-card-styled.js";
|
|
12
|
+
const H = I(
|
|
13
|
+
({
|
|
14
|
+
title: a,
|
|
15
|
+
description: s,
|
|
16
|
+
imageSrc: t,
|
|
17
|
+
imageSrcMobile: h,
|
|
18
|
+
textBG: o,
|
|
19
|
+
ctaLabel: $,
|
|
20
|
+
type: e,
|
|
21
|
+
isTrialDone: f,
|
|
22
|
+
onClick: i
|
|
23
|
+
}) => {
|
|
24
|
+
const u = w(), l = m(() => u.device <= W.MOBILE, [u.device]), p = m(() => f && e && i, [f, e, i]), g = k(() => {
|
|
25
|
+
e && i && i(e);
|
|
26
|
+
}, [e, i]), b = m(
|
|
27
|
+
() => /* @__PURE__ */ n(c, { $flex: 1, children: [
|
|
28
|
+
/* @__PURE__ */ r(v, { $height: 84, $width: "100%", $background: o, children: /* @__PURE__ */ r(
|
|
29
|
+
x,
|
|
30
|
+
{
|
|
31
|
+
src: l ? h : t,
|
|
32
|
+
height: 84,
|
|
33
|
+
width: "100%",
|
|
34
|
+
withLoader: !1
|
|
35
|
+
}
|
|
36
|
+
) }),
|
|
37
|
+
/* @__PURE__ */ n(c, { $gap: 12, $gutter: 16, $background: o, $flex: 1, children: [
|
|
38
|
+
/* @__PURE__ */ r(d, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "WHITE", children: a }),
|
|
39
|
+
/* @__PURE__ */ r(A, { height: l ? 8 : 12 }),
|
|
40
|
+
/* @__PURE__ */ r(d, { $renderAs: "ub3", $color: "WHITE", children: s })
|
|
41
|
+
] })
|
|
42
|
+
] }, a),
|
|
43
|
+
[a, o, l, h, t, s]
|
|
44
|
+
), C = m(
|
|
45
|
+
() => /* @__PURE__ */ r(E, { label: e || "", onClick: g, children: /* @__PURE__ */ r(c, { $background: o, children: /* @__PURE__ */ n(
|
|
46
|
+
c,
|
|
47
|
+
{
|
|
48
|
+
$background: "BLACK_T_38",
|
|
49
|
+
$gapX: 0.5,
|
|
50
|
+
$gutterX: 0.5,
|
|
51
|
+
$flexDirection: "row",
|
|
52
|
+
$alignItems: "center",
|
|
53
|
+
$justifyContent: "space-between",
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ r(d, { $renderAs: "ac4", $color: "WHITE_1", children: $ }),
|
|
56
|
+
/* @__PURE__ */ r(T, { width: 24, height: 24, color: "WHITE" })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
) }) }),
|
|
60
|
+
[e, $, o, g]
|
|
61
|
+
);
|
|
62
|
+
return p ? /* @__PURE__ */ n(c, { $flex: 1, children: [
|
|
63
|
+
b,
|
|
64
|
+
C
|
|
65
|
+
] }) : b;
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
H.displayName = "SessionSummaryCard";
|
|
69
|
+
export {
|
|
70
|
+
H as default
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=summary-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"summary-card.js","sources":["../../../../../../src/features/parent-dashboard/comps/session-summary/summary-card/summary-card.tsx"],"sourcesContent":["import type { ISessionSummaryCardProps } from './summary-card-types';\n\nimport { memo, useCallback, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport ChevronRightIcon from '../../../../../assets/line-icons/icons/chevron-right';\nimport Clickable from '../../../../ui/buttons/clickable/clickable';\nimport Image from '../../../../ui/image/image';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Separator from '../../../../ui/separator/separator';\nimport Text from '../../../../ui/text/text';\nimport { EDeviceType } from '../../../../ui/theme/constants';\nimport * as Styled from './summary-card-styled';\n\nconst SessionSummaryCard = memo(\n ({\n title,\n description,\n imageSrc,\n imageSrcMobile,\n textBG,\n ctaLabel,\n type,\n isTrialDone,\n onClick,\n }: ISessionSummaryCardProps) => {\n const theme = useTheme();\n const isMobile = useMemo(() => theme.device <= EDeviceType.MOBILE, [theme.device]);\n const isClickable = useMemo(() => isTrialDone && type && onClick, [isTrialDone, type, onClick]);\n\n const handleClick = useCallback(() => {\n if (type && onClick) onClick(type);\n }, [type, onClick]);\n\n const CardContent = useMemo(\n () => (\n <FlexView key={title} $flex={1}>\n <Styled.ImageWrapper $height={84} $width=\"100%\" $background={textBG}>\n <Image\n src={isMobile ? imageSrcMobile : imageSrc}\n height={84}\n width=\"100%\"\n withLoader={false}\n />\n </Styled.ImageWrapper>\n <FlexView $gap={12} $gutter={16} $background={textBG} $flex={1}>\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color=\"WHITE\">\n {title}\n </Text>\n <Separator height={isMobile ? 8 : 12} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </FlexView>\n </FlexView>\n ),\n [title, textBG, isMobile, imageSrcMobile, imageSrc, description],\n );\n\n const ClickableButton = useMemo(\n () => (\n <Clickable label={type || ''} onClick={handleClick}>\n <FlexView $background={textBG}>\n <FlexView\n $background=\"BLACK_T_38\"\n $gapX={0.5}\n $gutterX={0.5}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n {ctaLabel}\n </Text>\n <ChevronRightIcon width={24} height={24} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n </Clickable>\n ),\n [type, ctaLabel, textBG, handleClick],\n );\n\n return isClickable ? (\n <FlexView $flex={1}>\n {CardContent}\n {ClickableButton}\n </FlexView>\n ) : (\n CardContent\n );\n },\n);\n\nSessionSummaryCard.displayName = 'SessionSummaryCard';\n\nexport default SessionSummaryCard;\n"],"names":["SessionSummaryCard","memo","title","description","imageSrc","imageSrcMobile","textBG","ctaLabel","type","isTrialDone","onClick","theme","useTheme","isMobile","useMemo","EDeviceType","isClickable","handleClick","useCallback","CardContent","jsxs","FlexView","jsx","Styled.ImageWrapper","Image","Text","Separator","ClickableButton","Clickable","ChevronRightIcon"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAqBC;AAAA,EACzB,CAAC;AAAA,IACC,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,MAC8B;AAC9B,UAAMC,IAAQC,KACRC,IAAWC,EAAQ,MAAMH,EAAM,UAAUI,EAAY,QAAQ,CAACJ,EAAM,MAAM,CAAC,GAC3EK,IAAcF,EAAQ,MAAML,KAAeD,KAAQE,GAAS,CAACD,GAAaD,GAAME,CAAO,CAAC,GAExFO,IAAcC,EAAY,MAAM;AAChC,MAAAV,KAAQE,KAASA,EAAQF,CAAI;AAAA,IAAA,GAChC,CAACA,GAAME,CAAO,CAAC,GAEZS,IAAcL;AAAA,MAClB,MACE,gBAAAM,EAACC,GAAqB,EAAA,OAAO,GAC3B,UAAA;AAAA,QAAC,gBAAAC,EAAAC,GAAA,EAAoB,SAAS,IAAI,QAAO,QAAO,aAAajB,GAC3D,UAAA,gBAAAgB;AAAA,UAACE;AAAA,UAAA;AAAA,YACC,KAAKX,IAAWR,IAAiBD;AAAA,YACjC,QAAQ;AAAA,YACR,OAAM;AAAA,YACN,YAAY;AAAA,UAAA;AAAA,QAAA,GAEhB;AAAA,QACA,gBAAAgB,EAACC,KAAS,MAAM,IAAI,SAAS,IAAI,aAAaf,GAAQ,OAAO,GAC3D,UAAA;AAAA,UAAA,gBAAAgB,EAACG,KAAK,WAAU,aAAY,mBAAkB,aAAY,QAAO,SAC9D,UACHvB,EAAA,CAAA;AAAA,UACC,gBAAAoB,EAAAI,GAAA,EAAU,QAAQb,IAAW,IAAI,IAAI;AAAA,4BACrCY,GAAK,EAAA,WAAU,OAAM,QAAO,SAC1B,UACHtB,GAAA;AAAA,QAAA,GACF;AAAA,MAAA,EAAA,GAjBaD,CAkBf;AAAA,MAEF,CAACA,GAAOI,GAAQO,GAAUR,GAAgBD,GAAUD,CAAW;AAAA,IAAA,GAG3DwB,IAAkBb;AAAA,MACtB,MACG,gBAAAQ,EAAAM,GAAA,EAAU,OAAOpB,KAAQ,IAAI,SAASS,GACrC,UAAA,gBAAAK,EAACD,GAAS,EAAA,aAAaf,GACrB,UAAA,gBAAAc;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,aAAY;AAAA,UACZ,OAAO;AAAA,UACP,UAAU;AAAA,UACV,gBAAe;AAAA,UACf,aAAY;AAAA,UACZ,iBAAgB;AAAA,UAEhB,UAAA;AAAA,YAAA,gBAAAC,EAACG,GAAK,EAAA,WAAU,OAAM,QAAO,WAC1B,UACHlB,GAAA;AAAA,8BACCsB,GAAiB,EAAA,OAAO,IAAI,QAAQ,IAAI,OAAM,SAAQ;AAAA,UAAA;AAAA,QAAA;AAAA,SAE3D,EACF,CAAA;AAAA,MAEF,CAACrB,GAAMD,GAAUD,GAAQW,CAAW;AAAA,IAAA;AAGtC,WAAOD,IACL,gBAAAI,EAACC,GAAS,EAAA,OAAO,GACd,UAAA;AAAA,MAAAF;AAAA,MACAQ;AAAA,IAAA,EACH,CAAA,IAEAR;AAAA,EAEJ;AACF;AAEAnB,EAAmB,cAAc;"}
|
package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-constants.js","sources":["../../../../../src/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.ts"],"sourcesContent":["export const DAYS_TO_SHOW = 7;\n"],"names":["DAYS_TO_SHOW"],"mappings":"AAAO,MAAMA,IAAe;"}
|
package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-styled.js","sources":["../../../../../src/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst SessionRow = styled(FlexView)`\n border-bottom: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n min-height: 52px;\n`;\n\nconst DayLabel = styled(FlexView)`\n border-right: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n`;\nconst DateWrapper = styled(FlexView)`\n padding-bottom: 0;\n min-width: 22px;\n`;\n\nexport { SessionRow, DayLabel, DateWrapper };\n"],"names":["SessionRow","styled","FlexView","theme","DayLabel","DateWrapper"],"mappings":";;AAIM,MAAAA,IAAaC,EAAOC,CAAQ;AAAA,mBACf,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA,GAI/DC,IAAWH,EAAOC,CAAQ;AAAA,kBACd,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAE9DE,IAAcJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions-types.js","sources":["../../../../../src/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.ts"],"sourcesContent":["export enum ESessionStatus {\n COMPLETED = 'COMPLETED',\n IN_FUTURE = 'IN FUTURE',\n}\n\nexport type TSession = {\n session_start: number;\n session_end: number;\n session_status: ESessionStatus;\n};\n\nexport interface IUpcomingSessionsProps {\n sessions?: TSession[];\n}\n"],"names":["ESessionStatus"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,YAAY,aAFFA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as C, useMemo as a, useCallback as A } from "react";
|
|
3
3
|
import { useTheme as w } from "styled-components";
|
|
4
|
-
import y from "
|
|
5
|
-
import { CUEMATH_APP_URL as x } from "
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import {
|
|
4
|
+
import y from "../../../../assets/line-icons/icons/check2.js";
|
|
5
|
+
import { CUEMATH_APP_URL as x } from "../../../../constants/config.js";
|
|
6
|
+
import D from "../../../ui/buttons/text-button/text-button.js";
|
|
7
|
+
import n from "../../../ui/layout/flex-view.js";
|
|
8
|
+
import p from "../../../ui/separator/separator.js";
|
|
9
|
+
import i from "../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as M } from "../../../ui/theme/constants.js";
|
|
11
|
+
import { MOBILE_SPACING as S, DESKTOP_SPACING as H } from "../../parent-dashboard-constants.js";
|
|
12
12
|
import { DAYS_TO_SHOW as W } from "./upcoming-sessions-constants.js";
|
|
13
13
|
import { SessionRow as L, DayLabel as B, DateWrapper as O } from "./upcoming-sessions-styled.js";
|
|
14
14
|
import { ESessionStatus as T } from "./upcoming-sessions-types.js";
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
15
|
+
import { formatDate as l } from "../../../../node_modules/date-fns/format.js";
|
|
16
|
+
import { addDays as U } from "../../../../node_modules/date-fns/addDays.js";
|
|
17
|
+
import { isToday as k } from "../../../../node_modules/date-fns/isToday.js";
|
|
18
18
|
const P = ({ sessions: c = [] }) => {
|
|
19
|
-
const $ = w(), m = $.device <=
|
|
19
|
+
const $ = w(), m = $.device <= M.MOBILE, f = a(() => /* @__PURE__ */ new Date(), []), g = a(
|
|
20
20
|
() => new Map(
|
|
21
21
|
c.map((o) => [
|
|
22
22
|
l(new Date(o.session_start * 1e3), "yyyy-MM-dd"),
|
|
@@ -28,7 +28,7 @@ const P = ({ sessions: c = [] }) => {
|
|
|
28
28
|
() => Array.from({ length: W }, (o, s) => U(f, s)),
|
|
29
29
|
[f]
|
|
30
30
|
), u = a(
|
|
31
|
-
() => m ?
|
|
31
|
+
() => m ? S : H,
|
|
32
32
|
[m]
|
|
33
33
|
), E = A(() => {
|
|
34
34
|
window.open(x, "_blank");
|
|
@@ -40,7 +40,7 @@ const P = ({ sessions: c = [] }) => {
|
|
|
40
40
|
/* @__PURE__ */ e(p, { height: 4 }),
|
|
41
41
|
/* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexColumnGapX: 0.25, children: [
|
|
42
42
|
/* @__PURE__ */ e(i, { $renderAs: "ub1", $color: "WHITE_T_60", children: "For more details," }),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
43
|
+
/* @__PURE__ */ e(D, { label: "download the Cuemath app", onClick: E, color: "WHITE" })
|
|
44
44
|
] })
|
|
45
45
|
] }),
|
|
46
46
|
/* @__PURE__ */ e(p, { height: m ? 16 : 20 }),
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"upcoming-sessions.js","sources":["../../../../../src/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.tsx"],"sourcesContent":["import type { TColorNames } from '../../../ui/types';\nimport type { ISpacingConfig } from '../../parent-dashboard-types';\n\nimport { format, isToday, addDays } from 'date-fns';\nimport React, { useCallback, memo, useMemo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport { CUEMATH_APP_URL } from '../../../../constants/config';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { DESKTOP_SPACING, MOBILE_SPACING } from '../../parent-dashboard-constants';\nimport { DAYS_TO_SHOW } from './upcoming-sessions-constants';\nimport * as Styled from './upcoming-sessions-styled';\nimport { ESessionStatus, type IUpcomingSessionsProps } from './upcoming-sessions-types';\n\nconst UpcomingSessions: React.FC<IUpcomingSessionsProps> = ({ sessions = [] }) => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n const today = useMemo(() => new Date(), []);\n const sessionsMap = useMemo(\n () =>\n new Map(\n sessions.map(session => [\n format(new Date(session.session_start * 1000), 'yyyy-MM-dd'),\n session,\n ]),\n ),\n [sessions],\n );\n\n const days = useMemo(\n () => Array.from({ length: DAYS_TO_SHOW }, (_, i) => addDays(today, i)),\n [today],\n );\n\n const spacing: ISpacingConfig = useMemo(\n () => (isMobile ? MOBILE_SPACING : DESKTOP_SPACING),\n [isMobile],\n );\n\n const handleOpenApp = useCallback(() => {\n window.open(CUEMATH_APP_URL, '_blank');\n }, []);\n\n if (sessions.length === 0) return null;\n\n return (\n <FlexView>\n <Separator height={spacing.separator.extraLarge} />\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Upcoming sessions\n </Text>\n <Separator height={4} />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexColumnGapX={0.25}>\n <Text $renderAs=\"ub1\" $color=\"WHITE_T_60\">\n For more details,\n </Text>\n <TextButton label=\"download the Cuemath app\" onClick={handleOpenApp} color=\"WHITE\" />\n </FlexView>\n </FlexView>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $borderColor=\"BLACK_5\">\n {days.map(day => {\n const dateKey = format(day, 'yyyy-MM-dd');\n const session = sessionsMap.get(dateKey);\n const isTodayFlag = isToday(day);\n const isSessionCompleted = session?.session_status === ESessionStatus.COMPLETED;\n const defaultTimecellBg =\n session?.session_status === ESessionStatus.IN_FUTURE ? 'GREEN_6' : 'BLACK_1';\n const timeCellBg = isSessionCompleted ? 'WHITE_T_10' : defaultTimecellBg;\n\n return (\n <Styled.SessionRow key={dateKey} $flex={1} $flexDirection=\"row\">\n <Styled.DayLabel\n $width={80}\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $flexColumnGapX={0.25}\n $gutterX={1}\n $gapX={0.5}\n >\n <Text $renderAs=\"ac4-black\" $color=\"WHITE_1\">\n {format(day, 'EEE').toUpperCase()}\n </Text>\n <Styled.DateWrapper\n $background={isTodayFlag ? 'WHITE' : 'TRANSPARENT'}\n $width={22}\n $height={22}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadius={11}\n $gutter={1}\n $gap={2}\n >\n <Text $renderAs=\"ab3-bold\" $color={isTodayFlag ? 'BLACK_1' : 'WHITE_1'}>\n {format(day, 'd')}\n </Text>\n </Styled.DateWrapper>\n </Styled.DayLabel>\n <FlexView\n $flex={1}\n $gutterX={1}\n $gap={14}\n $background={timeCellBg as TColorNames}\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n >\n {session ? (\n <Text $renderAs=\"ab2\" $color={isSessionCompleted ? 'WHITE_T_38' : 'WHITE'}>\n {format(new Date(session.session_start * 1000), 'p')}\n </Text>\n ) : null}\n {isSessionCompleted && <Check2Icon color={theme.colors.WHITE_T_38} />}\n </FlexView>\n </Styled.SessionRow>\n );\n })}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(UpcomingSessions);\n"],"names":["UpcomingSessions","sessions","theme","useTheme","isMobile","EDeviceType","today","useMemo","sessionsMap","session","format","days","DAYS_TO_SHOW","_","i","addDays","spacing","MOBILE_SPACING","DESKTOP_SPACING","handleOpenApp","useCallback","CUEMATH_APP_URL","FlexView","jsx","Separator","Text","TextButton","day","dateKey","isTodayFlag","isToday","isSessionCompleted","ESessionStatus","defaultTimecellBg","timeCellBg","Styled.SessionRow","jsxs","Styled.DayLabel","Styled.DateWrapper","Check2Icon","UpcomingSessions$1","memo"],"mappings":"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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-fetch-parent-home.js","sources":["../../../../src/features/parent-dashboard/hooks/use-fetch-parent-home.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\n\n/**\n * This hook is intended only for **triggering** the Parent Home API\n * if it's needed outside the Parent Router.\n * This hook is being called at the level of the Parent Dashboard: <ParentRoutesWrapper />\n * To **consume** the parent home data elsewhere in the app,\n * use the `useParentHomeData()` hook instead.\n */\n\nconst useFetchParentHome = (studentId: string) => {\n const {\n get: getParentHome,\n data,\n isStale,\n isProcessing,\n isProcessingFailed,\n } = useParentHomeGet(studentId);\n\n const fetchData = useCallback(() => {\n studentId && getParentHome(studentId);\n }, [getParentHome, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n if (isStale) {\n fetchData();\n }\n }, [fetchData, isStale]);\n\n const result = useMemo(\n () => ({\n isLoading: isProcessing
|
|
1
|
+
{"version":3,"file":"use-fetch-parent-home.js","sources":["../../../../src/features/parent-dashboard/hooks/use-fetch-parent-home.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\n\n/**\n * This hook is intended only for **triggering** the Parent Home API\n * if it's needed outside the Parent Router.\n * This hook is being called at the level of the Parent Dashboard: <ParentRoutesWrapper />\n * To **consume** the parent home data elsewhere in the app,\n * use the `useParentHomeData()` hook instead.\n */\n\nconst useFetchParentHome = (studentId: string) => {\n const {\n get: getParentHome,\n data,\n isStale,\n isProcessing,\n isProcessingFailed,\n } = useParentHomeGet(studentId);\n\n const fetchData = useCallback(() => {\n studentId && getParentHome(studentId);\n }, [getParentHome, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n if (isStale) {\n fetchData();\n }\n }, [fetchData, isStale]);\n\n const result = useMemo(\n () => ({\n isLoading: isProcessing && !data,\n isProcessingFailed,\n }),\n [isProcessing, data, isProcessingFailed],\n );\n\n return result;\n};\n\nexport default useFetchParentHome;\n"],"names":["useFetchParentHome","studentId","getParentHome","data","isStale","isProcessing","isProcessingFailed","useParentHomeGet","fetchData","useCallback","useEffect","useMemo","useFetchParentHome$1"],"mappings":";;AAYA,MAAMA,IAAqB,CAACC,MAAsB;AAC1C,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAAC;AAAA,IACA,SAAAC;AAAA,IACA,cAAAC;AAAA,IACA,oBAAAC;AAAA,EAAA,IACEC,EAAiBN,CAAS,GAExBO,IAAYC,EAAY,MAAM;AAClC,IAAAR,KAAaC,EAAcD,CAAS;AAAA,EAAA,GACnC,CAACC,GAAeD,CAAS,CAAC;AAE7B,SAAAS,EAAU,MAAM;AACJ,IAAAF;EAAA,GACT,CAACA,CAAS,CAAC,GAEdE,EAAU,MAAM;AACd,IAAIN,KACQI;EACZ,GACC,CAACA,GAAWJ,CAAO,CAAC,GAERO;AAAA,IACb,OAAO;AAAA,MACL,WAAWN,KAAgB,CAACF;AAAA,MAC5B,oBAAAG;AAAA,IAAA;AAAA,IAEF,CAACD,GAAcF,GAAMG,CAAkB;AAAA,EAAA;AAI3C,GAEAM,IAAeZ;"}
|
|
@@ -1,54 +1,56 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useParentHomeGet as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
if (!s)
|
|
1
|
+
import { useMemo as P } from "react";
|
|
2
|
+
import { useParentHomeGet as R } from "../api/parent-home.js";
|
|
3
|
+
import { DEFAULT_LOADING_STATE as f, SUBSCRIPTION_CANCELLED_STATES as g, TRIAL_COMPLETED_STATES as M, PLA_INTRO_ELIGIBLE_STATES as h } from "../parent-dashboard-constants.js";
|
|
4
|
+
import { EPLAState as e } from "../parent-dashboard-types.js";
|
|
5
|
+
const G = (_) => {
|
|
6
|
+
const { data: t, isProcessingFailed: o } = R(_);
|
|
7
|
+
return P(() => {
|
|
8
|
+
if (!(t != null && t.pla_state))
|
|
10
9
|
return {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
isOnlyOneSessionCompleted: !1,
|
|
14
|
-
isMoreThanOneSessionCompleted: !1,
|
|
15
|
-
isDemoDone: !1,
|
|
16
|
-
isSubscriptionCancelled: !1,
|
|
17
|
-
completedSessions: 0,
|
|
18
|
-
nextSessionEnd: 0,
|
|
19
|
-
nextSessionStart: 0,
|
|
20
|
-
upcomingSessions: [],
|
|
21
|
-
showLoading: !0,
|
|
22
|
-
isProcessingFailed: n
|
|
10
|
+
...f,
|
|
11
|
+
isProcessingFailed: o
|
|
23
12
|
};
|
|
24
13
|
const {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
14
|
+
teacher_details: n,
|
|
15
|
+
session_details: i,
|
|
16
|
+
billing_details: l,
|
|
17
|
+
pla_state: s
|
|
18
|
+
} = t, {
|
|
19
|
+
completed_sessions: r = 0,
|
|
20
|
+
next_session_end: c = 0,
|
|
21
|
+
next_session_start: d = 0,
|
|
22
|
+
upcoming_sessions: T = [],
|
|
23
|
+
student_demo_id: E = null,
|
|
24
|
+
user_attempt_id: m = null
|
|
25
|
+
} = i ?? {}, S = n ? `${n.first_name || ""} ${n.last_name || ""}`.trim() : "", L = s === e.TRIAL_COMPLETED_CARD_DECLINED, u = s === e.NO_CARD_ON_FILE, A = g.includes(s), D = s === e.TRIAL_TUTOR_NO_SHOW, C = s === e.TRIAL_STUDENT_NO_SHOW, a = M.includes(s), I = a && s !== e.REGULAR_CLASS_COMPLETED, N = s === e.REGULAR_CLASS_COMPLETED, O = s === e.TRIAL_COMPLETED_PAYMENT_PENDING, p = h.includes(s);
|
|
33
26
|
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
27
|
+
plaState: s,
|
|
28
|
+
sessionDetails: i,
|
|
29
|
+
teacherDetails: n,
|
|
30
|
+
billingDetails: l,
|
|
31
|
+
teacherName: S,
|
|
32
|
+
completedSessions: r,
|
|
33
|
+
nextSessionEnd: c,
|
|
34
|
+
nextSessionStart: d,
|
|
35
|
+
upcomingSessions: T,
|
|
36
|
+
isTrialDone: a,
|
|
37
|
+
isOnlyTrialDone: I,
|
|
38
|
+
isRegularClassDone: N,
|
|
39
|
+
isCardDeclined: L,
|
|
40
|
+
isSubscriptionCancelled: A,
|
|
41
|
+
cardOnFileNotAvailable: u,
|
|
42
|
+
isTutorNoShow: D,
|
|
43
|
+
isStudentNoShow: C,
|
|
44
|
+
showLoading: !1,
|
|
45
|
+
demoId: E,
|
|
46
|
+
userAttemptId: m,
|
|
47
|
+
isProcessingFailed: !1,
|
|
48
|
+
canChangeTutor: O,
|
|
49
|
+
showPLAIntroduction: p
|
|
48
50
|
};
|
|
49
|
-
}, [
|
|
50
|
-
},
|
|
51
|
+
}, [t, o]);
|
|
52
|
+
}, w = G;
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
w as default
|
|
53
55
|
};
|
|
54
56
|
//# sourceMappingURL=use-parent-home-data.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-parent-home-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-parent-home-data.ts"],"sourcesContent":["import type {
|
|
1
|
+
{"version":3,"file":"use-parent-home-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-parent-home-data.ts"],"sourcesContent":["import type { IUseParentHomeDataReturn } from '../parent-dashboard-types';\n\nimport { useMemo } from 'react';\n\nimport { useParentHomeGet } from '../api/parent-home';\nimport {\n DEFAULT_LOADING_STATE,\n PLA_INTRO_ELIGIBLE_STATES,\n SUBSCRIPTION_CANCELLED_STATES,\n TRIAL_COMPLETED_STATES,\n} from '../parent-dashboard-constants';\nimport { EPLAState } from '../parent-dashboard-types';\n\n/**\n * Hook to consume processed parent home data.\n * - Automatically fetches on mount and when stale using useFetchParentHome() at <ParentRoutesWrapper/>.\n * - Use this to **read** parent home data.\n */\n\nconst useParentHomeData = (studentId: string): IUseParentHomeDataReturn => {\n const { data: parentHomeData, isProcessingFailed } = useParentHomeGet(studentId);\n\n const parentHomeDataMemoised = useMemo(() => {\n if (!parentHomeData?.pla_state) {\n return {\n ...DEFAULT_LOADING_STATE,\n isProcessingFailed,\n };\n }\n\n const {\n teacher_details: teacherDetails,\n session_details: sessionDetails,\n billing_details: billingDetails,\n pla_state: plaState,\n } = parentHomeData;\n\n const {\n completed_sessions: completedSessions = 0,\n next_session_end: nextSessionEnd = 0,\n next_session_start: nextSessionStart = 0,\n upcoming_sessions: upcomingSessions = [],\n student_demo_id: demoId = null,\n user_attempt_id: userAttemptId = null,\n } = sessionDetails ?? {};\n\n const teacherName = teacherDetails\n ? `${teacherDetails.first_name || ''} ${teacherDetails.last_name || ''}`.trim()\n : '';\n\n const isCardDeclined = plaState === EPLAState.TRIAL_COMPLETED_CARD_DECLINED;\n const cardOnFileNotAvailable = plaState === EPLAState.NO_CARD_ON_FILE;\n const isSubscriptionCancelled = SUBSCRIPTION_CANCELLED_STATES.includes(plaState);\n\n const isTutorNoShow = plaState === EPLAState.TRIAL_TUTOR_NO_SHOW;\n const isStudentNoShow = plaState === EPLAState.TRIAL_STUDENT_NO_SHOW;\n const isTrialDone = TRIAL_COMPLETED_STATES.includes(plaState);\n const isOnlyTrialDone = isTrialDone && plaState !== EPLAState.REGULAR_CLASS_COMPLETED;\n const isRegularClassDone = plaState === EPLAState.REGULAR_CLASS_COMPLETED;\n const canChangeTutor = plaState === EPLAState.TRIAL_COMPLETED_PAYMENT_PENDING;\n\n const showPLAIntroduction = PLA_INTRO_ELIGIBLE_STATES.includes(plaState);\n\n return {\n plaState,\n sessionDetails,\n teacherDetails,\n billingDetails,\n teacherName,\n completedSessions,\n nextSessionEnd,\n nextSessionStart,\n upcomingSessions,\n isTrialDone,\n isOnlyTrialDone,\n isRegularClassDone,\n isCardDeclined,\n isSubscriptionCancelled,\n cardOnFileNotAvailable,\n isTutorNoShow,\n isStudentNoShow,\n showLoading: false,\n demoId,\n userAttemptId,\n isProcessingFailed: false,\n canChangeTutor,\n showPLAIntroduction,\n };\n }, [parentHomeData, isProcessingFailed]);\n\n return parentHomeDataMemoised;\n};\n\nexport default useParentHomeData;\n"],"names":["useParentHomeData","studentId","parentHomeData","isProcessingFailed","useParentHomeGet","useMemo","DEFAULT_LOADING_STATE","teacherDetails","sessionDetails","billingDetails","plaState","completedSessions","nextSessionEnd","nextSessionStart","upcomingSessions","demoId","userAttemptId","teacherName","isCardDeclined","EPLAState","cardOnFileNotAvailable","isSubscriptionCancelled","SUBSCRIPTION_CANCELLED_STATES","isTutorNoShow","isStudentNoShow","isTrialDone","TRIAL_COMPLETED_STATES","isOnlyTrialDone","isRegularClassDone","canChangeTutor","showPLAIntroduction","PLA_INTRO_ELIGIBLE_STATES","useParentHomeData$1"],"mappings":";;;;AAmBA,MAAMA,IAAoB,CAACC,MAAgD;AACzE,QAAM,EAAE,MAAMC,GAAgB,oBAAAC,EAAmB,IAAIC,EAAiBH,CAAS;AAsExE,SApEwBI,EAAQ,MAAM;AACvC,QAAA,EAACH,KAAA,QAAAA,EAAgB;AACZ,aAAA;AAAA,QACL,GAAGI;AAAA,QACH,oBAAAH;AAAA,MAAA;AAIE,UAAA;AAAA,MACJ,iBAAiBI;AAAA,MACjB,iBAAiBC;AAAA,MACjB,iBAAiBC;AAAA,MACjB,WAAWC;AAAA,IACT,IAAAR,GAEE;AAAA,MACJ,oBAAoBS,IAAoB;AAAA,MACxC,kBAAkBC,IAAiB;AAAA,MACnC,oBAAoBC,IAAmB;AAAA,MACvC,mBAAmBC,IAAmB,CAAC;AAAA,MACvC,iBAAiBC,IAAS;AAAA,MAC1B,iBAAiBC,IAAgB;AAAA,IAAA,IAC/BR,KAAkB,CAAA,GAEhBS,IAAcV,IAChB,GAAGA,EAAe,cAAc,EAAE,IAAIA,EAAe,aAAa,EAAE,GAAG,KAAA,IACvE,IAEEW,IAAiBR,MAAaS,EAAU,+BACxCC,IAAyBV,MAAaS,EAAU,iBAChDE,IAA0BC,EAA8B,SAASZ,CAAQ,GAEzEa,IAAgBb,MAAaS,EAAU,qBACvCK,IAAkBd,MAAaS,EAAU,uBACzCM,IAAcC,EAAuB,SAAShB,CAAQ,GACtDiB,IAAkBF,KAAef,MAAaS,EAAU,yBACxDS,IAAqBlB,MAAaS,EAAU,yBAC5CU,IAAiBnB,MAAaS,EAAU,iCAExCW,IAAsBC,EAA0B,SAASrB,CAAQ;AAEhE,WAAA;AAAA,MACL,UAAAA;AAAA,MACA,gBAAAF;AAAA,MACA,gBAAAD;AAAA,MACA,gBAAAE;AAAA,MACA,aAAAQ;AAAA,MACA,mBAAAN;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,aAAAW;AAAA,MACA,iBAAAE;AAAA,MACA,oBAAAC;AAAA,MACA,gBAAAV;AAAA,MACA,yBAAAG;AAAA,MACA,wBAAAD;AAAA,MACA,eAAAG;AAAA,MACA,iBAAAC;AAAA,MACA,aAAa;AAAA,MACb,QAAAT;AAAA,MACA,eAAAC;AAAA,MACA,oBAAoB;AAAA,MACpB,gBAAAa;AAAA,MACA,qBAAAC;AAAA,IAAA;AAAA,EACF,GACC,CAAC5B,GAAgBC,CAAkB,CAAC;AAGzC,GAEA6B,IAAehC;"}
|
package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
title: "Wait! Weʼve found the perfect tutor for your child. Sure you want to cancel?",
|
|
3
|
+
consequences: [
|
|
4
|
+
"Your first session will be cancelled",
|
|
5
|
+
"Youʼll lose access to the student platform",
|
|
6
|
+
"Youʼll have to go through the signup process again"
|
|
7
|
+
]
|
|
8
|
+
}, t = {
|
|
9
|
+
title: "Wait! Weʼve almost found the perfect tutor. Sure you want to cancel?",
|
|
10
|
+
consequences: [
|
|
11
|
+
"Youʼll lose this perfect tutor match",
|
|
12
|
+
"Your first session will be cancelled",
|
|
13
|
+
"You'll lose access to the student platform",
|
|
14
|
+
"Youʼll have to go through the signup process again"
|
|
15
|
+
]
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
t as cancelSubscriptionNoTutor,
|
|
19
|
+
e as cancelSubscriptionWithTutor
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=cancel-subscription-constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-subscription-constants.js","sources":["../../../../../src/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.ts"],"sourcesContent":["export const cancelSubscriptionWithTutor = {\n title: 'Wait! Weʼve found the perfect tutor for your child. Sure you want to cancel?',\n consequences: [\n 'Your first session will be cancelled',\n 'Youʼll lose access to the student platform',\n 'Youʼll have to go through the signup process again',\n ],\n};\n\nexport const cancelSubscriptionNoTutor = {\n title: 'Wait! Weʼve almost found the perfect tutor. Sure you want to cancel?',\n consequences: [\n 'Youʼll lose this perfect tutor match',\n 'Your first session will be cancelled',\n \"You'll lose access to the student platform\",\n 'Youʼll have to go through the signup process again',\n ],\n};\n"],"names":["cancelSubscriptionWithTutor","cancelSubscriptionNoTutor"],"mappings":"AAAO,MAAMA,IAA8B;AAAA,EACzC,OAAO;AAAA,EACP,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF,GAEaC,IAA4B;AAAA,EACvC,OAAO;AAAA,EACP,cAAc;AAAA,IACZ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as g } from "react";
|
|
3
|
+
import { useTheme as w } from "styled-components";
|
|
4
|
+
import T from "../../../../assets/line-icons/icons/cross.js";
|
|
5
|
+
import c from "../../../ui/buttons/text-button/text-button.js";
|
|
6
|
+
import o from "../../../ui/layout/flex-view.js";
|
|
7
|
+
import X from "../../../ui/modals/use-modal-params.js";
|
|
8
|
+
import n from "../../../ui/separator/separator.js";
|
|
9
|
+
import i from "../../../ui/text/text.js";
|
|
10
|
+
import { EDeviceType as x } from "../../../ui/theme/constants.js";
|
|
11
|
+
import { cancelSubscriptionWithTutor as A, cancelSubscriptionNoTutor as C } from "./cancel-subscription-constants.js";
|
|
12
|
+
const E = g(() => {
|
|
13
|
+
const { withTutor: a, studentName: u, isTrialDone: h, onSwitchTutor: d, onReschedule: $, onCancel: l } = X(), { device: b } = w(), t = b <= x.MOBILE, f = a ? A : C, { title: m, consequences: p } = f;
|
|
14
|
+
return h ? /* @__PURE__ */ r(o, { $gapX: t ? 1.5 : 2.5, $gutterX: t ? 1 : 2.5, $background: "BLACK_2", children: [
|
|
15
|
+
/* @__PURE__ */ e(i, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Before you cancel - is this about the tutor?" }),
|
|
16
|
+
/* @__PURE__ */ e(n, { heightX: 0.75 }),
|
|
17
|
+
/* @__PURE__ */ r(i, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: [
|
|
18
|
+
"This is exactly why we offer a tutor match guarantee. It's completely okay if the first tutor wasn't the right fit - with our extensive network, we're confident we can find",
|
|
19
|
+
" ",
|
|
20
|
+
u,
|
|
21
|
+
"'s ideal tutor."
|
|
22
|
+
] }),
|
|
23
|
+
/* @__PURE__ */ e(n, { heightX: 0.75 }),
|
|
24
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: "Do you want to try a session with another tutor? We won’t charge you for it." }),
|
|
25
|
+
/* @__PURE__ */ e(n, { heightX: 2.5 }),
|
|
26
|
+
/* @__PURE__ */ r(o, { $flexDirection: "row", $flexGapX: 1.5, children: [
|
|
27
|
+
/* @__PURE__ */ e(
|
|
28
|
+
c,
|
|
29
|
+
{
|
|
30
|
+
size: "regular",
|
|
31
|
+
label: t ? "Cancel subscription" : "No, cancel subscription",
|
|
32
|
+
color: "ORANGE_4",
|
|
33
|
+
onClick: l
|
|
34
|
+
}
|
|
35
|
+
),
|
|
36
|
+
/* @__PURE__ */ e(
|
|
37
|
+
c,
|
|
38
|
+
{
|
|
39
|
+
size: "regular",
|
|
40
|
+
label: t ? "Switch tutor" : "Yes, try another tutor",
|
|
41
|
+
color: "WHITE",
|
|
42
|
+
onClick: d
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
] })
|
|
46
|
+
] }) : /* @__PURE__ */ r(o, { $gapX: t ? 1.5 : 2.5, $gutterX: t ? 1 : 2.5, $background: "BLACK_2", children: [
|
|
47
|
+
/* @__PURE__ */ e(i, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: m }),
|
|
48
|
+
/* @__PURE__ */ e(n, { heightX: 0.75 }),
|
|
49
|
+
/* @__PURE__ */ r(o, { $flexGapX: 0.75, children: [
|
|
50
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", children: "If you decide to cancel:" }),
|
|
51
|
+
p.map((s) => /* @__PURE__ */ r(o, { $flexDirection: "row", $flexGapX: 0.5, children: [
|
|
52
|
+
/* @__PURE__ */ e(
|
|
53
|
+
o,
|
|
54
|
+
{
|
|
55
|
+
$justifyContent: "center",
|
|
56
|
+
$alignItems: "center",
|
|
57
|
+
$background: "ORANGE_4",
|
|
58
|
+
$borderRadiusX: 0.5,
|
|
59
|
+
$widthX: 1,
|
|
60
|
+
$heightX: 1,
|
|
61
|
+
children: /* @__PURE__ */ e(T, {})
|
|
62
|
+
}
|
|
63
|
+
),
|
|
64
|
+
/* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", children: s })
|
|
65
|
+
] }, s))
|
|
66
|
+
] }),
|
|
67
|
+
/* @__PURE__ */ e(n, { heightX: 2.5 }),
|
|
68
|
+
/* @__PURE__ */ r(o, { $flexDirection: "row", $flexGapX: 1.5, children: [
|
|
69
|
+
/* @__PURE__ */ e(
|
|
70
|
+
c,
|
|
71
|
+
{
|
|
72
|
+
size: "regular",
|
|
73
|
+
label: "Cancel subscription",
|
|
74
|
+
color: "ORANGE_4",
|
|
75
|
+
onClick: l
|
|
76
|
+
}
|
|
77
|
+
),
|
|
78
|
+
/* @__PURE__ */ e(c, { size: "regular", label: "Reschedule", color: "WHITE", onClick: $ })
|
|
79
|
+
] })
|
|
80
|
+
] });
|
|
81
|
+
}), R = E;
|
|
82
|
+
export {
|
|
83
|
+
R as default
|
|
84
|
+
};
|
|
85
|
+
//# sourceMappingURL=cancel-subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancel-subscription.js","sources":["../../../../../src/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.tsx"],"sourcesContent":["import type { ICancelSubscriptionProps } from './cancel-subscription-types';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport CrossIcon from '../../../../assets/line-icons/icons/cross';\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 {\n cancelSubscriptionNoTutor,\n cancelSubscriptionWithTutor,\n} from './cancel-subscription-constants';\n\nconst CancelSubscription = memo(() => {\n const { withTutor, studentName, isTrialDone, onSwitchTutor, onReschedule, onCancel } =\n useModalParams<ICancelSubscriptionProps>();\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n const config = withTutor ? cancelSubscriptionWithTutor : cancelSubscriptionNoTutor;\n const { title, consequences } = config;\n\n if (isTrialDone) {\n return (\n <FlexView $gapX={isMobile ? 1.5 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Before you cancel - is this about the tutor?\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n This is exactly why we offer a tutor match guarantee. It's completely okay if the first\n tutor wasn't the right fit - with our extensive network, we're confident we can find{' '}\n {studentName}'s ideal tutor.\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n Do you want to try a session with another tutor? We won’t charge you for it.\n </Text>\n <Separator heightX={2.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <TextButton\n size=\"regular\"\n label={isMobile ? 'Cancel subscription' : 'No, cancel subscription'}\n color=\"ORANGE_4\"\n onClick={onCancel}\n />\n <TextButton\n size=\"regular\"\n label={isMobile ? 'Switch tutor' : 'Yes, try another tutor'}\n color=\"WHITE\"\n onClick={onSwitchTutor}\n />\n </FlexView>\n </FlexView>\n );\n }\n\n return (\n <FlexView $gapX={isMobile ? 1.5 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {title}\n </Text>\n <Separator heightX={0.75} />\n <FlexView $flexGapX={0.75}>\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n If you decide to cancel:\n </Text>\n {consequences.map(item => (\n <FlexView key={item} $flexDirection=\"row\" $flexGapX={0.5}>\n <FlexView\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $background=\"ORANGE_4\"\n $borderRadiusX={0.5}\n $widthX={1}\n $heightX={1}\n >\n <CrossIcon />\n </FlexView>\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n {item}\n </Text>\n </FlexView>\n ))}\n </FlexView>\n <Separator heightX={2.5} />\n <FlexView $flexDirection=\"row\" $flexGapX={1.5}>\n <TextButton\n size=\"regular\"\n label=\"Cancel subscription\"\n color=\"ORANGE_4\"\n onClick={onCancel}\n />\n <TextButton size=\"regular\" label=\"Reschedule\" color=\"WHITE\" onClick={onReschedule} />\n </FlexView>\n </FlexView>\n );\n});\n\nexport default CancelSubscription;\n"],"names":["CancelSubscription","memo","withTutor","studentName","isTrialDone","onSwitchTutor","onReschedule","onCancel","useModalParams","device","useTheme","isMobile","EDeviceType","config","cancelSubscriptionWithTutor","cancelSubscriptionNoTutor","title","consequences","jsxs","FlexView","jsx","Text","Separator","TextButton","item","CrossIcon","CancelSubscription$1"],"mappings":"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"}
|
package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsxs as s, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import { memo as c } from "react";
|
|
3
|
+
import { useTheme as a } from "styled-components";
|
|
4
|
+
import l from "../../../ui/buttons/text-button/text-button.js";
|
|
5
|
+
import m from "../../../ui/layout/flex-view.js";
|
|
6
|
+
import u from "../../../ui/modals/use-modal-actions.js";
|
|
7
|
+
import r from "../../../ui/separator/separator.js";
|
|
8
|
+
import t from "../../../ui/text/text.js";
|
|
9
|
+
import { EDeviceType as d } from "../../../ui/theme/constants.js";
|
|
10
|
+
const p = c(() => {
|
|
11
|
+
const { closeModal: i } = u(), { device: n } = a(), e = n <= d.MOBILE;
|
|
12
|
+
return /* @__PURE__ */ s(m, { $gapX: e ? 1.5 : 2.5, $gutterX: e ? 1 : 2.5, $background: "BLACK_2", children: [
|
|
13
|
+
/* @__PURE__ */ o(t, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "ORANGE_4", children: "Your subscription has been cancelled" }),
|
|
14
|
+
/* @__PURE__ */ o(r, { heightX: 0.75 }),
|
|
15
|
+
/* @__PURE__ */ o(t, { $renderAs: "ub3", $color: "WHITE", children: "We won't charge your card. If you change your mind, you can always restart the signup process by visiting our website." }),
|
|
16
|
+
/* @__PURE__ */ o(r, { heightX: 2.5 }),
|
|
17
|
+
/* @__PURE__ */ o(l, { size: "regular", label: "Close", color: "WHITE", onClick: i })
|
|
18
|
+
] });
|
|
19
|
+
}), T = p;
|
|
20
|
+
export {
|
|
21
|
+
T as default
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=cancellation-confirmation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cancellation-confirmation.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.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 useModalActions from '../../../ui/modals/use-modal-actions';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\n\nconst CancelConfirmation = memo(() => {\n const { closeModal } = useModalActions();\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView $gapX={isMobile ? 1.5 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"ORANGE_4\">\n Your subscription has been cancelled\n </Text>\n <Separator heightX={0.75} />\n <Text $renderAs=\"ub3\" $color=\"WHITE\">\n We won't charge your card. If you change your mind, you can always restart the signup\n process by visiting our website.\n </Text>\n <Separator heightX={2.5} />\n <TextButton size=\"regular\" label=\"Close\" color=\"WHITE\" onClick={closeModal} />\n </FlexView>\n );\n});\n\nexport default CancelConfirmation;\n"],"names":["CancelConfirmation","memo","closeModal","useModalActions","device","useTheme","isMobile","EDeviceType","jsxs","FlexView","jsx","Text","Separator","TextButton","CancelConfirmation$1"],"mappings":";;;;;;;;;AAUA,MAAMA,IAAqBC,EAAK,MAAM;AAC9B,QAAA,EAAE,YAAAC,MAAeC,KACjB,EAAE,QAAAC,MAAWC,KACbC,IAAWF,KAAUG,EAAY;AAGrC,SAAA,gBAAAC,EAACC,GAAS,EAAA,OAAOH,IAAW,MAAM,KAAK,UAAUA,IAAW,IAAI,KAAK,aAAY,WAC/E,UAAA;AAAA,IAAA,gBAAAI,EAACC,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,YAAW,UAE1E,uCAAA,CAAA;AAAA,IACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,KAAM,CAAA;AAAA,sBACzBD,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,UAGrC,0HAAA;AAAA,IACA,gBAAAD,EAACE,GAAU,EAAA,SAAS,IAAK,CAAA;AAAA,IACzB,gBAAAF,EAACG,KAAW,MAAK,WAAU,OAAM,SAAQ,OAAM,SAAQ,SAASX,EAAY,CAAA;AAAA,EAC9E,EAAA,CAAA;AAEJ,CAAC,GAEDY,IAAed;"}
|