@cuemath/leap 3.3.34 → 3.3.35-m
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 +1 -4
- 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 +29 -35
- package/dist/features/auth/comps/otp-input/otp-input.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +3 -12
- 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 +34 -43
- 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 +101 -140
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +16 -20
- 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 +21 -20
- 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/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 +0 -400
- package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
- package/dist/features/milestone/constants.js +15 -28
- 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 +16 -23
- 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 +7 -13
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js +22 -28
- package/dist/features/parent-dashboard/comps/pla-first-session-introduction/pla-first-session-introduction.js.map +1 -1
- 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 +46 -48
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +12 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +1 -0
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js +17 -16
- 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 +8 -4
- 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/parent-dashboard-constants.js +4 -45
- 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 +174 -197
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js +32 -0
- package/dist/features/stickers/sticker-selector/hooks/use-handle-sticker-send.js.map +1 -0
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js +72 -0
- package/dist/features/stickers/sticker-selector/hooks/use-stickers-journey/use-stickers-journey.js.map +1 -0
- package/dist/features/stickers/sticker-selector/sticker-selector.js +58 -57
- package/dist/features/stickers/sticker-selector/sticker-selector.js.map +1 -1
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js +34 -0
- package/dist/features/stickers/stickers-effects/comps/sticker-with-fallback.js.map +1 -0
- package/dist/features/stickers/stickers-effects/constants.js +26 -0
- package/dist/features/stickers/stickers-effects/constants.js.map +1 -0
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js +28 -0
- package/dist/features/stickers/stickers-effects/context/sticker-provider.js.map +1 -0
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js +12 -0
- package/dist/features/stickers/stickers-effects/hooks/use-stickers.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-helper.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js +32 -17
- package/dist/features/stickers/stickers-effects/stickers-effects-styled.js.map +1 -1
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js +6 -0
- package/dist/features/stickers/stickers-effects/stickers-effects-types.js.map +1 -0
- package/dist/features/stickers/stickers-effects/stickers-effects.js +40 -56
- 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/comps/class-preference/class-preference.js +58 -74
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/learning-plan/index.js +45 -47
- package/dist/features/trial-session/comps/learning-plan/index.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +40 -41
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-constants.js +1 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-constants.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps-styled.js +1 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps-styled.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/next-steps/next-steps.js +5 -5
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js +29 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-countdown.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js +132 -0
- package/dist/features/trial-session/comps/pla/session-status/hooks/use-session-status-config.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js +11 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js +19 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status-helpers.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-status/session-status-styled.js +2 -2
- package/dist/features/trial-session/comps/pla/session-status/session-status-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js +127 -0
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/session-summary-constants.js +12 -18
- package/dist/features/trial-session/comps/pla/session-summary/session-summary-constants.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js +53 -0
- package/dist/features/trial-session/comps/pla/session-summary/session-summary.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/session-summary/summary-card/summary-card-styled.js +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +56 -0
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-constants.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-styled.js +1 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -0
- package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions.js +14 -14
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -0
- package/dist/features/trial-session/comps/school-goals/school-goals.js +57 -59
- 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 +40 -41
- 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 +0 -5
- 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 +51 -96
- 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 +63 -70
- 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 +44 -43
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +40 -41
- 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 +61 -60
- package/dist/features/trial-session/comps/trial-circle-game/trial-circle-game.js.map +1 -1
- package/dist/features/trial-session/helper.js +61 -76
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +144 -174
- 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 +110 -99
- 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 +13 -45
- 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 +145 -94
- package/dist/index.js +301 -292
- package/dist/index.js.map +1 -1
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js +10 -0
- package/dist/node_modules/date-fns/_lib/getRoundingMethod.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js +9 -0
- package/dist/node_modules/date-fns/differenceInMilliseconds.js.map +1 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js +11 -0
- package/dist/node_modules/date-fns/differenceInSeconds.js.map +1 -0
- package/dist/static/trophy.a8ea85ef.json +6813 -0
- package/package.json +3 -2
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js +0 -86
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js +0 -140
- package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map +0 -1
- package/dist/features/parent-dashboard/api/cancel-subscription.js +0 -9
- package/dist/features/parent-dashboard/api/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js +0 -20
- package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js +0 -74
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.js.map +0 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/next-steps/next-steps.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js +0 -34
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-countdown.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js +0 -137
- package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js +0 -20
- package/dist/features/parent-dashboard/comps/session-status/session-status-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js +0 -19
- package/dist/features/parent-dashboard/comps/session-status/session-status-helpers.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-status/session-status.js +0 -124
- package/dist/features/parent-dashboard/comps/session-status/session-status.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/session-summary-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js +0 -54
- package/dist/features/parent-dashboard/comps/session-summary/session-summary.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js +0 -72
- package/dist/features/parent-dashboard/comps/session-summary/summary-card/summary-card.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-constants.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-styled.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions-types.js.map +0 -1
- package/dist/features/parent-dashboard/comps/upcoming-sessions/upcoming-sessions.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js +0 -21
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription-constants.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js +0 -85
- package/dist/features/parent-dashboard/modals/cancel-subscription/cancel-subscription.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js +0 -23
- package/dist/features/parent-dashboard/modals/cancellation-confirmation/cancellation-confirmation.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js +0 -55
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js +0 -71
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map +0 -1
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js +0 -119
- package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map +0 -1
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js +0 -58
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js +0 -76
- package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map +0 -1
- package/dist/features/trial-session/api/teacher-availability.js +0 -9
- package/dist/features/trial-session/api/teacher-availability.js.map +0 -1
- package/dist/features/trial-session/comps/class-preference/helpers.js +0 -28
- package/dist/features/trial-session/comps/class-preference/helpers.js.map +0 -1
- package/dist/features/trial-session/hooks/use-slide-config-update.js +0 -49
- package/dist/features/trial-session/hooks/use-slide-config-update.js.map +0 -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/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-constants.js +0 -0
- /package/dist/features/{parent-dashboard/comps → trial-session/comps/pla}/upcoming-sessions/upcoming-sessions-types.js +0 -0
package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.js
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
const e = {
|
|
2
|
-
title: "We’re sorry to see you go!",
|
|
3
|
-
description: "Tell us why youʼre canceling.",
|
|
4
|
-
reasons: [
|
|
5
|
-
{ id: "Looking for more affordable options", label: "Looking for more affordable options" },
|
|
6
|
-
{ id: "Taking too long to find a tutor match", label: "Taking too long to find a tutor match" },
|
|
7
|
-
{ id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
|
|
8
|
-
{ id: "I donʼt have the right device/ setup", label: "I donʼt have the right device/ setup" },
|
|
9
|
-
{
|
|
10
|
-
id: "No longer interested in online tutoring",
|
|
11
|
-
label: "No longer interested in online tutoring"
|
|
12
|
-
},
|
|
13
|
-
{ id: "other", label: "Something else" }
|
|
14
|
-
]
|
|
15
|
-
}, o = {
|
|
16
|
-
title: "We’re sorry to see you go!",
|
|
17
|
-
description: "Tell us why youʼre canceling.",
|
|
18
|
-
reasons: [
|
|
19
|
-
{
|
|
20
|
-
id: "The tutor doesnʼt seem like a good fit",
|
|
21
|
-
label: "The tutor doesnʼt seem like a good fit"
|
|
22
|
-
},
|
|
23
|
-
{ id: "Looking for more affordable options", label: "Looking for more affordable options" },
|
|
24
|
-
{ id: "Taking too long to find a tutor match", label: "Taking too long to find a tutor match" },
|
|
25
|
-
{ id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
|
|
26
|
-
{
|
|
27
|
-
id: "No longer interested in online tutoring",
|
|
28
|
-
label: "No longer interested in online tutoring"
|
|
29
|
-
},
|
|
30
|
-
{ id: "I donʼt have the right device/ setup", label: "I donʼt have the right device/ setup" },
|
|
31
|
-
{ id: "other", label: "Something else" }
|
|
32
|
-
]
|
|
33
|
-
}, t = {
|
|
34
|
-
title: "We’re sorry to see you go!",
|
|
35
|
-
description: "Tell us why youʼre canceling.",
|
|
36
|
-
reasons: [
|
|
37
|
-
{ id: "Looking for more affordable options", label: "Looking for more affordable options" },
|
|
38
|
-
{ id: "I found a better option elsewhere", label: "I found a better option elsewhere" },
|
|
39
|
-
{
|
|
40
|
-
id: "No longer interested in online tutoring",
|
|
41
|
-
label: "No longer interested in online tutoring"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "I want to try other options first",
|
|
45
|
-
label: "I want to try other options first"
|
|
46
|
-
},
|
|
47
|
-
{ id: "other", label: "Something else" }
|
|
48
|
-
]
|
|
49
|
-
};
|
|
50
|
-
export {
|
|
51
|
-
t as cancellationReasonAfterTrial,
|
|
52
|
-
e as cancellationReasonNoTutor,
|
|
53
|
-
o as cancellationReasonWithTutor
|
|
54
|
-
};
|
|
55
|
-
//# sourceMappingURL=cancellation-reason-constant.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancellation-reason-constant.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-constant.ts"],"sourcesContent":["export const cancellationReasonNoTutor = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'Taking too long to find a tutor match', label: 'Taking too long to find a tutor match' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n { id: 'I donʼt have the right device/ setup', label: 'I donʼt have the right device/ setup' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n { id: 'other', label: 'Something else' },\n ],\n};\n\nexport const cancellationReasonWithTutor = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n {\n id: 'The tutor doesnʼt seem like a good fit',\n label: 'The tutor doesnʼt seem like a good fit',\n },\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'Taking too long to find a tutor match', label: 'Taking too long to find a tutor match' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n { id: 'I donʼt have the right device/ setup', label: 'I donʼt have the right device/ setup' },\n { id: 'other', label: 'Something else' },\n ],\n};\n\nexport const cancellationReasonAfterTrial = {\n title: 'We’re sorry to see you go!',\n description: 'Tell us why youʼre canceling.',\n reasons: [\n { id: 'Looking for more affordable options', label: 'Looking for more affordable options' },\n { id: 'I found a better option elsewhere', label: 'I found a better option elsewhere' },\n {\n id: 'No longer interested in online tutoring',\n label: 'No longer interested in online tutoring',\n },\n {\n id: 'I want to try other options first',\n label: 'I want to try other options first',\n },\n { id: 'other', label: 'Something else' },\n ],\n};\n"],"names":["cancellationReasonNoTutor","cancellationReasonWithTutor","cancellationReasonAfterTrial"],"mappings":"AAAO,MAAMA,IAA4B;AAAA,EACvC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,yCAAyC,OAAO,wCAAwC;AAAA,IAC9F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF,EAAE,IAAI,wCAAwC,OAAO,uCAAuC;AAAA,IAC5F;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF,GAEaC,IAA8B;AAAA,EACzC,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,yCAAyC,OAAO,wCAAwC;AAAA,IAC9F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,wCAAwC,OAAO,uCAAuC;AAAA,IAC5F,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF,GAEaC,IAA+B;AAAA,EAC1C,OAAO;AAAA,EACP,aAAa;AAAA,EACb,SAAS;AAAA,IACP,EAAE,IAAI,uCAAuC,OAAO,sCAAsC;AAAA,IAC1F,EAAE,IAAI,qCAAqC,OAAO,oCAAoC;AAAA,IACtF;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA;AAAA,MACE,IAAI;AAAA,MACJ,OAAO;AAAA,IACT;AAAA,IACA,EAAE,IAAI,SAAS,OAAO,iBAAiB;AAAA,EACzC;AACF;"}
|
package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import o from "styled-components";
|
|
2
|
-
import t from "../../../ui/layout/flex-view.js";
|
|
3
|
-
import d from "../../../ui/text/text.js";
|
|
4
|
-
const x = o(t)`
|
|
5
|
-
max-width: 560px;
|
|
6
|
-
border: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
|
|
7
|
-
`, h = o(t)`
|
|
8
|
-
overflow-y: auto;
|
|
9
|
-
max-height: 468px;
|
|
10
|
-
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
11
|
-
max-height: unset;
|
|
12
|
-
overflow-y: hidden;
|
|
13
|
-
}
|
|
14
|
-
`, u = o(t)`
|
|
15
|
-
padding-top: 0;
|
|
16
|
-
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
17
|
-
max-height: 300px;
|
|
18
|
-
overflow-y: auto;
|
|
19
|
-
}
|
|
20
|
-
`, c = o(t)`
|
|
21
|
-
padding-bottom: 24px;
|
|
22
|
-
${({ theme: e }) => e.mediaQueries.minWidthTablet} {
|
|
23
|
-
border-top: ${({ theme: e }) => `1px solid ${e.colors.BLACK_5}`};
|
|
24
|
-
padding-bottom: 40px;
|
|
25
|
-
}
|
|
26
|
-
`, g = o.textarea(({ theme: e }) => {
|
|
27
|
-
const {
|
|
28
|
-
colors: { WHITE: i, WHITE_T_38: r, BLACK_2: n, BLACK_5: a },
|
|
29
|
-
layout: { gutter: p }
|
|
30
|
-
} = e;
|
|
31
|
-
return `border: 1px solid ${a};
|
|
32
|
-
width: 100%;
|
|
33
|
-
min-height: ${p * 5}px;
|
|
34
|
-
padding: 16px;
|
|
35
|
-
background-color: ${n};
|
|
36
|
-
white-space: pre-line;
|
|
37
|
-
font-family: 'Untitled Sans Regular';
|
|
38
|
-
font-weight: 400;
|
|
39
|
-
font-size: 14px;
|
|
40
|
-
line-height: 24px;
|
|
41
|
-
color: ${i};
|
|
42
|
-
resize: none;
|
|
43
|
-
outline: none;
|
|
44
|
-
&::placeholder {
|
|
45
|
-
color: ${r};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&:focus {
|
|
49
|
-
outline: none;
|
|
50
|
-
}
|
|
51
|
-
`;
|
|
52
|
-
}), $ = o(d)(
|
|
53
|
-
({ theme: e }) => `
|
|
54
|
-
position: absolute;
|
|
55
|
-
top: 0;
|
|
56
|
-
width: 100%;
|
|
57
|
-
transition: all 0.2s ease-in-out;
|
|
58
|
-
${e.mediaQueries.minWidthTablet} {
|
|
59
|
-
top: 6px;
|
|
60
|
-
}
|
|
61
|
-
`
|
|
62
|
-
);
|
|
63
|
-
export {
|
|
64
|
-
x as Container,
|
|
65
|
-
u as ContentWrapper,
|
|
66
|
-
$ as ErrorWrapper,
|
|
67
|
-
c as FooterWrapper,
|
|
68
|
-
h as OuterWrapper,
|
|
69
|
-
g as StyledTextArea
|
|
70
|
-
};
|
|
71
|
-
//# sourceMappingURL=cancellation-reason-styled.js.map
|
package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancellation-reason-styled.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nexport const Container = styled(FlexView)`\n max-width: 560px;\n border: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n`;\n\nexport const OuterWrapper = styled(FlexView)`\n overflow-y: auto;\n max-height: 468px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: unset;\n overflow-y: hidden;\n }\n`;\n\nexport const ContentWrapper = styled(FlexView)`\n padding-top: 0;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n max-height: 300px;\n overflow-y: auto;\n }\n`;\n\nexport const FooterWrapper = styled(FlexView)`\n padding-bottom: 24px;\n ${({ theme }) => theme.mediaQueries.minWidthTablet} {\n border-top: ${({ theme }) => `1px solid ${theme.colors.BLACK_5}`};\n padding-bottom: 40px;\n }\n`;\n\nexport const StyledTextArea = styled.textarea(({ theme }) => {\n const {\n colors: { WHITE, WHITE_T_38, BLACK_2, BLACK_5 },\n layout: { gutter },\n } = theme;\n\n return `border: 1px solid ${BLACK_5};\n width: 100%;\n min-height: ${gutter * 5}px;\n padding: 16px;\n background-color: ${BLACK_2};\n white-space: pre-line;\n font-family: 'Untitled Sans Regular';\n font-weight: 400;\n font-size: 14px;\n line-height: 24px;\n color: ${WHITE};\n resize: none;\n outline: none;\n &::placeholder {\n color: ${WHITE_T_38};\n }\n\n &:focus {\n outline: none;\n }\n`;\n});\n\nexport const ErrorWrapper = styled(Text)(\n ({ theme }) =>\n `\n position: absolute;\n top: 0;\n width: 100%;\n transition: all 0.2s ease-in-out;\n ${theme.mediaQueries.minWidthTablet} {\n top: 6px;\n }\n`,\n);\n"],"names":["Container","styled","FlexView","theme","OuterWrapper","ContentWrapper","FooterWrapper","StyledTextArea","WHITE","WHITE_T_38","BLACK_2","BLACK_5","gutter","ErrorWrapper","Text"],"mappings":";;;AAKa,MAAAA,IAAYC,EAAOC,CAAQ;AAAA;AAAA,YAE5B,CAAC,EAAE,OAAAC,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA,GAGjDC,IAAeH,EAAOC,CAAQ;AAAA;AAAA;AAAA,IAGvC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCE,IAAiBJ,EAAOC,CAAQ;AAAA;AAAA,IAEzC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAAA,GAMvCG,IAAgBL,EAAOC,CAAQ;AAAA;AAAA,IAExC,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,aAAa,cAAc;AAAA,kBAClC,CAAC,EAAE,OAAAA,EAAM,MAAM,aAAaA,EAAM,OAAO,OAAO,EAAE;AAAA;AAAA;AAAA,GAKvDI,IAAiBN,EAAO,SAAS,CAAC,EAAE,OAAAE,QAAY;AACrD,QAAA;AAAA,IACJ,QAAQ,EAAE,OAAAK,GAAO,YAAAC,GAAY,SAAAC,GAAS,SAAAC,EAAQ;AAAA,IAC9C,QAAQ,EAAE,QAAAC,EAAO;AAAA,EACf,IAAAT;AAEJ,SAAO,qBAAqBQ,CAAO;AAAA;AAAA,gBAErBC,IAAS,CAAC;AAAA;AAAA,sBAEJF,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMlBF,CAAK;AAAA;AAAA;AAAA;AAAA,aAIHC,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvB,CAAC,GAEYI,IAAeZ,EAAOa,CAAI;AAAA,EACrC,CAAC,EAAE,OAAAX,EAAA,MACD;AAAA;AAAA;AAAA;AAAA;AAAA,MAKEA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAIvC;"}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { jsxs as a, jsx as r, Fragment as M } from "react/jsx-runtime";
|
|
2
|
-
import { memo as k, useState as d, useRef as D, useMemo as F, useCallback as c, useEffect as U } from "react";
|
|
3
|
-
import { useTheme as y } from "styled-components";
|
|
4
|
-
import G from "../../../auth/comps/pill-button/pill-button.js";
|
|
5
|
-
import { PLA_ANALYTICS_EVENTS as R } from "../../../auth/pla-signup/pla-analytics-events.js";
|
|
6
|
-
import E from "../../../ui/buttons/text-button/text-button.js";
|
|
7
|
-
import { useUIContext as H } from "../../../ui/context/context.js";
|
|
8
|
-
import V from "../../../ui/layout/flex-view.js";
|
|
9
|
-
import j from "../../../ui/modals/use-modal-actions.js";
|
|
10
|
-
import K from "../../../ui/modals/use-modal-params.js";
|
|
11
|
-
import Y from "../../../ui/separator/separator.js";
|
|
12
|
-
import S from "../../../ui/text/text.js";
|
|
13
|
-
import { EDeviceType as q } from "../../../ui/theme/constants.js";
|
|
14
|
-
import { useCancelSubscriptionPatch as z } from "../../api/cancel-subscription.js";
|
|
15
|
-
import { cancellationReasonAfterTrial as J, cancellationReasonWithTutor as Q, cancellationReasonNoTutor as Z } from "./cancellation-reason-constant.js";
|
|
16
|
-
import { Container as ee, OuterWrapper as oe, ContentWrapper as re, StyledTextArea as te, FooterWrapper as ne, ErrorWrapper as ae } from "./cancellation-reason-styled.js";
|
|
17
|
-
const le = k(() => {
|
|
18
|
-
const { withTutor: p, isTrialDone: f, studentId: h, demoId: C, onCancelConfirmation: $ } = K(), { closeModal: g } = j(), { onEvent: m } = H(), [o, I] = d(""), [x, u] = d(!1), [l, b] = d(""), s = D(null), { device: O } = y(), t = O <= q.MOBILE, _ = F(() => f ? J : p ? Q : Z, [f, p]), { title: L, description: A, reasons: N } = _, w = c(
|
|
19
|
-
(e) => {
|
|
20
|
-
if (e) {
|
|
21
|
-
u(!0), m(R.SUBSCRIPTION_CANCELLATION_FAILED, {
|
|
22
|
-
reason: o,
|
|
23
|
-
error: e
|
|
24
|
-
});
|
|
25
|
-
return;
|
|
26
|
-
}
|
|
27
|
-
m(R.SUBSCRIPTION_CANCELLATION_SUCCESSFUL, {
|
|
28
|
-
reason: o
|
|
29
|
-
}), $();
|
|
30
|
-
},
|
|
31
|
-
[$, o, m]
|
|
32
|
-
), { patch: T, isProcessing: X } = z({
|
|
33
|
-
onComplete: w
|
|
34
|
-
}), n = o === "other", v = X || !o || n && !l.trim(), P = c(() => {
|
|
35
|
-
T(h, {
|
|
36
|
-
reason: n ? l : o,
|
|
37
|
-
student_demo_id: C
|
|
38
|
-
});
|
|
39
|
-
}, [n, l, o, T, h, C]), W = c((e) => {
|
|
40
|
-
b(""), u(!1), I(e);
|
|
41
|
-
}, []), B = c((e) => {
|
|
42
|
-
u(!1), b(e.target.value);
|
|
43
|
-
}, []);
|
|
44
|
-
return U(() => {
|
|
45
|
-
var e, i;
|
|
46
|
-
n && s.current && ((e = s.current) == null || e.focus(), (i = s.current) == null || i.scrollIntoView({ behavior: "smooth" }));
|
|
47
|
-
}, [n]), /* @__PURE__ */ a(ee, { $background: "BLACK_2", $width: "100%", $borderColor: "BLACK_5", children: [
|
|
48
|
-
/* @__PURE__ */ a(oe, { $flex: 1, children: [
|
|
49
|
-
/* @__PURE__ */ a(V, { $gutterX: t ? 1 : 2.5, $gapX: t ? 1.5 : 2.5, children: [
|
|
50
|
-
/* @__PURE__ */ r(S, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: L }),
|
|
51
|
-
A ? /* @__PURE__ */ a(M, { children: [
|
|
52
|
-
/* @__PURE__ */ r(Y, { heightX: 0.25 }),
|
|
53
|
-
/* @__PURE__ */ r(S, { $renderAs: "ub2", $renderOnMobileAs: "ub3", $color: "WHITE", children: A })
|
|
54
|
-
] }) : null
|
|
55
|
-
] }),
|
|
56
|
-
/* @__PURE__ */ a(
|
|
57
|
-
re,
|
|
58
|
-
{
|
|
59
|
-
$flex: 1,
|
|
60
|
-
$gutterX: t ? 1 : 2.5,
|
|
61
|
-
$gapX: t ? 1 : 2.5,
|
|
62
|
-
$width: "100%",
|
|
63
|
-
$alignItems: "flex-start",
|
|
64
|
-
$flexRowGapX: 1,
|
|
65
|
-
children: [
|
|
66
|
-
N.map(({ id: e, label: i }) => /* @__PURE__ */ r(
|
|
67
|
-
G,
|
|
68
|
-
{
|
|
69
|
-
selected: o === e,
|
|
70
|
-
label: i,
|
|
71
|
-
id: e,
|
|
72
|
-
onClick: W,
|
|
73
|
-
isTransparent: !0
|
|
74
|
-
},
|
|
75
|
-
e
|
|
76
|
-
)),
|
|
77
|
-
n && /* @__PURE__ */ r(
|
|
78
|
-
te,
|
|
79
|
-
{
|
|
80
|
-
placeholder: "Tell us more about your experience...",
|
|
81
|
-
id: "text-area",
|
|
82
|
-
ref: s,
|
|
83
|
-
value: l,
|
|
84
|
-
onChange: B
|
|
85
|
-
}
|
|
86
|
-
)
|
|
87
|
-
]
|
|
88
|
-
}
|
|
89
|
-
)
|
|
90
|
-
] }),
|
|
91
|
-
/* @__PURE__ */ a(
|
|
92
|
-
ne,
|
|
93
|
-
{
|
|
94
|
-
$position: "relative",
|
|
95
|
-
$gutterX: t ? 1 : 2.5,
|
|
96
|
-
$gapX: t ? 1.5 : 2.5,
|
|
97
|
-
$flexDirection: "row",
|
|
98
|
-
$flexColumnGapX: 1.5,
|
|
99
|
-
children: [
|
|
100
|
-
x ? /* @__PURE__ */ r(ae, { $renderAs: "ub3", $color: "ORANGE_4", $align: "left", children: "Something went wrong. Please try again." }) : null,
|
|
101
|
-
/* @__PURE__ */ r(
|
|
102
|
-
E,
|
|
103
|
-
{
|
|
104
|
-
label: "Cancel Subscription",
|
|
105
|
-
onClick: P,
|
|
106
|
-
color: "ORANGE_4",
|
|
107
|
-
disabled: v
|
|
108
|
-
}
|
|
109
|
-
),
|
|
110
|
-
/* @__PURE__ */ r(E, { label: "Close", onClick: g, color: "WHITE" })
|
|
111
|
-
]
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
] });
|
|
115
|
-
}), Se = le;
|
|
116
|
-
export {
|
|
117
|
-
Se as default
|
|
118
|
-
};
|
|
119
|
-
//# sourceMappingURL=cancellation-reason.js.map
|
package/dist/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancellation-reason.js","sources":["../../../../../src/features/parent-dashboard/modals/cancellation-reason/cancellation-reason.tsx"],"sourcesContent":["import type { ICancelReasonProps } from './cancel-reason-types';\nimport type { ChangeEvent } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport PillButton from '../../../auth/comps/pill-button/pill-button';\nimport { PLA_ANALYTICS_EVENTS } from '../../../auth/pla-signup/pla-analytics-events';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport { useUIContext } from '../../../ui/context/context';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { useCancelSubscriptionPatch } from '../../api/cancel-subscription';\nimport {\n cancellationReasonAfterTrial,\n cancellationReasonNoTutor,\n cancellationReasonWithTutor,\n} from './cancellation-reason-constant';\nimport * as Styled from './cancellation-reason-styled';\n\nconst CancellationReason = memo(() => {\n const { withTutor, isTrialDone, studentId, demoId, onCancelConfirmation } =\n useModalParams<ICancelReasonProps>();\n const { closeModal } = useModalActions();\n const { onEvent: trackEvent } = useUIContext();\n\n const [reason, setReason] = useState('');\n const [isError, setIsError] = useState<boolean>(false);\n const [otherReason, setOtherReason] = useState('');\n\n const textAreaRef = useRef<HTMLTextAreaElement | null>(null);\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const config = useMemo(() => {\n if (isTrialDone) return cancellationReasonAfterTrial;\n\n return withTutor ? cancellationReasonWithTutor : cancellationReasonNoTutor;\n }, [isTrialDone, withTutor]);\n const { title, description, reasons } = config;\n\n const handleCancelConfirmation = useCallback(\n (errorMessage: string | null) => {\n if (errorMessage) {\n setIsError(true);\n trackEvent(PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_FAILED, {\n reason,\n error: errorMessage,\n });\n // Need to add analytics event for cancellation failure\n\n return;\n }\n\n trackEvent(PLA_ANALYTICS_EVENTS.SUBSCRIPTION_CANCELLATION_SUCCESSFUL, {\n reason,\n });\n onCancelConfirmation();\n },\n [onCancelConfirmation, reason, trackEvent],\n );\n\n const { patch: cancelSubscription, isProcessing } = useCancelSubscriptionPatch({\n onComplete: handleCancelConfirmation,\n });\n\n const isOtherReasonSelected = reason === 'other';\n const isSubmitDisabled =\n isProcessing || !reason || (isOtherReasonSelected && !otherReason.trim());\n\n const handleCancel = useCallback(() => {\n const cancellationReason = isOtherReasonSelected ? otherReason : reason;\n\n cancelSubscription(studentId, {\n reason: cancellationReason,\n student_demo_id: demoId,\n });\n }, [isOtherReasonSelected, otherReason, reason, cancelSubscription, studentId, demoId]);\n\n const handleSelectReason = useCallback((id: string) => {\n setOtherReason('');\n setIsError(false);\n setReason(id);\n }, []);\n\n const handleOtherReasonChange = useCallback((event: ChangeEvent<HTMLTextAreaElement>) => {\n setIsError(false);\n setOtherReason(event.target.value);\n }, []);\n\n useEffect(() => {\n if (isOtherReasonSelected && textAreaRef.current) {\n textAreaRef.current?.focus();\n textAreaRef.current?.scrollIntoView({ behavior: 'smooth' });\n }\n }, [isOtherReasonSelected]);\n\n return (\n <Styled.Container $background=\"BLACK_2\" $width=\"100%\" $borderColor=\"BLACK_5\">\n <Styled.OuterWrapper $flex={1}>\n <FlexView $gutterX={isMobile ? 1 : 2.5} $gapX={isMobile ? 1.5 : 2.5}>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n {title}\n </Text>\n {description ? (\n <>\n <Separator heightX={0.25} />\n <Text $renderAs=\"ub2\" $renderOnMobileAs=\"ub3\" $color=\"WHITE\">\n {description}\n </Text>\n </>\n ) : null}\n </FlexView>\n <Styled.ContentWrapper\n $flex={1}\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1 : 2.5}\n $width={'100%'}\n $alignItems=\"flex-start\"\n $flexRowGapX={1}\n >\n {reasons.map(({ id, label }) => (\n <PillButton\n selected={reason === id}\n key={id}\n label={label}\n id={id}\n onClick={handleSelectReason}\n isTransparent\n />\n ))}\n {isOtherReasonSelected && (\n <Styled.StyledTextArea\n placeholder=\"Tell us more about your experience...\"\n id=\"text-area\"\n ref={textAreaRef}\n value={otherReason}\n onChange={handleOtherReasonChange}\n />\n )}\n </Styled.ContentWrapper>\n </Styled.OuterWrapper>\n <Styled.FooterWrapper\n $position=\"relative\"\n $gutterX={isMobile ? 1 : 2.5}\n $gapX={isMobile ? 1.5 : 2.5}\n $flexDirection=\"row\"\n $flexColumnGapX={1.5}\n >\n {isError ? (\n <Styled.ErrorWrapper $renderAs=\"ub3\" $color=\"ORANGE_4\" $align=\"left\">\n Something went wrong. Please try again.\n </Styled.ErrorWrapper>\n ) : null}\n <TextButton\n label=\"Cancel Subscription\"\n onClick={handleCancel}\n color=\"ORANGE_4\"\n disabled={isSubmitDisabled}\n />\n\n <TextButton label=\"Close\" onClick={closeModal} color=\"WHITE\" />\n </Styled.FooterWrapper>\n </Styled.Container>\n );\n});\n\nexport default CancellationReason;\n"],"names":["CancellationReason","memo","withTutor","isTrialDone","studentId","demoId","onCancelConfirmation","useModalParams","closeModal","useModalActions","trackEvent","useUIContext","reason","setReason","useState","isError","setIsError","otherReason","setOtherReason","textAreaRef","useRef","device","useTheme","isMobile","EDeviceType","config","useMemo","cancellationReasonAfterTrial","cancellationReasonWithTutor","cancellationReasonNoTutor","title","description","reasons","handleCancelConfirmation","useCallback","errorMessage","PLA_ANALYTICS_EVENTS","cancelSubscription","isProcessing","useCancelSubscriptionPatch","isOtherReasonSelected","isSubmitDisabled","handleCancel","handleSelectReason","id","handleOtherReasonChange","event","useEffect","_a","_b","jsxs","Styled.Container","Styled.OuterWrapper","FlexView","jsx","Text","Fragment","Separator","Styled.ContentWrapper","label","PillButton","Styled.StyledTextArea","Styled.FooterWrapper","Styled.ErrorWrapper","TextButton","CancellationReason$1"],"mappings":"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"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { useCallback as l, useMemo as f } from "react";
|
|
2
|
-
import h from "../../../ui/modals/use-modal-actions.js";
|
|
3
|
-
import { invalidateParentHome as y } from "../../api/parent-home.js";
|
|
4
|
-
const V = ({
|
|
5
|
-
studentId: a,
|
|
6
|
-
demoId: t,
|
|
7
|
-
withTutor: o,
|
|
8
|
-
isTrialDone: e,
|
|
9
|
-
studentName: i,
|
|
10
|
-
billingDetails: d,
|
|
11
|
-
onChangeTutor: m,
|
|
12
|
-
onRescheduleDemo: p
|
|
13
|
-
}) => {
|
|
14
|
-
const { openModal: n } = h(), { payment_method_details: s } = d ?? {}, r = l(() => {
|
|
15
|
-
y(a), n("pla-cancellation-confirmation");
|
|
16
|
-
}, [n, a]), C = l(() => {
|
|
17
|
-
n("pla-cancellation-reason", {
|
|
18
|
-
withTutor: o,
|
|
19
|
-
studentId: a,
|
|
20
|
-
demoId: t,
|
|
21
|
-
isTrialDone: e,
|
|
22
|
-
onCancelConfirmation: r
|
|
23
|
-
});
|
|
24
|
-
}, [t, r, e, n, a, o]), c = l(() => {
|
|
25
|
-
n("pla-cancel-subscription", {
|
|
26
|
-
withTutor: o,
|
|
27
|
-
studentName: i,
|
|
28
|
-
isTrialDone: e,
|
|
29
|
-
onSwitchTutor: m,
|
|
30
|
-
onReschedule: p,
|
|
31
|
-
onCancel: C
|
|
32
|
-
});
|
|
33
|
-
}, [
|
|
34
|
-
n,
|
|
35
|
-
o,
|
|
36
|
-
i,
|
|
37
|
-
e,
|
|
38
|
-
m,
|
|
39
|
-
p,
|
|
40
|
-
C
|
|
41
|
-
]), M = l(() => {
|
|
42
|
-
n("pla-view-payment-method", {
|
|
43
|
-
paymentMethodDetails: s,
|
|
44
|
-
onCancel: c
|
|
45
|
-
});
|
|
46
|
-
}, [c, n, s]);
|
|
47
|
-
return f(
|
|
48
|
-
() => ({
|
|
49
|
-
onCancelSubscription: c,
|
|
50
|
-
onViewPaymentMethod: M
|
|
51
|
-
}),
|
|
52
|
-
[c, M]
|
|
53
|
-
);
|
|
54
|
-
};
|
|
55
|
-
export {
|
|
56
|
-
V as usePLAModalHandlers
|
|
57
|
-
};
|
|
58
|
-
//# sourceMappingURL=use-pla-model-handlers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-pla-model-handlers.js","sources":["../../../../../src/features/parent-dashboard/modals/hooks/use-pla-model-handlers.ts"],"sourcesContent":["import type { IBillingDetails } from '../../parent-dashboard-types';\n\nimport { useCallback, useMemo } from 'react';\n\nimport useModalActions from '../../../ui/modals/use-modal-actions';\nimport { invalidateParentHome } from '../../api/parent-home';\n\ninterface IUsePLAModalHandlers {\n demoId: string | null;\n isTrialDone: boolean;\n studentId: string;\n studentName: string;\n withTutor: boolean;\n billingDetails: IBillingDetails | null;\n onRescheduleDemo: () => void;\n onChangeTutor: () => void;\n}\n\ninterface IUsePLAModalResponse {\n onCancelSubscription: () => void;\n onViewPaymentMethod: () => void;\n}\n\nexport const usePLAModalHandlers = ({\n studentId,\n demoId,\n withTutor,\n isTrialDone,\n studentName,\n billingDetails,\n onChangeTutor,\n onRescheduleDemo,\n}: IUsePLAModalHandlers): IUsePLAModalResponse => {\n const { openModal } = useModalActions();\n\n const { payment_method_details: paymentMethodDetails } = billingDetails ?? {};\n\n const handleCancelConfirmation = useCallback(() => {\n invalidateParentHome(studentId);\n openModal('pla-cancellation-confirmation');\n }, [openModal, studentId]);\n\n const handleViewCancellationReason = useCallback(() => {\n openModal('pla-cancellation-reason', {\n withTutor,\n studentId,\n demoId,\n isTrialDone,\n onCancelConfirmation: handleCancelConfirmation,\n });\n }, [demoId, handleCancelConfirmation, isTrialDone, openModal, studentId, withTutor]);\n\n const handleCancelSubscription = useCallback(() => {\n openModal('pla-cancel-subscription', {\n withTutor,\n studentName,\n isTrialDone,\n onSwitchTutor: onChangeTutor,\n onReschedule: onRescheduleDemo,\n onCancel: handleViewCancellationReason,\n });\n }, [\n openModal,\n withTutor,\n studentName,\n isTrialDone,\n onChangeTutor,\n onRescheduleDemo,\n handleViewCancellationReason,\n ]);\n\n const handleViewPaymentMethod = useCallback(() => {\n openModal('pla-view-payment-method', {\n paymentMethodDetails,\n onCancel: handleCancelSubscription,\n });\n }, [handleCancelSubscription, openModal, paymentMethodDetails]);\n\n return useMemo(\n () => ({\n onCancelSubscription: handleCancelSubscription,\n onViewPaymentMethod: handleViewPaymentMethod,\n }),\n [handleCancelSubscription, handleViewPaymentMethod],\n );\n};\n"],"names":["usePLAModalHandlers","studentId","demoId","withTutor","isTrialDone","studentName","billingDetails","onChangeTutor","onRescheduleDemo","openModal","useModalActions","paymentMethodDetails","handleCancelConfirmation","useCallback","invalidateParentHome","handleViewCancellationReason","handleCancelSubscription","handleViewPaymentMethod","useMemo"],"mappings":";;;AAuBO,MAAMA,IAAsB,CAAC;AAAA,EAClC,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,kBAAAC;AACF,MAAkD;AAC1C,QAAA,EAAE,WAAAC,MAAcC,KAEhB,EAAE,wBAAwBC,MAAyBL,KAAkB,CAAA,GAErEM,IAA2BC,EAAY,MAAM;AACjD,IAAAC,EAAqBb,CAAS,GAC9BQ,EAAU,+BAA+B;AAAA,EAAA,GACxC,CAACA,GAAWR,CAAS,CAAC,GAEnBc,IAA+BF,EAAY,MAAM;AACrD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,WAAAF;AAAA,MACA,QAAAC;AAAA,MACA,aAAAE;AAAA,MACA,sBAAsBQ;AAAA,IAAA,CACvB;AAAA,EAAA,GACA,CAACV,GAAQU,GAA0BR,GAAaK,GAAWR,GAAWE,CAAS,CAAC,GAE7Ea,IAA2BH,EAAY,MAAM;AACjD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,WAAAN;AAAA,MACA,aAAAE;AAAA,MACA,aAAAD;AAAA,MACA,eAAeG;AAAA,MACf,cAAcC;AAAA,MACd,UAAUO;AAAA,IAAA,CACX;AAAA,EAAA,GACA;AAAA,IACDN;AAAA,IACAN;AAAA,IACAE;AAAA,IACAD;AAAA,IACAG;AAAA,IACAC;AAAA,IACAO;AAAA,EAAA,CACD,GAEKE,IAA0BJ,EAAY,MAAM;AAChD,IAAAJ,EAAU,2BAA2B;AAAA,MACnC,sBAAAE;AAAA,MACA,UAAUK;AAAA,IAAA,CACX;AAAA,EACA,GAAA,CAACA,GAA0BP,GAAWE,CAAoB,CAAC;AAEvD,SAAAO;AAAA,IACL,OAAO;AAAA,MACL,sBAAsBF;AAAA,MACtB,qBAAqBC;AAAA,IAAA;AAAA,IAEvB,CAACD,GAA0BC,CAAuB;AAAA,EAAA;AAEtD;"}
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
import { jsxs as e, jsx as o, Fragment as $ } from "react/jsx-runtime";
|
|
2
|
-
import { memo as h } from "react";
|
|
3
|
-
import { useTheme as p } from "styled-components";
|
|
4
|
-
import u from "../../../ui/buttons/text-button/text-button.js";
|
|
5
|
-
import t from "../../../ui/layout/flex-view.js";
|
|
6
|
-
import b from "../../../ui/modals/use-modal-params.js";
|
|
7
|
-
import n from "../../../ui/separator/separator.js";
|
|
8
|
-
import i from "../../../ui/text/text.js";
|
|
9
|
-
import { EDeviceType as f } from "../../../ui/theme/constants.js";
|
|
10
|
-
const g = h(() => {
|
|
11
|
-
const { paymentMethodDetails: l, onCancel: a } = b(), {
|
|
12
|
-
exp_month: c,
|
|
13
|
-
exp_year: d,
|
|
14
|
-
last_4_digits: s
|
|
15
|
-
} = l || {}, { device: m } = p(), r = m <= f.MOBILE;
|
|
16
|
-
return /* @__PURE__ */ e(t, { $gapX: r ? 2.25 : 2.5, $gutterX: r ? 1 : 2.5, $background: "BLACK_2", children: [
|
|
17
|
-
/* @__PURE__ */ o(
|
|
18
|
-
i,
|
|
19
|
-
{
|
|
20
|
-
$renderAs: "ah4-bold",
|
|
21
|
-
$renderOnMobileAs: "ac4-black",
|
|
22
|
-
$color: r ? "WHITE_T_60" : "WHITE",
|
|
23
|
-
children: r ? "Payment Method" : "View Payment Method"
|
|
24
|
-
}
|
|
25
|
-
),
|
|
26
|
-
/* @__PURE__ */ o(n, { heightX: r ? 1 : 2.5 }),
|
|
27
|
-
/* @__PURE__ */ e(
|
|
28
|
-
t,
|
|
29
|
-
{
|
|
30
|
-
$flexDirection: "row",
|
|
31
|
-
$justifyContent: "flex-start",
|
|
32
|
-
$alignItems: "center",
|
|
33
|
-
$flexGapX: 0.5,
|
|
34
|
-
$gapX: 1,
|
|
35
|
-
$gutterX: 1,
|
|
36
|
-
$background: "BLACK_2",
|
|
37
|
-
$borderColor: "BLACK_5",
|
|
38
|
-
children: [
|
|
39
|
-
/* @__PURE__ */ o(t, { $widthX: 3, $heightX: 1.75, $background: "BLACK_4", $borderRadiusX: 0.25 }),
|
|
40
|
-
/* @__PURE__ */ e(t, { children: [
|
|
41
|
-
/* @__PURE__ */ e(i, { $renderAs: "ac4-black", $color: "WHITE", children: [
|
|
42
|
-
"•••• ",
|
|
43
|
-
s
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ e(i, { $renderAs: "ub3-bold", $color: "WHITE", children: [
|
|
46
|
-
"Card",
|
|
47
|
-
" ",
|
|
48
|
-
/* @__PURE__ */ e(i, { $renderAs: "ub3", $color: "WHITE", $inline: !0, children: [
|
|
49
|
-
"Exp: ",
|
|
50
|
-
c,
|
|
51
|
-
"/",
|
|
52
|
-
d
|
|
53
|
-
] })
|
|
54
|
-
] })
|
|
55
|
-
] })
|
|
56
|
-
]
|
|
57
|
-
}
|
|
58
|
-
),
|
|
59
|
-
r ? /* @__PURE__ */ e($, { children: [
|
|
60
|
-
/* @__PURE__ */ o(n, { heightX: 1.5 }),
|
|
61
|
-
/* @__PURE__ */ o(
|
|
62
|
-
u,
|
|
63
|
-
{
|
|
64
|
-
size: "small",
|
|
65
|
-
label: "Cancel subscription",
|
|
66
|
-
color: "WHITE_T_60",
|
|
67
|
-
onClick: a
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
] }) : null
|
|
71
|
-
] });
|
|
72
|
-
}), I = g;
|
|
73
|
-
export {
|
|
74
|
-
I as default
|
|
75
|
-
};
|
|
76
|
-
//# sourceMappingURL=view-payment-method.js.map
|
package/dist/features/parent-dashboard/modals/view-payment-method/view-payment-method.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"view-payment-method.js","sources":["../../../../../src/features/parent-dashboard/modals/view-payment-method/view-payment-method.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { EDeviceType } from '../../../ui/theme/constants';\nimport { type IViewPaymentMethodProps } from './view-payment-method-types';\n\nconst ViewPaymentMethod = memo(() => {\n const { paymentMethodDetails, onCancel } = useModalParams<IViewPaymentMethodProps>();\n\n const {\n exp_month: expMonth,\n exp_year: expYear,\n last_4_digits: last4Digits,\n } = paymentMethodDetails || {};\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView $gapX={isMobile ? 2.25 : 2.5} $gutterX={isMobile ? 1 : 2.5} $background=\"BLACK_2\">\n <Text\n $renderAs=\"ah4-bold\"\n $renderOnMobileAs=\"ac4-black\"\n $color={isMobile ? 'WHITE_T_60' : 'WHITE'}\n >\n {isMobile ? 'Payment Method' : 'View Payment Method'}\n </Text>\n <Separator heightX={isMobile ? 1 : 2.5} />\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexGapX={0.5}\n $gapX={1}\n $gutterX={1}\n $background=\"BLACK_2\"\n $borderColor=\"BLACK_5\"\n >\n <FlexView $widthX={3} $heightX={1.75} $background=\"BLACK_4\" $borderRadiusX={0.25} />\n <FlexView>\n <Text $renderAs=\"ac4-black\" $color=\"WHITE\">\n •••• {last4Digits}\n </Text>\n <Text $renderAs=\"ub3-bold\" $color=\"WHITE\">\n Card{' '}\n <Text $renderAs=\"ub3\" $color=\"WHITE\" $inline>\n Exp: {expMonth}/{expYear}\n </Text>\n </Text>\n </FlexView>\n </FlexView>\n {isMobile ? (\n <>\n <Separator heightX={1.5} />\n <TextButton\n size=\"small\"\n label=\"Cancel subscription\"\n color=\"WHITE_T_60\"\n onClick={onCancel}\n />\n </>\n ) : null}\n </FlexView>\n );\n});\n\nexport default ViewPaymentMethod;\n"],"names":["ViewPaymentMethod","memo","paymentMethodDetails","onCancel","useModalParams","expMonth","expYear","last4Digits","device","useTheme","isMobile","EDeviceType","jsxs","FlexView","jsx","Text","Separator","Fragment","TextButton","ViewPaymentMethod$1"],"mappings":";;;;;;;;;AAWA,MAAMA,IAAoBC,EAAK,MAAM;AACnC,QAAM,EAAE,sBAAAC,GAAsB,UAAAC,EAAS,IAAIC,EAAwC,GAE7E;AAAA,IACJ,WAAWC;AAAA,IACX,UAAUC;AAAA,IACV,eAAeC;AAAA,EAAA,IACbL,KAAwB,CAAA,GAEtB,EAAE,QAAAM,MAAWC,KACbC,IAAWF,KAAUG,EAAY;AAGrC,SAAA,gBAAAC,EAACC,GAAS,EAAA,OAAOH,IAAW,OAAO,KAAK,UAAUA,IAAW,IAAI,KAAK,aAAY,WAChF,UAAA;AAAA,IAAA,gBAAAI;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,mBAAkB;AAAA,QAClB,QAAQL,IAAW,eAAe;AAAA,QAEjC,cAAW,mBAAmB;AAAA,MAAA;AAAA,IACjC;AAAA,IACC,gBAAAI,EAAAE,GAAA,EAAU,SAASN,IAAW,IAAI,KAAK;AAAA,IACxC,gBAAAE;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,gBAAe;AAAA,QACf,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,WAAW;AAAA,QACX,OAAO;AAAA,QACP,UAAU;AAAA,QACV,aAAY;AAAA,QACZ,cAAa;AAAA,QAEb,UAAA;AAAA,UAAC,gBAAAC,EAAAD,GAAA,EAAS,SAAS,GAAG,UAAU,MAAM,aAAY,WAAU,gBAAgB,KAAM,CAAA;AAAA,4BACjFA,GACC,EAAA,UAAA;AAAA,YAAA,gBAAAD,EAACG,GAAK,EAAA,WAAU,aAAY,QAAO,SAAQ,UAAA;AAAA,cAAA;AAAA,cACnCR;AAAA,YAAA,GACR;AAAA,YACC,gBAAAK,EAAAG,GAAA,EAAK,WAAU,YAAW,QAAO,SAAQ,UAAA;AAAA,cAAA;AAAA,cACnC;AAAA,gCACJA,GAAK,EAAA,WAAU,OAAM,QAAO,SAAQ,SAAO,IAAC,UAAA;AAAA,gBAAA;AAAA,gBACrCV;AAAA,gBAAS;AAAA,gBAAEC;AAAA,cAAA,GACnB;AAAA,YAAA,GACF;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,IACCI,IAEG,gBAAAE,EAAAK,GAAA,EAAA,UAAA;AAAA,MAAC,gBAAAH,EAAAE,GAAA,EAAU,SAAS,IAAK,CAAA;AAAA,MACzB,gBAAAF;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,OAAM;AAAA,UACN,OAAM;AAAA,UACN,SAASf;AAAA,QAAA;AAAA,MACX;AAAA,IAAA,EAAA,CACF,IACE;AAAA,EACN,EAAA,CAAA;AAEJ,CAAC,GAEDgB,IAAenB;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createPostAPI as t } from "@cuemath/rest-api";
|
|
2
|
-
import { BASE_URL_V1 as e } from "../../../constants/api.js";
|
|
3
|
-
const { usePost: i } = t({
|
|
4
|
-
getURL: () => `${e}/teacher-slot-availability/`
|
|
5
|
-
});
|
|
6
|
-
export {
|
|
7
|
-
i as usePostTeacherAvailability
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=teacher-availability.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"teacher-availability.js","sources":["../../../../src/features/trial-session/api/teacher-availability.ts"],"sourcesContent":["import { createPostAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\n\ntype TSessionList = {\n weekday: string;\n start_time: string;\n};\n\ntype TTeacherAvailabilityBody = {\n teacher_id: string;\n session_list: TSessionList[];\n};\n\nexport type TTeacherAvailabilityResponse = {\n is_available: boolean;\n reason: string;\n}[];\n\nconst { usePost: usePostTeacherAvailability } = createPostAPI<\n TTeacherAvailabilityResponse,\n TTeacherAvailabilityBody\n>({\n getURL: () => `${BASE_URL_V1}/teacher-slot-availability/`,\n});\n\nexport { usePostTeacherAvailability };\n"],"names":["usePostTeacherAvailability","createPostAPI","BASE_URL_V1"],"mappings":";;AAmBA,MAAM,EAAE,SAASA,EAA2B,IAAIC,EAG9C;AAAA,EACA,QAAQ,MAAM,GAAGC,CAAW;AAC9B,CAAC;"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
const m = (o, n) => {
|
|
2
|
-
let r = typeof o == "string" ? parseInt(o, 10) : o, t = typeof n == "string" ? parseInt(n, 10) : n;
|
|
3
|
-
const a = t % 15;
|
|
4
|
-
return a >= 8 ? (t += 15 - a, t === 60 && (t = 0, r += 1, r === 24 && (r = 0))) : t -= a, {
|
|
5
|
-
roundedHour: r.toString().padStart(2, "0"),
|
|
6
|
-
roundedMinute: t.toString().padStart(2, "0")
|
|
7
|
-
};
|
|
8
|
-
}, c = (o, n) => {
|
|
9
|
-
const r = new Date(o), t = {
|
|
10
|
-
weekday: "long",
|
|
11
|
-
hour: "2-digit",
|
|
12
|
-
minute: "2-digit",
|
|
13
|
-
hour12: !0,
|
|
14
|
-
timeZone: n
|
|
15
|
-
}, p = new Intl.DateTimeFormat("en-US", t).formatToParts(r);
|
|
16
|
-
let i = "", d = "", u = "", s = "";
|
|
17
|
-
for (const e of p)
|
|
18
|
-
e.type === "weekday" && (i = e.value), e.type === "hour" && (d = e.value), e.type === "minute" && (u = e.value), e.type === "dayPeriod" && (s = e.value);
|
|
19
|
-
const { roundedHour: f, roundedMinute: l } = m(d, u);
|
|
20
|
-
return {
|
|
21
|
-
day: i,
|
|
22
|
-
time: `${f}:${l} ${s}`
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
export {
|
|
26
|
-
c as extractDayAndTimeFromEpoch
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=helpers.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.js","sources":["../../../../../src/features/trial-session/comps/class-preference/helpers.ts"],"sourcesContent":["/**\n * Rounds a given hour and minute to the nearest 15-minute interval.\n * @param hour string or number\n * @param minute string or number\n * @returns { roundedHour: string, roundedMinute: string }\n */\nconst roundToNearest15Min = (\n hour: string | number,\n minute: string | number,\n): { roundedHour: string; roundedMinute: string } => {\n let h = typeof hour === 'string' ? parseInt(hour, 10) : hour;\n let m = typeof minute === 'string' ? parseInt(minute, 10) : minute;\n // Round down to nearest 15\n const remainder = m % 15;\n\n if (remainder >= 8) {\n m += 15 - remainder;\n if (m === 60) {\n m = 0;\n h += 1;\n if (h === 24) h = 0;\n }\n } else {\n m -= remainder;\n }\n\n return {\n roundedHour: h.toString().padStart(2, '0'),\n roundedMinute: m.toString().padStart(2, '0'),\n };\n};\n\n/**\n * Extracts day and time in 'hh:mm AM/PM' format from epoch and timezone.\n * @param epoch Epoch timestamp (number)\n * @param timezone IANA timezone string (e.g., 'Asia/Kolkata')\n * @returns { day: string, time: string }\n */\nconst extractDayAndTimeFromEpoch = (\n epoch: number,\n timezone: string,\n): { day: string; time: string } => {\n // Use Intl.DateTimeFormat for timezone conversion\n const date = new Date(epoch);\n const options: Intl.DateTimeFormatOptions = {\n weekday: 'long',\n hour: '2-digit',\n minute: '2-digit',\n hour12: true,\n timeZone: timezone,\n };\n const formatter = new Intl.DateTimeFormat('en-US', options);\n const parts = formatter.formatToParts(date);\n let day = '';\n let hour = '';\n let minute = '';\n let period = '';\n\n for (const part of parts) {\n if (part.type === 'weekday') day = part.value;\n\n if (part.type === 'hour') hour = part.value;\n\n if (part.type === 'minute') minute = part.value;\n\n if (part.type === 'dayPeriod') period = part.value;\n }\n const { roundedHour, roundedMinute } = roundToNearest15Min(hour, minute);\n\n return {\n day,\n time: `${roundedHour}:${roundedMinute} ${period}`,\n };\n};\n\nexport { extractDayAndTimeFromEpoch };\n"],"names":["roundToNearest15Min","hour","minute","h","m","remainder","extractDayAndTimeFromEpoch","epoch","timezone","date","options","parts","day","period","part","roundedHour","roundedMinute"],"mappings":"AAMA,MAAMA,IAAsB,CAC1BC,GACAC,MACmD;AACnD,MAAIC,IAAI,OAAOF,KAAS,WAAW,SAASA,GAAM,EAAE,IAAIA,GACpDG,IAAI,OAAOF,KAAW,WAAW,SAASA,GAAQ,EAAE,IAAIA;AAE5D,QAAMG,IAAYD,IAAI;AAEtB,SAAIC,KAAa,KACfD,KAAK,KAAKC,GACND,MAAM,OACJA,IAAA,GACCD,KAAA,GACDA,MAAM,OAAQA,IAAA,OAGfC,KAAAC,GAGA;AAAA,IACL,aAAaF,EAAE,SAAA,EAAW,SAAS,GAAG,GAAG;AAAA,IACzC,eAAeC,EAAE,SAAA,EAAW,SAAS,GAAG,GAAG;AAAA,EAAA;AAE/C,GAQME,IAA6B,CACjCC,GACAC,MACkC;AAE5B,QAAAC,IAAO,IAAI,KAAKF,CAAK,GACrBG,IAAsC;AAAA,IAC1C,SAAS;AAAA,IACT,MAAM;AAAA,IACN,QAAQ;AAAA,IACR,QAAQ;AAAA,IACR,UAAUF;AAAA,EAAA,GAGNG,IADY,IAAI,KAAK,eAAe,SAASD,CAAO,EAClC,cAAcD,CAAI;AAC1C,MAAIG,IAAM,IACNX,IAAO,IACPC,IAAS,IACTW,IAAS;AAEb,aAAWC,KAAQH;AACjB,IAAIG,EAAK,SAAS,cAAWF,IAAME,EAAK,QAEpCA,EAAK,SAAS,WAAQb,IAAOa,EAAK,QAElCA,EAAK,SAAS,aAAUZ,IAASY,EAAK,QAEtCA,EAAK,SAAS,gBAAaD,IAASC,EAAK;AAE/C,QAAM,EAAE,aAAAC,GAAa,eAAAC,EAAA,IAAkBhB,EAAoBC,GAAMC,CAAM;AAEhE,SAAA;AAAA,IACL,KAAAU;AAAA,IACA,MAAM,GAAGG,CAAW,IAAIC,CAAa,IAAIH,CAAM;AAAA,EAAA;AAEnD;"}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { useState as h, useCallback as O } from "react";
|
|
2
|
-
import { PREFERENCE_CATEGORY as p } from "../../milestone/constants.js";
|
|
3
|
-
import { getGradesFromConfig as T } from "../../milestone/create/milestone-create-helpers.js";
|
|
4
|
-
import { PREFERENCE_CODE_MAP as v } from "../comps/student-feedback/student-feedback-constants.js";
|
|
5
|
-
import { getPreferenceCodesByCategory as u } from "../helper.js";
|
|
6
|
-
const A = ({
|
|
7
|
-
teacherClassroomId: g,
|
|
8
|
-
milestoneConfig: n,
|
|
9
|
-
studentTimezone: o,
|
|
10
|
-
updateSlideConfig: r
|
|
11
|
-
}) => {
|
|
12
|
-
const t = `trialSessionConfigCache_${g}`, [s, C] = h(() => {
|
|
13
|
-
try {
|
|
14
|
-
return window.localStorage.getItem(t) === "true";
|
|
15
|
-
} catch {
|
|
16
|
-
return !1;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
return { onRenderUpdateSlideConfig: O(
|
|
20
|
-
(E) => {
|
|
21
|
-
if (s)
|
|
22
|
-
return;
|
|
23
|
-
const { student: m, intel_student: S } = E, { student_preference: I } = S || {}, { preferences: i = [] } = I || {}, { name: P, grade: c } = m || {}, R = !!T(n).find(
|
|
24
|
-
(_) => _.id === c
|
|
25
|
-
), a = u(i, p.OBJECTIVES), e = u(
|
|
26
|
-
i,
|
|
27
|
-
p.POSITION,
|
|
28
|
-
!0
|
|
29
|
-
), d = a.length > 0 ? a : null, l = e.length > 0 ? e : null, f = e.length > 0 && e[0] ? [v[e[0]]] : null, U = {
|
|
30
|
-
studentTimezone: o,
|
|
31
|
-
name: P,
|
|
32
|
-
grade: R ? c : "",
|
|
33
|
-
...d && { personalizedObjectives: d },
|
|
34
|
-
...l && { personalizedPosition: l },
|
|
35
|
-
...f && { personalizedLevel: f }
|
|
36
|
-
};
|
|
37
|
-
try {
|
|
38
|
-
window.localStorage.setItem(t, "true"), C(!0);
|
|
39
|
-
} catch {
|
|
40
|
-
}
|
|
41
|
-
r(U);
|
|
42
|
-
},
|
|
43
|
-
[s, n, o, r, t]
|
|
44
|
-
) };
|
|
45
|
-
};
|
|
46
|
-
export {
|
|
47
|
-
A as useSlideConfigUpdate
|
|
48
|
-
};
|
|
49
|
-
//# sourceMappingURL=use-slide-config-update.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-slide-config-update.js","sources":["../../../../src/features/trial-session/hooks/use-slide-config-update.ts"],"sourcesContent":["import type { IMilestoneConfig } from '../../milestone/create/milestone-create-types';\nimport type { ITrialHomeData, ITrialSessionFormFields } from '../trial-session-types';\n\nimport { useCallback, useState } from 'react';\n\nimport { PREFERENCE_CATEGORY } from '../../milestone/constants';\nimport { getGradesFromConfig } from '../../milestone/create/milestone-create-helpers';\nimport { PREFERENCE_CODE_MAP } from '../comps/student-feedback/student-feedback-constants';\nimport { getPreferenceCodesByCategory } from '../helper';\n\ninterface UseSlideConfigUpdateProps {\n teacherClassroomId: string;\n milestoneConfig: IMilestoneConfig;\n studentTimezone?: string;\n updateSlideConfig: (config: Partial<ITrialSessionFormFields>) => void;\n}\n\nexport const useSlideConfigUpdate = ({\n teacherClassroomId,\n milestoneConfig,\n studentTimezone,\n updateSlideConfig,\n}: UseSlideConfigUpdateProps) => {\n const CACHE_KEY = `trialSessionConfigCache_${teacherClassroomId}`;\n\n // Check if config was already set for this student in localStorage\n const [isConfigSet, setIsConfigSet] = useState<boolean>(() => {\n try {\n return window.localStorage.getItem(CACHE_KEY) === 'true';\n } catch {\n return false;\n }\n });\n\n const onRenderUpdateSlideConfig = useCallback(\n (homeData: ITrialHomeData) => {\n // If config was already set for this student in this session, skip update\n if (isConfigSet) {\n return;\n }\n\n const { student, intel_student: intelStudent } = homeData;\n const { student_preference: studentPreference } = intelStudent || {};\n const { preferences = [] } = studentPreference || {};\n const { name: studentName, grade: studentGrade } = student || {};\n\n const IsGradeExistInMilestoneConfig = !!getGradesFromConfig(milestoneConfig).find(\n element => element.id === studentGrade,\n );\n\n const objectives = getPreferenceCodesByCategory(preferences, PREFERENCE_CATEGORY.OBJECTIVES);\n const position = getPreferenceCodesByCategory(\n preferences,\n PREFERENCE_CATEGORY.POSITION,\n true,\n );\n\n const objectivesToUpdate = objectives.length > 0 ? objectives : null;\n const positionToUpdate = position.length > 0 ? position : null;\n const levelToUpdate =\n position.length > 0 && position[0]\n ? [PREFERENCE_CODE_MAP[position[0] as keyof typeof PREFERENCE_CODE_MAP]]\n : null;\n\n const configToUpdate: Partial<ITrialSessionFormFields> = {\n studentTimezone,\n name: studentName,\n grade: IsGradeExistInMilestoneConfig ? studentGrade : '',\n ...(objectivesToUpdate && { personalizedObjectives: objectivesToUpdate }),\n ...(positionToUpdate && { personalizedPosition: positionToUpdate }),\n ...(levelToUpdate && { personalizedLevel: levelToUpdate }),\n };\n\n // Mark config as set in window. and state\n try {\n window.localStorage.setItem(CACHE_KEY, 'true');\n setIsConfigSet(true);\n } catch {} // Silent catch\n\n updateSlideConfig(configToUpdate);\n },\n [isConfigSet, milestoneConfig, studentTimezone, updateSlideConfig, CACHE_KEY],\n );\n\n return { onRenderUpdateSlideConfig };\n};\n"],"names":["useSlideConfigUpdate","teacherClassroomId","milestoneConfig","studentTimezone","updateSlideConfig","CACHE_KEY","isConfigSet","setIsConfigSet","useState","useCallback","homeData","student","intelStudent","studentPreference","preferences","studentName","studentGrade","IsGradeExistInMilestoneConfig","getGradesFromConfig","element","objectives","getPreferenceCodesByCategory","PREFERENCE_CATEGORY","position","objectivesToUpdate","positionToUpdate","levelToUpdate","PREFERENCE_CODE_MAP","configToUpdate"],"mappings":";;;;;AAiBO,MAAMA,IAAuB,CAAC;AAAA,EACnC,oBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,mBAAAC;AACF,MAAiC;AACzB,QAAAC,IAAY,2BAA2BJ,CAAkB,IAGzD,CAACK,GAAaC,CAAc,IAAIC,EAAkB,MAAM;AACxD,QAAA;AACF,aAAO,OAAO,aAAa,QAAQH,CAAS,MAAM;AAAA,IAAA,QAC5C;AACC,aAAA;AAAA,IACT;AAAA,EAAA,CACD;AAoDD,SAAO,EAAE,2BAlDyBI;AAAA,IAChC,CAACC,MAA6B;AAE5B,UAAIJ;AACF;AAGF,YAAM,EAAE,SAAAK,GAAS,eAAeC,EAAA,IAAiBF,GAC3C,EAAE,oBAAoBG,MAAsBD,KAAgB,CAAA,GAC5D,EAAE,aAAAE,IAAc,CAAA,MAAOD,KAAqB,CAAA,GAC5C,EAAE,MAAME,GAAa,OAAOC,EAAa,IAAIL,KAAW,IAExDM,IAAgC,CAAC,CAACC,EAAoBhB,CAAe,EAAE;AAAA,QAC3E,CAAAiB,MAAWA,EAAQ,OAAOH;AAAA,MAAA,GAGtBI,IAAaC,EAA6BP,GAAaQ,EAAoB,UAAU,GACrFC,IAAWF;AAAA,QACfP;AAAA,QACAQ,EAAoB;AAAA,QACpB;AAAA,MAAA,GAGIE,IAAqBJ,EAAW,SAAS,IAAIA,IAAa,MAC1DK,IAAmBF,EAAS,SAAS,IAAIA,IAAW,MACpDG,IACJH,EAAS,SAAS,KAAKA,EAAS,CAAC,IAC7B,CAACI,EAAoBJ,EAAS,CAAC,CAAqC,CAAC,IACrE,MAEAK,IAAmD;AAAA,QACvD,iBAAAzB;AAAA,QACA,MAAMY;AAAA,QACN,OAAOE,IAAgCD,IAAe;AAAA,QACtD,GAAIQ,KAAsB,EAAE,wBAAwBA,EAAmB;AAAA,QACvE,GAAIC,KAAoB,EAAE,sBAAsBA,EAAiB;AAAA,QACjE,GAAIC,KAAiB,EAAE,mBAAmBA,EAAc;AAAA,MAAA;AAItD,UAAA;AACK,eAAA,aAAa,QAAQrB,GAAW,MAAM,GAC7CE,EAAe,EAAI;AAAA,MAAA,QACb;AAAA,MAAC;AAET,MAAAH,EAAkBwB,CAAc;AAAA,IAClC;AAAA,IACA,CAACtB,GAAaJ,GAAiBC,GAAiBC,GAAmBC,CAAS;AAAA,EAAA,EAG3C;AACrC;"}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
File without changes
|