@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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cuemath/leap",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.35-m",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -96,5 +96,6 @@
|
|
|
96
96
|
"vite-plugin-dts": "3.6.4",
|
|
97
97
|
"vite-plugin-svgr": "3.2.0",
|
|
98
98
|
"vite-tsconfig-paths": "^4.2.2"
|
|
99
|
-
}
|
|
99
|
+
},
|
|
100
|
+
"packageManager": "yarn@4.4.1"
|
|
100
101
|
}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as f, useCallback as i, useMemo as w, useEffect as b } from "react";
|
|
3
|
-
import k from "../../../chapters-v2/chapter-details/block-sections/block-section-view.js";
|
|
4
|
-
import h from "../../../ui/layout/flex-view.js";
|
|
5
|
-
import B from "../../../ui/text/text.js";
|
|
6
|
-
import { JOURNEY_ID_STUDENT as L } from "../../journey-id/journey-id-student.js";
|
|
7
|
-
import { DOWNLOAD_BLOCK_MOCKS as g } from "../../mocks/chapter-page-journey-mock-data.js";
|
|
8
|
-
import { IndicatorType as I } from "../../use-journey/constants.js";
|
|
9
|
-
import { useJourney as J } from "../../use-journey/use-journey.js";
|
|
10
|
-
import E from "../use-home-page-journey/tooltip-item.js";
|
|
11
|
-
const H = () => {
|
|
12
|
-
const e = L.DOWNLOAD_BLOCK_JOURNEY, o = f(null), t = f([]), { nextCoachmark: l, setJourney: c, endJourney: s } = J(), u = i(() => {
|
|
13
|
-
l(e, !1, 0, !0);
|
|
14
|
-
}, [e, l]), m = i(() => {
|
|
15
|
-
document.body.style.overflow = "unset", s(e);
|
|
16
|
-
}, [s, e]), a = i(
|
|
17
|
-
({ chapterDetails: n, userType: C }) => {
|
|
18
|
-
if (!(o != null && o.current) || !n)
|
|
19
|
-
return;
|
|
20
|
-
const { image_hue: T } = n, O = [
|
|
21
|
-
{
|
|
22
|
-
originalElementToHighlightRef: o,
|
|
23
|
-
elementToHighlight: /* @__PURE__ */ r(h, { $widthX: 50, children: /* @__PURE__ */ r(
|
|
24
|
-
k,
|
|
25
|
-
{
|
|
26
|
-
blockData: g,
|
|
27
|
-
userType: C,
|
|
28
|
-
isLastBlock: !0,
|
|
29
|
-
lessonIdx: 0,
|
|
30
|
-
imageHue: T
|
|
31
|
-
}
|
|
32
|
-
) }),
|
|
33
|
-
type: I.TOOLTIP,
|
|
34
|
-
indicator: {
|
|
35
|
-
position: "top",
|
|
36
|
-
tooltipYCoOrdinates: 14,
|
|
37
|
-
tooltipXCoOrdinates: "-100%",
|
|
38
|
-
backgroundColor: "BLUE_4",
|
|
39
|
-
borderColor: "BLACK",
|
|
40
|
-
arrowColor: "BLACK",
|
|
41
|
-
arrowSize: 12,
|
|
42
|
-
arrowXCoOrdinates: -100,
|
|
43
|
-
width: 264,
|
|
44
|
-
children: null,
|
|
45
|
-
renderAs: "primary",
|
|
46
|
-
tooltipItem: /* @__PURE__ */ r(
|
|
47
|
-
E,
|
|
48
|
-
{
|
|
49
|
-
element: /* @__PURE__ */ r(h, { children: /* @__PURE__ */ r(B, { $renderAs: "ab2-black", children: "Introducing downloadable study material." }) }),
|
|
50
|
-
buttonLabel: "Got it",
|
|
51
|
-
onButtonClick: m
|
|
52
|
-
}
|
|
53
|
-
)
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
];
|
|
57
|
-
c(e, O);
|
|
58
|
-
const d = setTimeout(() => {
|
|
59
|
-
clearTimeout(d), o.current && o.current.scrollIntoView({
|
|
60
|
-
behavior: "smooth",
|
|
61
|
-
block: "center",
|
|
62
|
-
inline: "center"
|
|
63
|
-
});
|
|
64
|
-
const p = setTimeout(() => {
|
|
65
|
-
clearTimeout(p), document.body.style.overflow = "hidden", u();
|
|
66
|
-
}, 800);
|
|
67
|
-
t.current.push(p);
|
|
68
|
-
}, 800);
|
|
69
|
-
t.current.push(d);
|
|
70
|
-
},
|
|
71
|
-
[m, u, e, c]
|
|
72
|
-
), y = w(
|
|
73
|
-
() => ({
|
|
74
|
-
blockSectionRef: o,
|
|
75
|
-
startJourney: a
|
|
76
|
-
}),
|
|
77
|
-
[a]
|
|
78
|
-
);
|
|
79
|
-
return b(() => () => {
|
|
80
|
-
t.current.forEach((n) => clearTimeout(n)), t.current = [];
|
|
81
|
-
}, []), y;
|
|
82
|
-
};
|
|
83
|
-
export {
|
|
84
|
-
H as useDownloadBlockJourney
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=use-download-block-journey.js.map
|
package/dist/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-download-block-journey.js","sources":["../../../../../src/features/journey/hooks/use-chapter-page-journey/use-download-block-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport type { IChallengeArenaStartJourneyProps } from './chapter-page-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport BlockSectionView from '../../../chapters-v2/chapter-details/block-sections/block-section-view';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { JOURNEY_ID_STUDENT } from '../../journey-id/journey-id-student';\nimport { DOWNLOAD_BLOCK_MOCKS } from '../../mocks/chapter-page-journey-mock-data';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nexport const useDownloadBlockJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.DOWNLOAD_BLOCK_JOURNEY;\n\n const blockSectionRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, true);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n ({ chapterDetails, userType }: IChallengeArenaStartJourneyProps) => {\n if (!blockSectionRef?.current || !chapterDetails) {\n return;\n }\n\n const { image_hue: imageHue } = chapterDetails;\n\n const downloadNodeJourneySteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: blockSectionRef,\n elementToHighlight: (\n <FlexView $widthX={50}>\n <BlockSectionView\n blockData={DOWNLOAD_BLOCK_MOCKS}\n userType={userType}\n isLastBlock={true}\n lessonIdx={0}\n imageHue={imageHue}\n />\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipYCoOrdinates: 14,\n tooltipXCoOrdinates: '-100%',\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n arrowXCoOrdinates: -100,\n width: 264,\n children: null,\n renderAs: 'primary',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ab2-black\">Introducing downloadable study material.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, downloadNodeJourneySteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n\n // Scroll the element into view if it's not visible\n if (blockSectionRef.current) {\n blockSectionRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n\n // Wait for scroll to complete before starting the journey\n const scrollCompleteTimer = setTimeout(() => {\n clearTimeout(scrollCompleteTimer);\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 800); // Give time for smooth scroll to complete\n\n timerRefs.current.push(scrollCompleteTimer);\n }, 800);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [handleEndJourney, handleNextCoachmark, journeyId, setJourney],\n );\n\n const data = useMemo(\n () => ({\n blockSectionRef,\n startJourney,\n }),\n [startJourney],\n );\n\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useDownloadBlockJourney","journeyId","JOURNEY_ID_STUDENT","blockSectionRef","useRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","handleNextCoachmark","useCallback","handleEndJourney","startJourney","chapterDetails","userType","imageHue","downloadNodeJourneySteps","jsx","FlexView","BlockSectionView","DOWNLOAD_BLOCK_MOCKS","IndicatorType","TooltipItem","Text","delayBeforeStart","scrollCompleteTimer","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;AAeO,MAAMA,IAA0B,MAAM;AAC3C,QAAMC,IAAYC,EAAmB,wBAE/BC,IAAkBC,EAAuB,IAAI,GAC7CC,IAAYD,EAAwC,CAAA,CAAE,GACtD,EAAE,eAAAE,GAAe,YAAAC,GAAY,YAAAC,MAAeC,EAAW,GAEvDC,IAAsBC,E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AGzBtB,EAAgB,WAClBA,EAAgB,QAAQ,eAAe;AAAA,UACrC,UAAU;AAAA,UACV,OAAO;AAAA,UACP,QAAQ;AAAA,QAAA,CACT;AAIG,cAAAuB,IAAsB,WAAW,MAAM;AAC3C,uBAAaA,CAAmB,GACvB,SAAA,KAAK,MAAM,WAAW,UACXhB;WACnB,GAAG;AAEI,QAAAL,EAAA,QAAQ,KAAKqB,CAAmB;AAAA,SACzC,GAAG;AAEI,MAAArB,EAAA,QAAQ,KAAKoB,CAAgB;AAAA,IACzC;AAAA,IACA,CAACb,GAAkBF,GAAqBT,GAAWM,CAAU;AAAA,EAAA,GAGzDoB,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,iBAAAzB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAGf,SAAAgB,EAAU,MACD,MAAM;AACX,IAAAxB,EAAU,QAAQ,QAAQ,CAASyB,MAAA,aAAaA,CAAK,CAAC,GACtDzB,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEEsB;AACT;"}
|
|
@@ -1,140 +0,0 @@
|
|
|
1
|
-
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as i, useCallback as f, useMemo as R, useEffect as J } from "react";
|
|
3
|
-
import B from "../../../chapters-v2/chapter-details/block-sections/block-section-view.js";
|
|
4
|
-
import { getHasDownloadBlock as S } from "../../../chapters-v2/utils/index.js";
|
|
5
|
-
import a from "../../../ui/layout/flex-view.js";
|
|
6
|
-
import L from "../../../ui/text/text.js";
|
|
7
|
-
import { JOURNEY_ID_STUDENT as T } from "../../journey-id/journey-id-student.js";
|
|
8
|
-
import { BLOCK_MOCKS_WITH_DOWNLOAD_NODE as x, DOWNLOAD_BLOCK_MOCKS as K } from "../../mocks/chapter-page-journey-mock-data.js";
|
|
9
|
-
import { IndicatorType as g } from "../../use-journey/constants.js";
|
|
10
|
-
import { useJourney as H } from "../../use-journey/use-journey.js";
|
|
11
|
-
import D from "../use-home-page-journey/tooltip-item.js";
|
|
12
|
-
const z = () => {
|
|
13
|
-
const e = T.DOWNLOAD_NODE_JOURNEY, c = i(null), s = i(null), t = i(null), r = i([]), { nextCoachmark: h, setJourney: p, endJourney: n } = H(), d = f(() => {
|
|
14
|
-
h(e, !1, 0, !0);
|
|
15
|
-
}, [e, h]), u = f(() => {
|
|
16
|
-
document.body.style.overflow = "unset", n(e);
|
|
17
|
-
}, [n, e]), O = f(
|
|
18
|
-
({
|
|
19
|
-
chapterDetails: l,
|
|
20
|
-
userType: C,
|
|
21
|
-
canStartDownloadBlockJourney: _
|
|
22
|
-
}) => {
|
|
23
|
-
if (!l || !s.current)
|
|
24
|
-
return;
|
|
25
|
-
const { image_hue: y, blocks: A } = l, m = _ && S(A);
|
|
26
|
-
if (m && !t.current) return;
|
|
27
|
-
const I = [
|
|
28
|
-
{
|
|
29
|
-
originalElementToHighlightRef: s,
|
|
30
|
-
elementToHighlight: /* @__PURE__ */ o(a, { $widthX: 50, ref: c, children: /* @__PURE__ */ o(
|
|
31
|
-
B,
|
|
32
|
-
{
|
|
33
|
-
blockData: x,
|
|
34
|
-
userType: C,
|
|
35
|
-
isLastBlock: !0,
|
|
36
|
-
lessonIdx: 0,
|
|
37
|
-
imageHue: y,
|
|
38
|
-
isGoalBlock: !0
|
|
39
|
-
}
|
|
40
|
-
) }),
|
|
41
|
-
type: g.TOOLTIP,
|
|
42
|
-
indicator: {
|
|
43
|
-
position: "bottom",
|
|
44
|
-
tooltipYCoOrdinates: -84,
|
|
45
|
-
tooltipXCoOrdinates: "127%",
|
|
46
|
-
backgroundColor: "PURPLE_4",
|
|
47
|
-
borderColor: "BLACK",
|
|
48
|
-
arrowColor: "BLACK",
|
|
49
|
-
arrowSize: 12,
|
|
50
|
-
arrowXCoOrdinates: -100,
|
|
51
|
-
width: 264,
|
|
52
|
-
children: null,
|
|
53
|
-
renderAs: "primary",
|
|
54
|
-
tooltipItem: /* @__PURE__ */ o(
|
|
55
|
-
D,
|
|
56
|
-
{
|
|
57
|
-
element: /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(L, { $renderAs: "ab2-black", children: "Introducing downloadable study material." }) }),
|
|
58
|
-
buttonLabel: m ? "Next" : "Got it",
|
|
59
|
-
onButtonClick: () => {
|
|
60
|
-
if (m) {
|
|
61
|
-
const w = document.getElementById("tooltip-root");
|
|
62
|
-
w && Array.from(w.children).forEach((N) => {
|
|
63
|
-
N.style.display = "none";
|
|
64
|
-
}), c.current && (c.current.style.display = "none"), t.current && t.current.scrollIntoView({
|
|
65
|
-
behavior: "smooth",
|
|
66
|
-
block: "center",
|
|
67
|
-
inline: "center"
|
|
68
|
-
});
|
|
69
|
-
const k = setTimeout(() => {
|
|
70
|
-
clearTimeout(k), d();
|
|
71
|
-
}, 800);
|
|
72
|
-
r.current.push(k);
|
|
73
|
-
} else
|
|
74
|
-
u();
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
)
|
|
78
|
-
}
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
originalElementToHighlightRef: t,
|
|
82
|
-
elementToHighlight: /* @__PURE__ */ o(a, { $widthX: 50, children: /* @__PURE__ */ o(
|
|
83
|
-
B,
|
|
84
|
-
{
|
|
85
|
-
blockData: K,
|
|
86
|
-
userType: C,
|
|
87
|
-
isLastBlock: !0,
|
|
88
|
-
lessonIdx: 0,
|
|
89
|
-
imageHue: y
|
|
90
|
-
}
|
|
91
|
-
) }),
|
|
92
|
-
type: g.TOOLTIP,
|
|
93
|
-
indicator: {
|
|
94
|
-
position: "top",
|
|
95
|
-
tooltipYCoOrdinates: 14,
|
|
96
|
-
tooltipXCoOrdinates: "-100%",
|
|
97
|
-
backgroundColor: "BLUE_4",
|
|
98
|
-
borderColor: "BLACK",
|
|
99
|
-
arrowColor: "BLACK",
|
|
100
|
-
arrowSize: 12,
|
|
101
|
-
arrowXCoOrdinates: -100,
|
|
102
|
-
width: 264,
|
|
103
|
-
children: null,
|
|
104
|
-
renderAs: "primary",
|
|
105
|
-
tooltipItem: /* @__PURE__ */ o(
|
|
106
|
-
D,
|
|
107
|
-
{
|
|
108
|
-
element: /* @__PURE__ */ o(a, { children: /* @__PURE__ */ o(L, { $renderAs: "ab2-black", children: "Also available in the Downloads section." }) }),
|
|
109
|
-
buttonLabel: "Got it",
|
|
110
|
-
onButtonClick: () => {
|
|
111
|
-
u(), n(T.DOWNLOAD_BLOCK_JOURNEY);
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
)
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
];
|
|
118
|
-
p(e, I);
|
|
119
|
-
const b = setTimeout(() => {
|
|
120
|
-
clearTimeout(b), document.body.style.overflow = "hidden", d();
|
|
121
|
-
}, 800);
|
|
122
|
-
r.current.push(b);
|
|
123
|
-
},
|
|
124
|
-
[n, u, d, e, p]
|
|
125
|
-
), E = R(
|
|
126
|
-
() => ({
|
|
127
|
-
blockSectionRef: t,
|
|
128
|
-
downloadCoreBlockRef: s,
|
|
129
|
-
startJourney: O
|
|
130
|
-
}),
|
|
131
|
-
[O]
|
|
132
|
-
);
|
|
133
|
-
return J(() => () => {
|
|
134
|
-
r.current.forEach((l) => clearTimeout(l)), r.current = [];
|
|
135
|
-
}, []), E;
|
|
136
|
-
};
|
|
137
|
-
export {
|
|
138
|
-
z as useDownloadNodeJourney
|
|
139
|
-
};
|
|
140
|
-
//# sourceMappingURL=use-download-node-journey.js.map
|
package/dist/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-download-node-journey.js","sources":["../../../../../src/features/journey/hooks/use-chapter-page-journey/use-download-node-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport type { IChallengeArenaStartJourneyProps } from './chapter-page-types';\n\nimport { useCallback, useEffect, useMemo, useRef } from 'react';\n\nimport BlockSectionView from '../../../chapters-v2/chapter-details/block-sections/block-section-view';\nimport { getHasDownloadBlock } from '../../../chapters-v2/utils';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { JOURNEY_ID_STUDENT } from '../../journey-id/journey-id-student';\nimport {\n BLOCK_MOCKS_WITH_DOWNLOAD_NODE,\n DOWNLOAD_BLOCK_MOCKS,\n} from '../../mocks/chapter-page-journey-mock-data';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nexport const useDownloadNodeJourney = () => {\n const journeyId = JOURNEY_ID_STUDENT.DOWNLOAD_NODE_JOURNEY;\n\n const journeyRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n\n const downloadCoreBlockRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const blockSectionRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { nextCoachmark, setJourney, endJourney } = useJourney();\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, true);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(\n ({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n }: IChallengeArenaStartJourneyProps) => {\n if (!chapterDetails || !downloadCoreBlockRef.current) {\n return;\n }\n\n const { image_hue: imageHue, blocks } = chapterDetails;\n const hasDownloadBlock = canStartDownloadBlockJourney && getHasDownloadBlock(blocks);\n\n if (hasDownloadBlock && !blockSectionRef.current) return;\n\n const downloadNodeJourneySteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: downloadCoreBlockRef,\n elementToHighlight: (\n <FlexView $widthX={50} ref={journeyRef}>\n <BlockSectionView\n blockData={BLOCK_MOCKS_WITH_DOWNLOAD_NODE}\n userType={userType}\n isLastBlock={true}\n lessonIdx={0}\n imageHue={imageHue}\n isGoalBlock\n />\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'bottom',\n tooltipYCoOrdinates: -84,\n tooltipXCoOrdinates: '127%',\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n arrowXCoOrdinates: -100,\n width: 264,\n children: null,\n renderAs: 'primary',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ab2-black\">Introducing downloadable study material.</Text>\n </FlexView>\n }\n buttonLabel={hasDownloadBlock ? 'Next' : 'Got it'}\n onButtonClick={() => {\n if (hasDownloadBlock) {\n const $parentEle = document.getElementById('tooltip-root');\n\n if ($parentEle) {\n // Hide all direct children of tooltip-root\n Array.from($parentEle.children).forEach(child => {\n (child as HTMLElement).style.display = 'none';\n });\n }\n\n if (journeyRef.current) {\n journeyRef.current.style.display = 'none';\n }\n\n if (blockSectionRef.current) {\n blockSectionRef.current.scrollIntoView({\n behavior: 'smooth',\n block: 'center',\n inline: 'center',\n });\n }\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n\n handleNextCoachmark();\n }, 800);\n\n timerRefs.current.push(delayBeforeStart);\n } else {\n handleEndJourney();\n }\n }}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: blockSectionRef,\n elementToHighlight: (\n <FlexView $widthX={50}>\n <BlockSectionView\n blockData={DOWNLOAD_BLOCK_MOCKS}\n userType={userType}\n isLastBlock={true}\n lessonIdx={0}\n imageHue={imageHue}\n />\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n position: 'top',\n tooltipYCoOrdinates: 14,\n tooltipXCoOrdinates: '-100%',\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n arrowSize: 12,\n arrowXCoOrdinates: -100,\n width: 264,\n children: null,\n renderAs: 'primary',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ab2-black\">Also available in the Downloads section.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={() => {\n handleEndJourney();\n endJourney(JOURNEY_ID_STUDENT.DOWNLOAD_BLOCK_JOURNEY);\n }}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, downloadNodeJourneySteps);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 800);\n\n timerRefs.current.push(delayBeforeStart);\n },\n [endJourney, handleEndJourney, handleNextCoachmark, journeyId, setJourney],\n );\n\n const data = useMemo(\n () => ({\n blockSectionRef,\n downloadCoreBlockRef,\n startJourney,\n }),\n [startJourney],\n );\n\n useEffect(() => {\n return () => {\n timerRefs.current.forEach(timer => clearTimeout(timer));\n timerRefs.current = [];\n };\n }, []);\n\n return data;\n};\n"],"names":["useDownloadNodeJourney","journeyId","JOURNEY_ID_STUDENT","journeyRef","useRef","downloadCoreBlockRef","blockSectionRef","timerRefs","nextCoachmark","setJourney","endJourney","useJourney","handleNextCoachmark","useCallback","handleEndJourney","startJourney","chapterDetails","userType","canStartDownloadBlockJourney","imageHue","blocks","hasDownloadBlock","getHasDownloadBlock","downloadNodeJourneySteps","jsx","FlexView","BlockSectionView","BLOCK_MOCKS_WITH_DOWNLOAD_NODE","IndicatorType","TooltipItem","Text","$parentEle","child","delayBeforeStart","DOWNLOAD_BLOCK_MOCKS","data","useMemo","useEffect","timer"],"mappings":";;;;;;;;;;;AAmBO,MAAMA,IAAyB,MAAM;AAC1C,QAAMC,IAAYC,EAAmB,uBAE/BC,IAAaC,EAAuB,IAAI,GAExCC,IAAuBD,EAAuB,IAAI,GAClDE,IAAkBF,EAAuB,IAAI,GAC7CG,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AAA,gBACC,2BACGJ,GACC,EAAA,UAAA,gBAAAD,EAACM,KAAK,WAAU,aAAY,sDAAwC,EACtE,CAAA;AAAA,gBAEF,aAAY;AAAA,gBACZ,eAAe,MAAM;AACF,kBAAAhB,KACjBJ,EAAWR,EAAmB,sBAAsB;AAAA,gBACtD;AAAA,cAAA;AAAA,YACF;AAAA,UAEJ;AAAA,QACF;AAAA,MAAA;AAGF,MAAAO,EAAWR,GAAWsB,CAAwB;AAExC,YAAAU,IAAmB,WAAW,MAAM;AACxC,qBAAaA,CAAgB,GAEpB,SAAA,KAAK,MAAM,WAAW,UACXrB;SACnB,GAAG;AAEI,MAAAL,EAAA,QAAQ,KAAK0B,CAAgB;AAAA,IACzC;AAAA,IACA,CAACvB,GAAYI,GAAkBF,GAAqBX,GAAWQ,CAAU;AAAA,EAAA,GAGrE0B,IAAOC;AAAA,IACX,OAAO;AAAA,MACL,iBAAA9B;AAAA,MACA,sBAAAD;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAGf,SAAAsB,EAAU,MACD,MAAM;AACX,IAAA9B,EAAU,QAAQ,QAAQ,CAAS+B,MAAA,aAAaA,CAAK,CAAC,GACtD/B,EAAU,UAAU;EAAC,GAEtB,CAAE,CAAA,GAEE4B;AACT;"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createPatchAPI as c } from "@cuemath/rest-api";
|
|
2
|
-
import { BASE_URL_V1 as e } from "../../../constants/api.js";
|
|
3
|
-
const { usePatch: s } = c({
|
|
4
|
-
getURL: (t) => `${e}/students/${t}/cancel-subscription`
|
|
5
|
-
});
|
|
6
|
-
export {
|
|
7
|
-
s as useCancelSubscriptionPatch
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=cancel-subscription.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cancel-subscription.js","sources":["../../../../src/features/parent-dashboard/api/cancel-subscription.ts"],"sourcesContent":["import { createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\n\nconst { usePatch: useCancelSubscriptionPatch } = createPatchAPI({\n getURL: studentId => `${BASE_URL_V1}/students/${studentId}/cancel-subscription`,\n});\n\nexport { useCancelSubscriptionPatch };\n"],"names":["useCancelSubscriptionPatch","createPatchAPI","studentId","BASE_URL_V1"],"mappings":";;AAIA,MAAM,EAAE,UAAUA,EAA2B,IAAIC,EAAe;AAAA,EAC9D,QAAQ,CAAAC,MAAa,GAAGC,CAAW,aAAaD,CAAS;AAC3D,CAAC;"}
|
package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import o from "styled-components";
|
|
2
|
-
import t from "../../../../assets/line-icons/icons/more-vertical.js";
|
|
3
|
-
import e from "../../../ui/layout/flex-view.js";
|
|
4
|
-
const l = o(t)(
|
|
5
|
-
({ theme: r }) => `
|
|
6
|
-
cursor: pointer;
|
|
7
|
-
path {
|
|
8
|
-
stroke: ${r.colors.WHITE};
|
|
9
|
-
}
|
|
10
|
-
`
|
|
11
|
-
);
|
|
12
|
-
o(e)`
|
|
13
|
-
top: 0;
|
|
14
|
-
right: 32px;
|
|
15
|
-
z-index: 100;
|
|
16
|
-
`;
|
|
17
|
-
export {
|
|
18
|
-
l as StyledVerticalMenu
|
|
19
|
-
};
|
|
20
|
-
//# sourceMappingURL=billing-information-styled.js.map
|
package/dist/features/parent-dashboard/comps/billing-information/billing-information-styled.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"billing-information-styled.js","sources":["../../../../../src/features/parent-dashboard/comps/billing-information/billing-information-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport FlexView from '../../../ui/layout/flex-view';\n\nconst StyledVerticalMenu = styled(MoreVerticalIcon)(\n ({ theme }) => `\n cursor: pointer;\n path {\n stroke: ${theme.colors.WHITE};\n }\n `,\n);\n\nconst DropdownMenu = styled(FlexView)`\n top: 0;\n right: 32px;\n z-index: 100;\n`;\n\nexport { StyledVerticalMenu, DropdownMenu };\n"],"names":["StyledVerticalMenu","styled","MoreVerticalIcon","theme","FlexView"],"mappings":";;;AAKM,MAAAA,IAAqBC,EAAOC,CAAgB;AAAA,EAChD,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA;AAAA;AAAA,gBAGDA,EAAM,OAAO,KAAK;AAAA;AAAA;AAGlC;AAEqBF,EAAOG,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as s } from "react";
|
|
3
|
-
import { useTheme as p } from "styled-components";
|
|
4
|
-
import l from "../../../ui/buttons/clickable/clickable.js";
|
|
5
|
-
import b from "../../../ui/context-menu/context-menu.js";
|
|
6
|
-
import t from "../../../ui/layout/flex-view.js";
|
|
7
|
-
import f from "../../../ui/separator/separator.js";
|
|
8
|
-
import n from "../../../ui/text/text.js";
|
|
9
|
-
import { EDeviceType as h } from "../../../ui/theme/constants.js";
|
|
10
|
-
import { StyledVerticalMenu as C } from "./billing-information-styled.js";
|
|
11
|
-
const M = s(
|
|
12
|
-
({ billingDetails: c, onViewPaymentMethod: i, onCancelSubscription: d }) => {
|
|
13
|
-
const { amount: m, cycle_frequency: a, next_due_date: u } = c, { device: $ } = p(), r = $ <= h.MOBILE;
|
|
14
|
-
return /* @__PURE__ */ o(t, { children: [
|
|
15
|
-
/* @__PURE__ */ e(n, { $renderAs: "ah4-bold", $renderOnMobileAs: "ab1-bold", $color: "WHITE", children: "Billing Information" }),
|
|
16
|
-
/* @__PURE__ */ e(f, { height: 20 }),
|
|
17
|
-
/* @__PURE__ */ o(
|
|
18
|
-
t,
|
|
19
|
-
{
|
|
20
|
-
$flexDirection: "row",
|
|
21
|
-
$justifyContent: "space-between",
|
|
22
|
-
$alignItems: "center",
|
|
23
|
-
$gap: r ? 16 : 24,
|
|
24
|
-
$gutter: r ? 16 : 24,
|
|
25
|
-
$background: "BLACK_2",
|
|
26
|
-
$borderColor: r ? "WHITE" : "BLACK_5",
|
|
27
|
-
onClick: r ? i : void 0,
|
|
28
|
-
children: [
|
|
29
|
-
/* @__PURE__ */ o(t, { $flexGap: 12, children: [
|
|
30
|
-
/* @__PURE__ */ o(n, { $renderAs: "ac3-black", $renderOnMobileAs: "ac4-black", $color: "PURPLE_4", children: [
|
|
31
|
-
a,
|
|
32
|
-
" PLAN"
|
|
33
|
-
] }),
|
|
34
|
-
/* @__PURE__ */ o(n, { $renderAs: r ? "ub3" : "ub2", $color: "WHITE", children: [
|
|
35
|
-
"$",
|
|
36
|
-
m,
|
|
37
|
-
" payment due on ",
|
|
38
|
-
u
|
|
39
|
-
] })
|
|
40
|
-
] }),
|
|
41
|
-
r ? null : /* @__PURE__ */ e(
|
|
42
|
-
b,
|
|
43
|
-
{
|
|
44
|
-
menuWidth: 180,
|
|
45
|
-
targetElement: /* @__PURE__ */ e(C, { height: 24, width: 24 }),
|
|
46
|
-
menuElement: /* @__PURE__ */ o(
|
|
47
|
-
t,
|
|
48
|
-
{
|
|
49
|
-
$position: "absolute",
|
|
50
|
-
$background: "BLACK_4",
|
|
51
|
-
$borderColor: "BLACK_5",
|
|
52
|
-
$gapX: 1,
|
|
53
|
-
$gutterX: 1,
|
|
54
|
-
$flexGap: 12,
|
|
55
|
-
children: [
|
|
56
|
-
/* @__PURE__ */ e(l, { onClick: i, label: "View Payment Method", children: /* @__PURE__ */ e(n, { $renderAs: "ub3", $cursor: "pointer", $color: "WHITE", children: "View Payment Method" }) }),
|
|
57
|
-
/* @__PURE__ */ e(l, { onClick: d, label: "Cancel Subscription", children: /* @__PURE__ */ e(n, { $renderAs: "ub3", $cursor: "pointer", $color: "ORANGE_5", children: "Cancel Subscription" }) })
|
|
58
|
-
]
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
menuOffset: -24,
|
|
62
|
-
menuZIndex: 1
|
|
63
|
-
}
|
|
64
|
-
)
|
|
65
|
-
]
|
|
66
|
-
}
|
|
67
|
-
)
|
|
68
|
-
] });
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
export {
|
|
72
|
-
M as default
|
|
73
|
-
};
|
|
74
|
-
//# sourceMappingURL=billing-information.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"billing-information.js","sources":["../../../../../src/features/parent-dashboard/comps/billing-information/billing-information.tsx"],"sourcesContent":["import type { FC } from 'react';\n\nimport { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Clickable from '../../../ui/buttons/clickable/clickable';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\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 './billing-information-styled';\nimport { type IBillingInformationProps } from './billing-information-types';\n\nconst BillingInformation: FC<IBillingInformationProps> = memo(\n ({ billingDetails, onViewPaymentMethod, onCancelSubscription }) => {\n const { amount, cycle_frequency: cycleFrequency, next_due_date: nextDueDate } = billingDetails;\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n Billing Information\n </Text>\n <Separator height={20} />\n <FlexView\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $alignItems=\"center\"\n $gap={isMobile ? 16 : 24}\n $gutter={isMobile ? 16 : 24}\n $background=\"BLACK_2\"\n $borderColor={isMobile ? 'WHITE' : 'BLACK_5'}\n onClick={isMobile ? onViewPaymentMethod : undefined}\n >\n <FlexView $flexGap={12}>\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color=\"PURPLE_4\">\n {cycleFrequency} PLAN\n </Text>\n <Text $renderAs={isMobile ? 'ub3' : 'ub2'} $color=\"WHITE\">\n ${amount} payment due on {nextDueDate}\n </Text>\n </FlexView>\n\n {isMobile ? null : (\n <ContextMenu\n menuWidth={180}\n targetElement={<Styled.StyledVerticalMenu height={24} width={24} />}\n menuElement={\n <FlexView\n $position=\"absolute\"\n $background=\"BLACK_4\"\n $borderColor=\"BLACK_5\"\n $gapX={1}\n $gutterX={1}\n $flexGap={12}\n >\n <Clickable onClick={onViewPaymentMethod} label=\"View Payment Method\">\n <Text $renderAs=\"ub3\" $cursor=\"pointer\" $color=\"WHITE\">\n View Payment Method\n </Text>\n </Clickable>\n <Clickable onClick={onCancelSubscription} label=\"Cancel Subscription\">\n <Text $renderAs=\"ub3\" $cursor=\"pointer\" $color=\"ORANGE_5\">\n Cancel Subscription\n </Text>\n </Clickable>\n </FlexView>\n }\n menuOffset={-24}\n menuZIndex={1}\n />\n )}\n </FlexView>\n </FlexView>\n );\n },\n);\n\nexport default BillingInformation;\n"],"names":["BillingInformation","memo","billingDetails","onViewPaymentMethod","onCancelSubscription","amount","cycleFrequency","nextDueDate","device","useTheme","isMobile","EDeviceType","FlexView","jsx","Text","Separator","jsxs","ContextMenu","Styled.StyledVerticalMenu","Clickable"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAmDC;AAAA,EACvD,CAAC,EAAE,gBAAAC,GAAgB,qBAAAC,GAAqB,sBAAAC,QAA2B;AACjE,UAAM,EAAE,QAAAC,GAAQ,iBAAiBC,GAAgB,eAAeC,EAAgB,IAAAL,GAE1E,EAAE,QAAAM,MAAWC,KACbC,IAAWF,KAAUG,EAAY;AAEvC,6BACGC,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAC,EAACC,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAAQ,UAEvE,sBAAA,CAAA;AAAA,MACA,gBAAAD,EAACE,GAAU,EAAA,QAAQ,GAAI,CAAA;AAAA,MACvB,gBAAAC;AAAA,QAACJ;AAAA,QA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AA,gBACF;AAAA,gBAEF,YAAY;AAAA,gBACZ,YAAY;AAAA,cAAA;AAAA,YACd;AAAA,UAAA;AAAA,QAAA;AAAA,MAEJ;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-steps-constants.js","sources":["../../../../../src/features/parent-dashboard/comps/next-steps/next-steps-constants.ts"],"sourcesContent":["import type { INextStep } from './next-steps-types';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\n\nexport const nextStepsData: INextStep[] = [\n {\n title: 'Personalized Sessions',\n description: `Your tutor will align sessions to your child's school curriculum and focus areas.`,\n image: ILLUSTRATIONS.KNOWLEDGE_BLUE,\n textColor: 'BLUE_4',\n },\n {\n title: 'Regular Practice',\n description: `Your child will get homework assignments and daily practice through our app.`,\n image: ILLUSTRATIONS.BOOK_CHECKED_ORANGE,\n textColor: 'ORANGE_4',\n },\n {\n title: 'Parent-tutor Conference',\n description: `We'll schedule a conference after 8 sessions to review progress & adjust approach.`,\n image: ILLUSTRATIONS.HANDSHAKE,\n textColor: 'YELLOW_4',\n },\n];\n"],"names":["nextStepsData","ILLUSTRATIONS"],"mappings":";AAIO,MAAMA,IAA6B;AAAA,EACxC;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOC,EAAc;AAAA,IACrB,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAc;AAAA,IACrB,WAAW;AAAA,EACb;AAAA,EACA;AAAA,IACE,OAAO;AAAA,IACP,aAAa;AAAA,IACb,OAAOA,EAAc;AAAA,IACrB,WAAW;AAAA,EACb;AACF;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-steps-styled.js","sources":["../../../../../src/features/parent-dashboard/comps/next-steps/next-steps-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const TextContent = styled(FlexView)(\n ({ theme }) => `\n border-bottom: 1px solid ${theme.colors.BLACK_5};\n\n ${theme.mediaQueries.minWidthTablet} {\n border-bottom: none;\n }\n `,\n);\n\nexport const ListItem = styled(FlexView)(\n ({ theme }) => `\n &:first-child {\n ${TextContent} {\n padding-top: 0;\n }\n }\n &:last-child {\n ${TextContent} {\n padding-bottom: 0;\n border-bottom: none;\n }\n }\n\n ${theme.mediaQueries.minWidthTablet} {\n border-right: 1px solid ${theme.colors.BLACK_5};\n\n &:last-child {\n border-right: none;\n padding-right: 0;\n }\n\n &:first-child {\n padding-left: 0;\n }\n }\n `,\n);\n"],"names":["TextContent","styled","FlexView","theme","ListItem"],"mappings":";;AAIa,MAAAA,IAAcC,EAAOC,CAAQ;AAAA,EACxC,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA,+BACcA,EAAM,OAAO,OAAO;AAAA;AAAA,MAE7CA,EAAM,aAAa,cAAc;AAAA;AAAA;AAAA;AAIvC,GAEaC,IAAWH,EAAOC,CAAQ;AAAA,EACrC,CAAC,EAAE,OAAAC,EAAA,MAAY;AAAA;AAAA,QAETH,CAAW;AAAA;AAAA;AAAA;AAAA;AAAA,QAKXA,CAAW;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAMbG,EAAM,aAAa,cAAc;AAAA,gCACPA,EAAM,OAAO,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYpD;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-steps.js","sources":["../../../../../src/features/parent-dashboard/comps/next-steps/next-steps.tsx"],"sourcesContent":["import { memo } from 'react';\nimport { useTheme } from 'styled-components';\n\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 { nextStepsData } from './next-steps-constants';\nimport * as Styled from './next-steps-styled';\n\nconst NextSteps: React.FC = () => {\n const theme = useTheme();\n const isMobile = theme.device <= EDeviceType.MOBILE;\n\n return (\n <FlexView>\n <Text $renderAs=\"ah4-bold\" $renderOnMobileAs=\"ab1-bold\" $color=\"WHITE\">\n What happens next?\n </Text>\n <Separator height={isMobile ? 16 : 20} />\n <FlexView $justifyContent=\"center\" $flexDirection={isMobile ? 'column' : 'row'}>\n {nextStepsData.map(({ title, description, image, textColor }) => (\n <Styled.ListItem\n key={title}\n $flexDirection={isMobile ? 'row' : 'column'}\n $flex={1}\n $gutterX={isMobile ? 0 : 1}\n $flexColumnGapX={isMobile ? 0.75 : 0}\n $alignItems={isMobile ? 'center' : 'normal'}\n >\n <Image\n src={image}\n width={isMobile ? 72 : 80}\n height={isMobile ? 72 : 80}\n withLoader={false}\n />\n {!isMobile && <Separator heightX={0.75} />}\n <Styled.TextContent $flex={1} $gapX={isMobile ? 1 : 0} $justifyContent=\"space-between\">\n <Text $renderAs=\"ac3-black\" $renderOnMobileAs=\"ac4-black\" $color={textColor}>\n {title}\n </Text>\n <Separator height={isMobile ? 10 : 12} />\n <Text $renderAs=\"ub1\" $renderOnMobileAs=\"ub2\" $color=\"WHITE\">\n {description}\n </Text>\n </Styled.TextContent>\n </Styled.ListItem>\n ))}\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(NextSteps);\n"],"names":["NextSteps","isMobile","useTheme","EDeviceType","FlexView","jsx","Text","Separator","nextStepsData","title","description","image","textColor","jsxs","Styled.ListItem","Image","Styled.TextContent","NextSteps$1","memo"],"mappings":";;;;;;;;;;AAWA,MAAMA,IAAsB,MAAM;AAE1B,QAAAC,IADQC,IACS,UAAUC,EAAY;AAE7C,2BACGC,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACC,KAAK,WAAU,YAAW,mBAAkB,YAAW,QAAO,SAAQ,UAEvE,qBAAA,CAAA;AAAA,IACC,gBAAAD,EAAAE,GAAA,EAAU,QAAQN,IAAW,KAAK,IAAI;AAAA,sBACtCG,GAAS,EAAA,iBAAgB,UAAS,gBAAgBH,IAAW,WAAW,OACtE,UAAcO,EAAA,IAAI,CAAC,EAAE,OAAAC,GAAO,aAAAC,GAAa,OAAAC,GAAO,WAAAC,QAC/C,gBAAAC;AAAA,MAACC;AAAAA,MAAA;AAAA,QAEC,gBAAgBb,IAAW,QAAQ;AAAA,QACnC,OAAO;AAAA,QACP,UAAUA,IAAW,IAAI;AAAA,QACzB,iBAAiBA,IAAW,OAAO;AAAA,QACnC,aAAaA,IAAW,WAAW;AAAA,QAEnC,UAAA;AAAA,UAAA,gBAAAI;AAAA,YAACU;AAAA,YAAA;AAAA,cACC,KAAKJ;AAAA,cACL,OAAOV,IAAW,KAAK;AAAA,cACvB,QAAQA,IAAW,KAAK;AAAA,cACxB,YAAY;AAAA,YAAA;AAAA,UACd;AAAA,UACC,CAACA,KAAa,gBAAAI,EAAAE,GAAA,EAAU,SAAS,KAAM,CAAA;AAAA,UACxC,gBAAAM,EAACG,GAAA,EAAmB,OAAO,GAAG,OAAOf,IAAW,IAAI,GAAG,iBAAgB,iBACrE,UAAA;AAAA,YAAA,gBAAAI,EAACC,KAAK,WAAU,aAAY,mBAAkB,aAAY,QAAQM,GAC/D,UACHH,EAAA,CAAA;AAAA,YACC,gBAAAJ,EAAAE,GAAA,EAAU,QAAQN,IAAW,KAAK,IAAI;AAAA,YACvC,gBAAAI,EAACC,KAAK,WAAU,OAAM,mBAAkB,OAAM,QAAO,SAClD,UACHI,EAAA,CAAA;AAAA,UAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,MAtBKD;AAAA,IAwBR,CAAA,GACH;AAAA,EACF,EAAA,CAAA;AAEJ,GAEeQ,IAAAC,EAAKlB,CAAS;"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { useState as R, useRef as m, useCallback as u, useEffect as g } from "react";
|
|
2
|
-
import { COUNTDOWN_INTERVAL as d } from "../session-status-constants.js";
|
|
3
|
-
const C = ({ timeLeft: t, maxHoursToShow: s = 48 }) => {
|
|
4
|
-
const [l, e] = R(0), r = m(null), c = u(() => {
|
|
5
|
-
r.current && (clearInterval(r.current), r.current = null);
|
|
6
|
-
}, []), i = u(
|
|
7
|
-
(a) => {
|
|
8
|
-
const o = Math.floor(Date.now() / 1e3), n = a - o, f = s * 3600;
|
|
9
|
-
return n <= 0 || n > f ? 0 : n;
|
|
10
|
-
},
|
|
11
|
-
[s]
|
|
12
|
-
);
|
|
13
|
-
return g(() => {
|
|
14
|
-
if (!t) {
|
|
15
|
-
c(), e(0);
|
|
16
|
-
return;
|
|
17
|
-
}
|
|
18
|
-
const a = i(t);
|
|
19
|
-
if (a <= 0) {
|
|
20
|
-
e(0);
|
|
21
|
-
return;
|
|
22
|
-
}
|
|
23
|
-
e(a);
|
|
24
|
-
const o = () => {
|
|
25
|
-
const n = i(t);
|
|
26
|
-
n <= 0 ? (c(), e(0)) : e(n);
|
|
27
|
-
};
|
|
28
|
-
return r.current = setInterval(o, d), c;
|
|
29
|
-
}, [t, c, i]), l;
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
C as default
|
|
33
|
-
};
|
|
34
|
-
//# sourceMappingURL=use-countdown.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-countdown.js","sources":["../../../../../../src/features/parent-dashboard/comps/session-status/hooks/use-countdown.ts"],"sourcesContent":["import { useState, useEffect, useRef, useCallback } from 'react';\n\nimport { COUNTDOWN_INTERVAL } from '../session-status-constants';\n\ninterface IUseCountdownParams {\n timeLeft: number | null;\n maxHoursToShow?: number;\n}\n\nconst useCountdown = ({ timeLeft, maxHoursToShow = 48 }: IUseCountdownParams): number => {\n const [remaining, setRemaining] = useState(0);\n const intervalRef = useRef<NodeJS.Timeout | null>(null);\n\n const clear = useCallback(() => {\n if (intervalRef.current) {\n clearInterval(intervalRef.current);\n intervalRef.current = null;\n }\n }, []);\n\n const calculateRemaining = useCallback(\n (targetTime: number): number => {\n const now = Math.floor(Date.now() / 1000);\n const diff = targetTime - now;\n const maxSeconds = maxHoursToShow * 3600;\n\n if (diff <= 0 || diff > maxSeconds) {\n return 0;\n }\n\n return diff;\n },\n [maxHoursToShow],\n );\n\n useEffect(() => {\n if (!timeLeft) {\n clear();\n setRemaining(0);\n\n return;\n }\n\n const initialRemaining = calculateRemaining(timeLeft);\n\n if (initialRemaining <= 0) {\n setRemaining(0);\n\n return;\n }\n\n setRemaining(initialRemaining);\n\n const tick = () => {\n const currentRemaining = calculateRemaining(timeLeft);\n\n if (currentRemaining <= 0) {\n clear();\n setRemaining(0);\n } else {\n setRemaining(currentRemaining);\n }\n };\n\n intervalRef.current = setInterval(tick, COUNTDOWN_INTERVAL);\n\n return clear;\n }, [timeLeft, clear, calculateRemaining]);\n\n return remaining;\n};\n\nexport default useCountdown;\n"],"names":["useCountdown","timeLeft","maxHoursToShow","remaining","setRemaining","useState","intervalRef","useRef","clear","useCallback","calculateRemaining","targetTime","now","diff","maxSeconds","useEffect","initialRemaining","tick","currentRemaining","COUNTDOWN_INTERVAL"],"mappings":";;AASA,MAAMA,IAAe,CAAC,EAAE,UAAAC,GAAU,gBAAAC,IAAiB,SAAsC;AACvF,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAS,CAAC,GACtCC,IAAcC,EAA8B,IAAI,GAEhDC,IAAQC,EAAY,MAAM;AAC9B,IAAIH,EAAY,YACd,cAAcA,EAAY,OAAO,GACjCA,EAAY,UAAU;AAAA,EAE1B,GAAG,CAAE,CAAA,GAECI,IAAqBD;AAAA,IACzB,CAACE,MAA+B;AAC9B,YAAMC,IAAM,KAAK,MAAM,KAAK,IAAA,IAAQ,GAAI,GAClCC,IAAOF,IAAaC,GACpBE,IAAaZ,IAAiB;AAEhC,aAAAW,KAAQ,KAAKA,IAAOC,IACf,IAGFD;AAAA,IACT;AAAA,IACA,CAACX,CAAc;AAAA,EAAA;AAGjB,SAAAa,EAAU,MAAM;AACd,QAAI,CAACd,GAAU;AACP,MAAAO,KACNJ,EAAa,CAAC;AAEd;AAAA,IACF;AAEM,UAAAY,IAAmBN,EAAmBT,CAAQ;AAEpD,QAAIe,KAAoB,GAAG;AACzB,MAAAZ,EAAa,CAAC;AAEd;AAAA,IACF;AAEA,IAAAA,EAAaY,CAAgB;AAE7B,UAAMC,IAAO,MAAM;AACX,YAAAC,IAAmBR,EAAmBT,CAAQ;AAEpD,MAAIiB,KAAoB,KAChBV,KACNJ,EAAa,CAAC,KAEdA,EAAac,CAAgB;AAAA,IAC/B;AAGU,WAAAZ,EAAA,UAAU,YAAYW,GAAME,CAAkB,GAEnDX;AAAA,EACN,GAAA,CAACP,GAAUO,GAAOE,CAAkB,CAAC,GAEjCP;AACT;"}
|
package/dist/features/parent-dashboard/comps/session-status/hooks/use-session-status-config.js
DELETED
|
@@ -1,137 +0,0 @@
|
|
|
1
|
-
import { h } from "../../../../../node_modules/humanize-plus/dist/humanize.js";
|
|
2
|
-
import { useMemo as s, useCallback as C } from "react";
|
|
3
|
-
import { ILLUSTRATIONS as a } from "../../../../../assets/illustrations/illustrations.js";
|
|
4
|
-
import { LOTTIE as O } from "../../../../../assets/lottie/lottie.js";
|
|
5
|
-
import { CUEMATH_APP_URL as R } from "../../../../../constants/config.js";
|
|
6
|
-
import { TEXT_STYLES as t } from "../session-status-constants.js";
|
|
7
|
-
import { formatSessionDateTime as A, formatTimeRemaining as D } from "../session-status-helpers.js";
|
|
8
|
-
import P from "./use-countdown.js";
|
|
9
|
-
const x = ({
|
|
10
|
-
completedSessions: u,
|
|
11
|
-
nextSessionStartTime: S,
|
|
12
|
-
isTrialDone: c = !1,
|
|
13
|
-
teacherName: o,
|
|
14
|
-
studentName: b,
|
|
15
|
-
isStudentNoShow: i = !1,
|
|
16
|
-
onRescheduleClick: n,
|
|
17
|
-
isOnlyTrialDone: I = !1,
|
|
18
|
-
isTutorNoShow: d = !1
|
|
19
|
-
}) => {
|
|
20
|
-
const B = s(
|
|
21
|
-
() => ({
|
|
22
|
-
isNoShowStatus: i || d,
|
|
23
|
-
isTeacherAssigned: !!o,
|
|
24
|
-
formattedSessionStart: A(S)
|
|
25
|
-
}),
|
|
26
|
-
[i, d, o, S]
|
|
27
|
-
), { isNoShowStatus: L, isTeacherAssigned: e, formattedSessionStart: l } = B, r = P({
|
|
28
|
-
timeLeft: c || L ? null : S,
|
|
29
|
-
maxHoursToShow: 48
|
|
30
|
-
}), y = C(() => {
|
|
31
|
-
window.open(R, "_blank");
|
|
32
|
-
}, []), T = C(() => {
|
|
33
|
-
n == null || n();
|
|
34
|
-
}, [n]), f = s(
|
|
35
|
-
() => ({
|
|
36
|
-
topSection: {
|
|
37
|
-
icon: a.CALENDAR_CROSS_ORANGE,
|
|
38
|
-
title: "Session Cancelled",
|
|
39
|
-
titleColor: "ORANGE_4",
|
|
40
|
-
titleStyle: t.TITLE_DESKTOP,
|
|
41
|
-
titleTabletStyle: t.TITLE_MOBILE,
|
|
42
|
-
subtitle: l,
|
|
43
|
-
subtitleStyle: t.SUBTITLE_DESKTOP,
|
|
44
|
-
subtitleTabletStyle: t.SUBTITLE_MOBILE,
|
|
45
|
-
subtitleLineThrough: !0,
|
|
46
|
-
description: i ? "We understand life is unpredictable and schedules change unexpectedly." : "We're sorry - our tutor couldn't attend your first session. This rarely happens, but tutors sometimes face unexpected circumstances.",
|
|
47
|
-
descriptionColor: "WHITE_1"
|
|
48
|
-
},
|
|
49
|
-
bottomSection: {
|
|
50
|
-
icon: a.PLATFORM_PURPLE,
|
|
51
|
-
title: "Please Reschedule",
|
|
52
|
-
titleColor: "PURPLE_4",
|
|
53
|
-
titleStyle: t.TITLE_DESKTOP,
|
|
54
|
-
titleTabletStyle: t.TITLE_MOBILE,
|
|
55
|
-
subtitle: i ? "Please reschedule when it works better for you. Choose any available time slot, and we'll assign you a new tutor for your child." : "Since your first class didn't happen, we haven't activated your subscription. Choose any available time slot, and we'll assign a reliable tutor.",
|
|
56
|
-
subtitleStyle: t.BODY_DESKTOP,
|
|
57
|
-
subtitleTabletStyle: t.BODY_MOBILE,
|
|
58
|
-
action: {
|
|
59
|
-
label: "Reschedule",
|
|
60
|
-
onClick: T
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
}),
|
|
64
|
-
[l, i, T]
|
|
65
|
-
), m = s(() => {
|
|
66
|
-
const _ = I ? "First" : u.toString(), E = h.pluralize(u, "session");
|
|
67
|
-
return {
|
|
68
|
-
topSection: {
|
|
69
|
-
icon: a.BOOK_CHECKED_GREEN,
|
|
70
|
-
title: `${_} ${E} Completed!`,
|
|
71
|
-
titleColor: "GREEN_4",
|
|
72
|
-
titleStyle: t.TITLE_DESKTOP,
|
|
73
|
-
titleTabletStyle: t.TITLE_MOBILE,
|
|
74
|
-
align: "center"
|
|
75
|
-
},
|
|
76
|
-
bottomSection: {
|
|
77
|
-
lottie: O.CALENDAR_HOUR_GLASS_ORANGE,
|
|
78
|
-
title: "Next Session",
|
|
79
|
-
titleColor: "ORANGE_4",
|
|
80
|
-
titleStyle: t.TITLE_DESKTOP,
|
|
81
|
-
titleTabletStyle: t.TITLE_MOBILE,
|
|
82
|
-
subtitle: `${l}
|
|
83
|
-
with ${o}`,
|
|
84
|
-
subtitleStyle: t.SUBTITLE_DESKTOP,
|
|
85
|
-
subtitleTabletStyle: t.SUBTITLE_MOBILE,
|
|
86
|
-
action: {
|
|
87
|
-
label: "Reschedule on the Cuemath app",
|
|
88
|
-
onClick: y
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
};
|
|
92
|
-
}, [I, u, l, o, y]), p = s(() => {
|
|
93
|
-
const _ = r ? D(r) : "SESSION SCHEDULED", E = !!r;
|
|
94
|
-
return {
|
|
95
|
-
topSection: {
|
|
96
|
-
icon: a.CALENDAR_CHECK_GREEN,
|
|
97
|
-
title: _,
|
|
98
|
-
titleColor: "GREEN_4",
|
|
99
|
-
titleStyle: E ? t.COUNTDOWN_DESKTOP : t.TITLE_DESKTOP,
|
|
100
|
-
titleTabletStyle: E ? t.COUNTDOWN_MOBILE : t.TITLE_MOBILE,
|
|
101
|
-
subtitle: l,
|
|
102
|
-
subtitleStyle: t.SUBTITLE_DESKTOP,
|
|
103
|
-
subtitleTabletStyle: t.SUBTITLE_MOBILE,
|
|
104
|
-
action: {
|
|
105
|
-
label: "Reschedule",
|
|
106
|
-
onClick: T
|
|
107
|
-
}
|
|
108
|
-
},
|
|
109
|
-
bottomSection: {
|
|
110
|
-
align: "center",
|
|
111
|
-
lottie: e ? O.TEACHER_FOUND : O.TEACHER_SEARCH,
|
|
112
|
-
title: e ? "Tutor Assigned!" : "",
|
|
113
|
-
titleColor: e ? "ORANGE_4" : "WHITE_1",
|
|
114
|
-
titleStyle: e ? t.TITLE_DESKTOP : t.SUBTITLE_MOBILE,
|
|
115
|
-
titleTabletStyle: e ? t.TITLE_MOBILE : t.SUBTITLE_MOBILE,
|
|
116
|
-
subtitle: e ? `From over 3000 expert tutors, we selected ${o} as the perfect match for ${b}!` : "Finding the perfect tutor for your child",
|
|
117
|
-
subtitleStyle: t.BODY_DESKTOP,
|
|
118
|
-
subtitleTabletStyle: t.BODY_MOBILE,
|
|
119
|
-
description: e ? void 0 : "This typically takes 24-48 hours. We'll notify you via email.",
|
|
120
|
-
maxWidth: e ? 368 : 383,
|
|
121
|
-
isLargeIcon: !0
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
}, [
|
|
125
|
-
r,
|
|
126
|
-
l,
|
|
127
|
-
T,
|
|
128
|
-
e,
|
|
129
|
-
o,
|
|
130
|
-
b
|
|
131
|
-
]);
|
|
132
|
-
return s(() => L ? f : c ? m : p, [L, c, f, m, p]);
|
|
133
|
-
};
|
|
134
|
-
export {
|
|
135
|
-
x as default
|
|
136
|
-
};
|
|
137
|
-
//# sourceMappingURL=use-session-status-config.js.map
|