@cuemath/leap 2.8.21 → 2.8.22
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/images/images.js +12 -0
- package/dist/assets/images/images.js.map +1 -1
- package/dist/constants/urls.js +5 -0
- package/dist/constants/urls.js.map +1 -0
- package/dist/features/chapters/chapter/chapter.js +45 -43
- package/dist/features/chapters/chapter/chapter.js.map +1 -1
- package/dist/features/chapters/chapter/comps/core-lessons/core-lessons.js +23 -21
- package/dist/features/chapters/chapter/comps/core-lessons/core-lessons.js.map +1 -1
- package/dist/features/milestone/constants.js +53 -18
- package/dist/features/milestone/constants.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js +16 -4
- package/dist/features/milestone/create/comps/chapters-selection-step/chapters-selection-step-styled.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-constants.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-container.js +56 -47
- package/dist/features/milestone/create/milestone-create-container.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +132 -113
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-hooks.js +92 -90
- package/dist/features/milestone/create/milestone-create-hooks.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-styled.js +34 -20
- package/dist/features/milestone/create/milestone-create-styled.js.map +1 -1
- package/dist/features/milestone/create/milestone-create.js +72 -53
- package/dist/features/milestone/create/milestone-create.js.map +1 -1
- package/dist/features/milestone/create/submit-modal/use-submit-milestone.js +53 -46
- package/dist/features/milestone/create/submit-modal/use-submit-milestone.js.map +1 -1
- package/dist/features/milestone/create/utils/index.js.map +1 -1
- package/dist/features/milestone/drafts/create/draft-create-container.js +54 -0
- package/dist/features/milestone/drafts/create/draft-create-container.js.map +1 -0
- package/dist/features/milestone/drafts/edit/draft-edit-container.js +77 -0
- package/dist/features/milestone/drafts/edit/draft-edit-container.js.map +1 -0
- package/dist/features/milestone/drafts/edit/draft-edit-helpers.js +69 -0
- package/dist/features/milestone/drafts/edit/draft-edit-helpers.js.map +1 -0
- package/dist/features/milestone/{edit/goal-drafts → drafts/goal-edit}/goal-draft-edit-container.js +24 -22
- package/dist/features/milestone/drafts/goal-edit/goal-draft-edit-container.js.map +1 -0
- package/dist/features/milestone/drafts/review/draft-review-container.js +76 -0
- package/dist/features/milestone/drafts/review/draft-review-container.js.map +1 -0
- package/dist/features/milestone/edit/comps/delete-milestone/add-remove-nudge.js +48 -0
- package/dist/features/milestone/edit/comps/delete-milestone/add-remove-nudge.js.map +1 -0
- package/dist/features/milestone/edit/comps/delete-milestone/styled.js +11 -8
- package/dist/features/milestone/edit/comps/delete-milestone/styled.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone-modal-styled.js +23 -0
- package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone-modal-styled.js.map +1 -0
- package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone.js +79 -82
- package/dist/features/milestone/edit/comps/edit-milestone-modal/edit-milestone.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +136 -112
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/share-screen.js +68 -0
- package/dist/features/milestone/edit/comps/edit-milestone-modal/share-screen.js.map +1 -0
- package/dist/features/milestone/edit/goal-edit-helpers.js +6 -5
- package/dist/features/milestone/edit/goal-edit-helpers.js.map +1 -1
- package/dist/features/milestone/edit/milestone-edit-helpers.js +17 -16
- package/dist/features/milestone/edit/milestone-edit-helpers.js.map +1 -1
- package/dist/features/milestone/help-modals/index.js +22 -0
- package/dist/features/milestone/help-modals/index.js.map +1 -0
- package/dist/features/milestone/help-modals/milestone-lesson.js +17 -0
- package/dist/features/milestone/help-modals/milestone-lesson.js.map +1 -0
- package/dist/features/milestone/help-modals/milestone-list.js +17 -0
- package/dist/features/milestone/help-modals/milestone-list.js.map +1 -0
- package/dist/features/milestone/help-modals/utils.js +20 -0
- package/dist/features/milestone/help-modals/utils.js.map +1 -0
- package/dist/features/milestone/intro-modal/index.js +24 -0
- package/dist/features/milestone/intro-modal/index.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +48 -46
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +60 -58
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/outcome/comps/past-milestone/past-milestone-container.js +41 -39
- package/dist/features/milestone/outcome/comps/past-milestone/past-milestone-container.js.map +1 -1
- package/dist/features/notifications/api/notification.js +13 -0
- package/dist/features/notifications/api/notification.js.map +1 -0
- package/dist/features/notifications/use-student-journey.js +20 -0
- package/dist/features/notifications/use-student-journey.js.map +1 -0
- package/dist/features/sheets/constants/lessons.js +28 -0
- package/dist/features/sheets/constants/lessons.js.map +1 -0
- package/dist/features/ui/modals/info-modal/index.js +117 -0
- package/dist/features/ui/modals/info-modal/index.js.map +1 -0
- package/dist/index.d.ts +125 -7
- package/dist/index.js +258 -244
- package/dist/index.js.map +1 -1
- package/dist/static/goal_creation_helper.d45e4d58.png +0 -0
- package/dist/static/help_banner1.ddb0ef0f.png +0 -0
- package/dist/static/help_banner2.40979ed0.png +0 -0
- package/dist/static/help_banner3.532099c7.png +0 -0
- package/dist/static/help_banner4.90a6fd4d.png +0 -0
- package/dist/static/help_banner5.2a9efb39.png +0 -0
- package/dist/static/help_banner6.94fe9589.png +0 -0
- package/dist/static/milestone_intro_slide1.1537493e.png +0 -0
- package/dist/static/milestone_intro_slide2.b791c159.png +0 -0
- package/dist/static/milestone_intro_slide3.f7d63a11.png +0 -0
- package/dist/static/milestone_intro_slide4.f8da4e46.png +0 -0
- package/dist/static/milestone_intro_slide5.ea5d12d2.png +0 -0
- package/package.json +1 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-container.js.map +0 -1
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-helpers.js +0 -17
- package/dist/features/milestone/edit/goal-drafts/goal-draft-edit-helpers.js.map +0 -1
package/dist/features/milestone/outcome/comps/past-milestone/past-milestone-container.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"past-milestone-container.js","sources":["../../../../../../src/features/milestone/outcome/comps/past-milestone/past-milestone-container.tsx"],"sourcesContent":["import type {\n IMileStoneFormFields,\n TMilestonePayload,\n} from '../../../create/milestone-create-types';\nimport type { TTestType } from '../../../types';\nimport type { IPastMilestoneProps } from './past-milestone-types';\n\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport NextIcon from '../../../../../assets/line-icons/icons/next';\nimport Button from '../../../../ui/buttons/button/button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport RadioCards from '../../../../ui/radio-cards/radio-cards';\nimport Text from '../../../../ui/text/text';\nimport { useGetMileStoneConfig } from '../../../create/api/milestone-config';\nimport { useMilestonePost } from '../../../create/api/milestone-submit';\nimport { TEST_TYPE_OPTIONS } from '../../../create/comps/test-type-step/test-type-step-constants';\nimport PastMilestoneForm from './past-milestone-form';\nimport { FooterWrapper } from './past-milestone-styled';\nimport Question from './question';\n\nconst PastMilestoneContainer: React.FC<IPastMilestoneProps> = ({\n studentId,\n studentName,\n onSubmit,\n onError,\n grade: prevGrade,\n courseStream,\n}) => {\n const [testType, setTestType] = useState<TTestType>();\n const [canSubmit, setCanSubmit] = useState(false);\n const [formData, setFormData] = useState<IMileStoneFormFields>({ grade: prevGrade });\n const [dateErrorMessage, setDateErrorMessage] = useState('');\n const { get: getConfig, data: configData } = useGetMileStoneConfig();\n const { onEvent: trackEvent } = useUIContext();\n const itemIdRef = useRef(uuidv4());\n\n const testTypeOptions = useMemo(\n () =>\n TEST_TYPE_OPTIONS.filter(({ id }) =>\n courseStream === 'MATH' ? id !== 'no-test' : id === 'non-standardized',\n ),\n [courseStream],\n );\n\n const currentDate = useMemo(() => {\n const today = new Date();\n\n return today.toISOString().split('T')[0];\n }, []);\n\n // Get date that was 5 years ago\n const fiveYearsAgoDate = useMemo(() => {\n const today = new Date();\n\n today.setFullYear(today.getFullYear() - 5);\n\n return today.toISOString().split('T')[0];\n }, []);\n\n const handleFormDataChange = useCallback(\n (changedData: IMileStoneFormFields) => {\n const { milestoneEndDate } = changedData || {};\n\n if (\n dateErrorMessage &&\n milestoneEndDate &&\n currentDate &&\n fiveYearsAgoDate &&\n milestoneEndDate <= currentDate &&\n milestoneEndDate > fiveYearsAgoDate\n ) {\n setDateErrorMessage('');\n }\n\n setFormData(prevFormData => ({ ...prevFormData, ...changedData }));\n },\n [currentDate, dateErrorMessage, fiveYearsAgoDate],\n );\n const handleOnSubmit = (errorMessage: string | null, data?: Record<string, unknown>) => {\n if (errorMessage) {\n onError(errorMessage);\n } else {\n const { id: milestoneId = '' } = data || {};\n\n trackEvent('TEST_DETAILS_SUBMITTED', {\n milestone_id: milestoneId,\n temporary_milestone_id: itemIdRef.current,\n });\n onSubmit(milestoneId as string);\n }\n };\n\n useEffect(() => {\n trackEvent('TEST_DETAILS_PAGE_LOADED', {\n temporary_milestone_id: itemIdRef.current,\n });\n }, [trackEvent]);\n\n useEffect(() => {\n getConfig('', undefined);\n }, [getConfig]);\n const { post: postMilestone, isProcessing } = useMilestonePost({\n onComplete: handleOnSubmit,\n });\n const handleTestTypeChange = (inputTestType: TTestType) => {\n setTestType(inputTestType);\n setFormData({ grade: prevGrade });\n };\n\n const createMilestone = () => {\n const { grade, testName, board, milestoneEndDate, academicEventId } = formData;\n\n if (\n milestoneEndDate &&\n currentDate &&\n fiveYearsAgoDate &&\n (milestoneEndDate > currentDate || milestoneEndDate < fiveYearsAgoDate)\n ) {\n if (milestoneEndDate > currentDate) {\n setDateErrorMessage('Please enter a past date');\n } else {\n setDateErrorMessage('Please select a date within the past 5 years');\n }\n\n return;\n }\n\n const payload: TMilestonePayload = {\n grade,\n test_name: testName,\n board,\n course_stream: courseStream,\n milestone_date_ts: milestoneEndDate ? new Date(milestoneEndDate).getTime() / 1000 : null,\n academic_event_id: academicEventId,\n publish: true,\n };\n\n postMilestone(payload, {\n studentId,\n });\n };\n\n if (!studentId) {\n return <div>Error</div>;\n }\n\n return (\n <>\n <FlexView $height={'max-content'} $alignItems=\"center\">\n <Text\n $renderAs=\"h4\"\n $align=\"center\"\n $alignSelf=\"center\"\n $widthX={28.75}\n $marginBottomX={0.75}\n >\n Please enter the test details\n </Text>\n <Question\n index={0}\n description=\"What was the type of test?\"\n inputComponent={\n <RadioCards\n options={testTypeOptions}\n value={testType}\n widthX={18.75}\n onChange={handleTestTypeChange}\n analyticsLabel=\"test_type\"\n />\n }\n />\n {configData && testType && (\n <PastMilestoneForm\n config={configData}\n testType={testType}\n studentName={studentName}\n formData={formData}\n onFormDataChange={handleFormDataChange}\n onFormValidityChange={setCanSubmit}\n errorMessage={dateErrorMessage}\n />\n )}\n </FlexView>\n {testType && (\n <FooterWrapper>\n <FlexView $flexDirection=\"row\" $justifyContent=\"center\">\n <Button\n label=\"Add outcome\"\n renderAs=\"primary\"\n widthX={16}\n Icon={NextIcon}\n onClick={createMilestone}\n disabled={!canSubmit}\n busy={isProcessing}\n iconPosition=\"right\"\n analyticsProps={{\n temporary_milestone_id: itemIdRef.current,\n }}\n />\n </FlexView>\n </FooterWrapper>\n )}\n </>\n );\n};\n\nexport default PastMilestoneContainer;\n"],"names":["PastMilestoneContainer","studentId","studentName","onSubmit","onError","prevGrade","courseStream","testType","setTestType","useState","canSubmit","setCanSubmit","formData","setFormData","dateErrorMessage","setDateErrorMessage","getConfig","configData","useGetMileStoneConfig","trackEvent","useUIContext","itemIdRef","useRef","uuidv4","testTypeOptions","useMemo","TEST_TYPE_OPTIONS","id","currentDate","fiveYearsAgoDate","today","handleFormDataChange","useCallback","changedData","milestoneEndDate","prevFormData","handleOnSubmit","errorMessage","data","milestoneId","useEffect","postMilestone","isProcessing","useMilestonePost","handleTestTypeChange","inputTestType","createMilestone","grade","testName","board","academicEventId","payload","jsxs","Fragment","FlexView","jsx","Text","Question","RadioCards","PastMilestoneForm","FooterWrapper","Button","NextIcon"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAMA,KAAwD,CAAC;AAAA,EAC7D,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAOC;AAAA,EACP,cAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAoB,GAC9C,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAC1C,CAACG,GAAUC,CAAW,IAAIJ,EAA+B,EAAE,OAAOJ,GAAW,GAC7E,CAACS,GAAkBC,CAAmB,IAAIN,EAAS,EAAE,GACrD,EAAE,KAAKO,GAAW,MAAMC,EAAA,IAAeC,KACvC,EAAE,SAASC,EAAW,IAAIC,EAAa,GACvCC,IAAYC,EAAOC,EAAA,CAAQ,GAE3BC,IAAkBC;AAAA,IACtB,MACEC,EAAkB;AAAA,MAAO,CAAC,EAAE,IAAAC,EAAG,MAC7BrB,MAAiB,SAASqB,MAAO,YAAYA,MAAO;AAAA,IACtD;AAAA,IACF,CAACrB,CAAY;AAAA,EAAA,GAGTsB,IAAcH,EAAQ,2BACR,QAEL,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC,GACtC,CAAE,CAAA,GAGCI,IAAmBJ,EAAQ,MAAM;AAC/B,UAAAK,wBAAY;AAElB,WAAAA,EAAM,YAAYA,EAAM,YAAY,IAAI,CAAC,GAElCA,EAAM,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC;AAAA,EACzC,GAAG,CAAE,CAAA,GAECC,IAAuBC;AAAA,IAC3B,CAACC,MAAsC;AACrC,YAAM,EAAE,kBAAAC,EAAA,IAAqBD,KAAe;AAE5C,MACEnB,KACAoB,KACAN,KAC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,QACN,SAAShB;AAAA,QACT,UAAU,CAACpC;AAAA,QACX,MAAMgC;AAAA,QACN,cAAa;AAAA,QACb,gBAAgB;AAAA,UACd,wBAAwBrB,EAAU;AAAA,QACpC;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA,IA3DO,gBAAAkC,EAAC,SAAI,UAAK,QAAA,CAAA;AA6DrB;"}
|
1
|
+
{"version":3,"file":"past-milestone-container.js","sources":["../../../../../../src/features/milestone/outcome/comps/past-milestone/past-milestone-container.tsx"],"sourcesContent":["import type {\n IMileStoneFormFields,\n TMilestonePayload,\n} from '../../../create/milestone-create-types';\nimport type { TTestType } from '../../../types';\nimport type { IPastMilestoneProps } from './past-milestone-types';\n\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport NextIcon from '../../../../../assets/line-icons/icons/next';\nimport Button from '../../../../ui/buttons/button/button';\nimport { useUIContext } from '../../../../ui/context/context';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport RadioCards from '../../../../ui/radio-cards/radio-cards';\nimport Text from '../../../../ui/text/text';\nimport { useGetMileStoneConfig } from '../../../create/api/milestone-config';\nimport { useMilestonePost } from '../../../create/api/milestone-submit';\nimport { TEST_TYPE_OPTIONS } from '../../../create/comps/test-type-step/test-type-step-constants';\nimport PastMilestoneForm from './past-milestone-form';\nimport { FooterWrapper } from './past-milestone-styled';\nimport Question from './question';\n\nconst PastMilestoneContainer: React.FC<IPastMilestoneProps> = ({\n studentId,\n studentName,\n onSubmit,\n onError,\n grade: prevGrade,\n courseStream,\n}) => {\n const [testType, setTestType] = useState<TTestType>();\n const [canSubmit, setCanSubmit] = useState(false);\n const [formData, setFormData] = useState<IMileStoneFormFields>({ grade: prevGrade });\n const [dateErrorMessage, setDateErrorMessage] = useState('');\n const { get: getConfig, data: configData } = useGetMileStoneConfig();\n const { onEvent: trackEvent } = useUIContext();\n const itemIdRef = useRef(uuidv4());\n\n const testTypeOptions = useMemo(\n () =>\n TEST_TYPE_OPTIONS.filter(({ id }) =>\n courseStream === 'MATH' ? id !== 'no-test' : id === 'non-standardized',\n ),\n [courseStream],\n );\n\n const currentDate = useMemo(() => {\n const today = new Date();\n\n return today.toISOString().split('T')[0];\n }, []);\n\n // Get date that was 5 years ago\n const fiveYearsAgoDate = useMemo(() => {\n const today = new Date();\n\n today.setFullYear(today.getFullYear() - 5);\n\n return today.toISOString().split('T')[0];\n }, []);\n\n const handleFormDataChange = useCallback(\n (changedData: IMileStoneFormFields) => {\n const { milestoneEndDate } = changedData || {};\n\n if (\n dateErrorMessage &&\n milestoneEndDate &&\n currentDate &&\n fiveYearsAgoDate &&\n milestoneEndDate <= currentDate &&\n milestoneEndDate > fiveYearsAgoDate\n ) {\n setDateErrorMessage('');\n }\n\n setFormData(prevFormData => ({ ...prevFormData, ...changedData }));\n },\n [currentDate, dateErrorMessage, fiveYearsAgoDate],\n );\n const handleOnSubmit = (errorMessage: string | null, data?: Record<string, unknown>) => {\n if (errorMessage) {\n onError(errorMessage);\n } else {\n const { id: milestoneId = '' } = data || {};\n\n trackEvent('TEST_DETAILS_SUBMITTED', {\n milestone_id: milestoneId,\n temporary_milestone_id: itemIdRef.current,\n });\n onSubmit(milestoneId as string);\n }\n };\n\n useEffect(() => {\n trackEvent('TEST_DETAILS_PAGE_LOADED', {\n temporary_milestone_id: itemIdRef.current,\n });\n }, [trackEvent]);\n\n useEffect(() => {\n getConfig('', undefined);\n }, [getConfig]);\n const { post: postMilestone, isProcessing } = useMilestonePost({\n onComplete: handleOnSubmit,\n });\n const handleTestTypeChange = (inputTestType: TTestType) => {\n setTestType(inputTestType);\n setFormData({ grade: prevGrade });\n };\n\n const createMilestone = () => {\n const { grade, testName, board, milestoneEndDate, schoolGooglePlaceData, academicEventId } =\n formData;\n\n if (\n milestoneEndDate &&\n currentDate &&\n fiveYearsAgoDate &&\n (milestoneEndDate > currentDate || milestoneEndDate < fiveYearsAgoDate)\n ) {\n if (milestoneEndDate > currentDate) {\n setDateErrorMessage('Please enter a past date');\n } else {\n setDateErrorMessage('Please select a date within the past 5 years');\n }\n\n return;\n }\n\n const payload: TMilestonePayload = {\n grade,\n test_name: testName,\n board,\n course_stream: courseStream,\n milestone_date_ts: milestoneEndDate ? new Date(milestoneEndDate).getTime() / 1000 : null,\n school_google_place_data: schoolGooglePlaceData,\n academic_event_id: academicEventId,\n is_first_milestone: false,\n publish: true,\n };\n\n postMilestone(payload, {\n studentId,\n });\n };\n\n if (!studentId) {\n return <div>Error</div>;\n }\n\n return (\n <>\n <FlexView $height={'max-content'} $alignItems=\"center\">\n <Text\n $renderAs=\"h4\"\n $align=\"center\"\n $alignSelf=\"center\"\n $widthX={28.75}\n $marginBottomX={0.75}\n >\n Please enter the test details\n </Text>\n <Question\n index={0}\n description=\"What was the type of test?\"\n inputComponent={\n <RadioCards\n options={testTypeOptions}\n value={testType}\n widthX={18.75}\n onChange={handleTestTypeChange}\n analyticsLabel=\"test_type\"\n />\n }\n />\n {configData && testType && (\n <PastMilestoneForm\n config={configData}\n testType={testType}\n studentName={studentName}\n formData={formData}\n onFormDataChange={handleFormDataChange}\n onFormValidityChange={setCanSubmit}\n errorMessage={dateErrorMessage}\n />\n )}\n </FlexView>\n {testType && (\n <FooterWrapper>\n <FlexView $flexDirection=\"row\" $justifyContent=\"center\">\n <Button\n label=\"Add outcome\"\n renderAs=\"primary\"\n widthX={16}\n Icon={NextIcon}\n onClick={createMilestone}\n disabled={!canSubmit}\n busy={isProcessing}\n iconPosition=\"right\"\n analyticsProps={{\n temporary_milestone_id: itemIdRef.current,\n }}\n />\n </FlexView>\n </FooterWrapper>\n )}\n </>\n );\n};\n\nexport default PastMilestoneContainer;\n"],"names":["PastMilestoneContainer","studentId","studentName","onSubmit","onError","prevGrade","courseStream","testType","setTestType","useState","canSubmit","setCanSubmit","formData","setFormData","dateErrorMessage","setDateErrorMessage","getConfig","configData","useGetMileStoneConfig","trackEvent","useUIContext","itemIdRef","useRef","uuidv4","testTypeOptions","useMemo","TEST_TYPE_OPTIONS","id","currentDate","fiveYearsAgoDate","today","handleFormDataChange","useCallback","changedData","milestoneEndDate","prevFormData","handleOnSubmit","errorMessage","data","milestoneId","useEffect","postMilestone","isProcessing","useMilestonePost","handleTestTypeChange","inputTestType","createMilestone","grade","testName","board","schoolGooglePlaceData","academicEventId","payload","jsxs","Fragment","FlexView","jsx","Text","Question","RadioCards","PastMilestoneForm","FooterWrapper","Button","NextIcon"],"mappings":";;;;;;;;;;;;;;;AAuBA,MAAMA,KAAwD,CAAC;AAAA,EAC7D,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAOC;AAAA,EACP,cAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAoB,GAC9C,CAACC,GAAWC,CAAY,IAAIF,EAAS,EAAK,GAC1C,CAACG,GAAUC,CAAW,IAAIJ,EAA+B,EAAE,OAAOJ,GAAW,GAC7E,CAACS,GAAkBC,CAAmB,IAAIN,EAAS,EAAE,GACrD,EAAE,KAAKO,GAAW,MAAMC,EAAA,IAAeC,KACvC,EAAE,SAASC,EAAW,IAAIC,EAAa,GACvCC,IAAYC,EAAOC,GAAA,CAAQ,GAE3BC,IAAkBC;AAAA,IACtB,MACEC,EAAkB;AAAA,MAAO,CAAC,EAAE,IAAAC,EAAG,MAC7BrB,MAAiB,SAASqB,MAAO,YAAYA,MAAO;AAAA,IACtD;AAAA,IACF,CAACrB,CAAY;AAAA,EAAA,GAGTsB,IAAcH,EAAQ,2BACR,QAEL,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC,GACtC,CAAE,CAAA,GAGCI,IAAmBJ,EAAQ,MAAM;AAC/B,UAAAK,wBAAY;AAElB,WAAAA,EAAM,YAAYA,EAAM,YAAY,IAAI,CAAC,GAElCA,EAAM,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC;AAAA,EACzC,GAAG,CAAE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,GACC,EAAA,UAAA,gBAAAL,EAACD,KAAS,gBAAe,OAAM,iBAAgB,UAC7C,UAAA,gBAAAC;AAAA,MAACM;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,UAAS;AAAA,QACT,QAAQ;AAAA,QACR,MAAMC;AAAA,QACN,SAASjB;AAAA,QACT,UAAU,CAACpC;AAAA,QACX,MAAMgC;AAAA,QACN,cAAa;AAAA,QACb,gBAAgB;AAAA,UACd,wBAAwBrB,EAAU;AAAA,QACpC;AAAA,MAAA;AAAA,OAEJ,EACF,CAAA;AAAA,EAEJ,EAAA,CAAA,IA3DO,gBAAAmC,EAAC,SAAI,UAAK,QAAA,CAAA;AA6DrB;"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import { createGetAllAPI as o, createPatchAPI as r } from "@cuemath/rest-api";
|
2
|
+
import { BASE_URL_V1 as t } from "../../../constants/api.js";
|
3
|
+
import { stringify as i } from "../../../helpers/query-string.js";
|
4
|
+
const { useGetAll: f } = o({
|
5
|
+
getURL: (e) => `${t}/notification/journeys/?${i(e)}`
|
6
|
+
});
|
7
|
+
r({
|
8
|
+
getURL: () => `${t}/notification/journeys/`
|
9
|
+
});
|
10
|
+
export {
|
11
|
+
f as useGetJourneys
|
12
|
+
};
|
13
|
+
//# sourceMappingURL=notification.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"notification.js","sources":["../../../../src/features/notifications/api/notification.ts"],"sourcesContent":["import type { TUserTypes } from '../../ui/types';\nimport type { IStudentJourneyData, TJourneyType } from '../types';\n\nimport { createGetAllAPI, createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport { stringify } from '../../../helpers/query-string';\n\ntype TGetQuery = {\n user_id?: string;\n journey_type?: string;\n user_type?: TUserTypes;\n};\n\nconst { useGetAll: useGetJourneys } = createGetAllAPI<IStudentJourneyData, TGetQuery>({\n getURL: query => `${BASE_URL_V1}/notification/journeys/?${stringify(query)}`,\n});\n\ntype TPatchBody = {\n user_id: string;\n journey_id: string;\n user_type: TUserTypes;\n step: number;\n state: TJourneyType;\n};\n\nconst { usePatch: usePatchJourney } = createPatchAPI<TPatchBody, Record<string, unknown>>({\n getURL: () => `${BASE_URL_V1}/notification/journeys/`,\n});\n\nexport { useGetJourneys, usePatchJourney };\n"],"names":["useGetJourneys","createGetAllAPI","query","BASE_URL_V1","stringify","createPatchAPI"],"mappings":";;;AAcA,MAAM,EAAE,WAAWA,EAAe,IAAIC,EAAgD;AAAA,EACpF,QAAQ,CAASC,MAAA,GAAGC,CAAW,2BAA2BC,EAAUF,CAAK,CAAC;AAC5E,CAAC;AAUqCG,EAAoD;AAAA,EACxF,QAAQ,MAAM,GAAGF,CAAW;AAC9B,CAAC;"}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
import { useEffect as t, useMemo as i } from "react";
|
2
|
+
import { useGetJourneys as c } from "./api/notification.js";
|
3
|
+
const y = (s) => {
|
4
|
+
const { getAll: o, data: e, isProcessing: r } = c();
|
5
|
+
t(() => {
|
6
|
+
s && o({
|
7
|
+
user_type: "STUDENT",
|
8
|
+
user_id: s
|
9
|
+
});
|
10
|
+
}, [o, s]);
|
11
|
+
const u = i(
|
12
|
+
() => (e == null ? void 0 : e.filter(({ state: n }) => n === "UNFINISHED")) ?? [],
|
13
|
+
[e]
|
14
|
+
);
|
15
|
+
return r ? { journeysToInclude: null, isProcessing: !0 } : { journeysToInclude: u, isProcessing: !1 };
|
16
|
+
};
|
17
|
+
export {
|
18
|
+
y as default
|
19
|
+
};
|
20
|
+
//# sourceMappingURL=use-student-journey.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"use-student-journey.js","sources":["../../../src/features/notifications/use-student-journey.ts"],"sourcesContent":["import type { IStudentJourneyData } from './types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { useGetJourneys } from './api/notification';\n\nconst useStudentJourneys = (\n studentId: string | null,\n):\n | { journeysToInclude: IStudentJourneyData[]; isProcessing: false }\n | { journeysToInclude: null; isProcessing: true } => {\n const { getAll: getStudentJourneys, data: studentJourneys, isProcessing } = useGetJourneys();\n\n useEffect(() => {\n if (studentId)\n getStudentJourneys({\n user_type: 'STUDENT',\n user_id: studentId,\n });\n }, [getStudentJourneys, studentId]);\n\n const journeyCodesToInclude = useMemo(\n () => studentJourneys?.filter(({ state }) => state === 'UNFINISHED') ?? [],\n [studentJourneys],\n );\n\n if (isProcessing) return { journeysToInclude: null, isProcessing: true };\n\n return { journeysToInclude: journeyCodesToInclude, isProcessing: false };\n};\n\nexport default useStudentJourneys;\n"],"names":["useStudentJourneys","studentId","getStudentJourneys","studentJourneys","isProcessing","useGetJourneys","useEffect","journeyCodesToInclude","useMemo","state"],"mappings":";;AAMM,MAAAA,IAAqB,CACzBC,MAGqD;AACrD,QAAM,EAAE,QAAQC,GAAoB,MAAMC,GAAiB,cAAAC,EAAA,IAAiBC;AAE5E,EAAAC,EAAU,MAAM;AACV,IAAAL,KACiBC,EAAA;AAAA,MACjB,WAAW;AAAA,MACX,SAASD;AAAA,IAAA,CACV;AAAA,EAAA,GACF,CAACC,GAAoBD,CAAS,CAAC;AAElC,QAAMM,IAAwBC;AAAA,IAC5B,OAAML,KAAA,gBAAAA,EAAiB,OAAO,CAAC,EAAE,OAAAM,QAAYA,MAAU,kBAAiB,CAAC;AAAA,IACzE,CAACN,CAAe;AAAA,EAAA;AAGlB,SAAIC,IAAqB,EAAE,mBAAmB,MAAM,cAAc,OAE3D,EAAE,mBAAmBG,GAAuB,cAAc,GAAM;AACzE;"}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { IMAGES as e } from "../../../assets/images/images.js";
|
2
|
+
import { S3_LINK as s } from "../../../constants/urls.js";
|
3
|
+
const o = [
|
4
|
+
{
|
5
|
+
modalHeader: "Mark as learned vs Skip lesson",
|
6
|
+
modalSubHeader: "Learned lessons progress is tracked. Skipped lessons are removed from progress tracking.",
|
7
|
+
modalAnalyticsLabel: "FAMILIAR_VS_SKIP",
|
8
|
+
header: "🧐 Mark as learned vs Skip lesson. More questions?",
|
9
|
+
videoSrc: `${s}/2024/10_Oct/Mark+as+learned+vs+mark+as+not+needed+final.mp4`,
|
10
|
+
subHeaderStart: "When to use what.",
|
11
|
+
imgSrc: e.HELP_BANNER6,
|
12
|
+
hue: "PURPLE"
|
13
|
+
},
|
14
|
+
{
|
15
|
+
modalHeader: "How does a student achieve mastery of a lesson?",
|
16
|
+
modalSubHeader: "To achieve mastery of a lesson, student must complete the smart practice sheet corresponding to the lesson.",
|
17
|
+
modalAnalyticsLabel: "STUDENT_MASTERY",
|
18
|
+
header: "🤔 How does a student achieve mastery? More questions?",
|
19
|
+
videoSrc: `${s}/2024/10_Oct/When+is+a+lesson+mastered+final.mp4`,
|
20
|
+
subHeaderStart: "For sure.",
|
21
|
+
imgSrc: e.HELP_BANNER5,
|
22
|
+
hue: "GREEN"
|
23
|
+
}
|
24
|
+
];
|
25
|
+
export {
|
26
|
+
o as LESSON_HELP_CONFIG
|
27
|
+
};
|
28
|
+
//# sourceMappingURL=lessons.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"lessons.js","sources":["../../../../src/features/sheets/constants/lessons.ts"],"sourcesContent":["import type { IMilestoneHelpBannerConfig } from '../../milestone/types';\n\nimport { IMAGES } from '../../../assets/images/images';\nimport { S3_LINK } from '../../../constants/urls';\n\nexport const LESSON_HELP_CONFIG: IMilestoneHelpBannerConfig[] = [\n {\n modalHeader: 'Mark as learned vs Skip lesson',\n modalSubHeader:\n 'Learned lessons progress is tracked. Skipped lessons are removed from progress tracking.',\n modalAnalyticsLabel: 'FAMILIAR_VS_SKIP',\n header: '🧐 Mark as learned vs Skip lesson. More questions?',\n videoSrc: `${S3_LINK}/2024/10_Oct/Mark+as+learned+vs+mark+as+not+needed+final.mp4`,\n subHeaderStart: 'When to use what.',\n\n imgSrc: IMAGES.HELP_BANNER6,\n hue: 'PURPLE',\n },\n {\n modalHeader: 'How does a student achieve mastery of a lesson?',\n modalSubHeader:\n 'To achieve mastery of a lesson, student must complete the smart practice sheet corresponding to the lesson.',\n modalAnalyticsLabel: 'STUDENT_MASTERY',\n header: '🤔 How does a student achieve mastery? More questions?',\n videoSrc: `${S3_LINK}/2024/10_Oct/When+is+a+lesson+mastered+final.mp4`,\n subHeaderStart: 'For sure.',\n imgSrc: IMAGES.HELP_BANNER5,\n hue: 'GREEN',\n },\n];\n"],"names":["LESSON_HELP_CONFIG","S3_LINK","IMAGES"],"mappings":";;AAKO,MAAMA,IAAmD;AAAA,EAC9D;AAAA,IACE,aAAa;AAAA,IACb,gBACE;AAAA,IACF,qBAAqB;AAAA,IACrB,QAAQ;AAAA,IACR,UAAU,GAAGC,CAAO;AAAA,IACpB,gBAAgB;AAAA,IAEhB,QAAQC,EAAO;AAAA,IACf,KAAK;AAAA,EACP;AAAA,EACA;AAAA,IACE,aAAa;AAAA,IACb,gBACE;AAAA,IACF,qBAAqB;AAAA,IACrB,QAAQ;AAAA,IACR,UAAU,GAAGD,CAAO;AAAA,IACpB,gBAAgB;AAAA,IAChB,QAAQC,EAAO;AAAA,IACf,KAAK;AAAA,EACP;AACF;"}
|
@@ -0,0 +1,117 @@
|
|
1
|
+
import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as B, useState as L, useMemo as D } from "react";
|
3
|
+
import N from "../../../../assets/line-icons/icons/back.js";
|
4
|
+
import X from "../../../../assets/line-icons/icons/next.js";
|
5
|
+
import _ from "../../buttons/button/button.js";
|
6
|
+
import p from "../../buttons/icon-button/icon-button.js";
|
7
|
+
import v from "../../buttons/text-button/text-button.js";
|
8
|
+
import T from "../../image/image.js";
|
9
|
+
import t from "../../layout/flex-view.js";
|
10
|
+
import y from "../../text/text.js";
|
11
|
+
import P from "../../video/index.js";
|
12
|
+
const Q = B(
|
13
|
+
({ onFinish: c, entrySlideNumber: $, slides: a, tertiaryProps: s, analyticsProps: u }) => {
|
14
|
+
const [o, b] = L($), x = () => {
|
15
|
+
b((n) => n - 1);
|
16
|
+
}, f = () => {
|
17
|
+
o === a.length - 1 ? c == null || c() : b((n) => n + 1);
|
18
|
+
}, {
|
19
|
+
img: h,
|
20
|
+
video: m,
|
21
|
+
header: d,
|
22
|
+
sub_header: g,
|
23
|
+
analytics_label: i,
|
24
|
+
thumbnail: w,
|
25
|
+
autoPlay: A,
|
26
|
+
buttonLabel: C
|
27
|
+
} = a[o], { commonAnalytics: l, videoAnalytics: I } = D(() => {
|
28
|
+
const n = {
|
29
|
+
step_header: d,
|
30
|
+
banner_type: i,
|
31
|
+
...u ?? {}
|
32
|
+
}, j = { ...n, label: i };
|
33
|
+
return { commonAnalytics: n, videoAnalytics: j };
|
34
|
+
}, [i, d, u]), k = C || (o === a.length - 1 ? "Ok got it!" : "Next");
|
35
|
+
return /* @__PURE__ */ r(
|
36
|
+
t,
|
37
|
+
{
|
38
|
+
$flexGapX: 1.5,
|
39
|
+
$gutterX: 2.5,
|
40
|
+
$gapX: 2.5,
|
41
|
+
$heightX: 31.125,
|
42
|
+
$justifyContent: "space-between",
|
43
|
+
children: [
|
44
|
+
/* @__PURE__ */ r(t, { children: [
|
45
|
+
/* @__PURE__ */ e(y, { $renderAs: "ah4-bold", children: d }),
|
46
|
+
/* @__PURE__ */ e(y, { $renderAs: "ub3", children: g })
|
47
|
+
] }),
|
48
|
+
/* @__PURE__ */ r(t, { $borderColor: "BLACK_T_38", children: [
|
49
|
+
h && /* @__PURE__ */ e(T, { alt: i, width: "480", height: "200", src: h, withLoader: !1 }),
|
50
|
+
m && /* @__PURE__ */ e(
|
51
|
+
P,
|
52
|
+
{
|
53
|
+
width: "480",
|
54
|
+
height: "270",
|
55
|
+
src: m,
|
56
|
+
analyticsData: I,
|
57
|
+
controls: !0,
|
58
|
+
thumbnailImg: w,
|
59
|
+
autoPlay: A
|
60
|
+
},
|
61
|
+
m
|
62
|
+
)
|
63
|
+
] }),
|
64
|
+
/* @__PURE__ */ e(t, { $justifyContent: "space-between", children: s ? /* @__PURE__ */ r(t, { $justifyContent: "space-between", $flexDirection: "row", $alignItems: "baseline", children: [
|
65
|
+
/* @__PURE__ */ e(
|
66
|
+
v,
|
67
|
+
{
|
68
|
+
label: s.CTA,
|
69
|
+
onClick: s.onClick,
|
70
|
+
analyticsProps: l
|
71
|
+
}
|
72
|
+
),
|
73
|
+
/* @__PURE__ */ r(t, { $flexDirection: "row", $justifyContent: "space-between", $widthX: 6, children: [
|
74
|
+
/* @__PURE__ */ e(
|
75
|
+
p,
|
76
|
+
{
|
77
|
+
Icon: N,
|
78
|
+
renderAs: "primary",
|
79
|
+
analyticsLabel: "Back",
|
80
|
+
onClick: x,
|
81
|
+
analyticsProps: l,
|
82
|
+
disabled: o === 0
|
83
|
+
}
|
84
|
+
),
|
85
|
+
/* @__PURE__ */ e(
|
86
|
+
p,
|
87
|
+
{
|
88
|
+
Icon: X,
|
89
|
+
analyticsLabel: "Next",
|
90
|
+
renderAs: "primary",
|
91
|
+
onClick: f,
|
92
|
+
analyticsProps: l,
|
93
|
+
disabled: o === a.length - 1
|
94
|
+
}
|
95
|
+
)
|
96
|
+
] })
|
97
|
+
] }) : /* @__PURE__ */ e(t, { $flexDirection: "row", $alignItems: "center", $justifyContent: "flex-end", children: /* @__PURE__ */ e(
|
98
|
+
_,
|
99
|
+
{
|
100
|
+
renderAs: "primary",
|
101
|
+
shape: "square",
|
102
|
+
widthX: 10,
|
103
|
+
size: "small",
|
104
|
+
label: k,
|
105
|
+
onClick: f,
|
106
|
+
analyticsProps: l
|
107
|
+
}
|
108
|
+
) }) })
|
109
|
+
]
|
110
|
+
}
|
111
|
+
);
|
112
|
+
}
|
113
|
+
);
|
114
|
+
export {
|
115
|
+
Q as default
|
116
|
+
};
|
117
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../../src/features/ui/modals/info-modal/index.tsx"],"sourcesContent":["import type { IInfoModalProps, TSlideConfig } from './types';\n\nimport { memo, useMemo, useState } from 'react';\n\nimport BackIcon from '../../../../assets/line-icons/icons/back';\nimport NextIcon from '../../../../assets/line-icons/icons/next';\nimport Button from '../../buttons/button/button';\nimport IconButton from '../../buttons/icon-button/icon-button';\nimport TextButton from '../../buttons/text-button/text-button';\nimport Image from '../../image/image';\nimport FlexView from '../../layout/flex-view';\nimport Text from '../../text/text';\nimport Video from '../../video';\n\nconst InfoModal: React.FC<IInfoModalProps> = memo(\n ({ onFinish: handleFinish, entrySlideNumber, slides, tertiaryProps, analyticsProps }) => {\n const [slideNum, setSlideNum] = useState(entrySlideNumber);\n const handlePrevious = () => {\n setSlideNum(prev => prev - 1);\n };\n\n const handleNext = () => {\n if (slideNum === slides.length - 1) {\n handleFinish?.();\n } else {\n setSlideNum(prev => prev + 1);\n }\n };\n\n const {\n img,\n video,\n header,\n sub_header: subHeader,\n analytics_label: analyticsLabel,\n thumbnail,\n autoPlay,\n buttonLabel,\n } = slides[slideNum] as TSlideConfig;\n\n const { commonAnalytics, videoAnalytics } = useMemo(() => {\n const commonAnalyticsData = {\n step_header: header,\n banner_type: analyticsLabel,\n ...(analyticsProps ?? {}),\n };\n const videoAnalyticsData = { ...commonAnalyticsData, label: analyticsLabel };\n\n return { commonAnalytics: commonAnalyticsData, videoAnalytics: videoAnalyticsData };\n }, [analyticsLabel, header, analyticsProps]);\n\n const nextButtonLabel = buttonLabel || (slideNum === slides.length - 1 ? 'Ok got it!' : 'Next');\n\n return (\n <FlexView\n $flexGapX={1.5}\n $gutterX={2.5}\n $gapX={2.5}\n $heightX={31.125}\n $justifyContent=\"space-between\"\n >\n <FlexView>\n <Text $renderAs=\"ah4-bold\">{header}</Text>\n <Text $renderAs=\"ub3\">{subHeader}</Text>\n </FlexView>\n\n <FlexView $borderColor=\"BLACK_T_38\">\n {img && (\n <Image alt={analyticsLabel} width=\"480\" height=\"200\" src={img} withLoader={false} />\n )}\n {video && (\n <Video\n key={video}\n width=\"480\"\n height=\"270\"\n src={video}\n analyticsData={videoAnalytics}\n controls\n thumbnailImg={thumbnail}\n autoPlay={autoPlay}\n />\n )}\n </FlexView>\n\n <FlexView $justifyContent=\"space-between\">\n {tertiaryProps ? (\n <FlexView $justifyContent=\"space-between\" $flexDirection=\"row\" $alignItems=\"baseline\">\n <TextButton\n label={tertiaryProps.CTA}\n onClick={tertiaryProps.onClick}\n analyticsProps={commonAnalytics}\n />\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $widthX={6}>\n <IconButton\n Icon={BackIcon}\n renderAs=\"primary\"\n analyticsLabel=\"Back\"\n onClick={handlePrevious}\n analyticsProps={commonAnalytics}\n disabled={slideNum === 0}\n />\n\n <IconButton\n Icon={NextIcon}\n analyticsLabel=\"Next\"\n renderAs=\"primary\"\n onClick={handleNext}\n analyticsProps={commonAnalytics}\n disabled={slideNum === slides.length - 1}\n />\n </FlexView>\n </FlexView>\n ) : (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"flex-end\">\n <Button\n renderAs=\"primary\"\n shape=\"square\"\n widthX={10}\n size=\"small\"\n label={nextButtonLabel}\n onClick={handleNext}\n analyticsProps={commonAnalytics}\n />\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n },\n);\n\nexport default InfoModal;\n"],"names":["InfoModal","memo","handleFinish","entrySlideNumber","slides","tertiaryProps","analyticsProps","slideNum","setSlideNum","useState","handlePrevious","prev","handleNext","img","video","header","subHeader","analyticsLabel","thumbnail","autoPlay","buttonLabel","commonAnalytics","videoAnalytics","useMemo","commonAnalyticsData","videoAnalyticsData","nextButtonLabel","jsxs","FlexView","jsx","Text","Image","Video","TextButton","IconButton","BackIcon","NextIcon","Button"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAAuCC;AAAA,EAC3C,CAAC,EAAE,UAAUC,GAAc,kBAAAC,GAAkB,QAAAC,GAAQ,eAAAC,GAAe,gBAAAC,QAAqB;AACvF,UAAM,CAACC,GAAUC,CAAW,IAAIC,EAASN,CAAgB,GACnDO,IAAi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AA,cACN,QAAQ;AAAA,cACR,MAAK;AAAA,cACL,OAAOX;AAAA,cACP,SAASd;AAAA,cACT,gBAAgBS;AAAA,YAAA;AAAA,aAEpB,EAEJ,CAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
package/dist/index.d.ts
CHANGED
@@ -47,6 +47,8 @@ export declare const AchievementNotShareReasonModal: React_2.FC<IShareInstructio
|
|
47
47
|
|
48
48
|
export declare const AchievementShareInstructionModal: React_2.FC<IShareInstructionModalProps>;
|
49
49
|
|
50
|
+
export declare const AddRemoveChapters: React_2.FC<IShareScreenModalProps>;
|
51
|
+
|
50
52
|
export declare const AlertIcon: React_2.FC<React_2.SVGProps<SVGSVGElement>>;
|
51
53
|
|
52
54
|
export declare const AppLoader: FC<IAppLoaderProps>;
|
@@ -1021,8 +1023,11 @@ declare interface IDesmosCalculatorProps {
|
|
1021
1023
|
}
|
1022
1024
|
|
1023
1025
|
declare interface IEditMilestoneModalProps extends IMilestoneEditProps {
|
1026
|
+
isStudentPresent: boolean;
|
1027
|
+
handleEditChapters: (milestoneId: string, shareScreen: boolean) => void;
|
1024
1028
|
studentId: string;
|
1025
1029
|
isUsingAlternateCurriculum: boolean;
|
1030
|
+
studentName: string;
|
1026
1031
|
isClassOngoing: boolean;
|
1027
1032
|
onDelete: (data?: {
|
1028
1033
|
milestone_name: string;
|
@@ -1175,6 +1180,19 @@ declare interface IGoalCurriculumMap {
|
|
1175
1180
|
program_id: string;
|
1176
1181
|
}
|
1177
1182
|
|
1183
|
+
declare interface IGooglePlaceData {
|
1184
|
+
description: string;
|
1185
|
+
placeId: string;
|
1186
|
+
label: string;
|
1187
|
+
gmaps?: {
|
1188
|
+
address_components: {
|
1189
|
+
long_name: string;
|
1190
|
+
short_name: string;
|
1191
|
+
types: string[];
|
1192
|
+
}[];
|
1193
|
+
};
|
1194
|
+
}
|
1195
|
+
|
1178
1196
|
declare interface IGooglePlaceOption extends google.maps.places.AutocompletePrediction, ISelectOption<string> {
|
1179
1197
|
gmaps?: google.maps.GeocoderResult;
|
1180
1198
|
}
|
@@ -1194,6 +1212,14 @@ declare interface IGradeSelectorProps {
|
|
1194
1212
|
layoutAlignment?: 'center' | 'auto';
|
1195
1213
|
}
|
1196
1214
|
|
1215
|
+
declare interface IGradeSyllabusMap {
|
1216
|
+
program_code: string;
|
1217
|
+
majors?: {
|
1218
|
+
program_code: string;
|
1219
|
+
program_name: string;
|
1220
|
+
}[];
|
1221
|
+
}
|
1222
|
+
|
1197
1223
|
declare interface IIconButtonProps extends Omit<IButtonProps, 'label' | 'shape' | 'widthX' | 'width' | 'iconPosition' | 'alignSelf' | 'analyticsLabel'>, Required<Pick<IClickableAnalyticsProps, 'analyticsLabel'>> {
|
1198
1224
|
Icon: React.FC<React.SVGProps<SVGSVGElement>>;
|
1199
1225
|
customBgColor?: TColorNames;
|
@@ -1247,6 +1273,10 @@ export declare interface IInputVariantConfig {
|
|
1247
1273
|
optionHoverColorName?: TColorNames;
|
1248
1274
|
}
|
1249
1275
|
|
1276
|
+
declare interface IIntroModalProps {
|
1277
|
+
onFinish: () => void;
|
1278
|
+
}
|
1279
|
+
|
1250
1280
|
declare interface IIsOkayTypeQuestion {
|
1251
1281
|
(question: IWorksheetQuestion | ILearnosityQuestion): boolean;
|
1252
1282
|
}
|
@@ -1695,11 +1725,23 @@ export declare const IMAGES: {
|
|
1695
1725
|
DVI: string;
|
1696
1726
|
EKA: string;
|
1697
1727
|
EMPTY_MIX_TESTS: string;
|
1728
|
+
GOAL_CREATION_HELPER: string;
|
1698
1729
|
GREAT: string;
|
1730
|
+
HELP_BANNER1: string;
|
1731
|
+
HELP_BANNER2: string;
|
1732
|
+
HELP_BANNER3: string;
|
1733
|
+
HELP_BANNER4: string;
|
1734
|
+
HELP_BANNER5: string;
|
1735
|
+
HELP_BANNER6: string;
|
1699
1736
|
HEXO: string;
|
1700
1737
|
KUDOS: string;
|
1701
1738
|
LEARNING_PLAN: string;
|
1702
1739
|
LESSON_OVERVIEW_BANNER: string;
|
1740
|
+
MILESTONE_INTRO_SLIDE1: string;
|
1741
|
+
MILESTONE_INTRO_SLIDE2: string;
|
1742
|
+
MILESTONE_INTRO_SLIDE3: string;
|
1743
|
+
MILESTONE_INTRO_SLIDE4: string;
|
1744
|
+
MILESTONE_INTRO_SLIDE5: string;
|
1703
1745
|
NO_INFO: string;
|
1704
1746
|
OCTO: string;
|
1705
1747
|
PLAYSTORE: string;
|
@@ -1747,6 +1789,18 @@ declare interface IMilestoneConfig {
|
|
1747
1789
|
action_plan: Record<'green' | 'red' | 'yellow', {
|
1748
1790
|
share_message_template: string;
|
1749
1791
|
}>;
|
1792
|
+
boards: {
|
1793
|
+
available_countries: string[];
|
1794
|
+
available_states: string[];
|
1795
|
+
board_code: string;
|
1796
|
+
board_name: string;
|
1797
|
+
majors?: {
|
1798
|
+
available_grades: string[];
|
1799
|
+
program_code: string;
|
1800
|
+
program_id: string;
|
1801
|
+
program_name: string;
|
1802
|
+
}[];
|
1803
|
+
}[];
|
1750
1804
|
grades: string[];
|
1751
1805
|
academic_events: {
|
1752
1806
|
id: string;
|
@@ -1758,14 +1812,26 @@ declare interface IMilestoneConfig {
|
|
1758
1812
|
available_grade_and_syllabus_map: Record<string, string | null> | null;
|
1759
1813
|
}[];
|
1760
1814
|
outcome_config: IOutcomeConfig[];
|
1815
|
+
journeys: {
|
1816
|
+
familiarityInfo: string;
|
1817
|
+
};
|
1761
1818
|
country_code_to_name_map: Record<string, string>;
|
1819
|
+
curriculum_catalogue_filters: {
|
1820
|
+
math: {
|
1821
|
+
curriculum: {
|
1822
|
+
code: string;
|
1823
|
+
name: string;
|
1824
|
+
available_grade_and_syllabus_map: Record<string, IGradeSyllabusMap>;
|
1825
|
+
}[];
|
1826
|
+
};
|
1827
|
+
};
|
1762
1828
|
curriculum_standards: ICurriculumStandards[];
|
1763
1829
|
goal_curriculum_map: IGoalCurriculumMap[];
|
1764
1830
|
share_message: TGoalShareMessage;
|
1765
1831
|
preference_config: IPreferencesCurriculumMap[];
|
1766
1832
|
}
|
1767
1833
|
|
1768
|
-
declare interface IMilestoneContainerProps extends Omit<IMilestoneWidgetResourcesProps, 'userMilestoneId' | 'onChangeLocation' | 'isMilestoneActive'>, Omit<ITestsListProps, 'userMilestoneId' | 'isMilestoneActive'> {
|
1834
|
+
declare interface IMilestoneContainerProps extends Omit<IMilestoneWidgetResourcesProps, 'userMilestoneId' | 'onChangeLocation' | 'onHelpClick' | 'isMilestoneActive'>, Omit<ITestsListProps, 'userMilestoneId' | 'isMilestoneActive'> {
|
1769
1835
|
studentName: string;
|
1770
1836
|
parentName?: string;
|
1771
1837
|
teacherName?: string;
|
@@ -1781,6 +1847,7 @@ declare interface IMilestoneContainerProps extends Omit<IMilestoneWidgetResource
|
|
1781
1847
|
onCreatePlan?: (id: string) => void;
|
1782
1848
|
onDelete?: (milestoneDeleteArgs: TMilestoneDeleteProps) => void;
|
1783
1849
|
canCreatePlan?: boolean;
|
1850
|
+
onMilestoneHelpClick?: (helpModalIdx: number) => void;
|
1784
1851
|
studentClassroomId?: string | undefined;
|
1785
1852
|
courseStream: TCourseStream;
|
1786
1853
|
}
|
@@ -1802,6 +1869,8 @@ declare interface IMileStoneCreateProps {
|
|
1802
1869
|
grade: string;
|
1803
1870
|
board?: string;
|
1804
1871
|
classRatio?: number | null;
|
1872
|
+
journeysToInclude?: IStudentJourneyData[];
|
1873
|
+
isFirstMilestoneCreated?: boolean;
|
1805
1874
|
isGoalCreation?: boolean;
|
1806
1875
|
milestoneId?: string;
|
1807
1876
|
currentCountryCode?: string;
|
@@ -1833,7 +1902,7 @@ export declare interface IMilestoneData {
|
|
1833
1902
|
selected_major: string | null;
|
1834
1903
|
user_milestone_progress: IUserChapterProgressProps | null;
|
1835
1904
|
permissions: IMilestoneCardPermissions;
|
1836
|
-
recommended_chapter_filters:
|
1905
|
+
recommended_chapter_filters: TRecommenedChaptersFilter | null;
|
1837
1906
|
}
|
1838
1907
|
|
1839
1908
|
declare interface IMileStoneEditContainerProps extends IMileStoneCreateContainerProps {
|
@@ -1882,11 +1951,22 @@ declare interface IMileStoneFormFields {
|
|
1882
1951
|
chapterSubStages?: 'custom-chapters' | 'date-selection';
|
1883
1952
|
milestoneEndDate?: string;
|
1884
1953
|
milestoneEndDateIsTentative?: boolean;
|
1954
|
+
schoolGooglePlaceData?: IGooglePlaceData;
|
1955
|
+
schoolCountryCode?: string;
|
1885
1956
|
academicEventId?: string;
|
1886
1957
|
standardizedTestType?: 'unknown' | 'known' | 'incomplete';
|
1958
|
+
standardizedTestPreparationMethod?: 'cuemath-curricullum' | 'alternate-curricullum';
|
1887
1959
|
testName?: string;
|
1960
|
+
familiarityInfoExpanded?: boolean;
|
1961
|
+
familiarityInfo?: {
|
1962
|
+
isRead: boolean;
|
1963
|
+
journeyId?: string;
|
1964
|
+
};
|
1965
|
+
defocusInfoRead?: boolean;
|
1966
|
+
defocusedInfoExpanded?: boolean;
|
1888
1967
|
searchChapterFields?: ISearchChapterFields;
|
1889
1968
|
recommendedChaptersList?: IChapter[];
|
1969
|
+
metaRecommendedChaptersQuery?: TRecommenedChaptersFilter;
|
1890
1970
|
milestoneChaptersList?: IChapter[];
|
1891
1971
|
chaptersFamiliarityList?: IChapter[];
|
1892
1972
|
}
|
@@ -1911,7 +1991,7 @@ declare interface IMilestoneStartProps {
|
|
1911
1991
|
handleOnClick?: () => void;
|
1912
1992
|
}
|
1913
1993
|
|
1914
|
-
declare interface IMilestoneWidgetProps extends Omit<IMilestoneWidgetResourcesProps, 'userMilestoneId' | 'onChangeLocation'>, Omit<ITestsListProps, 'userMilestoneId'> {
|
1994
|
+
declare interface IMilestoneWidgetProps extends Omit<IMilestoneWidgetResourcesProps, 'userMilestoneId' | 'onChangeLocation' | 'onHelpClick'>, Omit<ITestsListProps, 'userMilestoneId'> {
|
1915
1995
|
milestone: IMilestoneData;
|
1916
1996
|
studentName: string;
|
1917
1997
|
parentName?: string;
|
@@ -1928,6 +2008,7 @@ declare interface IMilestoneWidgetProps extends Omit<IMilestoneWidgetResourcesPr
|
|
1928
2008
|
onDelete?: (milestoneDeleteArgs: TMilestoneDeleteProps) => void;
|
1929
2009
|
onDraftPublish?: (milestoneId: string, isGoalPublish?: boolean) => void;
|
1930
2010
|
onAddChapter?: IChaptersListProps['onAddChapter'];
|
2011
|
+
onHelpClick?: (idx: number) => void;
|
1931
2012
|
courseStream: TCourseStream;
|
1932
2013
|
}
|
1933
2014
|
|
@@ -2391,6 +2472,14 @@ declare interface IShareInstructionModalProps {
|
|
2391
2472
|
onError: (errorMessage: string) => void;
|
2392
2473
|
}
|
2393
2474
|
|
2475
|
+
declare interface IShareScreenModalProps {
|
2476
|
+
handleEditChapters: (milestoneId: string, shareScreen: boolean) => void;
|
2477
|
+
milestoneId: string;
|
2478
|
+
studentName: string;
|
2479
|
+
onCreatePlan?: () => void;
|
2480
|
+
canCreatePlan?: boolean;
|
2481
|
+
}
|
2482
|
+
|
2394
2483
|
export declare interface ISheetDataProps {
|
2395
2484
|
accuracy: number | null;
|
2396
2485
|
attempt_location: TSheetAttemptLocation;
|
@@ -2429,6 +2518,7 @@ declare interface ISheetItemCallbackProps {
|
|
2429
2518
|
onUnlock?: (nodeId: string) => void;
|
2430
2519
|
onMarkRelevant?: (nodeId: string) => void;
|
2431
2520
|
onMarkIrrelevant?: (nodeId: string) => void;
|
2521
|
+
onHelpClick?: (arg: number | string) => void;
|
2432
2522
|
onUnAssignSheet?: (sheetData: ISheetDataProps, userMilestoneId?: string) => void;
|
2433
2523
|
}
|
2434
2524
|
|
@@ -2518,6 +2608,12 @@ declare interface IStudentDetailsProps extends IWinsPreviewProps {
|
|
2518
2608
|
classStatus?: IClassStatus;
|
2519
2609
|
}
|
2520
2610
|
|
2611
|
+
declare interface IStudentJourneyData {
|
2612
|
+
state: TJourneyType;
|
2613
|
+
code: string;
|
2614
|
+
journey_id: string;
|
2615
|
+
}
|
2616
|
+
|
2521
2617
|
declare interface IStudentSchool {
|
2522
2618
|
place_id: string;
|
2523
2619
|
country_code: string;
|
@@ -3292,10 +3388,30 @@ export declare const MilestoneActionWidget: React_2.FC<IMilestoneActionWidgetPro
|
|
3292
3388
|
|
3293
3389
|
export declare const MilestoneCreate: React.FC<IMileStoneCreateContainerProps>;
|
3294
3390
|
|
3391
|
+
export declare const MilestoneDraftCreate: React.FC<IMileStoneCreateContainerProps>;
|
3392
|
+
|
3393
|
+
export declare const MilestoneDraftEdit: React.FC<IMileStoneEditContainerProps>;
|
3394
|
+
|
3395
|
+
export declare const MilestoneDraftReview: React.FC<IMileStoneEditContainerProps>;
|
3396
|
+
|
3295
3397
|
export declare const MilestoneEdit: React.FC<IMileStoneEditContainerProps>;
|
3296
3398
|
|
3399
|
+
export declare const MilestoneIntroModal: React.FC<IIntroModalProps>;
|
3400
|
+
|
3401
|
+
export declare const MilestoneLessonHelpModal: React.FC<{
|
3402
|
+
entrySlideNumber: number;
|
3403
|
+
onFAQClick: () => void;
|
3404
|
+
analyticsProps: Record<string, unknown>;
|
3405
|
+
}>;
|
3406
|
+
|
3297
3407
|
export declare const MilestoneList: React_2.FC<IMilestoneContainerProps>;
|
3298
3408
|
|
3409
|
+
export declare const MilestoneListHelpModal: React.FC<{
|
3410
|
+
entrySlideNumber: number;
|
3411
|
+
onFAQClick: () => void;
|
3412
|
+
analyticsProps: Record<string, unknown>;
|
3413
|
+
}>;
|
3414
|
+
|
3299
3415
|
export declare const MilestoneOutcome: React_2.FC<IMilestoneOutcomeContainer>;
|
3300
3416
|
|
3301
3417
|
export declare const MilestoneStart: React_2.FC<IMilestoneStartProps>;
|
@@ -4192,6 +4308,8 @@ declare type TItemType = 'overview' | 'learning-we-do' | 'learning-your-turn' |
|
|
4192
4308
|
|
4193
4309
|
export declare type TJourneyId = JOURNEY_ID_STUDENT;
|
4194
4310
|
|
4311
|
+
declare type TJourneyType = 'UNFINISHED' | 'FINISHED';
|
4312
|
+
|
4195
4313
|
declare type TLayerKey = 'layer-1' | 'layer-2' | 'layer-3' | 'layer-4';
|
4196
4314
|
|
4197
4315
|
declare type TLearnosityPreloaderContextValue = {
|
@@ -4488,10 +4606,6 @@ declare type TQuestionByQuestionOverviewList = {
|
|
4488
4606
|
user_node_id: string;
|
4489
4607
|
}[];
|
4490
4608
|
|
4491
|
-
declare type TRecommendedChaptersFilter = TRecommendedChaptersQuery & {
|
4492
|
-
chapter_codes?: string[];
|
4493
|
-
};
|
4494
|
-
|
4495
4609
|
declare type TRecommendedChaptersQuery = {
|
4496
4610
|
filter_type: 'GRADE_BOARD' | 'GRADE_ACADEMIC_EVENT_CODE' | 'PROGRAM_CODE' | 'GRADE_COUNTRY_CODE';
|
4497
4611
|
grade?: string;
|
@@ -4502,6 +4616,10 @@ declare type TRecommendedChaptersQuery = {
|
|
4502
4616
|
user_id?: string;
|
4503
4617
|
};
|
4504
4618
|
|
4619
|
+
declare type TRecommenedChaptersFilter = TRecommendedChaptersQuery & {
|
4620
|
+
chapter_codes?: string[];
|
4621
|
+
};
|
4622
|
+
|
4505
4623
|
declare type TRenderAs = 'primary' | 'secondary';
|
4506
4624
|
|
4507
4625
|
declare type TRenderAs_2 = 'canvas' | 'whiteboard';
|