@cuemath/leap 3.3.33-as1 → 3.3.33-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/line-icons/icons/chevron-right.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js +4 -4
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map +1 -1
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js +5 -5
- package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message.js.map +1 -1
- package/dist/features/auth/pla-signup/pla-analytics-events.js +2 -4
- 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/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 +36 -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/{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 +2 -2
- 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/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/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/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +73 -71
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/ui/constants/z-index.js +2 -5
- package/dist/features/ui/constants/z-index.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/ui/timers/countdown-timer/countdown-timer.js +62 -54
- package/dist/features/ui/timers/countdown-timer/countdown-timer.js.map +1 -1
- package/dist/features/utils/utils.js +18 -18
- package/dist/features/utils/utils.js.map +1 -1
- package/dist/index.d.ts +146 -140
- package/dist/index.js +422 -423
- 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/package.json +1 -1
- package/dist/features/hooks/use-visibility-change.js +0 -12
- package/dist/features/hooks/use-visibility-change.js.map +0 -1
- 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 -53
- 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 -63
- 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/ui/timers/class-time/animate.js +0 -89
- package/dist/features/ui/timers/class-time/animate.js.map +0 -1
- package/dist/features/ui/timers/class-time/animations/open-close.js +0 -93
- package/dist/features/ui/timers/class-time/animations/open-close.js.map +0 -1
- package/dist/features/ui/timers/class-time/animations/ripple.js +0 -44
- package/dist/features/ui/timers/class-time/animations/ripple.js.map +0 -1
- package/dist/features/ui/timers/class-time/class-time-animation-wrapper.js +0 -28
- package/dist/features/ui/timers/class-time/class-time-animation-wrapper.js.map +0 -1
- package/dist/features/ui/timers/class-time/class-time.js +0 -34
- package/dist/features/ui/timers/class-time/class-time.js.map +0 -1
- package/dist/features/ui/timers/class-time/constants.js +0 -26
- package/dist/features/ui/timers/class-time/constants.js.map +0 -1
- package/dist/features/ui/timers/class-time/use-class-time-logic.js +0 -57
- package/dist/features/ui/timers/class-time/use-class-time-logic.js.map +0 -1
- package/dist/features/ui/timers/clock/clock.js +0 -25
- package/dist/features/ui/timers/clock/clock.js.map +0 -1
- package/dist/features/ui/timers/timer/timer.js +0 -29
- package/dist/features/ui/timers/timer/timer.js.map +0 -1
- /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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chevron-right.js","sources":["../../../../src/assets/line-icons/icons/chevron-right.tsx"],"sourcesContent":["import React from 'react';\n\ninterface IconProps extends React.SVGProps<SVGSVGElement> {}\n\nconst ChevronRight: React.FC<IconProps> = props => (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.666 12.6C13.3155 12.6 10.5993 15.3161 10.5993 18.6666H9.39935C9.39935 15.6827 11.1979 13.1188 13.77 12C11.1979 10.8811 9.39935 8.31722 9.39935 5.33329H10.5993C10.5993 8.68382 13.3155 11.4 16.666 11.4V12.6Z\"\n fill=\"currentColor\"\n fillOpacity=\"1\"\n />\n </svg>\n);\n\nexport default ChevronRight;\n"],"names":["ChevronRight","props","jsx","
|
|
1
|
+
{"version":3,"file":"chevron-right.js","sources":["../../../../src/assets/line-icons/icons/chevron-right.tsx"],"sourcesContent":["import React from 'react';\n\ninterface IconProps extends React.SVGProps<SVGSVGElement> {}\n\nconst ChevronRight: React.FC<IconProps> = props => (\n <svg\n width=\"24\"\n height=\"24\"\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M16.666 12.6C13.3155 12.6 10.5993 15.3161 10.5993 18.6666H9.39935C9.39935 15.6827 11.1979 13.1188 13.77 12C11.1979 10.8811 9.39935 8.31722 9.39935 5.33329H10.5993C10.5993 8.68382 13.3155 11.4 16.666 11.4V12.6Z\"\n fill=\"currentColor\"\n fillOpacity=\"1\"\n />\n </svg>\n);\n\nexport default ChevronRight;\n"],"names":["ChevronRight","props","jsx","ChevronRight$1"],"mappings":";AAIA,MAAMA,IAAoC,CACxCC,MAAA,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,OAAM;AAAA,IACN,QAAO;AAAA,IACP,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IACL,GAAGD;AAAA,IAEJ,UAAA,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,UAAS;AAAA,QACT,UAAS;AAAA,QACT,GAAE;AAAA,QACF,MAAK;AAAA,QACL,aAAY;AAAA,MAAA;AAAA,IACd;AAAA,EAAA;AACF,GAGFC,IAAeH;"}
|
|
@@ -23,10 +23,10 @@ const l = r(e)``, s = a`
|
|
|
23
23
|
left: -12px;
|
|
24
24
|
width: fit-content;
|
|
25
25
|
max-width: 100%;
|
|
26
|
-
border: 1px solid ${({ theme: o }) => o.colors.WHITE_T_15}
|
|
27
|
-
opacity: ${({
|
|
28
|
-
transform: ${({
|
|
29
|
-
animation: ${({
|
|
26
|
+
border: 1px solid ${({ theme: o }) => o.colors.WHITE_T_15}
|
|
27
|
+
opacity: ${({ isVisible: o }) => o ? 1 : 0};
|
|
28
|
+
transform: ${({ isVisible: o }) => o ? "scale(1)" : "scale(0.95)"};
|
|
29
|
+
animation: ${({ isVisible: o }) => o ? t`
|
|
30
30
|
${s} 0.4s ease forwards
|
|
31
31
|
` : t`
|
|
32
32
|
${i} 0.4s ease forwards
|
package/dist/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-avatar-message-styled.js","sources":["../../../../../src/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Wrapper = styled(FlexView)``;\n\nconst fadeInScale = keyframes`\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\nconst fadeOutScale = keyframes`\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n`;\n\nexport const MessageWrapper = styled(FlexView)<{
|
|
1
|
+
{"version":3,"file":"animated-avatar-message-styled.js","sources":["../../../../../src/features/auth/comps/animated-avatar-message/animated-avatar-message-styled.tsx"],"sourcesContent":["import styled, { keyframes, css } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\n\nexport const Wrapper = styled(FlexView)``;\n\nconst fadeInScale = keyframes`\n from {\n opacity: 0;\n transform: scale(0.95);\n }\n to {\n opacity: 1;\n transform: scale(1);\n }\n`;\n\nconst fadeOutScale = keyframes`\n from {\n opacity: 1;\n transform: scale(1);\n }\n to {\n opacity: 0;\n transform: scale(0.95);\n }\n`;\n\nexport const MessageWrapper = styled(FlexView)<{ isVisible: boolean }>`\n position: relative;\n left: -12px;\n width: fit-content;\n max-width: 100%;\n border: 1px solid ${({ theme }) => theme.colors.WHITE_T_15}\n opacity: ${({ isVisible }) => (isVisible ? 1 : 0)};\n transform: ${({ isVisible }) => (isVisible ? 'scale(1)' : 'scale(0.95)')};\n animation: ${({ isVisible }) =>\n isVisible\n ? css`\n ${fadeInScale} 0.4s ease forwards\n `\n : css`\n ${fadeOutScale} 0.4s ease forwards\n `};\n transition: all 0.4s ease;\n &::before {\n content: '';\n position: absolute;\n left: -8px;\n top: 50%;\n transform: translateY(-50%);\n width: 0;\n height: 0;\n border-top: 8px solid transparent;\n border-bottom: 8px solid transparent;\n border-right: 8px solid ${({ theme }) => theme.colors.BLACK_5};\n }\n`;\n"],"names":["Wrapper","styled","FlexView","fadeInScale","keyframes","fadeOutScale","MessageWrapper","theme","isVisible","css"],"mappings":";;AAIa,MAAAA,IAAUC,EAAOC,CAAQ,KAEhCC,IAAcC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWdC,IAAeD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAWRE,IAAiBL,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA,sBAKvB,CAAC,EAAE,OAAAK,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA,aAC/C,CAAC,EAAE,WAAAC,EAAA,MAAiBA,IAAY,IAAI,CAAE;AAAA,eACpC,CAAC,EAAE,WAAAA,EAAA,MAAiBA,IAAY,aAAa,aAAc;AAAA,eAC3D,CAAC,EAAE,WAAAA,QACdA,IACIC;AAAA,YACIN,CAAW;AAAA,YAEfM;AAAA,YACIJ,CAAY;AAAA,SACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAYqB,CAAC,EAAE,OAAAE,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA;"}
|
|
@@ -21,7 +21,7 @@ const K = {
|
|
|
21
21
|
height: N = "auto",
|
|
22
22
|
idleFrames: A
|
|
23
23
|
}) => {
|
|
24
|
-
const l = c(null), u = c(null), [
|
|
24
|
+
const l = c(null), u = c(null), [x, n] = y(!1), [I, $] = y(!1), [M, C] = y(d), L = c(!1), m = c(A), i = E(() => {
|
|
25
25
|
const e = l.current;
|
|
26
26
|
if (!e) return;
|
|
27
27
|
e.removeEventListener("complete", i), e.setLoop(!0);
|
|
@@ -46,12 +46,12 @@ const K = {
|
|
|
46
46
|
h,
|
|
47
47
|
() => ({
|
|
48
48
|
fadeOutMessageAndPlayCompletion: () => new Promise((e) => {
|
|
49
|
-
s(!1),
|
|
49
|
+
s(!1), $(!1), o && I && (L.current = !1, g(o)), u.current = setTimeout(() => {
|
|
50
50
|
n(!1), e();
|
|
51
51
|
}, b);
|
|
52
52
|
}),
|
|
53
53
|
playConfirmationFrames: () => new Promise((e) => {
|
|
54
|
-
I || (o &&
|
|
54
|
+
I || (o && $(!0), L.current = !!m.current, g(v)), r && n(!1), u.current = setTimeout(() => {
|
|
55
55
|
r && C(!0), n(!0), e();
|
|
56
56
|
}, b);
|
|
57
57
|
})
|
|
@@ -94,14 +94,14 @@ const K = {
|
|
|
94
94
|
settings: K
|
|
95
95
|
}
|
|
96
96
|
) }),
|
|
97
|
-
|
|
97
|
+
x && /* @__PURE__ */ a(R, { $flex: 1, children: /* @__PURE__ */ a(
|
|
98
98
|
B,
|
|
99
99
|
{
|
|
100
100
|
$gutterX: 1,
|
|
101
101
|
$gapX: 0.5,
|
|
102
102
|
$background: "BLACK_3",
|
|
103
103
|
$borderColor: "BLACK_5",
|
|
104
|
-
|
|
104
|
+
isVisible: x,
|
|
105
105
|
children: /* @__PURE__ */ a(G, { text: V, speed: 20 })
|
|
106
106
|
}
|
|
107
107
|
) })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"animated-avatar-message.js","sources":["../../../../../src/features/auth/comps/animated-avatar-message/animated-avatar-message.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { IAnimatedAvatarMessageProps } from './animated-avatar-message-types';\n\nimport {\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n useEffect,\n type FC,\n useMemo,\n memo,\n} from 'react';\n\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport { ANIMATION_SEGMENTS, FADE_TIMEOUT } from './animated-avatar-message-constants';\nimport * as Styled from './animated-avatar-message-styled';\nimport AnimatedText from './animated-text/animated-text';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n};\n\nconst AnimatedAvatarMessage: FC<IAnimatedAvatarMessageProps> = ({\n message,\n confirmationMessage,\n onShowContent,\n confirmationFrames,\n completionFrames,\n isConfirmationVisible,\n ref,\n height = 'auto',\n idleFrames,\n}) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isMessageVisible, setIsMessageVisible] = useState(false);\n const [isConfirmationAnimationPlayed, setIsConfirmationAnimationPlayed] = useState(false);\n const [isConfirmationMessageVisible, setIsConfirmationMessageVisible] =\n useState(isConfirmationVisible);\n const shouldUseCustomIdleFrames = useRef(false);\n const idleFramesRef = useRef(idleFrames);\n\n const playIdleLoop = useCallback(() => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.removeEventListener('complete', playIdleLoop);\n animation.setLoop(true);\n\n const idleSegment =\n shouldUseCustomIdleFrames.current && idleFramesRef.current\n ? idleFramesRef.current\n : ANIMATION_SEGMENTS.IDLE;\n\n animation.playSegments(idleSegment, true);\n }, []);\n\n const handleLottieRender = useCallback(() => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.playSegments(ANIMATION_SEGMENTS.INITIAL, true);\n\n const onComplete = () => {\n animation.removeEventListener('complete', onComplete);\n setIsMessageVisible(true);\n onShowContent(true);\n animation.playSegments(ANIMATION_SEGMENTS.FINAL, true);\n animation.addEventListener('complete', playIdleLoop);\n };\n\n animation.addEventListener('complete', onComplete);\n }, [onShowContent, playIdleLoop]);\n\n const playAnimation = useCallback(\n (frames: [number, number]) => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.setLoop(false);\n animation.playSegments(frames, true);\n animation.addEventListener('complete', playIdleLoop);\n },\n [playIdleLoop],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n fadeOutMessageAndPlayCompletion: () =>\n new Promise<void>(resolve => {\n onShowContent(false);\n setIsConfirmationAnimationPlayed(false);\n if (completionFrames && isConfirmationAnimationPlayed) {\n shouldUseCustomIdleFrames.current = false;\n playAnimation(completionFrames);\n }\n timeoutRef.current = setTimeout(() => {\n setIsMessageVisible(false);\n resolve();\n }, FADE_TIMEOUT);\n }),\n\n playConfirmationFrames: () =>\n new Promise<void>(resolve => {\n if (!isConfirmationAnimationPlayed) {\n if (completionFrames) {\n setIsConfirmationAnimationPlayed(true);\n }\n shouldUseCustomIdleFrames.current = !!idleFramesRef.current;\n playAnimation(confirmationFrames);\n }\n\n if (confirmationMessage) {\n setIsMessageVisible(false);\n }\n timeoutRef.current = setTimeout(() => {\n if (confirmationMessage) {\n setIsConfirmationMessageVisible(true);\n }\n setIsMessageVisible(true);\n resolve();\n }, FADE_TIMEOUT);\n }),\n }),\n [\n completionFrames,\n confirmationFrames,\n confirmationMessage,\n isConfirmationAnimationPlayed,\n onShowContent,\n playAnimation,\n ],\n );\n\n const displayMessage = useMemo(() => {\n return isConfirmationMessageVisible && confirmationMessage ? confirmationMessage : message;\n }, [isConfirmationMessageVisible, confirmationMessage, message]);\n\n useEffect(() => {\n idleFramesRef.current = idleFrames;\n }, [idleFrames]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n useEffect(() => {\n setIsConfirmationMessageVisible(isConfirmationVisible);\n }, [isConfirmationVisible]);\n\n useEffect(() => {\n setIsMessageVisible(true);\n onShowContent(true);\n }, [message, onShowContent]);\n\n return (\n <Styled.Wrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexColumnGapX={0.5}\n $height={height}\n >\n <FlexView>\n <LottieAnimation\n width={118}\n height={118}\n src={LOTTIE.ANIMATED_AVATAR}\n ref={animationRef}\n onRender={handleLottieRender}\n settings={animationSettings}\n />\n </FlexView>\n {isMessageVisible && (\n <FlexView $flex={1}>\n <Styled.MessageWrapper\n $gutterX={1}\n $gapX={0.5}\n $background=\"BLACK_3\"\n $borderColor=\"BLACK_5\"\n
|
|
1
|
+
{"version":3,"file":"animated-avatar-message.js","sources":["../../../../../src/features/auth/comps/animated-avatar-message/animated-avatar-message.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { IAnimatedAvatarMessageProps } from './animated-avatar-message-types';\n\nimport {\n useCallback,\n useImperativeHandle,\n useRef,\n useState,\n useEffect,\n type FC,\n useMemo,\n memo,\n} from 'react';\n\nimport { LOTTIE } from '../../../../assets/lottie/lottie';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport { ANIMATION_SEGMENTS, FADE_TIMEOUT } from './animated-avatar-message-constants';\nimport * as Styled from './animated-avatar-message-styled';\nimport AnimatedText from './animated-text/animated-text';\n\nconst animationSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n};\n\nconst AnimatedAvatarMessage: FC<IAnimatedAvatarMessageProps> = ({\n message,\n confirmationMessage,\n onShowContent,\n confirmationFrames,\n completionFrames,\n isConfirmationVisible,\n ref,\n height = 'auto',\n idleFrames,\n}) => {\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n const [isMessageVisible, setIsMessageVisible] = useState(false);\n const [isConfirmationAnimationPlayed, setIsConfirmationAnimationPlayed] = useState(false);\n const [isConfirmationMessageVisible, setIsConfirmationMessageVisible] =\n useState(isConfirmationVisible);\n const shouldUseCustomIdleFrames = useRef(false);\n const idleFramesRef = useRef(idleFrames);\n\n const playIdleLoop = useCallback(() => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.removeEventListener('complete', playIdleLoop);\n animation.setLoop(true);\n\n const idleSegment =\n shouldUseCustomIdleFrames.current && idleFramesRef.current\n ? idleFramesRef.current\n : ANIMATION_SEGMENTS.IDLE;\n\n animation.playSegments(idleSegment, true);\n }, []);\n\n const handleLottieRender = useCallback(() => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.playSegments(ANIMATION_SEGMENTS.INITIAL, true);\n\n const onComplete = () => {\n animation.removeEventListener('complete', onComplete);\n setIsMessageVisible(true);\n onShowContent(true);\n animation.playSegments(ANIMATION_SEGMENTS.FINAL, true);\n animation.addEventListener('complete', playIdleLoop);\n };\n\n animation.addEventListener('complete', onComplete);\n }, [onShowContent, playIdleLoop]);\n\n const playAnimation = useCallback(\n (frames: [number, number]) => {\n const animation = animationRef.current;\n\n if (!animation) return;\n\n animation.setLoop(false);\n animation.playSegments(frames, true);\n animation.addEventListener('complete', playIdleLoop);\n },\n [playIdleLoop],\n );\n\n useImperativeHandle(\n ref,\n () => ({\n fadeOutMessageAndPlayCompletion: () =>\n new Promise<void>(resolve => {\n onShowContent(false);\n setIsConfirmationAnimationPlayed(false);\n if (completionFrames && isConfirmationAnimationPlayed) {\n shouldUseCustomIdleFrames.current = false;\n playAnimation(completionFrames);\n }\n timeoutRef.current = setTimeout(() => {\n setIsMessageVisible(false);\n resolve();\n }, FADE_TIMEOUT);\n }),\n\n playConfirmationFrames: () =>\n new Promise<void>(resolve => {\n if (!isConfirmationAnimationPlayed) {\n if (completionFrames) {\n setIsConfirmationAnimationPlayed(true);\n }\n shouldUseCustomIdleFrames.current = !!idleFramesRef.current;\n playAnimation(confirmationFrames);\n }\n\n if (confirmationMessage) {\n setIsMessageVisible(false);\n }\n timeoutRef.current = setTimeout(() => {\n if (confirmationMessage) {\n setIsConfirmationMessageVisible(true);\n }\n setIsMessageVisible(true);\n resolve();\n }, FADE_TIMEOUT);\n }),\n }),\n [\n completionFrames,\n confirmationFrames,\n confirmationMessage,\n isConfirmationAnimationPlayed,\n onShowContent,\n playAnimation,\n ],\n );\n\n const displayMessage = useMemo(() => {\n return isConfirmationMessageVisible && confirmationMessage ? confirmationMessage : message;\n }, [isConfirmationMessageVisible, confirmationMessage, message]);\n\n useEffect(() => {\n idleFramesRef.current = idleFrames;\n }, [idleFrames]);\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n }\n };\n }, []);\n\n useEffect(() => {\n setIsConfirmationMessageVisible(isConfirmationVisible);\n }, [isConfirmationVisible]);\n\n useEffect(() => {\n setIsMessageVisible(true);\n onShowContent(true);\n }, [message, onShowContent]);\n\n return (\n <Styled.Wrapper\n $flexDirection=\"row\"\n $justifyContent=\"flex-start\"\n $alignItems=\"center\"\n $flexColumnGapX={0.5}\n $height={height}\n >\n <FlexView>\n <LottieAnimation\n width={118}\n height={118}\n src={LOTTIE.ANIMATED_AVATAR}\n ref={animationRef}\n onRender={handleLottieRender}\n settings={animationSettings}\n />\n </FlexView>\n {isMessageVisible && (\n <FlexView $flex={1}>\n <Styled.MessageWrapper\n $gutterX={1}\n $gapX={0.5}\n $background=\"BLACK_3\"\n $borderColor=\"BLACK_5\"\n isVisible={isMessageVisible}\n >\n <AnimatedText text={displayMessage} speed={20} />\n </Styled.MessageWrapper>\n </FlexView>\n )}\n </Styled.Wrapper>\n );\n};\n\nexport default memo(AnimatedAvatarMessage);\n"],"names":["animationSettings","AnimatedAvatarMessage","message","confirmationMessage","onShowContent","confirmationFrames","completionFrames","isConfirmationVisible","ref","height","idleFrames","animationRef","useRef","timeoutRef","isMessageVisible","setIsMessageVisible","useState","isConfirmationAnimationPlayed","setIsConfirmationAnimationPlayed","isConfirmationMessageVisible","setIsConfirmationMessageVisible","shouldUseCustomIdleFrames","idleFramesRef","playIdleLoop","useCallback","animation","idleSegment","ANIMATION_SEGMENTS","handleLottieRender","onComplete","playAnimation","frames","useImperativeHandle","resolve","FADE_TIMEOUT","displayMessage","useMemo","useEffect","jsxs","Styled.Wrapper","jsx","FlexView","LottieAnimation","LOTTIE","Styled.MessageWrapper","AnimatedText","animatedAvatarMessage","memo"],"mappings":"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"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PLUGINS as _ } from "../../../node_modules/@cuemath/analytics-v2/dist/constants.js";
|
|
2
|
-
var s = /* @__PURE__ */ ((e) => (e.START_SIGNUP_CTA_CLICKED = "start_signup_cta_clicked", e.ECNA_STEP_VIEWED = "ecna_step_viewed", e.ECNA_RESPONSE_RECORDED_DEBUG = "ecna_response_recorded_debug", e.PARENT_SIGNUP_CTA_CLICKED = "parent_signup_cta_clicked", e.PARENT_SIGNUP_SUCCESSFUL = "parent_signup_successful", e.PARENT_SIGNUP_FAILED = "parent_signup_failed", e.STUDENT_SIGNUP_SUCCESSFUL = "signup_successful", e.STUDENT_SIGNUP_FAILED = "signup_failed", e.SIGNUP_OTP_ENTERED = "signup_otp_entered", e.SIGNUP_OTP_VERIFIED = "signup_otp_verified", e.SIGNUP_OTP_FAILED = "signup_otp_failed", e.SLOTS_SHOWN = "slots_shown", e.SLOT_DATE_SELECTED = "slot_date_selected", e.SLOT_TIME_SELECTED = "slot_time_selected", e.TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected", e
|
|
2
|
+
var s = /* @__PURE__ */ ((e) => (e.START_SIGNUP_CTA_CLICKED = "start_signup_cta_clicked", e.ECNA_STEP_VIEWED = "ecna_step_viewed", e.ECNA_RESPONSE_RECORDED_DEBUG = "ecna_response_recorded_debug", e.PARENT_SIGNUP_CTA_CLICKED = "parent_signup_cta_clicked", e.PARENT_SIGNUP_SUCCESSFUL = "parent_signup_successful", e.PARENT_SIGNUP_FAILED = "parent_signup_failed", e.STUDENT_SIGNUP_SUCCESSFUL = "signup_successful", e.STUDENT_SIGNUP_FAILED = "signup_failed", e.SIGNUP_OTP_ENTERED = "signup_otp_entered", e.SIGNUP_OTP_VERIFIED = "signup_otp_verified", e.SIGNUP_OTP_FAILED = "signup_otp_failed", e.SLOTS_SHOWN = "slots_shown", e.SLOT_DATE_SELECTED = "slot_date_selected", e.SLOT_TIME_SELECTED = "slot_time_selected", e.TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected", e))(s || {});
|
|
3
3
|
const n = {
|
|
4
4
|
start_signup_cta_clicked: [_.MIXPANEL],
|
|
5
5
|
ecna_step_viewed: [_.MIXPANEL],
|
|
@@ -15,9 +15,7 @@ const n = {
|
|
|
15
15
|
slots_shown: [_.MIXPANEL],
|
|
16
16
|
slot_date_selected: [_.MIXPANEL],
|
|
17
17
|
slot_time_selected: [_.MIXPANEL],
|
|
18
|
-
tutor_change_reason_selected: [_.MIXPANEL]
|
|
19
|
-
subscription_cancellation_failed: [_.MIXPANEL],
|
|
20
|
-
subscription_cancellation_successful: [_.MIXPANEL]
|
|
18
|
+
tutor_change_reason_selected: [_.MIXPANEL]
|
|
21
19
|
};
|
|
22
20
|
export {
|
|
23
21
|
s as PLA_ANALYTICS_EVENTS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pla-analytics-events.js","sources":["../../../../src/features/auth/pla-signup/pla-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PLA_ANALYTICS_EVENTS {\n START_SIGNUP_CTA_CLICKED = 'start_signup_cta_clicked',\n ECNA_STEP_VIEWED = 'ecna_step_viewed',\n ECNA_RESPONSE_RECORDED_DEBUG = 'ecna_response_recorded_debug',\n PARENT_SIGNUP_CTA_CLICKED = 'parent_signup_cta_clicked',\n PARENT_SIGNUP_SUCCESSFUL = 'parent_signup_successful',\n PARENT_SIGNUP_FAILED = 'parent_signup_failed',\n STUDENT_SIGNUP_SUCCESSFUL = 'signup_successful',\n STUDENT_SIGNUP_FAILED = 'signup_failed',\n SIGNUP_OTP_ENTERED = 'signup_otp_entered',\n SIGNUP_OTP_VERIFIED = 'signup_otp_verified',\n SIGNUP_OTP_FAILED = 'signup_otp_failed',\n SLOTS_SHOWN = 'slots_shown',\n SLOT_DATE_SELECTED = 'slot_date_selected',\n SLOT_TIME_SELECTED = 'slot_time_selected',\n TUTOR_CHANGE_REASON_SELECTED = 'tutor_change_reason_selected',\n
|
|
1
|
+
{"version":3,"file":"pla-analytics-events.js","sources":["../../../../src/features/auth/pla-signup/pla-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PLA_ANALYTICS_EVENTS {\n START_SIGNUP_CTA_CLICKED = 'start_signup_cta_clicked',\n ECNA_STEP_VIEWED = 'ecna_step_viewed',\n ECNA_RESPONSE_RECORDED_DEBUG = 'ecna_response_recorded_debug',\n PARENT_SIGNUP_CTA_CLICKED = 'parent_signup_cta_clicked',\n PARENT_SIGNUP_SUCCESSFUL = 'parent_signup_successful',\n PARENT_SIGNUP_FAILED = 'parent_signup_failed',\n STUDENT_SIGNUP_SUCCESSFUL = 'signup_successful',\n STUDENT_SIGNUP_FAILED = 'signup_failed',\n SIGNUP_OTP_ENTERED = 'signup_otp_entered',\n SIGNUP_OTP_VERIFIED = 'signup_otp_verified',\n SIGNUP_OTP_FAILED = 'signup_otp_failed',\n SLOTS_SHOWN = 'slots_shown',\n SLOT_DATE_SELECTED = 'slot_date_selected',\n SLOT_TIME_SELECTED = 'slot_time_selected',\n TUTOR_CHANGE_REASON_SELECTED = 'tutor_change_reason_selected',\n}\n\nexport const PLA_ANALYTICS_WHITELIST_EVENTS = {\n [PLA_ANALYTICS_EVENTS.START_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_STEP_VIEWED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.ECNA_RESPONSE_RECORDED_DEBUG]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_CTA_CLICKED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.PARENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_SUCCESSFUL]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.STUDENT_SIGNUP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_ENTERED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_VERIFIED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SIGNUP_OTP_FAILED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOTS_SHOWN]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_DATE_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.SLOT_TIME_SELECTED]: [PLUGINS.MIXPANEL],\n [PLA_ANALYTICS_EVENTS.TUTOR_CHANGE_REASON_SELECTED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PLA_ANALYTICS_EVENTS","PLA_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,2BAA2B,4BAC3BA,EAAA,mBAAmB,oBACnBA,EAAA,+BAA+B,gCAC/BA,EAAA,4BAA4B,6BAC5BA,EAAA,2BAA2B,4BAC3BA,EAAA,uBAAuB,wBACvBA,EAAA,4BAA4B,qBAC5BA,EAAA,wBAAwB,iBACxBA,EAAA,qBAAqB,sBACrBA,EAAA,sBAAsB,uBACtBA,EAAA,oBAAoB,qBACpBA,EAAA,cAAc,eACdA,EAAA,qBAAqB,sBACrBA,EAAA,qBAAqB,sBACrBA,EAAA,+BAA+B,gCAfrBA,IAAAA,KAAA,CAAA,CAAA;AAkBL,MAAMC,IAAiC;AAAA,EAC3C,0BAAgD,CAACC,EAAQ,QAAQ;AAAA,EACjE,kBAAwC,CAACA,EAAQ,QAAQ;AAAA,EACzD,8BAAoD,CAACA,EAAQ,QAAQ;AAAA,EACrE,2BAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,0BAAgD,CAACA,EAAQ,QAAQ;AAAA,EACjE,sBAA4C,CAACA,EAAQ,QAAQ;AAAA,EAC7D,mBAAiD,CAACA,EAAQ,QAAQ;AAAA,EAClE,eAA6C,CAACA,EAAQ,QAAQ;AAAA,EAC9D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,qBAA2C,CAACA,EAAQ,QAAQ;AAAA,EAC5D,mBAAyC,CAACA,EAAQ,QAAQ;AAAA,EAC1D,aAAmC,CAACA,EAAQ,QAAQ;AAAA,EACpD,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,oBAA0C,CAACA,EAAQ,QAAQ;AAAA,EAC3D,8BAAoD,CAACA,EAAQ,QAAQ;AACxE;"}
|
|
@@ -1,62 +1,53 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { BLOCK_TYPE as
|
|
4
|
-
import
|
|
5
|
-
import { ChapterDetailsWrapper as
|
|
6
|
-
const { SAT_MOCK_TEST:
|
|
7
|
-
const {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
userType: r,
|
|
11
|
-
coreBlocksRef: S,
|
|
12
|
-
challengeBlockRef: C,
|
|
13
|
-
downloadBlockRef: E,
|
|
14
|
-
downloadCoreBlockRef: g,
|
|
15
|
-
...d
|
|
16
|
-
} = h;
|
|
17
|
-
let a = 0, k = !1, f = !1;
|
|
18
|
-
const { goalBlocks: p, nonGoalBlocks: B } = D(
|
|
1
|
+
import { jsxs as T, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import { memo as b, useMemo as A } from "react";
|
|
3
|
+
import { BLOCK_TYPE as C, SECTION_CODE as g } from "../../constants/block-constants.js";
|
|
4
|
+
import m from "./block-section-view.js";
|
|
5
|
+
import { ChapterDetailsWrapper as R } from "./block-sections-styled.js";
|
|
6
|
+
const { SAT_MOCK_TEST: u, GOAL: y } = C, { GOALS: G, READINESS: I } = g, v = b((_) => {
|
|
7
|
+
const { blocks: t, imageHue: n, userType: i, coreBlocksRef: B, blockSectionRef: S, ...r } = _;
|
|
8
|
+
let p = 0, k = !1;
|
|
9
|
+
const { goalBlocks: d, nonGoalBlocks: a } = A(
|
|
19
10
|
() => t.reduce(
|
|
20
|
-
(o, e) => (e.section_code ===
|
|
11
|
+
(o, e) => (e.section_code === G || e.section_code === I || e.block_type === u ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
|
|
21
12
|
{ goalBlocks: [], nonGoalBlocks: [] }
|
|
22
13
|
),
|
|
23
14
|
[t]
|
|
24
15
|
);
|
|
25
|
-
return /* @__PURE__ */
|
|
26
|
-
|
|
16
|
+
return /* @__PURE__ */ T(
|
|
17
|
+
R,
|
|
27
18
|
{
|
|
28
19
|
$width: "100%",
|
|
29
|
-
$background:
|
|
20
|
+
$background: a.length ? "WHITE_3" : "WHITE_1",
|
|
30
21
|
children: [
|
|
31
|
-
/* @__PURE__ */ c("div", { ref:
|
|
32
|
-
const { block_type: l, block_id: s, permissions:
|
|
33
|
-
let
|
|
34
|
-
const
|
|
35
|
-
return (l ===
|
|
36
|
-
|
|
22
|
+
/* @__PURE__ */ c("div", { ref: B, children: d.map((o, e) => {
|
|
23
|
+
const { block_type: l, block_id: s, permissions: E } = o;
|
|
24
|
+
let f = 0;
|
|
25
|
+
const h = e === d.length - 1;
|
|
26
|
+
return (l === y || l === u) && (E.can_un_skip || (p += 1), f = p), /* @__PURE__ */ c(
|
|
27
|
+
m,
|
|
37
28
|
{
|
|
38
29
|
blockData: o,
|
|
39
|
-
userType:
|
|
40
|
-
isLastBlock:
|
|
41
|
-
lessonIdx:
|
|
42
|
-
imageHue:
|
|
30
|
+
userType: i,
|
|
31
|
+
isLastBlock: h,
|
|
32
|
+
lessonIdx: f,
|
|
33
|
+
imageHue: n,
|
|
43
34
|
isGoalBlock: !0,
|
|
44
|
-
...
|
|
45
|
-
blockSectionRef:
|
|
35
|
+
...r,
|
|
36
|
+
blockSectionRef: void 0
|
|
46
37
|
},
|
|
47
38
|
s
|
|
48
39
|
);
|
|
49
40
|
}) }),
|
|
50
|
-
|
|
51
|
-
const { block_id: e, block_type: l } = o, s = l === "CHALLENGE_ARENA" && !k
|
|
52
|
-
return s && (k = !0),
|
|
53
|
-
|
|
41
|
+
a.map((o) => {
|
|
42
|
+
const { block_id: e, block_type: l } = o, s = l === "CHALLENGE_ARENA" && !k;
|
|
43
|
+
return s && (k = !0), /* @__PURE__ */ c(
|
|
44
|
+
m,
|
|
54
45
|
{
|
|
55
46
|
blockData: o,
|
|
56
|
-
userType:
|
|
57
|
-
imageHue:
|
|
58
|
-
...
|
|
59
|
-
blockSectionRef: s ?
|
|
47
|
+
userType: i,
|
|
48
|
+
imageHue: n,
|
|
49
|
+
...r,
|
|
50
|
+
blockSectionRef: s ? S : void 0
|
|
60
51
|
},
|
|
61
52
|
e
|
|
62
53
|
);
|
|
@@ -66,6 +57,6 @@ const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, F = y((
|
|
|
66
57
|
);
|
|
67
58
|
});
|
|
68
59
|
export {
|
|
69
|
-
|
|
60
|
+
v as default
|
|
70
61
|
};
|
|
71
62
|
//# sourceMappingURL=block-sections.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const {
|
|
1
|
+
{"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import type { IBlockSectionsProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(props => {\n const { blocks, imageHue, userType, coreBlocksRef, blockSectionRef, ...blockSectionCallBacks } =\n props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const shouldApplyRef = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n if (shouldApplyRef) {\n addChallengeArenaRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={shouldApplyRef ? blockSectionRef : undefined}\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","blockSectionRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","lessonIdx","isLastBlock","BlockSectionView","shouldApplyRef"],"mappings":";;;;;AASA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,CAASC,MAAA;AACrD,QAAA,EAAE,QAAAC,GAAQ,UAAAC,GAAU,UAAAC,GAAU,eAAAC,GAAe,iBAAAC,GAAiB,GAAGC,EACrE,IAAAN;AAEF,MAAIO,IAAc,GACdC,IAAuB;AAErB,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;AAAA,IACpC,MACEV,EAAO;AAAA,MACL,CAACW,GAAKC,OAEFA,EAAM,iBAAiBlB,KACvBkB,EAAM,iBAAiBjB,KACvBiB,EAAM,eAAerB,IAEjBoB,EAAA,WAAW,KAAKC,CAAK,IAErBD,EAAA,cAAc,KAAKC,CAAK,GAGvBD;AAAA,MAET,EAAE,YAAY,CAAA,GAAqB,eAAe,GAAoB;AAAA,IACxE;AAAA,IACF,CAACX,CAAM;AAAA,EAAA;AAIP,SAAA,gBAAAa;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,QAAO;AAAA,MACP,aAAcL,EAAc,SAAqB,YAAZ;AAAA,MAErC,UAAA;AAAA,QAAA,gBAAAM,EAAC,SAAI,KAAKZ,GACP,YAAW,IAAI,CAACa,GAAWC,MAAQ;AAClC,gBAAM,EAAE,YAAYC,GAAW,UAAUC,GAAS,aAAAC,EAAgB,IAAAJ;AAClE,cAAIK,IAAY;AAEV,gBAAAC,IAAcL,MAAQT,EAAW,SAAS;AAE5C,kBAAAU,MAAc1B,KAAQ0B,MAAc3B,OACjC6B,EAAY,gBACAd,KAAA,IAGLe,IAAAf,IAIZ,gBAAAS;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,WAAAP;AAAA,cACA,UAAAd;AAAA,cACA,aAAAoB;AAAA,cAEA,WAAAD;AAAA,cACA,UAAApB;AAAA,cACA,aAAW;AAAA,cACV,GAAGI;AAAA,cACJ,iBAAiB;AAAA,YAAA;AAAA,YALZc;AAAA,UAAA;AAAA,QAQV,CAAA,GACH;AAAA,QAECV,EAAc,IAAI,CAAaO,MAAA;AAC9B,gBAAM,EAAE,UAAUG,GAAS,YAAYD,MAAcF,GAG/CQ,IAAiBN,MAAc,qBAAqB,CAACX;AAE3D,iBAAIiB,MACqBjB,IAAA,KAIvB,gBAAAQ;AAAA,YAACQ;AAAA,YAAA;AAAA,cAEC,WAAAP;AAAA,cACA,UAAAd;AAAA,cACA,UAAAD;AAAA,cACC,GAAGI;AAAA,cACJ,iBAAiBmB,IAAiBpB,IAAkB;AAAA,YAAA;AAAA,YAL/Ce;AAAA,UAAA;AAAA,QAMP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
|
|
@@ -1,187 +1,148 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import { ILLUSTRATIONS as
|
|
4
|
-
import
|
|
5
|
-
import { useChallengeArenaJourney as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
import ce from "./chapter-banner/chapter-banner.js";
|
|
18
|
-
import { ContentWrapper as de, BackButtonContainer as me, BackButtonWrapper as pe, LoaderWrapper as fe } from "./chapter-details-styled.js";
|
|
19
|
-
const he = G((S) => {
|
|
1
|
+
import { jsxs as c, jsx as t, Fragment as E } from "react/jsx-runtime";
|
|
2
|
+
import { memo as L, useCallback as P, useEffect as p } from "react";
|
|
3
|
+
import { ILLUSTRATIONS as T } from "../../../assets/illustrations/illustrations.js";
|
|
4
|
+
import U from "../../../assets/line-icons/icons/back2.js";
|
|
5
|
+
import { useChallengeArenaJourney as j } from "../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey.js";
|
|
6
|
+
import { useJourney as H } from "../../journey/use-journey/use-journey.js";
|
|
7
|
+
import F from "../../ui/buttons/button/button.js";
|
|
8
|
+
import O from "../../ui/buttons/icon-button/icon-button.js";
|
|
9
|
+
import W from "../../ui/layout/flex-view.js";
|
|
10
|
+
import X from "../../ui/loader/app-loader/app-loader.js";
|
|
11
|
+
import z from "../../ui/text/text.js";
|
|
12
|
+
import { useGetChapterDetails as G } from "../api/chapter.js";
|
|
13
|
+
import V from "./block-sections/block-sections.js";
|
|
14
|
+
import q from "./chapter-banner/chapter-banner.js";
|
|
15
|
+
import { ContentWrapper as M, BackButtonContainer as K, BackButtonWrapper as Q, LoaderWrapper as Y } from "./chapter-details-styled.js";
|
|
16
|
+
const Z = L((u) => {
|
|
20
17
|
const {
|
|
21
|
-
userChapterId:
|
|
22
|
-
studentId:
|
|
23
|
-
userType:
|
|
24
|
-
onBlockSkipUnskip:
|
|
25
|
-
onNodeAttempt:
|
|
26
|
-
onNodeAssignAsHomework:
|
|
27
|
-
onNodeMarkAsDone:
|
|
28
|
-
onNodeReattempt:
|
|
29
|
-
onNodeReview:
|
|
30
|
-
onNodeView:
|
|
31
|
-
onExit:
|
|
32
|
-
onNodeUnassign:
|
|
33
|
-
onNodeUnlock:
|
|
34
|
-
onNodeSkipUnSkip:
|
|
35
|
-
startChapterPageJourney:
|
|
36
|
-
onBlockReset:
|
|
37
|
-
chapterPageRef:
|
|
38
|
-
bannerRef:
|
|
39
|
-
coreBlocksRef:
|
|
40
|
-
canStartJourney:
|
|
41
|
-
canStartChallengeArenaJourney:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
} = S, { isJourneyActive: g } = Z(), {
|
|
45
|
-
get: k,
|
|
18
|
+
userChapterId: a,
|
|
19
|
+
studentId: i,
|
|
20
|
+
userType: r,
|
|
21
|
+
onBlockSkipUnskip: k,
|
|
22
|
+
onNodeAttempt: C,
|
|
23
|
+
onNodeAssignAsHomework: y,
|
|
24
|
+
onNodeMarkAsDone: A,
|
|
25
|
+
onNodeReattempt: B,
|
|
26
|
+
onNodeReview: S,
|
|
27
|
+
onNodeView: $,
|
|
28
|
+
onExit: N,
|
|
29
|
+
onNodeUnassign: x,
|
|
30
|
+
onNodeUnlock: R,
|
|
31
|
+
onNodeSkipUnSkip: w,
|
|
32
|
+
startChapterPageJourney: s,
|
|
33
|
+
onBlockReset: I,
|
|
34
|
+
chapterPageRef: b,
|
|
35
|
+
bannerRef: J,
|
|
36
|
+
coreBlocksRef: _,
|
|
37
|
+
canStartJourney: l,
|
|
38
|
+
canStartChallengeArenaJourney: h
|
|
39
|
+
} = u, { isJourneyActive: m } = H(), {
|
|
40
|
+
get: g,
|
|
46
41
|
data: e,
|
|
47
|
-
isProcessing:
|
|
48
|
-
isProcessingFailed:
|
|
49
|
-
isStale:
|
|
50
|
-
} =
|
|
51
|
-
|
|
52
|
-
}, [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}, [
|
|
56
|
-
const { blockSectionRef:
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
startJourney: C
|
|
60
|
-
} = Y(), { blockSectionRef: N, startJourney: R } = Q(), D = h(
|
|
61
|
-
() => e && ie(e.blocks),
|
|
62
|
-
[e]
|
|
63
|
-
), d = h(
|
|
64
|
-
() => e && se(e.blocks),
|
|
65
|
-
[e]
|
|
66
|
-
), X = h(
|
|
67
|
-
() => c && d ? w : n ? N : void 0,
|
|
68
|
-
[
|
|
69
|
-
c,
|
|
70
|
-
n,
|
|
71
|
-
d,
|
|
72
|
-
w,
|
|
73
|
-
N
|
|
74
|
-
]
|
|
75
|
-
);
|
|
76
|
-
return f(() => {
|
|
77
|
-
e && !g && (r && m && m({
|
|
78
|
-
chapterDetails: e,
|
|
79
|
-
userChapterId: s,
|
|
80
|
-
studentId: l,
|
|
81
|
-
userType: t
|
|
82
|
-
}), !r && u && B({
|
|
83
|
-
chapterDetails: e,
|
|
84
|
-
userType: t
|
|
85
|
-
}), !r && c && d && C({
|
|
42
|
+
isProcessing: o,
|
|
43
|
+
isProcessingFailed: v,
|
|
44
|
+
isStale: d
|
|
45
|
+
} = G(), n = P(() => {
|
|
46
|
+
g(a, void 0, { studentId: i });
|
|
47
|
+
}, [g, a, i]);
|
|
48
|
+
p(() => {
|
|
49
|
+
n();
|
|
50
|
+
}, [n]);
|
|
51
|
+
const { blockSectionRef: D, startJourney: f } = j();
|
|
52
|
+
return p(() => {
|
|
53
|
+
e && l && !m && s && s({
|
|
86
54
|
chapterDetails: e,
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
55
|
+
userChapterId: a,
|
|
56
|
+
studentId: i,
|
|
57
|
+
userType: r
|
|
58
|
+
}), e && !l && h && !m && f({
|
|
90
59
|
chapterDetails: e,
|
|
91
|
-
userType:
|
|
92
|
-
})
|
|
60
|
+
userType: r
|
|
61
|
+
});
|
|
93
62
|
}, [
|
|
94
|
-
|
|
95
|
-
|
|
63
|
+
h,
|
|
64
|
+
l,
|
|
96
65
|
e,
|
|
97
|
-
g,
|
|
98
|
-
B,
|
|
99
66
|
m,
|
|
100
|
-
|
|
101
|
-
C,
|
|
102
|
-
l,
|
|
67
|
+
f,
|
|
103
68
|
s,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
n
|
|
109
|
-
]),
|
|
110
|
-
!
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
/* @__PURE__ */ o(
|
|
114
|
-
ee,
|
|
69
|
+
i,
|
|
70
|
+
a,
|
|
71
|
+
r
|
|
72
|
+
]), p(() => {
|
|
73
|
+
!o && d && n();
|
|
74
|
+
}, [n, o, d]), v ? /* @__PURE__ */ c(W, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
|
|
75
|
+
/* @__PURE__ */ t(z, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
|
|
76
|
+
/* @__PURE__ */ t(
|
|
77
|
+
F,
|
|
115
78
|
{
|
|
116
79
|
widthX: 14,
|
|
117
80
|
size: "small",
|
|
118
81
|
shape: "square",
|
|
119
82
|
renderAs: "primary",
|
|
120
83
|
label: "Try again",
|
|
121
|
-
onClick:
|
|
84
|
+
onClick: n
|
|
122
85
|
}
|
|
123
86
|
)
|
|
124
|
-
] }) : !e &&
|
|
125
|
-
|
|
87
|
+
] }) : !e && o ? /* @__PURE__ */ t(X, { height: "100vh" }) : /* @__PURE__ */ c(
|
|
88
|
+
M,
|
|
126
89
|
{
|
|
127
|
-
ref:
|
|
90
|
+
ref: b,
|
|
128
91
|
$widthX: 50,
|
|
129
|
-
$disablePointerEvents:
|
|
92
|
+
$disablePointerEvents: o,
|
|
130
93
|
$justifyContent: "center",
|
|
131
94
|
$alignItems: "center",
|
|
132
95
|
$height: "max-content",
|
|
133
96
|
children: [
|
|
134
|
-
|
|
135
|
-
|
|
97
|
+
r === "TEACHER" && /* @__PURE__ */ t(K, { $height: "100%", className: "goal-widget-chapter-item", children: /* @__PURE__ */ t(Q, { children: /* @__PURE__ */ t(
|
|
98
|
+
O,
|
|
136
99
|
{
|
|
137
|
-
Icon:
|
|
100
|
+
Icon: U,
|
|
138
101
|
renderAs: "secondary-gray",
|
|
139
102
|
analyticsLabel: "chapter_page_exit",
|
|
140
103
|
size: "xsmall",
|
|
141
|
-
onClick:
|
|
104
|
+
onClick: N
|
|
142
105
|
}
|
|
143
106
|
) }) }),
|
|
144
|
-
|
|
145
|
-
e && /* @__PURE__ */
|
|
146
|
-
/* @__PURE__ */
|
|
147
|
-
|
|
107
|
+
o && /* @__PURE__ */ t(Y, { children: /* @__PURE__ */ t("img", { src: T.LOADER_1, alt: "loader" }) }),
|
|
108
|
+
e && /* @__PURE__ */ c(E, { children: [
|
|
109
|
+
/* @__PURE__ */ t(
|
|
110
|
+
q,
|
|
148
111
|
{
|
|
149
112
|
title: e.name,
|
|
150
113
|
imageHue: e.image_hue,
|
|
151
114
|
imageUrl: e.image_url,
|
|
152
115
|
progressStats: e == null ? void 0 : e.progress_stat,
|
|
153
|
-
bannerRef:
|
|
116
|
+
bannerRef: J
|
|
154
117
|
}
|
|
155
118
|
),
|
|
156
|
-
/* @__PURE__ */
|
|
157
|
-
|
|
119
|
+
/* @__PURE__ */ t(
|
|
120
|
+
V,
|
|
158
121
|
{
|
|
159
122
|
imageHue: e.image_hue,
|
|
160
|
-
userType:
|
|
123
|
+
userType: r,
|
|
161
124
|
blocks: e.blocks,
|
|
162
|
-
onBlockSkipUnskip:
|
|
163
|
-
onNodeAttempt:
|
|
164
|
-
onNodeAssignAsHomework:
|
|
165
|
-
onNodeMarkAsDone:
|
|
166
|
-
onNodeReattempt:
|
|
167
|
-
onNodeReview:
|
|
168
|
-
onNodeView:
|
|
169
|
-
coreBlocksRef:
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
onNodeSkipUnSkip: H,
|
|
176
|
-
onBlockReset: L
|
|
125
|
+
onBlockSkipUnskip: k,
|
|
126
|
+
onNodeAttempt: C,
|
|
127
|
+
onNodeAssignAsHomework: y,
|
|
128
|
+
onNodeMarkAsDone: A,
|
|
129
|
+
onNodeReattempt: B,
|
|
130
|
+
onNodeReview: S,
|
|
131
|
+
onNodeView: $,
|
|
132
|
+
coreBlocksRef: _,
|
|
133
|
+
blockSectionRef: D,
|
|
134
|
+
onNodeUnassign: x,
|
|
135
|
+
onNodeUnlock: R,
|
|
136
|
+
onNodeSkipUnSkip: w,
|
|
137
|
+
onBlockReset: I
|
|
177
138
|
}
|
|
178
139
|
)
|
|
179
140
|
] })
|
|
180
141
|
]
|
|
181
142
|
}
|
|
182
143
|
);
|
|
183
|
-
}),
|
|
144
|
+
}), fe = Z;
|
|
184
145
|
export {
|
|
185
|
-
|
|
146
|
+
fe as default
|
|
186
147
|
};
|
|
187
148
|
//# sourceMappingURL=chapter-details.js.map
|