@cuemath/leap 3.3.30-beta.1 → 3.3.30
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/features/auth/pla-signup/pla-analytics-events.js +3 -9
- package/dist/features/auth/pla-signup/pla-analytics-events.js.map +1 -1
- package/dist/features/auth/signup/circular-step-wrapper/circular-step-wrapper.js.map +1 -1
- package/dist/features/auth/signup/custom-input-field/custom-input-field.js +8 -8
- package/dist/features/auth/signup/custom-input-field/custom-input-field.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/hooks/use-parent-home-data.js +30 -32
- 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.js +16 -17
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js +4 -8
- package/dist/features/parent-dashboard/modals/trial-report/trial-report-styled.js.map +1 -1
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js +3 -3
- package/dist/features/parent-dashboard/modals/tutor-change/tutor-change-styled.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +4 -5
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-types.js.map +1 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +145 -170
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +49 -61
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +25 -25
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +53 -55
- 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 +43 -44
- 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/test-prep/test-prep.js +39 -40
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/helper.js +53 -69
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +130 -150
- 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 +112 -103
- package/dist/features/trial-session/trial-session-view.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 +5 -45
- package/dist/index.js +106 -116
- package/dist/index.js.map +1 -1
- package/dist/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +7 -0
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +3 -2
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +6 -10
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +12 -9
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/package.json +3 -2
- 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 -96
- package/dist/features/parent-dashboard/comps/billing-information/billing-information.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 -59
- 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 -93
- 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 -66
- package/dist/features/parent-dashboard/modals/hooks/use-pla-model-handlers.js.map +0 -1
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js +0 -12
- package/dist/features/parent-dashboard/modals/student-profile-summary/student-profile-summary-styled.js.map +0 -1
- package/dist/features/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/student-username/add/add-student-username-constants.js +0 -6
- package/dist/features/student-username/add/add-student-username-constants.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-helpers.js +0 -6
- package/dist/features/student-username/add/add-student-username-helpers.js.map +0 -1
- package/dist/features/student-username/add/add-student-username-styled.js +0 -10
- package/dist/features/student-username/add/add-student-username-styled.js.map +0 -1
- package/dist/features/student-username/add/add-student-username.js +0 -78
- package/dist/features/student-username/add/add-student-username.js.map +0 -1
- package/dist/features/student-username/add/api/update-username.js +0 -9
- package/dist/features/student-username/add/api/update-username.js.map +0 -1
- package/dist/features/student-username/add/api/username-availability.js +0 -10
- package/dist/features/student-username/add/api/username-availability.js.map +0 -1
- package/dist/features/student-username/add/hooks/use-check-username-availability.js +0 -41
- package/dist/features/student-username/add/hooks/use-check-username-availability.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/node_modules/query-string/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +0 -5
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +0 -8
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +0 -1
- /package/dist/node_modules/{query-string/node_modules/decode-uri-component → decode-uri-component}/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-trial-session-navigation.js","sources":["../../../../src/features/trial-session/hooks/use-trial-session-navigation.ts"],"sourcesContent":["import type { TTeacherAvailabilityResponse } from '../api/teacher-availability';\nimport type { ITrialSessionFormFields } from '../trial-session-types';\n\nimport { useCallback, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { COURSE_STREAMS } from '../../milestone/constants';\nimport { useMilestoneBulkPost } from '../../milestone/create/api/milestone-bulk';\nimport { usePostStudentPreferences } from '../api/course-stream';\nimport { usePatchStudentInformation } from '../api/student-information';\nimport { usePostTeacherAvailability } from '../api/teacher-availability';\nimport { usePatchTrialHome } from '../api/trial-home';\nimport { useTrialSessionContext } from '../context/use-trial-session-context';\nimport {\n getFormattedPreferences,\n getFormattedStudentPersonalizedPreference,\n getWeekdayAndStartTimeFromPreference,\n} from '../helper';\nimport { DEFAULT_BUTTON_STATE, TrialPageId } from '../trial-session-constants';\n\nconst useTrialSessionNavigation = () => {\n const {\n updateSlideConfig,\n slideConfig,\n formData,\n updateButtonState,\n teacherId,\n studentId,\n milestoneConfig,\n handleInfoMessage,\n onTrialInformationUpdate,\n trialHomeData,\n worksheetNavigationPanel,\n } = useTrialSessionContext();\n const { nextPage, id: currentPageId } = slideConfig || {};\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo;\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { pageId: nextPageId } = nextPage || {};\n const {\n name,\n grade,\n goals,\n curriculum,\n studentTimezone = 'Asia/Calcutta',\n preferences = [],\n personalizedLevel = [],\n personalizedFocus = [],\n personalizedBehaviors = [],\n personalizedObjectives = [],\n personalizedPosition = [],\n } = formData || {};\n\n const disableNavButtons = useCallback(() => {\n updateButtonState('both', {\n left: { isDisabled: true, isLoading: false },\n right: { isDisabled: true, isLoading: true },\n });\n }, [updateButtonState]);\n\n const onAcknowledge = (errorMessage: string | null) => {\n if (!errorMessage) {\n const overrides: Partial<ITrialSessionFormFields> = {};\n\n if (\n nextPageId === TrialPageId.CIRCLE_GAME ||\n nextPageId === TrialPageId.CIRCLE_PUZZLE ||\n nextPageId === TrialPageId.CIRCLE_SKILL\n ) {\n overrides.matchmakingId = uuidv4();\n overrides.showCircleGameScreen = true;\n }\n\n updateSlideConfig({ id: nextPageId, ...overrides });\n }\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n\n if (currentPageId === TrialPageId.LEARNING_LEVEL) {\n onTrialInformationUpdate?.();\n }\n };\n\n // API specifications\n const { patch: patchTrialSession } = usePatchTrialHome({ onComplete: onAcknowledge });\n const { patch: patchStudentInformation } = usePatchStudentInformation({\n onComplete: onAcknowledge,\n });\n const { post: postMilestoneBulk } = useMilestoneBulkPost({\n onComplete: onAcknowledge,\n });\n const { post: postStudentPreferences } = usePostStudentPreferences({\n onComplete: onAcknowledge,\n });\n\n const onTeacherAvailabilityValidate = (_: string | null, data?: TTeacherAvailabilityResponse) => {\n const notAvailable = data?.filter(item => !item.is_available) ?? [];\n\n if (notAvailable.length > 0) {\n const reason = notAvailable.map(item => item.reason).join('\\n');\n\n handleInfoMessage?.({ message: reason, position: 'bottom' });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n\n return;\n }\n\n const selectedRegularSlots = getFormattedPreferences(preferences, studentTimezone);\n\n if (selectedRegularSlots.length > 0) {\n const actionData = {\n trial_details: {\n selected_regular_slots: selectedRegularSlots,\n },\n };\n\n patchTrialSession('trial-v3-patch', {\n action: 'UPDATE_DEMO',\n action_data: actionData,\n teacher_id: teacherId,\n student_id: studentId,\n });\n } else updateButtonState('both', DEFAULT_BUTTON_STATE);\n };\n\n const { post: postTeacherAvailability } = usePostTeacherAvailability({\n onComplete: onTeacherAvailabilityValidate,\n });\n\n // Function to call API and updates states\n const handleStudentInformation = useCallback(() => {\n const [firstName, lastName] = name?.trim()?.split(' ') || [];\n const payload = {\n first_name: firstName,\n last_name: lastName,\n grade,\n board: curriculum,\n demo_type: 'TRIAL_V3',\n teacher_id: teacherId,\n country_alpha_2: countryCode,\n };\n const isNumberExistsInName = /\\d/.test(name || '');\n\n if (isNumberExistsInName) {\n updateSlideConfig({ numberInNameError: true });\n } else {\n disableNavButtons();\n patchStudentInformation(studentId, payload);\n }\n }, [\n name,\n grade,\n curriculum,\n teacherId,\n countryCode,\n disableNavButtons,\n updateSlideConfig,\n patchStudentInformation,\n studentId,\n ]);\n\n const handleClassPreferences = useCallback(() => {\n const selectedRegularSlots = getFormattedPreferences(preferences, studentTimezone);\n const sessionList = getWeekdayAndStartTimeFromPreference(selectedRegularSlots);\n\n if (selectedRegularSlots.length > 0) {\n const availabilityPayload = {\n teacher_id: teacherId,\n session_list: sessionList,\n };\n\n disableNavButtons();\n postTeacherAvailability(availabilityPayload);\n } else {\n updateSlideConfig({ id: nextPageId });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n }\n }, [\n preferences,\n studentTimezone,\n teacherId,\n postTeacherAvailability,\n disableNavButtons,\n updateSlideConfig,\n nextPageId,\n updateButtonState,\n ]);\n\n const handleMileStoneBulkPost = useCallback(() => {\n const payload = {\n course_stream: stream,\n grade,\n teacher_id: teacherId,\n board: curriculum,\n goals,\n };\n\n disableNavButtons();\n postMilestoneBulk(payload, {\n studentId,\n });\n }, [\n curriculum,\n disableNavButtons,\n goals,\n grade,\n postMilestoneBulk,\n stream,\n studentId,\n teacherId,\n ]);\n\n const handleStudentPreferencesPatch = useCallback(() => {\n const personalizedPreferences = getFormattedStudentPersonalizedPreference(milestoneConfig, [\n ...personalizedLevel,\n ...personalizedFocus,\n ...personalizedBehaviors,\n ...personalizedObjectives,\n ...personalizedPosition,\n ]);\n\n const payload = { preferences: personalizedPreferences };\n const meta = { stream: COURSE_STREAMS.MATH, studentId };\n\n disableNavButtons();\n postStudentPreferences(payload, meta);\n }, [\n milestoneConfig,\n personalizedLevel,\n personalizedFocus,\n personalizedBehaviors,\n personalizedObjectives,\n personalizedPosition,\n studentId,\n disableNavButtons,\n postStudentPreferences,\n ]);\n\n // Navigation logic\n const handleNavigation = useCallback(\n (dir: string, id?: string) => {\n if (!updateSlideConfig) return;\n\n const isStudentProfilePage = currentPageId === TrialPageId.STUDENT_PROFILE;\n const isLearningPlanSlide = currentPageId === TrialPageId.LEARNING_PLAN;\n const overrides: Partial<ITrialSessionFormFields> = {};\n\n if (\n id === TrialPageId.CIRCLE_GAME ||\n id === TrialPageId.CIRCLE_PUZZLE ||\n id === TrialPageId.CIRCLE_SKILL\n ) {\n overrides.matchmakingId = uuidv4();\n overrides.showCircleGameScreen = true;\n }\n\n if (dir === 'prev') {\n updateSlideConfig({\n id,\n ...(isStudentProfilePage && { studentProfile: undefined }),\n ...(isLearningPlanSlide && {\n chapterId: undefined,\n }),\n ...overrides,\n });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n }\n\n if (dir === 'next') {\n switch (currentPageId) {\n //TODO: remove STUDENT_INFORMATION\n case TrialPageId.STUDENT_INFORMATION:\n case TrialPageId.SCHOOL_GOALS:\n handleStudentInformation();\n break;\n case TrialPageId.LEARNING_WORKSHEET:\n handleMileStoneBulkPost();\n break;\n case TrialPageId.CLASS_PREFERENCE:\n handleClassPreferences();\n break;\n case TrialPageId.LEARNING_LEVEL:\n handleStudentPreferencesPatch();\n break;\n case TrialPageId.LEARNING_PLAN:\n updateSlideConfig({ id, chapterId: undefined, ...overrides });\n break;\n default: {\n updateSlideConfig({ id, ...overrides });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n }\n }\n }\n },\n [\n updateSlideConfig,\n currentPageId,\n updateButtonState,\n handleStudentInformation,\n handleMileStoneBulkPost,\n handleClassPreferences,\n handleStudentPreferencesPatch,\n ],\n );\n\n const sessionWorksheetNavigation = useCallback(() => {\n if (!worksheetNavigationPanel && currentPageId === TrialPageId.LEARNING_WORKSHEET) {\n handleNavigation('next', nextPageId);\n }\n }, [currentPageId, handleNavigation, nextPageId, worksheetNavigationPanel]);\n\n useEffect(() => {\n sessionWorksheetNavigation();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [worksheetNavigationPanel]);\n\n return { handleNavigation };\n};\n\nexport { useTrialSessionNavigation };\n"],"names":["useTrialSessionNavigation","updateSlideConfig","slideConfig","formData","updateButtonState","teacherId","studentId","milestoneConfig","handleInfoMessage","onTrialInformationUpdate","trialHomeData","worksheetNavigationPanel","useTrialSessionContext","nextPage","currentPageId","demoInfo","stream","regionData","countryCode","nextPageId","name","grade","goals","curriculum","studentTimezone","preferences","personalizedLevel","personalizedFocus","personalizedBehaviors","personalizedObjectives","personalizedPosition","disableNavButtons","useCallback","onAcknowledge","errorMessage","overrides","TrialPageId","uuidv4","DEFAULT_BUTTON_STATE","patchTrialSession","usePatchTrialHome","patchStudentInformation","usePatchStudentInformation","postMilestoneBulk","useMilestoneBulkPost","postStudentPreferences","usePostStudentPreferences","onTeacherAvailabilityValidate","_","data","notAvailable","item","reason","selectedRegularSlots","getFormattedPreferences","postTeacherAvailability","usePostTeacherAvailability","handleStudentInformation","firstName","lastName","_a","payload","handleClassPreferences","sessionList","getWeekdayAndStartTimeFromPreference","availabilityPayload","handleMileStoneBulkPost","handleStudentPreferencesPatch","getFormattedStudentPersonalizedPreference","meta","COURSE_STREAMS","handleNavigation","dir","id","isStudentProfilePage","isLearningPlanSlide","sessionWorksheetNavigation","useEffect"],"mappings":";;;;;;;;;;;AAoBA,MAAMA,KAA4B,MAAM;AAChC,QAAA;AAAA,IACJ,mBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,eAAAC;AAAA,IACA,0BAAAC;AAAA,MACEC,GAAuB,GACrB,EAAE,UAAAC,GAAU,IAAIC,EAAc,IAAIZ,KAAe,CAAA,GACjD,EAAE,WAAWa,EAAa,IAAAL,GAC1B,EAAE,QAAAM,GAAQ,aAAaC,EAAA,IAAeF,GACtC,EAAE,qBAAqBG,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5D,EAAE,QAAQE,MAAeN,KAAY,CAAA,GACrC;AAAA,IACJ,MAAAO;AAAA,I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BG,MAAkBsB,EAAY,sBAC7DmC,EAAiB,QAAQpD,CAAU;AAAA,KAEpC,CAACL,GAAeyD,GAAkBpD,GAAYR,CAAwB,CAAC;AAE1E,SAAAkE,GAAU,MAAM;AACa,IAAAD;EAAA,GAE1B,CAACjE,CAAwB,CAAC,GAEtB,EAAE,kBAAA4D,EAAiB;AAC5B;"}
|
|
1
|
+
{"version":3,"file":"use-trial-session-navigation.js","sources":["../../../../src/features/trial-session/hooks/use-trial-session-navigation.ts"],"sourcesContent":["import type { ITrialSessionFormFields } from '../trial-session-types';\n\nimport { useCallback, useEffect } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport { COURSE_STREAMS } from '../../milestone/constants';\nimport { useMilestoneBulkPost } from '../../milestone/create/api/milestone-bulk';\nimport { usePostStudentPreferences } from '../api/course-stream';\nimport { usePatchStudentInformation } from '../api/student-information';\nimport { usePatchTrialHome } from '../api/trial-home';\nimport { useTrialSessionContext } from '../context/use-trial-session-context';\nimport { getFormattedPreferences, getFormattedStudentPersonalizedPreference } from '../helper';\nimport { DEFAULT_BUTTON_STATE, TrialPageId } from '../trial-session-constants';\n\nconst useTrialSessionNavigation = () => {\n const {\n updateSlideConfig,\n slideConfig,\n formData,\n updateButtonState,\n teacherId,\n studentId,\n milestoneConfig,\n onTrialInformationUpdate,\n trialHomeData,\n worksheetNavigationPanel,\n } = useTrialSessionContext();\n const { nextPage, id: currentPageId } = slideConfig || {};\n const { demo_info: demoInfo } = trialHomeData;\n const { stream, region_data: regionData } = demoInfo;\n const { opportunity_country: countryCode = 'US' } = regionData || {};\n const { pageId: nextPageId } = nextPage || {};\n const {\n name,\n grade,\n goals,\n curriculum,\n studentTimezone,\n preferences = [],\n personalizedLevel = [],\n personalizedFocus = [],\n personalizedBehaviors = [],\n personalizedObjectives = [],\n } = formData || {};\n\n const disableNavButtons = useCallback(() => {\n updateButtonState('both', {\n left: { isDisabled: true, isLoading: false },\n right: { isDisabled: true, isLoading: true },\n });\n }, [updateButtonState]);\n\n const onAcknowledge = (errorMessage: string | null) => {\n if (!errorMessage) {\n const overrides: Partial<ITrialSessionFormFields> = {};\n\n if (\n nextPageId === TrialPageId.CIRCLE_GAME ||\n nextPageId === TrialPageId.CIRCLE_PUZZLE ||\n nextPageId === TrialPageId.CIRCLE_SKILL\n ) {\n overrides.matchmakingId = uuidv4();\n overrides.showCircleGameScreen = true;\n }\n\n updateSlideConfig({ id: nextPageId, ...overrides });\n }\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n\n if (\n currentPageId === TrialPageId.STUDENT_INFORMATION ||\n currentPageId === TrialPageId.SCHOOL_GOALS\n ) {\n //TODO: remove TrialPageId.STUDENT_INFORMATION\n onTrialInformationUpdate?.();\n }\n };\n\n // API specifications\n const { patch: patchTrialSession } = usePatchTrialHome({ onComplete: onAcknowledge });\n const { patch: patchStudentInformation } = usePatchStudentInformation({\n onComplete: onAcknowledge,\n });\n const { post: postMilestoneBulk } = useMilestoneBulkPost({\n onComplete: onAcknowledge,\n });\n const { post: postStudentPreferences } = usePostStudentPreferences({\n onComplete: onAcknowledge,\n });\n\n // Function to call API and updates states\n const handleStudentInformation = useCallback(() => {\n const [firstName, lastName] = name?.split(' ') || [];\n const payload = {\n first_name: firstName,\n last_name: lastName,\n grade,\n board: curriculum,\n demo_type: 'TRIAL_V3',\n teacher_id: teacherId,\n country_alpha_2: countryCode,\n };\n const isNumberExistsInName = /\\d/.test(name || '');\n\n if (isNumberExistsInName) {\n updateSlideConfig({ numberInNameError: true });\n } else {\n disableNavButtons();\n patchStudentInformation(studentId, payload);\n }\n }, [\n name,\n grade,\n curriculum,\n teacherId,\n countryCode,\n disableNavButtons,\n updateSlideConfig,\n patchStudentInformation,\n studentId,\n ]);\n\n const handleClassPreferences = useCallback(() => {\n const selectedRegularSlots = getFormattedPreferences(preferences, studentTimezone);\n\n if (selectedRegularSlots.length > 0) {\n const actionData = {\n trial_details: {\n selected_regular_slots: selectedRegularSlots,\n },\n };\n\n disableNavButtons();\n patchTrialSession('trial-v3-patch', {\n action: 'UPDATE_DEMO',\n action_data: actionData,\n teacher_id: teacherId,\n student_id: studentId,\n });\n } else {\n updateSlideConfig({ id: nextPageId });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n }\n }, [\n preferences,\n studentTimezone,\n disableNavButtons,\n patchTrialSession,\n teacherId,\n studentId,\n updateSlideConfig,\n nextPageId,\n updateButtonState,\n ]);\n\n const handleMileStoneBulkPost = useCallback(() => {\n const payload = {\n course_stream: stream,\n grade,\n teacher_id: teacherId,\n board: curriculum,\n goals,\n };\n\n disableNavButtons();\n postMilestoneBulk(payload, {\n studentId,\n });\n }, [\n curriculum,\n disableNavButtons,\n goals,\n grade,\n postMilestoneBulk,\n stream,\n studentId,\n teacherId,\n ]);\n\n const handleStudentPreferencesPatch = useCallback(() => {\n const personalizedPreferences = getFormattedStudentPersonalizedPreference(milestoneConfig, [\n ...personalizedLevel,\n ...personalizedFocus,\n ...personalizedBehaviors,\n ...personalizedObjectives,\n ]);\n\n const payload = { preferences: personalizedPreferences };\n const meta = { stream: COURSE_STREAMS.MATH, studentId };\n\n disableNavButtons();\n postStudentPreferences(payload, meta);\n }, [\n disableNavButtons,\n milestoneConfig,\n personalizedBehaviors,\n personalizedFocus,\n personalizedLevel,\n postStudentPreferences,\n personalizedObjectives,\n studentId,\n ]);\n\n // Navigation logic\n const handleNavigation = useCallback(\n (dir: string, id?: string) => {\n if (!updateSlideConfig) return;\n\n const isStudentProfilePage = currentPageId === TrialPageId.STUDENT_PROFILE;\n const isLearningPlanSlide = currentPageId === TrialPageId.LEARNING_PLAN;\n const overrides: Partial<ITrialSessionFormFields> = {};\n\n if (\n id === TrialPageId.CIRCLE_GAME ||\n id === TrialPageId.CIRCLE_PUZZLE ||\n id === TrialPageId.CIRCLE_SKILL\n ) {\n overrides.matchmakingId = uuidv4();\n overrides.showCircleGameScreen = true;\n }\n\n if (dir === 'prev') {\n updateSlideConfig({\n id,\n ...(isStudentProfilePage && { studentProfile: undefined }),\n ...(isLearningPlanSlide && {\n chapterId: undefined,\n }),\n ...overrides,\n });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n }\n\n if (dir === 'next') {\n switch (currentPageId) {\n //TODO: remove STUDENT_INFORMATION\n case TrialPageId.STUDENT_INFORMATION:\n case TrialPageId.SCHOOL_GOALS:\n handleStudentInformation();\n break;\n case TrialPageId.LEARNING_WORKSHEET:\n handleMileStoneBulkPost();\n break;\n case TrialPageId.CLASS_PREFERENCE:\n handleClassPreferences();\n break;\n case TrialPageId.LEARNING_LEVEL:\n handleStudentPreferencesPatch();\n break;\n case TrialPageId.LEARNING_PLAN:\n updateSlideConfig({ id, chapterId: undefined, ...overrides });\n break;\n default: {\n updateSlideConfig({ id, ...overrides });\n updateButtonState('both', DEFAULT_BUTTON_STATE);\n }\n }\n }\n },\n [\n updateSlideConfig,\n currentPageId,\n updateButtonState,\n handleStudentInformation,\n handleMileStoneBulkPost,\n handleClassPreferences,\n handleStudentPreferencesPatch,\n ],\n );\n\n const sessionWorksheetNavigation = useCallback(() => {\n if (!worksheetNavigationPanel && currentPageId === TrialPageId.LEARNING_WORKSHEET) {\n handleNavigation('next', nextPageId);\n }\n }, [currentPageId, handleNavigation, nextPageId, worksheetNavigationPanel]);\n\n useEffect(() => {\n sessionWorksheetNavigation();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [worksheetNavigationPanel]);\n\n return { handleNavigation };\n};\n\nexport { useTrialSessionNavigation };\n"],"names":["useTrialSessionNavigation","updateSlideConfig","slideConfig","formData","updateButtonState","teacherId","studentId","milestoneConfig","onTrialInformationUpdate","trialHomeData","worksheetNavigationPanel","useTrialSessionContext","nextPage","currentPageId","demoInfo","stream","regionData","countryCode","nextPageId","name","grade","goals","curriculum","studentTimezone","preferences","personalizedLevel","personalizedFocus","personalizedBehaviors","personalizedObjectives","disableNavButtons","useCallback","onAcknowledge","errorMessage","overrides","TrialPageId","uuidv4","DEFAULT_BUTTON_STATE","patchTrialSession","usePatchTrialHome","patchStudentInformation","usePatchStudentInformation","postMilestoneBulk","useMilestoneBulkPost","postStudentPreferences","usePostStudentPreferences","handleStudentInformation","firstName","lastName","payload","handleClassPreferences","selectedRegularSlots","getFormattedPreferences","actionData","handleMileStoneBulkPost","handleStudentPreferencesPatch","getFormattedStudentPersonalizedPreference","meta","COURSE_STREAMS","handleNavigation","dir","id","isStudentProfilePage","isLearningPlanSlide","sessionWorksheetNavigation","useEffect"],"mappings":";;;;;;;;;;AAcA,MAAMA,KAA4B,MAAM;AAChC,QAAA;AAAA,IACJ,mBAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,0BAAAC;AAAA,IACA,eAAAC;AAAA,IACA,0BAAAC;AAAA,MACEC,GAAuB,GACrB,EAAE,UAAAC,GAAU,IAAIC,EAAc,IAAIX,KAAe,CAAA,GACjD,EAAE,WAAWY,EAAa,IAAAL,GAC1B,EAAE,QAAAM,GAAQ,aAAaC,EAAA,IAAeF,GACtC,EAAE,qBAAqBG,IAAc,KAAK,IAAID,KAAc,CAAA,GAC5D,EAAE,QAAQE,MAAeN,KAAY,CAAA,GACrC;AAAA,IACJ,MAAAO;AAAA,IACA,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,YAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,aAAAC,IAAc,CAAC;AAAA,IACf,mBAAAC,IAAoB,CAAC;AAAA,IACrB,mBAAAC,IAAoB,CAAC;AAAA,IACrB,uBAAAC,IAAwB,CAAC;AAAA,IACzB,wBAAAC,IAAyB,CAAC;AAAA,EAAA,IACxBzB,KAAY,CAAA,GAEV0B,IAAoBC,EAAY,MAAM;AAC1C,IAAA1B,EAAkB,QAAQ;AAAA,MACxB,MAAM,EAAE,YAAY,IAAM,WAAW,GAAM;AAAA,MAC3C,OAAO,EAAE,YAAY,IAAM,WAAW,GAAK;AAAA,IAAA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A,IACF;AAAA,EAAA,GAGIS,IAA6BjC,EAAY,MAAM;AACnD,IAAI,CAACpB,KAA4BG,MAAkBqB,EAAY,sBAC7DwB,EAAiB,QAAQxC,CAAU;AAAA,KAEpC,CAACL,GAAe6C,GAAkBxC,GAAYR,CAAwB,CAAC;AAE1E,SAAAsD,EAAU,MAAM;AACa,IAAAD;EAAA,GAE1B,CAACrD,CAAwB,CAAC,GAEtB,EAAE,kBAAAgD,EAAiB;AAC5B;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trial-session-types.js","sources":["../../../src/features/trial-session/trial-session-types.ts"],"sourcesContent":["import type { TNodeTypes } from '../../types/models/worksheet';\nimport type { IInfoMessage } from '../circle-games/games/web-view/web-view-types';\nimport type {\n IMilestoneConfig,\n TCourseStream,\n TPreferenceCategory,\n} from '../milestone/create/milestone-create-types';\nimport type { IAvatarLayer } from '../ui/avatar/avatar-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { TPreference } from './comps/class-preference/class-preference-types';\nimport type {\n ITrialCircleConfig,\n ITrialCircleGameParams,\n} from './comps/trial-circle-game/trial-circle-game-types';\nimport type { TrialPageId } from './trial-session-constants';\nimport type { Dispatch, ReactElement, SetStateAction } from 'react';\n\nexport type { TSessionReportData as TSessionReport } from './comps/session-report/session-report-types';\n\nexport type TSlideId = TrialPageId;\n\nexport type TRegionData = {\n opportunity_country: string;\n};\n\nexport type TPreferenceSchema = {\n preference_code: string;\n preference_name: string;\n preference_category: TPreferenceCategory;\n};\n\nexport enum EClassTimeAlertLevel {\n FIVE_MIN = '5min',\n FIFTEEN_MIN = '15min',\n}\ninterface IButtonConfig {\n buttonLabel: string;\n pageId: string;\n}\n\nexport interface ISolution {\n media?: string;\n media_type?: 'image' | 'video';\n text?: string;\n}\n\nexport type TDegreeInformation = {\n degree_name?: string;\n field_of_study?: string;\n degree_code?: string;\n};\n\nexport interface ITeacherProfileDetails {\n lower_grade: string;\n higher_grade: string;\n header_image: string;\n years_of_experience: number;\n number_of_students_taught: number;\n countries: string[];\n degree: TDegreeInformation;\n first_name: string;\n last_name: string;\n teacher_profile_url?: string;\n}\n\nexport interface ISlide {\n id: TrialPageId;\n renderAs: 'split' | 'full';\n renderAVIn: 'left' | 'right';\n header: string;\n subHeader?: string;\n prevPage?: IButtonConfig;\n nextPage?: IButtonConfig;\n cues?: string[];\n dos?: string[];\n donts?: string[];\n navigationLabel?: string;\n slideTag?: string;\n teacher_profile?: ITeacherProfileDetails;\n solutions?: ISolution[];\n enableSessionPerk?: boolean;\n showProfileHighlights?: boolean;\n}\n\nexport interface TGoals {\n goal_code?: string;\n milestone_date_ts?: number;\n goal_category?: string;\n milestone_name?: string;\n publish?: boolean;\n}\n\nexport interface ITrialSessionFormFields {\n id: string;\n name?: string;\n grade?: string;\n curriculum?: string;\n goals?: TGoals[];\n studentProfile?: {\n profileSummary?: string;\n dummyProfileImageIndex?: number;\n summaryFetched?: boolean;\n summaryFetchFailed?: boolean;\n };\n userNodeId?: string;\n nodeId?: string;\n nodeType?: TNodeTypes;\n attemptId?: string;\n preferences?: TPreference[];\n personalizedLevel?: string[];\n personalizedFocus?: string[];\n personalizedBehaviors?: string[];\n personalizedObjectives?: string[];\n
|
|
1
|
+
{"version":3,"file":"trial-session-types.js","sources":["../../../src/features/trial-session/trial-session-types.ts"],"sourcesContent":["import type { TNodeTypes } from '../../types/models/worksheet';\nimport type { IInfoMessage } from '../circle-games/games/web-view/web-view-types';\nimport type {\n IMilestoneConfig,\n TCourseStream,\n TPreferenceCategory,\n} from '../milestone/create/milestone-create-types';\nimport type { IAvatarLayer } from '../ui/avatar/avatar-types';\nimport type { TUserTypes } from '../ui/types';\nimport type { TPreference } from './comps/class-preference/class-preference-types';\nimport type {\n ITrialCircleConfig,\n ITrialCircleGameParams,\n} from './comps/trial-circle-game/trial-circle-game-types';\nimport type { TrialPageId } from './trial-session-constants';\nimport type { Dispatch, ReactElement, SetStateAction } from 'react';\n\nexport type { TSessionReportData as TSessionReport } from './comps/session-report/session-report-types';\n\nexport type TSlideId = TrialPageId;\n\nexport type TRegionData = {\n opportunity_country: string;\n};\n\nexport type TPreferenceSchema = {\n preference_code: string;\n preference_name: string;\n preference_category: TPreferenceCategory;\n};\n\nexport enum EClassTimeAlertLevel {\n FIVE_MIN = '5min',\n FIFTEEN_MIN = '15min',\n}\ninterface IButtonConfig {\n buttonLabel: string;\n pageId: string;\n}\n\nexport interface ISolution {\n media?: string;\n media_type?: 'image' | 'video';\n text?: string;\n}\n\nexport type TDegreeInformation = {\n degree_name?: string;\n field_of_study?: string;\n degree_code?: string;\n};\n\nexport interface ITeacherProfileDetails {\n lower_grade: string;\n higher_grade: string;\n header_image: string;\n years_of_experience: number;\n number_of_students_taught: number;\n countries: string[];\n degree: TDegreeInformation;\n first_name: string;\n last_name: string;\n teacher_profile_url?: string;\n}\n\nexport interface ISlide {\n id: TrialPageId;\n renderAs: 'split' | 'full';\n renderAVIn: 'left' | 'right';\n header: string;\n subHeader?: string;\n prevPage?: IButtonConfig;\n nextPage?: IButtonConfig;\n cues?: string[];\n dos?: string[];\n donts?: string[];\n navigationLabel?: string;\n slideTag?: string;\n teacher_profile?: ITeacherProfileDetails;\n solutions?: ISolution[];\n enableSessionPerk?: boolean;\n showProfileHighlights?: boolean;\n}\n\nexport interface TGoals {\n goal_code?: string;\n milestone_date_ts?: number;\n goal_category?: string;\n milestone_name?: string;\n publish?: boolean;\n}\n\nexport interface ITrialSessionFormFields {\n id: string;\n name?: string;\n grade?: string;\n curriculum?: string;\n goals?: TGoals[];\n studentProfile?: {\n profileSummary?: string;\n dummyProfileImageIndex?: number;\n summaryFetched?: boolean;\n summaryFetchFailed?: boolean;\n };\n userNodeId?: string;\n nodeId?: string;\n nodeType?: TNodeTypes;\n attemptId?: string;\n preferences?: TPreference[];\n personalizedLevel?: string[];\n personalizedFocus?: string[];\n personalizedBehaviors?: string[];\n personalizedObjectives?: string[];\n isCircleGamePlayed?: boolean;\n isCirclePuzzleSolved?: boolean;\n isCircleSkillCompleted?: boolean;\n studentTimezone?: string;\n showCircleGameScreen?: boolean;\n accuracyStr?: string;\n totalTimeTaken?: number;\n chapterId?: string;\n matchmakingId?: string;\n numberInNameError?: boolean;\n}\n\nexport interface IButtonState {\n isDisabled: boolean;\n isLoading: boolean;\n}\n\nexport interface ITrialHomeData {\n pages: ISlide[];\n demo_info: {\n student_classroom_id: string;\n stream: TCourseStream;\n region_data: TRegionData;\n course?: string;\n };\n parent: {\n name: string;\n };\n student: {\n grade: string;\n name: string;\n circle_username: string;\n user_avatar: IAvatarLayer[];\n };\n teacher: {\n name: string;\n circle_username: string;\n user_avatar: IAvatarLayer[];\n };\n circle_trial_game_config: ITrialCircleConfig;\n}\n\nexport interface IClassTimeAlertConfig {\n alertLevel: EClassTimeAlertLevel | null;\n isVisible: boolean;\n onComplete: () => void;\n}\n\nexport interface ITrialSessionProps {\n classStartedOn?: Date;\n height?: string | number;\n userType: TUserTypes;\n studentId: string;\n teacherId: string;\n teacherClassroomId: string;\n teacherPanel?: ReactElement;\n studentPanel?: ReactElement;\n formData?: ITrialSessionFormFields;\n onFormDataChange?: Dispatch<SetStateAction<ITrialSessionFormFields | undefined>>;\n worksheet?: ReactElement;\n worksheetNavigationPanel?: ReactElement;\n questionsRatingPanel?: ReactElement;\n studentAbsentInClass?: boolean;\n openEndClassModal?: () => void;\n trialGameUrl: string;\n handleInfoMessage: (message: IInfoMessage) => void;\n classTimeAlertConfig?: IClassTimeAlertConfig;\n classDuration?: number;\n}\n\nexport interface ITrialSessionContext\n extends Pick<\n ITrialSessionProps,\n | 'classStartedOn'\n | 'formData'\n | 'teacherPanel'\n | 'studentId'\n | 'teacherId'\n | 'studentPanel'\n | 'worksheet'\n | 'worksheetNavigationPanel'\n | 'questionsRatingPanel'\n | 'openEndClassModal'\n | 'studentAbsentInClass'\n | 'classDuration'\n | 'classTimeAlertConfig'\n > {\n buttonState: { left: IButtonState; right: IButtonState };\n isTeacher: boolean;\n milestoneConfig: IMilestoneConfig;\n slideConfig: ISlide;\n updateButtonState: (\n btnNavDir: 'left' | 'right' | 'both',\n currentState: IButtonState | { left: IButtonState; right: IButtonState },\n ) => void;\n updateSlideConfig: (config: Partial<ITrialSessionFormFields>) => void;\n trialHomeData: ITrialHomeData;\n onTrialInformationUpdate?: () => void;\n circleGames: ITrialCircleGameParams;\n trialGameUrl: string;\n handleInfoMessage: (message: IInfoMessage) => void;\n onRemoveOptionalSlides?: (grade?: string) => void;\n}\n\nexport interface ITrialSessionViewProps extends ITrialSessionProps {\n trialHomeData: ITrialHomeData;\n milestoneConfig: IMilestoneConfig;\n studentTimezone?: string;\n onStudentTimezoneUpdate?: () => void;\n onTrialInformationUpdate?: () => void;\n handleInfoMessage: (message: IInfoMessage) => void;\n onRemoveOptionalSlides?: (grade?: string) => void;\n}\n"],"names":["EClassTimeAlertLevel"],"mappings":"AA+BY,IAAAA,sBAAAA,OACVA,EAAA,WAAW,QACXA,EAAA,cAAc,SAFJA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,128 +1,137 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
1
|
+
import { jsx as D, jsxs as z } from "react/jsx-runtime";
|
|
2
|
+
import { memo as J, useState as K, useMemo as m, useCallback as Q, useEffect as S } from "react";
|
|
3
|
+
import { getGradesFromConfig as W } from "../milestone/create/milestone-create-helpers.js";
|
|
4
|
+
import X from "../ui/layout/flex-view.js";
|
|
5
|
+
import Y from "./context/trial-session-context.js";
|
|
6
|
+
import { useButtonStateForLeftPanel as Z } from "./hooks/use-left-panel-button-state.js";
|
|
7
|
+
import ee from "./left-panel/index.js";
|
|
8
|
+
import te from "./right-panel/index.js";
|
|
9
|
+
const de = J((H) => {
|
|
10
10
|
const {
|
|
11
|
-
userType:
|
|
12
|
-
teacherPanel:
|
|
13
|
-
studentPanel:
|
|
14
|
-
trialGameUrl:
|
|
15
|
-
formData:
|
|
16
|
-
height:
|
|
17
|
-
trialHomeData:
|
|
18
|
-
milestoneConfig:
|
|
19
|
-
onFormDataChange:
|
|
20
|
-
worksheet:
|
|
21
|
-
studentId:
|
|
22
|
-
teacherId:
|
|
23
|
-
classStartedOn:
|
|
24
|
-
worksheetNavigationPanel:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
circleConfig: e.circle_trial_game_config,
|
|
11
|
+
userType: r,
|
|
12
|
+
teacherPanel: I,
|
|
13
|
+
studentPanel: T,
|
|
14
|
+
trialGameUrl: x,
|
|
15
|
+
formData: s,
|
|
16
|
+
height: L = "100vh",
|
|
17
|
+
trialHomeData: t,
|
|
18
|
+
milestoneConfig: o,
|
|
19
|
+
onFormDataChange: u,
|
|
20
|
+
worksheet: P,
|
|
21
|
+
studentId: i,
|
|
22
|
+
teacherId: l,
|
|
23
|
+
classStartedOn: _,
|
|
24
|
+
worksheetNavigationPanel: v,
|
|
25
|
+
questionsRatingPanel: y,
|
|
26
|
+
studentAbsentInClass: E,
|
|
27
|
+
openEndClassModal: w,
|
|
28
|
+
onTrialInformationUpdate: F,
|
|
29
|
+
onStudentTimezoneUpdate: f,
|
|
30
|
+
handleInfoMessage: G,
|
|
31
|
+
onRemoveOptionalSlides: M,
|
|
32
|
+
classDuration: R,
|
|
33
|
+
studentTimezone: g,
|
|
34
|
+
classTimeAlertConfig: $
|
|
35
|
+
} = H, a = r === "TEACHER", { pages: p = [], student: O } = t, { name: b, grade: c } = O || {}, [n, q] = K(s), h = a ? n : s, C = h == null ? void 0 : h.id, j = m(
|
|
36
|
+
() => p.find((e) => e.id === C) ?? p[0],
|
|
37
|
+
[C, p]
|
|
38
|
+
), k = m(() => {
|
|
39
|
+
const e = {
|
|
40
|
+
circleConfig: t.circle_trial_game_config,
|
|
42
41
|
playerDetails: {
|
|
43
|
-
userId:
|
|
44
|
-
circle_username:
|
|
45
|
-
user_avatar:
|
|
46
|
-
playerType:
|
|
42
|
+
userId: a ? l : i,
|
|
43
|
+
circle_username: t[a ? "teacher" : "student"].circle_username,
|
|
44
|
+
user_avatar: t[a ? "teacher" : "student"].user_avatar,
|
|
45
|
+
playerType: r
|
|
47
46
|
}
|
|
48
47
|
};
|
|
49
|
-
return
|
|
50
|
-
}, [
|
|
51
|
-
|
|
52
|
-
}, []), { buttonState: A, updateButtonState:
|
|
53
|
-
teacherClassroomId: H,
|
|
54
|
-
milestoneConfig: l,
|
|
55
|
-
studentTimezone: $,
|
|
56
|
-
updateSlideConfig: g
|
|
57
|
-
}), N = h(
|
|
48
|
+
return r === "STUDENT" && (e.playerDetails.grade = t.student.grade), e;
|
|
49
|
+
}, [a, i, l, t, r]), d = Q((e) => {
|
|
50
|
+
q((B) => B ? { ...B, ...e } : e);
|
|
51
|
+
}, []), { buttonState: A, updateButtonState: N } = Z(), U = m(
|
|
58
52
|
() => ({
|
|
59
|
-
teacherPanel:
|
|
60
|
-
studentPanel:
|
|
61
|
-
isTeacher:
|
|
53
|
+
teacherPanel: I,
|
|
54
|
+
studentPanel: T,
|
|
55
|
+
isTeacher: a,
|
|
62
56
|
slideConfig: j,
|
|
63
|
-
milestoneConfig:
|
|
64
|
-
formData:
|
|
65
|
-
updateSlideConfig:
|
|
66
|
-
worksheet:
|
|
57
|
+
milestoneConfig: o,
|
|
58
|
+
formData: a ? n : s,
|
|
59
|
+
updateSlideConfig: d,
|
|
60
|
+
worksheet: P,
|
|
67
61
|
buttonState: A,
|
|
68
|
-
updateButtonState:
|
|
69
|
-
studentId:
|
|
70
|
-
teacherId:
|
|
71
|
-
classStartedOn:
|
|
72
|
-
trialHomeData:
|
|
73
|
-
worksheetNavigationPanel:
|
|
74
|
-
questionsRatingPanel:
|
|
75
|
-
onTrialInformationUpdate:
|
|
76
|
-
openEndClassModal:
|
|
77
|
-
studentAbsentInClass:
|
|
62
|
+
updateButtonState: N,
|
|
63
|
+
studentId: i,
|
|
64
|
+
teacherId: l,
|
|
65
|
+
classStartedOn: _,
|
|
66
|
+
trialHomeData: t,
|
|
67
|
+
worksheetNavigationPanel: v,
|
|
68
|
+
questionsRatingPanel: y,
|
|
69
|
+
onTrialInformationUpdate: F,
|
|
70
|
+
openEndClassModal: w,
|
|
71
|
+
studentAbsentInClass: E,
|
|
78
72
|
circleGames: k,
|
|
79
|
-
trialGameUrl:
|
|
80
|
-
handleInfoMessage:
|
|
81
|
-
onRemoveOptionalSlides:
|
|
82
|
-
classDuration:
|
|
83
|
-
classTimeAlertConfig:
|
|
73
|
+
trialGameUrl: x,
|
|
74
|
+
handleInfoMessage: G,
|
|
75
|
+
onRemoveOptionalSlides: M,
|
|
76
|
+
classDuration: R,
|
|
77
|
+
classTimeAlertConfig: $
|
|
84
78
|
}),
|
|
85
79
|
[
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
80
|
+
I,
|
|
81
|
+
T,
|
|
82
|
+
a,
|
|
89
83
|
j,
|
|
90
|
-
l,
|
|
91
|
-
r,
|
|
92
84
|
o,
|
|
93
|
-
|
|
94
|
-
T,
|
|
95
|
-
A,
|
|
96
|
-
M,
|
|
85
|
+
n,
|
|
97
86
|
s,
|
|
98
|
-
|
|
87
|
+
d,
|
|
99
88
|
P,
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
A,
|
|
90
|
+
N,
|
|
91
|
+
i,
|
|
92
|
+
l,
|
|
102
93
|
_,
|
|
103
|
-
|
|
104
|
-
y,
|
|
94
|
+
t,
|
|
105
95
|
v,
|
|
106
|
-
|
|
107
|
-
|
|
96
|
+
y,
|
|
97
|
+
F,
|
|
98
|
+
w,
|
|
108
99
|
E,
|
|
100
|
+
k,
|
|
101
|
+
x,
|
|
102
|
+
G,
|
|
103
|
+
M,
|
|
109
104
|
R,
|
|
110
|
-
|
|
111
|
-
b
|
|
105
|
+
$
|
|
112
106
|
]
|
|
113
107
|
);
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}, [
|
|
117
|
-
|
|
118
|
-
}, [
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
108
|
+
S(() => {
|
|
109
|
+
n && u && u(n);
|
|
110
|
+
}, [u, n]), S(() => {
|
|
111
|
+
g || f == null || f();
|
|
112
|
+
}, [C]);
|
|
113
|
+
const V = m(
|
|
114
|
+
() => !!W(o).find((e) => e.id === c),
|
|
115
|
+
[o, c]
|
|
116
|
+
);
|
|
117
|
+
return S(() => {
|
|
118
|
+
d({
|
|
119
|
+
studentTimezone: g,
|
|
120
|
+
name: b,
|
|
121
|
+
grade: V ? c : ""
|
|
122
|
+
});
|
|
123
|
+
}, [
|
|
124
|
+
b,
|
|
125
|
+
c,
|
|
126
|
+
d,
|
|
127
|
+
g,
|
|
128
|
+
V
|
|
129
|
+
]), /* @__PURE__ */ D(Y.Provider, { value: U, children: /* @__PURE__ */ z(X, { $height: L, $flexDirection: "row", $justifyContent: "center", $alignItems: "center", children: [
|
|
130
|
+
/* @__PURE__ */ D(ee, {}),
|
|
131
|
+
/* @__PURE__ */ D(te, {})
|
|
123
132
|
] }) });
|
|
124
133
|
});
|
|
125
134
|
export {
|
|
126
|
-
|
|
135
|
+
de as default
|
|
127
136
|
};
|
|
128
137
|
//# sourceMappingURL=trial-session-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trial-session-view.js","sources":["../../../src/features/trial-session/trial-session-view.tsx"],"sourcesContent":["import type { ITrialCircleGameParams } from './comps/trial-circle-game/trial-circle-game-types';\nimport type {\n ITrialSessionContext,\n ITrialSessionViewProps,\n ITrialSessionFormFields,\n} from './trial-session-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport FlexView from '../ui/layout/flex-view';\nimport TrialSessionContext from './context/trial-session-context';\nimport { useButtonStateForLeftPanel } from './hooks/use-left-panel-button-state';\nimport
|
|
1
|
+
{"version":3,"file":"trial-session-view.js","sources":["../../../src/features/trial-session/trial-session-view.tsx"],"sourcesContent":["import type { ITrialCircleGameParams } from './comps/trial-circle-game/trial-circle-game-types';\nimport type {\n ITrialSessionContext,\n ITrialSessionViewProps,\n ITrialSessionFormFields,\n} from './trial-session-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useState } from 'react';\n\nimport { getGradesFromConfig } from '../milestone/create/milestone-create-helpers';\nimport FlexView from '../ui/layout/flex-view';\nimport TrialSessionContext from './context/trial-session-context';\nimport { useButtonStateForLeftPanel } from './hooks/use-left-panel-button-state';\nimport LeftPanel from './left-panel';\nimport RightPanel from './right-panel';\n\nconst TrialSessionView: FC<ITrialSessionViewProps> = memo(props => {\n const {\n userType,\n teacherPanel,\n studentPanel,\n trialGameUrl,\n formData: formDataProps,\n height = '100vh',\n trialHomeData,\n milestoneConfig,\n onFormDataChange,\n worksheet,\n studentId,\n teacherId,\n classStartedOn,\n worksheetNavigationPanel,\n questionsRatingPanel,\n studentAbsentInClass,\n openEndClassModal,\n onTrialInformationUpdate,\n onStudentTimezoneUpdate,\n handleInfoMessage,\n onRemoveOptionalSlides,\n classDuration,\n studentTimezone,\n classTimeAlertConfig,\n } = props;\n const isTeacher = userType === 'TEACHER';\n const { pages: slides = [], student } = trialHomeData;\n const { name: studentName, grade: studentGrade } = student || {};\n const [formData, setFormData] = useState<ITrialSessionFormFields | undefined>(formDataProps);\n const formDataToUse = isTeacher ? formData : formDataProps;\n const currentSlideId = formDataToUse?.id;\n const currentSlideConfig = useMemo(\n () => slides.find(config => config.id === currentSlideId) ?? slides[0]!,\n [currentSlideId, slides],\n );\n\n const circleGames = useMemo(() => {\n const data = {\n circleConfig: trialHomeData.circle_trial_game_config,\n playerDetails: {\n userId: isTeacher ? teacherId : studentId,\n circle_username: trialHomeData[isTeacher ? 'teacher' : 'student'].circle_username,\n user_avatar: trialHomeData[isTeacher ? 'teacher' : 'student'].user_avatar,\n playerType: userType,\n },\n } as ITrialCircleGameParams;\n\n if (userType === 'STUDENT') {\n data.playerDetails.grade = trialHomeData.student.grade;\n }\n\n return data;\n }, [isTeacher, studentId, teacherId, trialHomeData, userType]);\n\n const updateSlideConfig = useCallback((config: Partial<ITrialSessionFormFields>) => {\n setFormData(previousProps => {\n if (!previousProps) return config as ITrialSessionFormFields;\n\n return { ...previousProps, ...config };\n });\n }, []);\n const { buttonState, updateButtonState } = useButtonStateForLeftPanel();\n\n const contextValue = useMemo<ITrialSessionContext>(\n () => ({\n teacherPanel,\n studentPanel,\n isTeacher,\n slideConfig: currentSlideConfig,\n milestoneConfig,\n formData: isTeacher ? formData : formDataProps,\n updateSlideConfig,\n worksheet,\n buttonState,\n updateButtonState,\n studentId,\n teacherId,\n classStartedOn,\n trialHomeData,\n worksheetNavigationPanel,\n questionsRatingPanel,\n onTrialInformationUpdate,\n openEndClassModal,\n studentAbsentInClass,\n circleGames,\n trialGameUrl,\n handleInfoMessage,\n onRemoveOptionalSlides,\n classDuration,\n classTimeAlertConfig,\n }),\n [\n teacherPanel,\n studentPanel,\n isTeacher,\n currentSlideConfig,\n milestoneConfig,\n formData,\n formDataProps,\n updateSlideConfig,\n worksheet,\n buttonState,\n updateButtonState,\n studentId,\n teacherId,\n classStartedOn,\n trialHomeData,\n worksheetNavigationPanel,\n questionsRatingPanel,\n onTrialInformationUpdate,\n openEndClassModal,\n studentAbsentInClass,\n circleGames,\n trialGameUrl,\n handleInfoMessage,\n onRemoveOptionalSlides,\n classDuration,\n classTimeAlertConfig,\n ],\n );\n\n useEffect(() => {\n if (formData && onFormDataChange) {\n onFormDataChange(formData);\n }\n }, [onFormDataChange, formData]);\n\n useEffect(() => {\n if (!studentTimezone) onStudentTimezoneUpdate?.();\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [currentSlideId]);\n\n const IsGradeExistInMilestoneConfig = useMemo(\n () => !!getGradesFromConfig(milestoneConfig).find(element => element.id === studentGrade),\n [milestoneConfig, studentGrade],\n );\n\n useEffect(() => {\n updateSlideConfig({\n studentTimezone,\n name: studentName,\n grade: IsGradeExistInMilestoneConfig ? studentGrade : '',\n });\n }, [\n studentName,\n studentGrade,\n updateSlideConfig,\n studentTimezone,\n IsGradeExistInMilestoneConfig,\n ]);\n\n return (\n <TrialSessionContext.Provider value={contextValue}>\n <FlexView $height={height} $flexDirection=\"row\" $justifyContent=\"center\" $alignItems=\"center\">\n <LeftPanel />\n <RightPanel />\n </FlexView>\n </TrialSessionContext.Provider>\n );\n});\n\nexport default TrialSessionView;\n"],"names":["TrialSessionView","memo","props","userType","teacherPanel","studentPanel","trialGameUrl","formDataProps","height","trialHomeData","milestoneConfig","onFormDataChange","worksheet","studentId","teacherId","classStartedOn","worksheetNavigationPanel","questionsRatingPanel","studentAbsentInClass","openEndClassModal","onTrialInformationUpdate","onStudentTimezoneUpdate","handleInfoMessage","onRemoveOptionalSlides","classDuration","studentTimezone","classTimeAlertConfig","isTeacher","slides","student","studentName","studentGrade","formData","setFormData","useState","formDataToUse","currentSlideId","currentSlideConfig","useMemo","config","circleGames","data","updateSlideConfig","useCallback","previousProps","buttonState","updateButtonState","useButtonStateForLeftPanel","contextValue","useEffect","IsGradeExistInMilestoneConfig","getGradesFromConfig","element","jsx","TrialSessionContext","jsxs","FlexView","LeftPanel","RightPanel"],"mappings":";;;;;;;;AAiBM,MAAAA,KAA+CC,EAAK,CAASC,MAAA;AAC3D,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,cAAAC;AAAA,IACA,UAAUC;AAAA,IACV,QAAAC,IAAS;AAAA,IACT,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,gBAAAC;AAA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Y;AAAA,IACxF,CAACrB,GAAiBqB,CAAY;AAAA,EAAA;AAGhC,SAAAkB,EAAU,MAAM;AACI,IAAAP,EAAA;AAAA,MAChB,iBAAAjB;AAAA,MACA,MAAMK;AAAA,MACN,OAAOoB,IAAgCnB,IAAe;AAAA,IAAA,CACvD;AAAA,EAAA,GACA;AAAA,IACDD;AAAA,IACAC;AAAA,IACAW;AAAA,IACAjB;AAAA,IACAyB;AAAA,EAAA,CACD,GAGE,gBAAAG,EAAAC,EAAoB,UAApB,EAA6B,OAAON,GACnC,UAAA,gBAAAO,EAACC,GAAS,EAAA,SAAShD,GAAQ,gBAAe,OAAM,iBAAgB,UAAS,aAAY,UACnF,UAAA;AAAA,IAAA,gBAAA6C,EAACI,IAAU,EAAA;AAAA,sBACVC,IAAW,EAAA;AAAA,EAAA,EACd,CAAA,EACF,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { addYears as s } from "../../node_modules/date-fns/addYears.js";
|
|
2
2
|
const i = (r) => Array.isArray(r) && r.length > 0, c = (r) => {
|
|
3
3
|
const t = (a) => a.toString().padStart(2, "0"), o = Math.floor(r / 3600), e = Math.floor(r % 3600 / 60), n = r % 60;
|
|
4
|
-
return o > 0 ? `${t(o)}:${t(e)}:${t(n)}` : `${t(e)}:${t(
|
|
4
|
+
return o > 0 ? `${t(o)}:${t(e)}:${t(n)}` : `${t(e)}:${t(n)}`;
|
|
5
5
|
}, l = (r) => {
|
|
6
6
|
let t = null;
|
|
7
7
|
return { promise: new Promise((e) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/features/utils/utils.ts"],"sourcesContent":["import { addYears } from 'date-fns';\n\nconst isNonEmptyArray = (array: unknown) => {\n return Array.isArray(array) && array.length > 0;\n};\n\n// format the time in HH:MM:SS\nconst formatTimeInHHMMSS = (seconds: number) => {\n const pad = (num: number) => num.toString().padStart(2, '0');\n\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n const s = seconds % 60;\n\n return h > 0 ? `${pad(h)}:${pad(m)}:${pad(s)}` : `${pad(m)}:${pad(
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/features/utils/utils.ts"],"sourcesContent":["import { addYears } from 'date-fns';\n\nconst isNonEmptyArray = (array: unknown) => {\n return Array.isArray(array) && array.length > 0;\n};\n\n// format the time in HH:MM:SS\nconst formatTimeInHHMMSS = (seconds: number) => {\n const pad = (num: number) => num.toString().padStart(2, '0');\n\n const h = Math.floor(seconds / 3600);\n const m = Math.floor((seconds % 3600) / 60);\n const s = seconds % 60;\n\n return h > 0 ? `${pad(h)}:${pad(m)}:${pad(s)}` : `${pad(m)}:${pad(s)}`;\n};\n\nconst delay = (delayInMs: number) => {\n let timerId: ReturnType<typeof setTimeout> | null = null;\n const promise = new Promise(res => {\n timerId = setTimeout(() => {\n res('resolved');\n }, delayInMs);\n });\n\n return { promise, timerId };\n};\n\nconst epochTimestampAfterOneYear = () => {\n const today = new Date();\n const oneYearLater = addYears(today, 1);\n\n return Math.floor(oneYearLater.getTime() / 1000);\n};\n\nexport { isNonEmptyArray, formatTimeInHHMMSS, delay, epochTimestampAfterOneYear };\n"],"names":["isNonEmptyArray","array","formatTimeInHHMMSS","seconds","pad","num","h","m","s","delay","delayInMs","timerId","res","epochTimestampAfterOneYear","oneYearLater","addYears"],"mappings":";AAEM,MAAAA,IAAkB,CAACC,MAChB,MAAM,QAAQA,CAAK,KAAKA,EAAM,SAAS,GAI1CC,IAAqB,CAACC,MAAoB;AACxC,QAAAC,IAAM,CAACC,MAAgBA,EAAI,WAAW,SAAS,GAAG,GAAG,GAErDC,IAAI,KAAK,MAAMH,IAAU,IAAI,GAC7BI,IAAI,KAAK,MAAOJ,IAAU,OAAQ,EAAE,GACpCK,IAAIL,IAAU;AAEb,SAAAG,IAAI,IAAI,GAAGF,EAAIE,CAAC,CAAC,IAAIF,EAAIG,CAAC,CAAC,IAAIH,EAAII,CAAC,CAAC,KAAK,GAAGJ,EAAIG,CAAC,CAAC,IAAIH,EAAII,CAAC,CAAC;AACtE,GAEMC,IAAQ,CAACC,MAAsB;AACnC,MAAIC,IAAgD;AAO7C,SAAA,EAAE,SANO,IAAI,QAAQ,CAAOC,MAAA;AACjC,IAAAD,IAAU,WAAW,MAAM;AACzB,MAAAC,EAAI,UAAU;AAAA,OACbF,CAAS;AAAA,EAAA,CACb,GAEiB,SAAAC;AACpB,GAEME,IAA6B,MAAM;AAEjC,QAAAC,IAAeC,sBADH,QACmB,CAAC;AAEtC,SAAO,KAAK,MAAMD,EAAa,YAAY,GAAI;AACjD;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -70,8 +70,6 @@ export declare const AchievementNotShareReasonModal: React_2.FC<IShareInstructio
|
|
|
70
70
|
|
|
71
71
|
export declare const AchievementShareInstructionModal: React_2.FC<IShareInstructionModalProps>;
|
|
72
72
|
|
|
73
|
-
export declare const AddStudentUsername: NamedExoticComponent<IAddStudentUsernameProps>;
|
|
74
|
-
|
|
75
73
|
export declare const AfternoonIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
76
74
|
|
|
77
75
|
export declare const AlertIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
|
@@ -235,12 +233,6 @@ export declare const CalendarIcon: React.FC<React.SVGProps<SVGSVGElement>>;
|
|
|
235
233
|
|
|
236
234
|
export declare const Callout: React.FC<ICalloutProps>;
|
|
237
235
|
|
|
238
|
-
export declare const CancellationConfirmationModal: MemoExoticComponent<() => JSX.Element>;
|
|
239
|
-
|
|
240
|
-
export declare const CancellationReasonModal: MemoExoticComponent<() => JSX.Element>;
|
|
241
|
-
|
|
242
|
-
export declare const CancelSubscriptionModal: MemoExoticComponent<() => JSX.Element>;
|
|
243
|
-
|
|
244
236
|
export declare const Carousel: React_2.FC<CarouselProps>;
|
|
245
237
|
|
|
246
238
|
declare interface CarouselProps {
|
|
@@ -833,12 +825,6 @@ declare interface IActionData {
|
|
|
833
825
|
dimension?: IViewport;
|
|
834
826
|
}
|
|
835
827
|
|
|
836
|
-
declare interface IAddStudentUsernameProps {
|
|
837
|
-
studentId: string;
|
|
838
|
-
onSuccess: (username: string) => void;
|
|
839
|
-
onGoBack: () => void;
|
|
840
|
-
}
|
|
841
|
-
|
|
842
828
|
declare interface IAnimatedArcProps {
|
|
843
829
|
radius: number;
|
|
844
830
|
strokeWidth: number;
|
|
@@ -1030,13 +1016,6 @@ declare interface IBaseWorksheetProps {
|
|
|
1030
1016
|
actionBarRightElement?: ReactElement;
|
|
1031
1017
|
}
|
|
1032
1018
|
|
|
1033
|
-
declare interface IBillingDetails {
|
|
1034
|
-
amount: number;
|
|
1035
|
-
cycle_frequency: string;
|
|
1036
|
-
next_due_date: string;
|
|
1037
|
-
payment_method_details: IPaymentMethodDetails;
|
|
1038
|
-
}
|
|
1039
|
-
|
|
1040
1019
|
declare interface IBlockSectionsCallbacks extends INodeCardCallbacks {
|
|
1041
1020
|
onBlockSkipUnskip?: (blockData: IChapterBlockData, skipBlock?: boolean) => void;
|
|
1042
1021
|
onBlockReset?: (blockData: IChapterBlockData) => void;
|
|
@@ -2572,7 +2551,7 @@ declare interface IMilestoneCardPermissions {
|
|
|
2572
2551
|
visible_tabs: string[];
|
|
2573
2552
|
}
|
|
2574
2553
|
|
|
2575
|
-
|
|
2554
|
+
declare interface IMilestoneConfig {
|
|
2576
2555
|
action_plan: Record<'green' | 'red' | 'yellow', {
|
|
2577
2556
|
share_message_template: string;
|
|
2578
2557
|
}>;
|
|
@@ -3056,14 +3035,6 @@ declare interface IParentDashboardProps {
|
|
|
3056
3035
|
HeaderAvatar: ReactElement;
|
|
3057
3036
|
}
|
|
3058
3037
|
|
|
3059
|
-
declare interface IPaymentMethodDetails {
|
|
3060
|
-
brand: string;
|
|
3061
|
-
last_4_digits: string;
|
|
3062
|
-
type: string;
|
|
3063
|
-
exp_month: number;
|
|
3064
|
-
exp_year: number;
|
|
3065
|
-
}
|
|
3066
|
-
|
|
3067
3038
|
declare interface IPercentileProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'size'>, Omit<IBaseInputProps, 'inputElement'> {
|
|
3068
3039
|
}
|
|
3069
3040
|
|
|
@@ -3164,13 +3135,12 @@ export declare interface IPostGameStatsRef {
|
|
|
3164
3135
|
declare interface IPreferencesCurriculumMap {
|
|
3165
3136
|
course_stream: TCourseStream;
|
|
3166
3137
|
is_live: boolean;
|
|
3167
|
-
preference_category:
|
|
3138
|
+
preference_category: TPreferenceCategory;
|
|
3168
3139
|
preference_code: string;
|
|
3169
3140
|
preference_grades: string[];
|
|
3170
3141
|
preference_name: string;
|
|
3171
3142
|
text_input_needed?: boolean;
|
|
3172
3143
|
preference_description?: string;
|
|
3173
|
-
lottie_key?: string;
|
|
3174
3144
|
}
|
|
3175
3145
|
|
|
3176
3146
|
export declare interface IPreviewWorksheetModel {
|
|
@@ -4167,7 +4137,6 @@ export declare interface ITrialSessionFormFields {
|
|
|
4167
4137
|
personalizedFocus?: string[];
|
|
4168
4138
|
personalizedBehaviors?: string[];
|
|
4169
4139
|
personalizedObjectives?: string[];
|
|
4170
|
-
personalizedPosition?: string[];
|
|
4171
4140
|
isCircleGamePlayed?: boolean;
|
|
4172
4141
|
isCirclePuzzleSolved?: boolean;
|
|
4173
4142
|
isCircleSkillCompleted?: boolean;
|
|
@@ -4308,7 +4277,6 @@ declare interface IUseParentHomeDataReturn {
|
|
|
4308
4277
|
plaState: EPLAState | null;
|
|
4309
4278
|
sessionDetails: ISessionDetails | null;
|
|
4310
4279
|
teacherDetails: ITeacherDetails | null;
|
|
4311
|
-
billingDetails: IBillingDetails | null;
|
|
4312
4280
|
completedSessions: number;
|
|
4313
4281
|
nextSessionEnd: number;
|
|
4314
4282
|
nextSessionStart: number;
|
|
@@ -5231,13 +5199,7 @@ export declare enum PLA_ANALYTICS_EVENTS {
|
|
|
5231
5199
|
SLOTS_SHOWN = "slots_shown",
|
|
5232
5200
|
SLOT_DATE_SELECTED = "slot_date_selected",
|
|
5233
5201
|
SLOT_TIME_SELECTED = "slot_time_selected",
|
|
5234
|
-
TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected"
|
|
5235
|
-
SUBSCRIPTION_INTENT_FAILED = "subscription_intent_failed",
|
|
5236
|
-
SUBSCRIPTION_INTENT_CREATED = "subscription_intent_created",
|
|
5237
|
-
STRIPE_PAYMENT_ELEMENT_READY = "stripe_payment_element_ready",
|
|
5238
|
-
STRIPE_PAYMENT_FAILED = "stripe_payment_failed",
|
|
5239
|
-
STRIPE_PAYMENT_SUCCESS = "stripe_payment_success",
|
|
5240
|
-
PAYMENT_PLAN_SELECTED = "payment_plan_selected"
|
|
5202
|
+
TUTOR_CHANGE_REASON_SELECTED = "tutor_change_reason_selected"
|
|
5241
5203
|
}
|
|
5242
5204
|
|
|
5243
5205
|
export declare const PlaFirstSessionIntroduction: NamedExoticComponent<IFirstSessionIntroductionProps>;
|
|
@@ -6238,8 +6200,6 @@ export declare type TJourneyId = JOURNEY_ID_STUDENT | JOURNEY_ID_TEACHER;
|
|
|
6238
6200
|
|
|
6239
6201
|
declare type TLayerKey = 'layer-1' | 'layer-2' | 'layer-3' | 'layer-4';
|
|
6240
6202
|
|
|
6241
|
-
export declare type TLearningPreferenceCategory = (typeof PREFERENCE_CATEGORY)[keyof typeof PREFERENCE_CATEGORY];
|
|
6242
|
-
|
|
6243
6203
|
declare type TLearnosityPreloaderContextValue = {
|
|
6244
6204
|
scriptStatus: Omit<TScriptStatus, 'loaded'>;
|
|
6245
6205
|
defaultAPIURL: string;
|
|
@@ -6525,6 +6485,8 @@ declare type TPreference = {
|
|
|
6525
6485
|
selectedTime: string;
|
|
6526
6486
|
};
|
|
6527
6487
|
|
|
6488
|
+
declare type TPreferenceCategory = (typeof PREFERENCE_CATEGORY)[keyof typeof PREFERENCE_CATEGORY];
|
|
6489
|
+
|
|
6528
6490
|
declare type TProfileHighlight = {
|
|
6529
6491
|
illustration: string;
|
|
6530
6492
|
background: TColorNames;
|
|
@@ -7147,8 +7109,6 @@ export declare const useZoomDisable: () => void;
|
|
|
7147
7109
|
|
|
7148
7110
|
export declare const Video: React_2.FC<ICustomVideoProps>;
|
|
7149
7111
|
|
|
7150
|
-
export declare const ViewPaymentMethodModal: MemoExoticComponent<() => JSX.Element>;
|
|
7151
|
-
|
|
7152
7112
|
declare const VISIBILITY_TYPES: {
|
|
7153
7113
|
GROUPED: string;
|
|
7154
7114
|
SEPARATE: string;
|