@cuemath/leap 3.5.67-link2 → 3.5.68-as2
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/cue-canvas/bottombar/homework-controls.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/sidebar.js +4 -4
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/toolbar.js +17 -21
- package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js +13 -23
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
- package/dist/features/math-fit/math-fit-overview/math-fit-overview-types.js +4 -4
- package/dist/features/math-fit/math-fit-overview/math-fit-overview-types.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js +40 -39
- package/dist/features/math-fit/math-fit-report/comps/score-section/score-section.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/math-fit-report.js +74 -57
- package/dist/features/math-fit/math-fit-report/math-fit-report.js.map +1 -1
- package/dist/features/milestone/create/api/milestone-config.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/mathfit/mathfit.js +30 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/comps/mathfit/mathfit.js.map +1 -0
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report-types.js.map +1 -1
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js +52 -49
- package/dist/features/timeline/monthly-timeline/monthly-report/monthly-report.js.map +1 -1
- package/dist/features/trial-session/api/trial-home.js +16 -10
- package/dist/features/trial-session/api/trial-home.js.map +1 -1
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +50 -62
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js +14 -5
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +53 -55
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js +2 -3
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js.map +1 -1
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js +26 -27
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js +18 -19
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session.js +43 -34
- package/dist/features/trial-session/comps/learning-session/learning-session.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +58 -56
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +6 -29
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information.js +64 -74
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js +9 -10
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js +39 -40
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +37 -39
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js +20 -12
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights.js +63 -64
- package/dist/features/trial-session/comps/session-insights/session-insights.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js +13 -13
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js +4 -23
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview.js +20 -20
- package/dist/features/trial-session/comps/session-overview/session-overview.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js +16 -15
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +33 -35
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js +16 -9
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +37 -39
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js +9 -10
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info-styled.js +11 -26
- package/dist/features/trial-session/comps/student-info/student-info-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info.js +78 -124
- package/dist/features/trial-session/comps/student-info/student-info.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +12 -3
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js +33 -34
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +44 -45
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +8 -9
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js +19 -11
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +29 -31
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/comps/worksheet/worksheet.js +33 -35
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/context/trial-session-context.js +0 -2
- package/dist/features/trial-session/context/trial-session-context.js.map +1 -1
- package/dist/features/trial-session/helper.js +70 -73
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +158 -190
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/right-panel/right-panel-styled.js +8 -8
- package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
- package/dist/features/trial-session/right-panel/slide-components-map.js +36 -42
- package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
- package/dist/features/trial-session/trial-session-constants.js +18 -22
- package/dist/features/trial-session/trial-session-constants.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 +79 -87
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/trial-session/trial-session.js +57 -66
- package/dist/features/trial-session/trial-session.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +12 -12
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +0 -1
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +37 -38
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/index.d.ts +6 -8
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/features/trial-session/api/trial-session-report.js +0 -16
- package/dist/features/trial-session/api/trial-session-report.js.map +0 -1
- package/dist/features/trial-session/api/trial-topics.js +0 -9
- package/dist/features/trial-session/api/trial-topics.js.map +0 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js +0 -61
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js.map +0 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js +0 -5
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js.map +0 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js +0 -135
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js.map +0 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js +0 -53
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js.map +0 -1
- package/dist/features/trial-session/comps/student-info/student-info-constants.js +0 -35
- package/dist/features/trial-session/comps/student-info/student-info-constants.js.map +0 -1
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js +0 -12
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js.map +0 -1
- package/dist/features/trial-session/comps/topic-selection/topic-selection-helpers.js +0 -10
- package/dist/features/trial-session/comps/topic-selection/topic-selection-helpers.js.map +0 -1
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js +0 -42
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js.map +0 -1
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js +0 -67
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js.map +0 -1
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js +0 -21
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js.map +0 -1
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js +0 -99
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/activity.js +0 -6
- package/dist/features/worksheet/worksheet/mocks/activity.js.map +0 -1
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js +0 -5
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +0 -57
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +0 -263
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js +0 -177
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +0 -1
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +0 -268
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"homework-controls.js","sources":["../../../../src/features/cue-canvas/bottombar/homework-controls.tsx"],"sourcesContent":["import { memo, useCallback, useState, type FC } from 'react';\n\nimport CheckIcon from '../../../assets/line-icons/icons/check';\nimport ShareIcon from '../../../assets/line-icons/icons/share';\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { dataURIToBlob } from '../cue-canvas-helpers';\nimport { useCueCanvasActions } from '../hooks/use-cue-canvas-actions';\nimport type { IHomeWorkControllerProps } from './bottombar-types';\n\nconst HomeworkController: FC<IHomeWorkControllerProps> = props => {\n const { width, onSendImageToChat, onMarkAsResolved } = props;\n const { homeworkId, activeInstance, setHomeworkId } = useCueCanvasActions();\n const [isBusy, setIsBusy] = useState(false);\n\n const onSuccess = useCallback(() => {\n activeInstance?.clearCanvas();\n setHomeworkId(undefined);\n setIsBusy(false);\n }, [activeInstance, setHomeworkId]);\n\n const getBoardSnapshot = useCallback(async () => {\n if (!activeInstance) return;\n\n const snapshot = await activeInstance?.getCanvasAsImage();\n\n if (!snapshot) {\n return;\n }\n\n const blobdata = dataURIToBlob(snapshot);\n\n return [blobdata];\n }, [activeInstance]);\n\n const handleSendImageToChat = useCallback(async () => {\n const snapshot = await getBoardSnapshot();\n\n if (!homeworkId || !onSendImageToChat || !snapshot) return;\n\n onSendImageToChat?.(homeworkId, snapshot, onSuccess);\n }, [getBoardSnapshot, homeworkId, onSendImageToChat, onSuccess]);\n\n const handleMarkAsResolved = useCallback(() => {\n if (!homeworkId) return;\n setIsBusy(true);\n onMarkAsResolved?.(homeworkId, onSuccess);\n }, [homeworkId, onMarkAsResolved, onSuccess]);\n\n if (!homeworkId) return null;\n\n if (isBusy) {\n return (\n <FlexView\n $gapX={1}\n $gutterX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width={width}\n $background=\"YELLOW_1\"\n >\n <Text $renderAs=\"body3\" $color=\"BLACK\">\n Resolving....\n </Text>\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $gapX={1}\n $gutterX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width={width}\n $background=\"YELLOW_1\"\n >\n <Button\n label=\"Mark as reolved\"\n onClick={handleMarkAsResolved}\n renderAs={'primary'}\n Icon={CheckIcon}\n busy={isBusy}\n />\n <Separator width={16} />\n <Button\n label=\"Send CueBoard image to chat\"\n onClick={handleSendImageToChat}\n renderAs={'primary'}\n Icon={ShareIcon}\n />\n </FlexView>\n );\n};\n\nexport default memo(HomeworkController);\n"],"names":["HomeworkController","props","width","onSendImageToChat","onMarkAsResolved","homeworkId","activeInstance","setHomeworkId","useCueCanvasActions","isBusy","setIsBusy","useState","onSuccess","useCallback","getBoardSnapshot","snapshot","dataURIToBlob","handleSendImageToChat","handleMarkAsResolved","jsx","FlexView","Text","jsxs","Button","CheckIcon","Separator","ShareIcon","
|
|
1
|
+
{"version":3,"file":"homework-controls.js","sources":["../../../../src/features/cue-canvas/bottombar/homework-controls.tsx"],"sourcesContent":["import { memo, useCallback, useState, type FC } from 'react';\n\nimport CheckIcon from '../../../assets/line-icons/icons/check';\nimport ShareIcon from '../../../assets/line-icons/icons/share';\nimport Button from '../../ui/buttons/button/button';\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport { dataURIToBlob } from '../cue-canvas-helpers';\nimport { useCueCanvasActions } from '../hooks/use-cue-canvas-actions';\nimport type { IHomeWorkControllerProps } from './bottombar-types';\n\nconst HomeworkController: FC<IHomeWorkControllerProps> = props => {\n const { width, onSendImageToChat, onMarkAsResolved } = props;\n const { homeworkId, activeInstance, setHomeworkId } = useCueCanvasActions();\n const [isBusy, setIsBusy] = useState(false);\n\n const onSuccess = useCallback(() => {\n activeInstance?.clearCanvas();\n setHomeworkId(undefined);\n setIsBusy(false);\n }, [activeInstance, setHomeworkId]);\n\n const getBoardSnapshot = useCallback(async () => {\n if (!activeInstance) return;\n\n const snapshot = await activeInstance?.getCanvasAsImage();\n\n if (!snapshot) {\n return;\n }\n\n const blobdata = dataURIToBlob(snapshot);\n\n return [blobdata];\n }, [activeInstance]);\n\n const handleSendImageToChat = useCallback(async () => {\n const snapshot = await getBoardSnapshot();\n\n if (!homeworkId || !onSendImageToChat || !snapshot) return;\n\n onSendImageToChat?.(homeworkId, snapshot, onSuccess);\n }, [getBoardSnapshot, homeworkId, onSendImageToChat, onSuccess]);\n\n const handleMarkAsResolved = useCallback(() => {\n if (!homeworkId) return;\n setIsBusy(true);\n onMarkAsResolved?.(homeworkId, onSuccess);\n }, [homeworkId, onMarkAsResolved, onSuccess]);\n\n if (!homeworkId) return null;\n\n if (isBusy) {\n return (\n <FlexView\n $gapX={1}\n $gutterX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width={width}\n $background=\"YELLOW_1\"\n >\n <Text $renderAs=\"body3\" $color=\"BLACK\">\n Resolving....\n </Text>\n </FlexView>\n );\n }\n\n return (\n <FlexView\n $flexDirection=\"row\"\n $gapX={1}\n $gutterX={0.5}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width={width}\n $background=\"YELLOW_1\"\n >\n <Button\n label=\"Mark as reolved\"\n onClick={handleMarkAsResolved}\n renderAs={'primary'}\n Icon={CheckIcon}\n busy={isBusy}\n />\n <Separator width={16} />\n <Button\n label=\"Send CueBoard image to chat\"\n onClick={handleSendImageToChat}\n renderAs={'primary'}\n Icon={ShareIcon}\n />\n </FlexView>\n );\n};\n\nexport default memo(HomeworkController);\n"],"names":["HomeworkController","props","width","onSendImageToChat","onMarkAsResolved","homeworkId","activeInstance","setHomeworkId","useCueCanvasActions","isBusy","setIsBusy","useState","onSuccess","useCallback","getBoardSnapshot","snapshot","dataURIToBlob","handleSendImageToChat","handleMarkAsResolved","jsx","FlexView","Text","jsxs","Button","CheckIcon","Separator","ShareIcon","homeworkControls","memo"],"mappings":";;;;;;;;;;AAYA,MAAMA,IAAmD,CAASC,MAAA;AAChE,QAAM,EAAE,OAAAC,GAAO,mBAAAC,GAAmB,kBAAAC,EAAA,IAAqBH,GACjD,EAAE,YAAAI,GAAY,gBAAAC,GAAgB,eAAAC,MAAkBC,EAAoB,GACpE,CAACC,GAAQC,CAAS,IAAIC,EAAS,EAAK,GAEpCC,IAAYC,EAAY,MAAM;AAClC,IAAAP,KAAA,QAAAA,EAAgB,eAChBC,EAAc,MAAS,GACvBG,EAAU,EAAK;AAAA,EAAA,GACd,CAACJ,GAAgBC,CAAa,CAAC,GAE5BO,IAAmBD,EAAY,YAAY;AAC/C,QAAI,CAACP,EAAgB;AAEf,UAAAS,IAAW,OAAMT,KAAA,gBAAAA,EAAgB;AAEvC,WAAKS,IAME,CAFUC,EAAcD,CAAQ,CAEvB,IALd;AAAA,EAKc,GACf,CAACT,CAAc,CAAC,GAEbW,IAAwBJ,EAAY,YAAY;AAC9C,UAAAE,IAAW,MAAMD;AAEvB,IAAI,CAACT,KAAc,CAACF,KAAqB,CAACY,KAEtBZ,KAAA,QAAAA,EAAAE,GAAYU,GAAUH;AAAA,KACzC,CAACE,GAAkBT,GAAYF,GAAmBS,CAAS,CAAC,GAEzDM,IAAuBL,EAAY,MAAM;AAC7C,IAAKR,MACLK,EAAU,EAAI,GACdN,KAAA,QAAAA,EAAmBC,GAAYO;AAAA,EAC9B,GAAA,CAACP,GAAYD,GAAkBQ,CAAS,CAAC;AAExC,SAACP,IAEDI,IAEA,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAQlB;AAAA,MACR,aAAY;AAAA,MAEZ,4BAACmB,GAAK,EAAA,WAAU,SAAQ,QAAO,SAAQ,UAEvC,iBAAA;AAAA,IAAA;AAAA,EAAA,IAMJ,gBAAAC;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,OAAO;AAAA,MACP,UAAU;AAAA,MACV,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,QAAQlB;AAAA,MACR,aAAY;AAAA,MAEZ,UAAA;AAAA,QAAA,gBAAAiB;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,SAASL;AAAA,YACT,UAAU;AAAA,YACV,MAAMM;AAAA,YACN,MAAMf;AAAA,UAAA;AAAA,QACR;AAAA,QACA,gBAAAU,EAACM,GAAU,EAAA,OAAO,GAAI,CAAA;AAAA,QACtB,gBAAAN;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,OAAM;AAAA,YACN,SAASN;AAAA,YACT,UAAU;AAAA,YACV,MAAMS;AAAA,UAAA;AAAA,QACR;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,IA1CoB;AA6C1B,GAEeC,IAAAC,EAAK5B,CAAkB;"}
|
|
@@ -3,15 +3,15 @@ import { memo as p, useState as d, useMemo as f } from "react";
|
|
|
3
3
|
import c from "../../ui/layout/flex-view.js";
|
|
4
4
|
import o from "../../ui/separator/separator.js";
|
|
5
5
|
import l from "./homework/homework.js";
|
|
6
|
-
import
|
|
7
|
-
import { SideBarContainer as
|
|
6
|
+
import s from "./puzzles/puzzles.js";
|
|
7
|
+
import { SideBarContainer as u } from "./sidebar-styled.js";
|
|
8
8
|
import x from "./tiles/tile.js";
|
|
9
9
|
const S = ({ grade: m, hwRequests: t }) => {
|
|
10
10
|
const [r, i] = d(), a = f(() => r === "tile" ? "300px" : r === "homework" ? "248px" : r === "puzzle" ? "650px" : "auto", [r]);
|
|
11
|
-
return /* @__PURE__ */ e(
|
|
11
|
+
return /* @__PURE__ */ e(u, { $activeSidebar: r, $width: a, children: /* @__PURE__ */ n(c, { $flexDirection: "row", children: [
|
|
12
12
|
/* @__PURE__ */ e(x, { activeSidebar: r, setActiveSidebar: i }),
|
|
13
13
|
/* @__PURE__ */ e(o, { width: 8 }),
|
|
14
|
-
/* @__PURE__ */ e(
|
|
14
|
+
/* @__PURE__ */ e(s, { grade: m, activeSidebar: r, setActiveSidebar: i }),
|
|
15
15
|
/* @__PURE__ */ e(o, { width: 8 }),
|
|
16
16
|
t && t.length > 0 && /* @__PURE__ */ e(
|
|
17
17
|
l,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sidebar.js","sources":["../../../../src/features/cue-canvas/sidebar/sidebar.tsx"],"sourcesContent":["import { memo, useMemo, useState, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Homework from './homework/homework';\nimport type { IHomeWorkHelpRequestModelWithStudentName } from './homework/homework-types';\nimport Puzzles from './puzzles/puzzles';\nimport type { TActiveSidebar } from './puzzles/puzzles-type';\nimport { SideBarContainer } from './sidebar-styled';\nimport TileBar from './tiles/tile';\n\ninterface ISidebar {\n grade?: string;\n hwRequests?: IHomeWorkHelpRequestModelWithStudentName[];\n}\n\nconst Sidebar: FC<ISidebar> = ({ grade, hwRequests }) => {\n const [activeSidebar, setActiveSidebar] = useState<TActiveSidebar | undefined>();\n\n const width = useMemo(() => {\n if (activeSidebar === 'tile') {\n return '300px';\n }\n\n if (activeSidebar === 'homework') {\n return '248px';\n }\n\n if (activeSidebar === 'puzzle') {\n return '650px';\n }\n\n return 'auto';\n }, [activeSidebar]);\n\n return (\n <SideBarContainer $activeSidebar={activeSidebar} $width={width}>\n <FlexView $flexDirection=\"row\">\n <TileBar activeSidebar={activeSidebar} setActiveSidebar={setActiveSidebar} />\n <Separator width={8} />\n <Puzzles grade={grade} activeSidebar={activeSidebar} setActiveSidebar={setActiveSidebar} />\n <Separator width={8} />\n\n {hwRequests && hwRequests.length > 0 && (\n <Homework\n activeSidebar={activeSidebar}\n setActiveSidebar={setActiveSidebar}\n hwRequests={hwRequests}\n />\n )}\n </FlexView>\n </SideBarContainer>\n );\n};\n\nexport default memo(Sidebar);\n"],"names":["Sidebar","grade","hwRequests","activeSidebar","setActiveSidebar","useState","width","useMemo","jsx","SideBarContainer","jsxs","FlexView","TileBar","Separator","Puzzles","Homework","
|
|
1
|
+
{"version":3,"file":"sidebar.js","sources":["../../../../src/features/cue-canvas/sidebar/sidebar.tsx"],"sourcesContent":["import { memo, useMemo, useState, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Separator from '../../ui/separator/separator';\nimport Homework from './homework/homework';\nimport type { IHomeWorkHelpRequestModelWithStudentName } from './homework/homework-types';\nimport Puzzles from './puzzles/puzzles';\nimport type { TActiveSidebar } from './puzzles/puzzles-type';\nimport { SideBarContainer } from './sidebar-styled';\nimport TileBar from './tiles/tile';\n\ninterface ISidebar {\n grade?: string;\n hwRequests?: IHomeWorkHelpRequestModelWithStudentName[];\n}\n\nconst Sidebar: FC<ISidebar> = ({ grade, hwRequests }) => {\n const [activeSidebar, setActiveSidebar] = useState<TActiveSidebar | undefined>();\n\n const width = useMemo(() => {\n if (activeSidebar === 'tile') {\n return '300px';\n }\n\n if (activeSidebar === 'homework') {\n return '248px';\n }\n\n if (activeSidebar === 'puzzle') {\n return '650px';\n }\n\n return 'auto';\n }, [activeSidebar]);\n\n return (\n <SideBarContainer $activeSidebar={activeSidebar} $width={width}>\n <FlexView $flexDirection=\"row\">\n <TileBar activeSidebar={activeSidebar} setActiveSidebar={setActiveSidebar} />\n <Separator width={8} />\n <Puzzles grade={grade} activeSidebar={activeSidebar} setActiveSidebar={setActiveSidebar} />\n <Separator width={8} />\n\n {hwRequests && hwRequests.length > 0 && (\n <Homework\n activeSidebar={activeSidebar}\n setActiveSidebar={setActiveSidebar}\n hwRequests={hwRequests}\n />\n )}\n </FlexView>\n </SideBarContainer>\n );\n};\n\nexport default memo(Sidebar);\n"],"names":["Sidebar","grade","hwRequests","activeSidebar","setActiveSidebar","useState","width","useMemo","jsx","SideBarContainer","jsxs","FlexView","TileBar","Separator","Puzzles","Homework","sidebar","memo"],"mappings":";;;;;;;;AAgBA,MAAMA,IAAwB,CAAC,EAAE,OAAAC,GAAO,YAAAC,QAAiB;AACvD,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAqC,GAEzEC,IAAQC,EAAQ,MAChBJ,MAAkB,SACb,UAGLA,MAAkB,aACb,UAGLA,MAAkB,WACb,UAGF,QACN,CAACA,CAAa,CAAC;AAGhB,SAAA,gBAAAK,EAACC,KAAiB,gBAAgBN,GAAe,QAAQG,GACvD,UAAA,gBAAAI,EAACC,GAAS,EAAA,gBAAe,OACvB,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAQ,eAAAT,GAA8B,kBAAAC,EAAoC,CAAA;AAAA,IAC3E,gBAAAI,EAACK,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IACpB,gBAAAL,EAAAM,GAAA,EAAQ,OAAAb,GAAc,eAAAE,GAA8B,kBAAAC,EAAoC,CAAA;AAAA,IACzF,gBAAAI,EAACK,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,IAEpBX,KAAcA,EAAW,SAAS,KACjC,gBAAAM;AAAA,MAACO;AAAA,MAAA;AAAA,QACC,eAAAZ;AAAA,QACA,kBAAAC;AAAA,QACA,YAAAF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA,EAEJ,CAAA,EACF,CAAA;AAEJ,GAEec,IAAAC,EAAKjB,CAAO;"}
|
|
@@ -1,25 +1,21 @@
|
|
|
1
|
-
import { jsx as r, jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import { getUserTools as
|
|
5
|
-
import { useCueCanvasActions as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}) {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
o && (o.setColor(s), o.setTool(m));
|
|
17
|
-
}, [o]), e === "whiteboard" ? /* @__PURE__ */ r(x, { tools: i, userType: t, withGutter: a }) : /* @__PURE__ */ c(u, { $flexDirection: "row", $alignItems: "center", $justifyContent: "center", $flexGapX: 0.25, children: [
|
|
18
|
-
i.map((n) => /* @__PURE__ */ r(v, { tool: n, shouldAnimate: !0 }, n)),
|
|
19
|
-
/* @__PURE__ */ r(b, { userType: t, renderAs: "canvas" })
|
|
1
|
+
import { jsx as r, jsxs as s } from "react/jsx-runtime";
|
|
2
|
+
import { memo as c, useEffect as l } from "react";
|
|
3
|
+
import f from "../../ui/layout/flex-view.js";
|
|
4
|
+
import { getUserTools as u } from "../cue-canvas-helpers.js";
|
|
5
|
+
import { useCueCanvasActions as p } from "../hooks/use-cue-canvas-actions.js";
|
|
6
|
+
import C from "./color-picker-menu.js";
|
|
7
|
+
import b from "./tool.js";
|
|
8
|
+
import v from "./whiteboard-toolbar.js";
|
|
9
|
+
const x = c(function({ userType: t, renderAs: e }) {
|
|
10
|
+
const i = u(t, e), { activeInstance: o, activeTool: a, activeColor: m } = p();
|
|
11
|
+
return l(() => {
|
|
12
|
+
o && (o.setColor(m), o.setTool(a));
|
|
13
|
+
}, [o]), e === "whiteboard" ? /* @__PURE__ */ r(v, { tools: i, userType: t }) : /* @__PURE__ */ s(f, { $flexDirection: "row", $alignItems: "center", $justifyContent: "center", $flexGapX: 0.25, children: [
|
|
14
|
+
i.map((n) => /* @__PURE__ */ r(b, { tool: n, shouldAnimate: !0 }, n)),
|
|
15
|
+
/* @__PURE__ */ r(C, { userType: t, renderAs: "canvas" })
|
|
20
16
|
] });
|
|
21
|
-
}),
|
|
17
|
+
}), k = x;
|
|
22
18
|
export {
|
|
23
|
-
|
|
19
|
+
k as default
|
|
24
20
|
};
|
|
25
21
|
//# sourceMappingURL=toolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolbar.js","sources":["../../../../src/features/cue-canvas/toolbar/toolbar.tsx"],"sourcesContent":["import { memo, useEffect, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport { getUserTools } from '../cue-canvas-helpers';\nimport { useCueCanvasActions } from '../hooks/use-cue-canvas-actions';\nimport type { IToolbarProps } from '../types/toolbar';\nimport ColorPickerMenu from './color-picker-menu';\nimport Tool from './tool';\nimport WhiteboardToolbar from './whiteboard-toolbar';\n\nconst Toolbar: FC<IToolbarProps> = memo(function Toolbar({
|
|
1
|
+
{"version":3,"file":"toolbar.js","sources":["../../../../src/features/cue-canvas/toolbar/toolbar.tsx"],"sourcesContent":["import { memo, useEffect, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport { getUserTools } from '../cue-canvas-helpers';\nimport { useCueCanvasActions } from '../hooks/use-cue-canvas-actions';\nimport type { IToolbarProps } from '../types/toolbar';\nimport ColorPickerMenu from './color-picker-menu';\nimport Tool from './tool';\nimport WhiteboardToolbar from './whiteboard-toolbar';\n\nconst Toolbar: FC<IToolbarProps> = memo(function Toolbar({ userType, renderAs }) {\n const tools = getUserTools(userType, renderAs);\n const { activeInstance: cueCanvas, activeTool, activeColor } = useCueCanvasActions();\n\n // This effect ensures that the selected tool and color are applied to the cueCanvas instance\n // whenever it changes. For example, if a user selects a tool and color, then navigates to a\n // different question (causing a new cueCanvas instance), the same tool and color will be set\n // on the new instance.\n // Disabling the exhaustive-deps rule here because we want to run this effect only\n // when the cueCanvas instance is set, not on every tool & color change.\n useEffect(() => {\n if (cueCanvas) {\n cueCanvas.setColor(activeColor);\n\n cueCanvas.setTool(activeTool);\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [cueCanvas]);\n\n if (renderAs === 'whiteboard') {\n return <WhiteboardToolbar tools={tools} userType={userType} />;\n }\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"center\" $flexGapX={0.25}>\n {tools.map(tool => (\n <Tool tool={tool} key={tool} shouldAnimate />\n ))}\n <ColorPickerMenu userType={userType} renderAs=\"canvas\" />\n </FlexView>\n );\n});\n\nexport default Toolbar;\n"],"names":["Toolbar","memo","userType","renderAs","tools","getUserTools","cueCanvas","activeTool","activeColor","useCueCanvasActions","useEffect","jsx","WhiteboardToolbar","jsxs","FlexView","Tool","tool","ColorPickerMenu","Toolbar$1"],"mappings":";;;;;;;;AAUA,MAAMA,IAA6BC,EAAK,SAAiB,EAAE,UAAAC,GAAU,UAAAC,KAAY;AACzE,QAAAC,IAAQC,EAAaH,GAAUC,CAAQ,GACvC,EAAE,gBAAgBG,GAAW,YAAAC,GAAY,aAAAC,EAAA,IAAgBC;AAiB/D,SATAC,EAAU,MAAM;AACd,IAAIJ,MACFA,EAAU,SAASE,CAAW,GAE9BF,EAAU,QAAQC,CAAU;AAAA,EAC9B,GAEC,CAACD,CAAS,CAAC,GAEVH,MAAa,eACR,gBAAAQ,EAACC,GAAkB,EAAA,OAAAR,GAAc,UAAAF,EAAoB,CAAA,IAI5D,gBAAAW,EAACC,KAAS,gBAAe,OAAM,aAAY,UAAS,iBAAgB,UAAS,WAAW,MACrF,UAAA;AAAA,IAAMV,EAAA,IAAI,OACR,gBAAAO,EAAAI,GAAA,EAAK,MAAAC,GAAuB,eAAa,GAAA,GAAnBA,CAAoB,CAC5C;AAAA,IACA,gBAAAL,EAAAM,GAAA,EAAgB,UAAAf,GAAoB,UAAS,SAAS,CAAA;AAAA,EACzD,EAAA,CAAA;AAEJ,CAAC,GAEDgB,IAAelB;"}
|
|
@@ -1,30 +1,20 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import { jsxs as s, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { memo as a } from "react";
|
|
3
|
+
import l from "../../ui/layout/flex-view.js";
|
|
4
|
+
import c from "./color-picker-menu.js";
|
|
5
5
|
import i from "./tool.js";
|
|
6
|
-
const
|
|
6
|
+
const b = a(function({
|
|
7
7
|
tools: e,
|
|
8
|
-
userType: t
|
|
9
|
-
withGutter: m
|
|
8
|
+
userType: t
|
|
10
9
|
}) {
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */
|
|
13
|
-
|
|
14
|
-
{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
$position: "relative",
|
|
18
|
-
$flexGapX: m ? 0.25 : 0,
|
|
19
|
-
children: [
|
|
20
|
-
n.map((o) => /* @__PURE__ */ r(i, { tool: o, shouldAnimate: !0 }, o)),
|
|
21
|
-
/* @__PURE__ */ r(p, { userType: t, renderAs: "whiteboard" }),
|
|
22
|
-
s.map((o) => /* @__PURE__ */ r(i, { tool: o }, o))
|
|
23
|
-
]
|
|
24
|
-
}
|
|
25
|
-
);
|
|
10
|
+
const m = e.slice(0, 4), n = e.slice(4);
|
|
11
|
+
return /* @__PURE__ */ s(l, { $flexDirection: "row", $alignItems: "center", $position: "relative", $flexGapX: 0.25, children: [
|
|
12
|
+
m.map((o) => /* @__PURE__ */ r(i, { tool: o, shouldAnimate: !0 }, o)),
|
|
13
|
+
/* @__PURE__ */ r(c, { userType: t, renderAs: "whiteboard" }),
|
|
14
|
+
n.map((o) => /* @__PURE__ */ r(i, { tool: o }, o))
|
|
15
|
+
] });
|
|
26
16
|
});
|
|
27
17
|
export {
|
|
28
|
-
|
|
18
|
+
b as default
|
|
29
19
|
};
|
|
30
20
|
//# sourceMappingURL=whiteboard-toolbar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"whiteboard-toolbar.js","sources":["../../../../src/features/cue-canvas/toolbar/whiteboard-toolbar.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport type { IWhiteboardToolbar } from '../types/toolbar';\nimport ColorPickerMenu from './color-picker-menu';\nimport Tool from './tool';\n\nconst WhiteboardToolbar: FC<IWhiteboardToolbar> = memo(function WhiteboardToolbar({\n tools,\n userType,\n
|
|
1
|
+
{"version":3,"file":"whiteboard-toolbar.js","sources":["../../../../src/features/cue-canvas/toolbar/whiteboard-toolbar.tsx"],"sourcesContent":["import { memo, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport type { IWhiteboardToolbar } from '../types/toolbar';\nimport ColorPickerMenu from './color-picker-menu';\nimport Tool from './tool';\n\nconst WhiteboardToolbar: FC<IWhiteboardToolbar> = memo(function WhiteboardToolbar({\n tools,\n userType,\n}) {\n const writingTools = tools.slice(0, 4);\n const otherTools = tools.slice(4);\n\n return (\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $position=\"relative\" $flexGapX={0.25}>\n {writingTools.map(tool => (\n <Tool tool={tool} key={tool} shouldAnimate={true} />\n ))}\n <ColorPickerMenu userType={userType} renderAs=\"whiteboard\" />\n {otherTools.map(tool => (\n <Tool tool={tool} key={tool} />\n ))}\n </FlexView>\n );\n});\n\nexport default WhiteboardToolbar;\n"],"names":["WhiteboardToolbar","memo","tools","userType","writingTools","otherTools","jsxs","FlexView","jsx","Tool","tool","ColorPickerMenu"],"mappings":";;;;;AAOM,MAAAA,IAA4CC,EAAK,SAA2B;AAAA,EAChF,OAAAC;AAAA,EACA,UAAAC;AACF,GAAG;AACD,QAAMC,IAAeF,EAAM,MAAM,GAAG,CAAC,GAC/BG,IAAaH,EAAM,MAAM,CAAC;AAG9B,SAAA,gBAAAI,EAACC,KAAS,gBAAe,OAAM,aAAY,UAAS,WAAU,YAAW,WAAW,MACjF,UAAA;AAAA,IAAaH,EAAA,IAAI,OACf,gBAAAI,EAAAC,GAAA,EAAK,MAAAC,GAAuB,eAAe,GAAA,GAArBA,CAA2B,CACnD;AAAA,IACA,gBAAAF,EAAAG,GAAA,EAAgB,UAAAR,GAAoB,UAAS,aAAa,CAAA;AAAA,IAC1DE,EAAW,IAAI,CAAAK,wBACbD,GAAK,EAAA,MAAAC,KAAiBA,CAAM,CAC9B;AAAA,EACH,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var
|
|
1
|
+
var T = /* @__PURE__ */ ((E) => (E.COMPLETED = "COMPLETED", E.ACTIVE = "ACTIVE", E.LOCKED = "LOCKED", E))(T || {}), C = /* @__PURE__ */ ((E) => (E.CORRECT = "CORRECT", E.INCORRECT = "INCORRECT", E.SKIPPED = "SKIPPED", E.UNATTEMPTED = "UNATTEMPTED", E))(C || {}), R = /* @__PURE__ */ ((E) => (E.IN_PROGRESS = "IN_PROGRESS", E.COMPLETED = "COMPLETED", E.NOT_STARTED = "NOT_STARTED", E.EXPIRED = "EXPIRED", E))(R || {});
|
|
2
2
|
export {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
R as EMathFitTestState,
|
|
4
|
+
C as EQuestionState,
|
|
5
|
+
T as ESectionStatus
|
|
6
6
|
};
|
|
7
7
|
//# sourceMappingURL=math-fit-overview-types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-fit-overview-types.js","sources":["../../../../src/features/math-fit/math-fit-overview/math-fit-overview-types.ts"],"sourcesContent":["import type { INodeDataProps } from '../../chapters-v2/comps/node-card/node-card-types';\nimport { type TUserTypes } from '../../ui/types';\n\nexport enum ESectionStatus {\n COMPLETED = 'COMPLETED',\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n}\n\nexport enum EQuestionState {\n CORRECT = 'CORRECT',\n INCORRECT = 'INCORRECT',\n SKIPPED = 'SKIPPED',\n}\n\nexport enum EMathFitTestState {\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETED = 'COMPLETED',\n NOT_STARTED = 'NOT_STARTED',\n EXPIRED = 'EXPIRED',\n}\n\nexport interface ISectionData {\n id: string;\n title: string;\n status: ESectionStatus;\n questionsCount: number;\n timeInMinutes: number;\n sheetData: INodeDataProps;\n}\n\nexport interface IQuestionDetail {\n item_reference: string;\n state: EQuestionState;\n order: number;\n}\n\nexport interface IMiniGoalDetail {\n order: number;\n description: string;\n items: IQuestionDetail[];\n}\n\nexport interface IMathFitSection {\n id: string;\n section_number: number;\n score: number;\n previous_score: number;\n user_node_id: string;\n created_on: string;\n created_on_ts: number;\n updated_on: string;\n updated_on_ts: number;\n sheet: INodeDataProps;\n summary: {\n [goalId: string]: IMiniGoalDetail;\n };\n}\n\nexport interface IMathFitAssessmentResponse {\n id: string;\n user_id: string;\n state: EMathFitTestState;\n score: number;\n previous_score: number;\n created_on: string;\n created_on_ts: number;\n updated_on: string;\n updated_on_ts: number;\n sections: IMathFitSection[];\n}\n\nexport interface IMathFitOverviewProps {\n data: IMathFitAssessmentResponse;\n onResume: (sheetData: INodeDataProps, sectionId: string) => void;\n onDoLater: () => void;\n}\n\nexport interface IMathFitProps {\n mathfitTestId: string;\n userId: string;\n onResume: (sheetData: INodeDataProps, sectionId: string) => void;\n onReview: (sheetData: INodeDataProps, sectionId: string) => void;\n onDoLater: () => void;\n studentName: string;\n userType: TUserTypes;\n onAPIComplete?: (success: boolean) => void;\n}\n\nexport type TTimeUnit = 'minutes' | 'hours' | 'days';\n\nexport interface ITimeLeft {\n value: number;\n unit: TTimeUnit;\n}\n"],"names":["ESectionStatus","EQuestionState","EMathFitTestState"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,SAAS,UACTA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,YAAY,aACZA,EAAA,UAAU,
|
|
1
|
+
{"version":3,"file":"math-fit-overview-types.js","sources":["../../../../src/features/math-fit/math-fit-overview/math-fit-overview-types.ts"],"sourcesContent":["import type { INodeDataProps } from '../../chapters-v2/comps/node-card/node-card-types';\nimport { type TUserTypes } from '../../ui/types';\n\nexport enum ESectionStatus {\n COMPLETED = 'COMPLETED',\n ACTIVE = 'ACTIVE',\n LOCKED = 'LOCKED',\n}\n\nexport enum EQuestionState {\n CORRECT = 'CORRECT',\n INCORRECT = 'INCORRECT',\n SKIPPED = 'SKIPPED',\n UNATTEMPTED = 'UNATTEMPTED',\n}\n\nexport enum EMathFitTestState {\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETED = 'COMPLETED',\n NOT_STARTED = 'NOT_STARTED',\n EXPIRED = 'EXPIRED',\n}\n\nexport interface ISectionData {\n id: string;\n title: string;\n status: ESectionStatus;\n questionsCount: number;\n timeInMinutes: number;\n sheetData: INodeDataProps;\n}\n\nexport interface IQuestionDetail {\n item_reference: string;\n state: EQuestionState;\n order: number;\n}\n\nexport interface IMiniGoalDetail {\n order: number;\n description: string;\n items: IQuestionDetail[];\n}\n\nexport interface IMathFitSection {\n id: string;\n section_number: number;\n score: number;\n previous_score: number;\n user_node_id: string;\n created_on: string;\n created_on_ts: number;\n updated_on: string;\n updated_on_ts: number;\n sheet: INodeDataProps;\n summary: {\n [goalId: string]: IMiniGoalDetail;\n };\n}\n\nexport interface IMathFitAssessmentResponse {\n id: string;\n user_id: string;\n state: EMathFitTestState;\n score: number;\n previous_score: number;\n created_on: string;\n created_on_ts: number;\n updated_on: string;\n updated_on_ts: number;\n sections: IMathFitSection[];\n}\n\nexport interface IMathFitOverviewProps {\n data: IMathFitAssessmentResponse;\n onResume: (sheetData: INodeDataProps, sectionId: string) => void;\n onDoLater: () => void;\n}\n\nexport interface IMathFitProps {\n mathfitTestId: string;\n userId: string;\n onResume: (sheetData: INodeDataProps, sectionId: string) => void;\n onReview: (sheetData: INodeDataProps, sectionId: string) => void;\n onDoLater: () => void;\n studentName: string;\n userType: TUserTypes;\n onAPIComplete?: (success: boolean) => void;\n}\n\nexport type TTimeUnit = 'minutes' | 'hours' | 'days';\n\nexport interface ITimeLeft {\n value: number;\n unit: TTimeUnit;\n}\n"],"names":["ESectionStatus","EQuestionState","EMathFitTestState"],"mappings":"AAGY,IAAAA,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,SAAS,UACTA,EAAA,SAAS,UAHCA,IAAAA,KAAA,CAAA,CAAA,GAMAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,YAAY,aACZA,EAAA,UAAU,WACVA,EAAA,cAAc,eAJJA,IAAAA,KAAA,CAAA,CAAA,GAOAC,sBAAAA,OACVA,EAAA,cAAc,eACdA,EAAA,YAAY,aACZA,EAAA,cAAc,eACdA,EAAA,UAAU,WAJAA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,52 +1,53 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as _, useCallback as
|
|
2
|
+
import { memo as _, useCallback as E, Fragment as S } from "react";
|
|
3
3
|
import { useTheme as w } from "styled-components";
|
|
4
4
|
import B from "../../../../ui/buttons/button/button.js";
|
|
5
5
|
import r from "../../../../ui/layout/flex-view.js";
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { Divider as
|
|
9
|
-
import
|
|
10
|
-
import { getQuestionStatusBgColor as
|
|
11
|
-
import { EQuestionState as
|
|
12
|
-
import { IS_APP_RUNNING_IN_RN as
|
|
13
|
-
import { EDeviceType as
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
6
|
+
import m from "../../../../ui/text/text.js";
|
|
7
|
+
import N from "../score-badge/score-badge.js";
|
|
8
|
+
import { Divider as X } from "./score-section-styled.js";
|
|
9
|
+
import u from "../../../../ui/separator/separator.js";
|
|
10
|
+
import { getQuestionStatusBgColor as D } from "../../math-fit-report-helpers.js";
|
|
11
|
+
import { EQuestionState as b } from "../../../math-fit-overview/math-fit-overview-types.js";
|
|
12
|
+
import { IS_APP_RUNNING_IN_RN as G } from "../../../../../constants/app-config.js";
|
|
13
|
+
import { EDeviceType as L } from "../../../../ui/theme/constants.js";
|
|
14
|
+
const M = _(function({
|
|
15
|
+
isMonthlyReportPage: c,
|
|
16
|
+
onReviewSection: l,
|
|
17
|
+
section: a,
|
|
18
|
+
sheet: $
|
|
18
19
|
}) {
|
|
19
20
|
const {
|
|
20
21
|
title: g,
|
|
21
|
-
score:
|
|
22
|
-
scoreChange:
|
|
23
|
-
sessionId:
|
|
22
|
+
score: f,
|
|
23
|
+
scoreChange: I,
|
|
24
|
+
sessionId: p,
|
|
24
25
|
isIncomplete: o = !1,
|
|
25
|
-
sectionNumber:
|
|
26
|
-
topics:
|
|
27
|
-
} =
|
|
28
|
-
!o &&
|
|
29
|
-
}, [o,
|
|
26
|
+
sectionNumber: x,
|
|
27
|
+
topics: C
|
|
28
|
+
} = a, { device: A } = w(), s = A <= L.MOBILE, h = [...C ?? []].sort((i, d) => i.miniGoal.order - d.miniGoal.order), T = E(() => {
|
|
29
|
+
!o && a.sheet && l && l($, p);
|
|
30
|
+
}, [o, l, a.sheet, $, p]);
|
|
30
31
|
return /* @__PURE__ */ t(r, { children: [
|
|
31
32
|
/* @__PURE__ */ t(r, { $flexDirection: "row", $alignItems: "center", children: [
|
|
32
|
-
/* @__PURE__ */ t(
|
|
33
|
+
/* @__PURE__ */ t(m, { $renderAs: "ab2-bold", $color: "BLACK_1", children: [
|
|
33
34
|
g,
|
|
34
35
|
":"
|
|
35
36
|
] }),
|
|
36
|
-
/* @__PURE__ */ e(
|
|
37
|
-
o ? /* @__PURE__ */ e(r, { $gutter: 3, $gap: 2.5, $background: "BLACK_5", children: /* @__PURE__ */ e(
|
|
37
|
+
/* @__PURE__ */ e(u, { width: 4 }),
|
|
38
|
+
o ? /* @__PURE__ */ e(r, { $gutter: 3, $gap: 2.5, $background: "BLACK_5", children: /* @__PURE__ */ e(m, { $renderAs: "ab4-bold", $color: "WHITE", children: "INCOMPLETE" }) }) : f && /* @__PURE__ */ e(N, { score: f, maxScore: 10, scoreChange: I })
|
|
38
39
|
] }),
|
|
39
|
-
/* @__PURE__ */ e(r, { $flexRowGapX: 0.5, $gapX: 0.75, children:
|
|
40
|
+
/* @__PURE__ */ e(r, { $flexRowGapX: 0.5, $gapX: 0.75, children: h.map((i, d) => /* @__PURE__ */ t(S, { children: [
|
|
40
41
|
/* @__PURE__ */ t(
|
|
41
42
|
r,
|
|
42
43
|
{
|
|
43
|
-
$flexDirection: s ? "column" : "row",
|
|
44
|
+
$flexDirection: s || c ? "column" : "row",
|
|
44
45
|
$justifyContent: "space-between",
|
|
45
|
-
$alignItems: s ? "" : "center",
|
|
46
|
-
$flexRowGapX: s ? 0.5 : 0,
|
|
46
|
+
$alignItems: s || c ? "" : "center",
|
|
47
|
+
$flexRowGapX: s || c ? 0.5 : 0,
|
|
47
48
|
children: [
|
|
48
|
-
/* @__PURE__ */ e(
|
|
49
|
-
/* @__PURE__ */ e(r, { $flexGapX: 0.5, $flexDirection: "row", children: i.miniGoal.items.map((n) => /* @__PURE__ */ e(
|
|
49
|
+
/* @__PURE__ */ e(m, { $renderAs: "ub2", $color: o ? "BLACK_T_38" : "BLACK_1", children: i.name }),
|
|
50
|
+
/* @__PURE__ */ e(r, { $flexGapX: 0.5, $flexDirection: "row", $flexWrap: !0, children: i.miniGoal.items.map((n) => /* @__PURE__ */ e(
|
|
50
51
|
r,
|
|
51
52
|
{
|
|
52
53
|
$widthX: 1.25,
|
|
@@ -54,12 +55,12 @@ const z = _(function({
|
|
|
54
55
|
$alignItems: "center",
|
|
55
56
|
$justifyContent: "center",
|
|
56
57
|
$borderRadiusX: 2,
|
|
57
|
-
$background:
|
|
58
|
+
$background: D(n.state),
|
|
58
59
|
children: /* @__PURE__ */ e(
|
|
59
|
-
|
|
60
|
+
m,
|
|
60
61
|
{
|
|
61
62
|
$renderAs: "ub3",
|
|
62
|
-
$color: n.state ===
|
|
63
|
+
$color: n.state === b.SKIPPED || n.state === b.UNATTEMPTED ? "BLACK_T_38" : "WHITE",
|
|
63
64
|
children: n.order
|
|
64
65
|
}
|
|
65
66
|
)
|
|
@@ -69,17 +70,17 @@ const z = _(function({
|
|
|
69
70
|
]
|
|
70
71
|
}
|
|
71
72
|
),
|
|
72
|
-
|
|
73
|
+
d !== h.length - 1 && /* @__PURE__ */ e(X, {})
|
|
73
74
|
] }, i.name)) }),
|
|
74
|
-
!
|
|
75
|
-
/* @__PURE__ */ e(
|
|
75
|
+
!G && !c && /* @__PURE__ */ t(r, { $alignItems: "center", children: [
|
|
76
|
+
/* @__PURE__ */ e(u, { heightX: 0.75 }),
|
|
76
77
|
/* @__PURE__ */ e(
|
|
77
78
|
B,
|
|
78
79
|
{
|
|
79
|
-
label: `Review Section ${
|
|
80
|
+
label: `Review Section ${x}`,
|
|
80
81
|
renderAs: o ? "secondary" : "primary",
|
|
81
82
|
size: "small",
|
|
82
|
-
onClick:
|
|
83
|
+
onClick: T,
|
|
83
84
|
disabled: o
|
|
84
85
|
}
|
|
85
86
|
)
|
|
@@ -87,6 +88,6 @@ const z = _(function({
|
|
|
87
88
|
] });
|
|
88
89
|
});
|
|
89
90
|
export {
|
|
90
|
-
|
|
91
|
+
M as default
|
|
91
92
|
};
|
|
92
93
|
//# sourceMappingURL=score-section.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"score-section.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-section/score-section.tsx"],"sourcesContent":["import { Fragment, memo, useCallback, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport ScoreBadge from '../score-badge/score-badge';\nimport type { IScoreSectionProps } from './score-section-types';\nimport * as Styled from './score-section-styled';\nimport Separator from '../../../../ui/separator/separator';\nimport { getQuestionStatusBgColor } from '../../math-fit-report-helpers';\nimport { EQuestionState } from '../../../math-fit-overview/math-fit-overview-types';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../constants/app-config';\nimport { EDeviceType } from '../../../../ui/theme/constants';\n\nconst ScoreSection: FC<IScoreSectionProps> = memo(function ScoreSection({\n
|
|
1
|
+
{"version":3,"file":"score-section.js","sources":["../../../../../../src/features/math-fit/math-fit-report/comps/score-section/score-section.tsx"],"sourcesContent":["import { Fragment, memo, useCallback, type FC } from 'react';\nimport { useTheme } from 'styled-components';\n\nimport Button from '../../../../ui/buttons/button/button';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\nimport ScoreBadge from '../score-badge/score-badge';\nimport type { IScoreSectionProps } from './score-section-types';\nimport * as Styled from './score-section-styled';\nimport Separator from '../../../../ui/separator/separator';\nimport { getQuestionStatusBgColor } from '../../math-fit-report-helpers';\nimport { EQuestionState } from '../../../math-fit-overview/math-fit-overview-types';\nimport { IS_APP_RUNNING_IN_RN } from '../../../../../constants/app-config';\nimport { EDeviceType } from '../../../../ui/theme/constants';\n\nconst ScoreSection: FC<IScoreSectionProps> = memo(function ScoreSection({\n isMonthlyReportPage,\n onReviewSection,\n section,\n sheet,\n}) {\n const {\n title,\n score,\n scoreChange,\n sessionId,\n isIncomplete = false,\n sectionNumber,\n topics,\n } = section;\n\n const { device } = useTheme();\n const isMobile = device <= EDeviceType.MOBILE;\n\n const sortedTopics = [...(topics ?? [])].sort((a, b) => a.miniGoal.order - b.miniGoal.order);\n\n const onClickReview = useCallback(() => {\n if (!isIncomplete && section.sheet && onReviewSection) {\n onReviewSection(sheet, sessionId);\n }\n }, [isIncomplete, onReviewSection, section.sheet, sheet, sessionId]);\n\n return (\n <FlexView>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\">\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_1\">\n {title}:\n </Text>\n <Separator width={4} />\n {isIncomplete ? (\n <FlexView $gutter={3} $gap={2.5} $background=\"BLACK_5\">\n <Text $renderAs=\"ab4-bold\" $color=\"WHITE\">\n INCOMPLETE\n </Text>\n </FlexView>\n ) : (\n score && <ScoreBadge score={score} maxScore={10} scoreChange={scoreChange} />\n )}\n </FlexView>\n <FlexView $flexRowGapX={0.5} $gapX={0.75}>\n {sortedTopics.map((topic, index) => (\n <Fragment key={topic.name}>\n <FlexView\n $flexDirection={isMobile || isMonthlyReportPage ? 'column' : 'row'}\n $justifyContent=\"space-between\"\n $alignItems={isMobile || isMonthlyReportPage ? '' : 'center'}\n $flexRowGapX={isMobile || isMonthlyReportPage ? 0.5 : 0}\n >\n <Text $renderAs=\"ub2\" $color={isIncomplete ? 'BLACK_T_38' : 'BLACK_1'}>\n {topic.name}\n </Text>\n <FlexView $flexGapX={0.5} $flexDirection=\"row\" $flexWrap>\n {topic.miniGoal.items.map(question => (\n <FlexView\n key={question.item_reference}\n $widthX={1.25}\n $heightX={1.25}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $borderRadiusX={2}\n $background={getQuestionStatusBgColor(question.state)}\n >\n <Text\n $renderAs=\"ub3\"\n $color={\n question.state === EQuestionState.SKIPPED ||\n question.state === EQuestionState.UNATTEMPTED\n ? 'BLACK_T_38'\n : 'WHITE'\n }\n >\n {question.order}\n </Text>\n </FlexView>\n ))}\n </FlexView>\n </FlexView>\n {index !== sortedTopics.length - 1 && <Styled.Divider />}\n </Fragment>\n ))}\n </FlexView>\n {!IS_APP_RUNNING_IN_RN && !isMonthlyReportPage && (\n <FlexView $alignItems=\"center\">\n <Separator heightX={0.75} />\n <Button\n label={`Review Section ${sectionNumber}`}\n renderAs={isIncomplete ? 'secondary' : 'primary'}\n size=\"small\"\n onClick={onClickReview}\n disabled={isIncomplete}\n />\n </FlexView>\n )}\n </FlexView>\n );\n});\n\nexport default ScoreSection;\n"],"names":["ScoreSection","memo","isMonthlyReportPage","onReviewSection","section","sheet","title","score","scoreChange","sessionId","isIncomplete","sectionNumber","topics","device","useTheme","isMobile","EDeviceType","sortedTopics","a","b","onClickReview","useCallback","FlexView","jsxs","Text","jsx","Separator","ScoreBadge","topic","index","Fragment","question","getQuestionStatusBgColor","EQuestionState","Styled.Divider","IS_APP_RUNNING_IN_RN","Button"],"mappings":";;;;;;;;;;;;;AAeM,MAAAA,IAAuCC,EAAK,SAAsB;AAAA,EACtE,qBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AACF,GAAG;AACK,QAAA;AAAA,IACJ,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,eAAAC;AAAA,IACA,QAAAC;AAAA,EACE,IAAAR,GAEE,EAAE,QAAAS,MAAWC,KACbC,IAAWF,KAAUG,EAAY,QAEjCC,IAAe,CAAC,GAAIL,KAAU,CAAA,CAAG,EAAE,KAAK,CAACM,GAAGC,MAAMD,EAAE,SAAS,QAAQC,EAAE,SAAS,KAAK,GAErFC,IAAgBC,EAAY,MAAM;AACtC,IAAI,CAACX,KAAgBN,EAAQ,SAASD,KACpCA,EAAgBE,GAAOI,CAAS;AAAA,EAClC,GACC,CAACC,GAAcP,GAAiBC,EAAQ,OAAOC,GAAOI,CAAS,CAAC;AAEnE,2BACGa,GACC,EAAA,UAAA;AAAA,IAAA,gBAAAC,EAACD,GAAS,EAAA,gBAAe,OAAM,aAAY,UACzC,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAK,EAAA,WAAU,YAAW,QAAO,WAC/B,UAAA;AAAA,QAAAlB;AAAA,QAAM;AAAA,MAAA,GACT;AAAA,MACA,gBAAAmB,EAACC,GAAU,EAAA,OAAO,EAAG,CAAA;AAAA,MACpBhB,IACE,gBAAAe,EAAAH,GAAA,EAAS,SAAS,GAAG,MAAM,KAAK,aAAY,WAC3C,UAAA,gBAAAG,EAACD,GAAK,EAAA,WAAU,YAAW,QAAO,SAAQ,UAE1C,aAAA,CAAA,EACF,CAAA,IAEAjB,uBAAUoB,GAAW,EAAA,OAAApB,GAAc,UAAU,IAAI,aAAAC,EAA0B,CAAA;AAAA,IAAA,GAE/E;AAAA,IACC,gBAAAiB,EAAAH,GAAA,EAAS,cAAc,KAAK,OAAO,MACjC,UAAaL,EAAA,IAAI,CAACW,GAAOC,MACxB,gBAAAN,EAACO,GACC,EAAA,UAAA;AAAA,MAAA,gBAAAP;AAAA,QAACD;AAAA,QAAA;AAAA,UACC,gBAAgBP,KAAYb,IAAsB,WAAW;AAAA,UAC7D,iBAAgB;AAAA,UAChB,aAAaa,KAAYb,IAAsB,KAAK;AAAA,UACpD,cAAca,KAAYb,IAAsB,MAAM;AAAA,UAEtD,UAAA;AAAA,YAAC,gBAAAuB,EAAAD,GAAA,EAAK,WAAU,OAAM,QAAQd,IAAe,eAAe,WACzD,YAAM,KACT,CAAA;AAAA,YACC,gBAAAe,EAAAH,GAAA,EAAS,WAAW,KAAK,gBAAe,OAAM,WAAS,IACrD,UAAMM,EAAA,SAAS,MAAM,IAAI,CACxBG,MAAA,gBAAAN;AAAA,cAACH;AAAA,cAAA;AAAA,gBAEC,SAAS;AAAA,gBACT,UAAU;AAAA,gBACV,aAAY;AAAA,gBACZ,iBAAgB;AAAA,gBAChB,gBAAgB;AAAA,gBAChB,aAAaU,EAAyBD,EAAS,KAAK;AAAA,gBAEpD,UAAA,gBAAAN;AAAA,kBAACD;AAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,QACEO,EAAS,UAAUE,EAAe,WAClCF,EAAS,UAAUE,EAAe,cAC9B,eACA;AAAA,oBAGL,UAASF,EAAA;AAAA,kBAAA;AAAA,gBACZ;AAAA,cAAA;AAAA,cAlBKA,EAAS;AAAA,YAoBjB,CAAA,GACH;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,MACCF,MAAUZ,EAAa,SAAS,KAAM,gBAAAQ,EAAAS,GAAA,EAAe;AAAA,IApCzC,EAAA,GAAAN,EAAM,IAqCrB,CACD,GACH;AAAA,IACC,CAACO,KAAwB,CAACjC,KACxB,gBAAAqB,EAAAD,GAAA,EAAS,aAAY,UACpB,UAAA;AAAA,MAAC,gBAAAG,EAAAC,GAAA,EAAU,SAAS,KAAM,CAAA;AAAA,MAC1B,gBAAAD;AAAA,QAACW;AAAA,QAAA;AAAA,UACC,OAAO,kBAAkBzB,CAAa;AAAA,UACtC,UAAUD,IAAe,cAAc;AAAA,UACvC,MAAK;AAAA,UACL,SAASU;AAAA,UACT,UAAUV;AAAA,QAAA;AAAA,MACZ;AAAA,IAAA,GACF;AAAA,EAEJ,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,68 +1,85 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as g, useMemo as l } from "react";
|
|
3
3
|
import o from "../../ui/layout/flex-view.js";
|
|
4
|
-
import
|
|
5
|
-
import
|
|
4
|
+
import c from "../../ui/text/text.js";
|
|
5
|
+
import d from "./comps/report-header/report-header.js";
|
|
6
6
|
import f from "./comps/score-section/score-section.js";
|
|
7
|
-
import { transformSectionsToReportData as
|
|
8
|
-
const
|
|
7
|
+
import { transformSectionsToReportData as x, LEGEND_ITEMS as _, getQuestionStatusBgColor as b } from "./math-fit-report-helpers.js";
|
|
8
|
+
const C = g(function({
|
|
9
9
|
data: e,
|
|
10
|
-
onReview:
|
|
11
|
-
studentName:
|
|
12
|
-
userType:
|
|
13
|
-
onBack:
|
|
10
|
+
onReview: $,
|
|
11
|
+
studentName: m,
|
|
12
|
+
userType: a,
|
|
13
|
+
onBack: p,
|
|
14
|
+
isMonthlyReportPage: i
|
|
14
15
|
}) {
|
|
15
|
-
const
|
|
16
|
+
const s = l(() => x(e.sections), [e.sections]), u = l(() => {
|
|
16
17
|
if (e.previous_score && e.score)
|
|
17
18
|
return e.score - e.previous_score;
|
|
18
19
|
}, [e.score, e.previous_score]);
|
|
19
|
-
return /* @__PURE__ */ n(
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
o,
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
20
|
+
return /* @__PURE__ */ n(
|
|
21
|
+
o,
|
|
22
|
+
{
|
|
23
|
+
$flex: 1,
|
|
24
|
+
$background: "BLACK_T_04",
|
|
25
|
+
$borderColor: i ? "WHITE_5" : void 0,
|
|
26
|
+
children: [
|
|
27
|
+
/* @__PURE__ */ r(
|
|
28
|
+
d,
|
|
29
|
+
{
|
|
30
|
+
score: e.score ?? 0,
|
|
31
|
+
maxScore: 10,
|
|
32
|
+
scoreChange: u,
|
|
33
|
+
createdOnTs: e.created_on_ts,
|
|
34
|
+
studentName: m,
|
|
35
|
+
userType: a,
|
|
36
|
+
onBack: p
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
s.map((t, h) => /* @__PURE__ */ n(o, { $background: "WHITE", children: [
|
|
40
|
+
/* @__PURE__ */ r(o, { $gapX: 1.5, $gutterX: 1.25, children: /* @__PURE__ */ r(
|
|
41
|
+
f,
|
|
42
|
+
{
|
|
43
|
+
isMonthlyReportPage: !!i,
|
|
44
|
+
onReviewSection: $,
|
|
45
|
+
section: t,
|
|
46
|
+
sheet: t.sheet
|
|
47
|
+
}
|
|
48
|
+
) }),
|
|
49
|
+
h !== s.length - 1 && /* @__PURE__ */ r(o, { $height: 1, $background: "BLACK_T_08" })
|
|
50
|
+
] }, t.title)),
|
|
51
|
+
/* @__PURE__ */ n(o, { $gutterX: 1, $flexColumnGapX: 1, $gapX: 1, $flexRowGapX: 2, $alignItems: "center", children: [
|
|
52
|
+
/* @__PURE__ */ r(o, { $flexDirection: "row", $flexColumnGapX: 1, $alignItems: "center", children: _.map((t) => /* @__PURE__ */ n(
|
|
53
|
+
o,
|
|
54
|
+
{
|
|
55
|
+
$flexDirection: "row",
|
|
56
|
+
$flexColumnGapX: 0.25,
|
|
57
|
+
$alignItems: "center",
|
|
58
|
+
children: [
|
|
59
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3", $color: "BLACK_T_60", children: t.label }),
|
|
60
|
+
/* @__PURE__ */ r(
|
|
61
|
+
o,
|
|
62
|
+
{
|
|
63
|
+
$width: 10,
|
|
64
|
+
$height: 10,
|
|
65
|
+
$borderRadiusX: 1,
|
|
66
|
+
$background: b(t.state)
|
|
67
|
+
}
|
|
68
|
+
)
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
t.label
|
|
72
|
+
)) }),
|
|
73
|
+
!i && /* @__PURE__ */ n(o, { $flexRowGapX: 0.25, $marginBottomX: 0.5, $alignItems: "center", children: [
|
|
74
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3-bold", $color: "BLACK_1", $align: "center", children: "Keep Up the Great Work! 🚀" }),
|
|
75
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3", $color: "BLACK_1", $align: "center", children: "You’re getting stronger at MathFit each day. See you next month!" })
|
|
76
|
+
] })
|
|
77
|
+
] })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
}), I = C;
|
|
65
82
|
export {
|
|
66
|
-
|
|
83
|
+
I as default
|
|
67
84
|
};
|
|
68
85
|
//# sourceMappingURL=math-fit-report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-fit-report.js","sources":["../../../../src/features/math-fit/math-fit-report/math-fit-report.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport ReportHeader from './comps/report-header/report-header';\nimport ScoreSection from './comps/score-section/score-section';\nimport {\n getQuestionStatusBgColor,\n LEGEND_ITEMS,\n transformSectionsToReportData,\n} from './math-fit-report-helpers';\nimport type { IMathFitReportProps } from './math-fit-report-types';\n\nconst MathFitReport: FC<IMathFitReportProps> = memo(function MathFitReport({\n data,\n onReview,\n studentName,\n userType,\n onBack,\n}) {\n const sectionData = useMemo(() => transformSectionsToReportData(data.sections), [data.sections]);\n\n const scoreChange = useMemo(() => {\n if (data.previous_score && data.score) {\n return data.score - data.previous_score;\n }\n\n return undefined;\n }, [data.score, data.previous_score]);\n\n return (\n <FlexView
|
|
1
|
+
{"version":3,"file":"math-fit-report.js","sources":["../../../../src/features/math-fit/math-fit-report/math-fit-report.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport ReportHeader from './comps/report-header/report-header';\nimport ScoreSection from './comps/score-section/score-section';\nimport {\n getQuestionStatusBgColor,\n LEGEND_ITEMS,\n transformSectionsToReportData,\n} from './math-fit-report-helpers';\nimport type { IMathFitReportProps } from './math-fit-report-types';\n\nconst MathFitReport: FC<IMathFitReportProps> = memo(function MathFitReport({\n data,\n onReview,\n studentName,\n userType,\n onBack,\n isMonthlyReportPage,\n}) {\n const sectionData = useMemo(() => transformSectionsToReportData(data.sections), [data.sections]);\n\n const scoreChange = useMemo(() => {\n if (data.previous_score && data.score) {\n return data.score - data.previous_score;\n }\n\n return undefined;\n }, [data.score, data.previous_score]);\n\n return (\n <FlexView\n $flex={1}\n $background=\"BLACK_T_04\"\n $borderColor={isMonthlyReportPage ? 'WHITE_5' : undefined}\n >\n <ReportHeader\n score={data.score ?? 0}\n maxScore={10}\n scoreChange={scoreChange}\n createdOnTs={data.created_on_ts}\n studentName={studentName}\n userType={userType}\n onBack={onBack}\n />\n\n {sectionData.map((section, index) => (\n <FlexView key={section.title} $background=\"WHITE\">\n <FlexView $gapX={1.5} $gutterX={1.25}>\n <ScoreSection\n isMonthlyReportPage={!!isMonthlyReportPage}\n onReviewSection={onReview}\n section={section}\n sheet={section.sheet}\n />\n </FlexView>\n {index !== sectionData.length - 1 && <FlexView $height={1} $background=\"BLACK_T_08\" />}\n </FlexView>\n ))}\n\n <FlexView $gutterX={1} $flexColumnGapX={1} $gapX={1} $flexRowGapX={2} $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {LEGEND_ITEMS.map(item => (\n <FlexView\n key={item.label}\n $flexDirection=\"row\"\n $flexColumnGapX={0.25}\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {item.label}\n </Text>\n <FlexView\n $width={10}\n $height={10}\n $borderRadiusX={1}\n $background={getQuestionStatusBgColor(item.state)}\n />\n </FlexView>\n ))}\n </FlexView>\n {!isMonthlyReportPage && (\n <FlexView $flexRowGapX={0.25} $marginBottomX={0.5} $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\" $align=\"center\">\n Keep Up the Great Work! 🚀\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\" $align=\"center\">\n You’re getting stronger at MathFit each day. See you next month!\n </Text>\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default MathFitReport;\n"],"names":["MathFitReport","memo","data","onReview","studentName","userType","onBack","isMonthlyReportPage","sectionData","useMemo","transformSectionsToReportData","scoreChange","jsxs","FlexView","jsx","ReportHeader","section","index","ScoreSection","LEGEND_ITEMS","item","Text","getQuestionStatusBgColor","MathFitReport$1"],"mappings":";;;;;;;AAaA,MAAMA,IAAyCC,EAAK,SAAuB;AAAA,EACzE,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,qBAAAC;AACF,GAAG;AACK,QAAAC,IAAcC,EAAQ,MAAMC,EAA8BR,EAAK,QAAQ,GAAG,CAACA,EAAK,QAAQ,CAAC,GAEzFS,IAAcF,EAAQ,MAAM;AAC5B,QAAAP,EAAK,kBAAkBA,EAAK;AACvB,aAAAA,EAAK,QAAQA,EAAK;AAAA,KAI1B,CAACA,EAAK,OAAOA,EAAK,cAAc,CAAC;AAGlC,SAAA,gBAAAU;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAO;AAAA,MACP,aAAY;AAAA,MACZ,cAAcN,IAAsB,YAAY;AAAA,MAEhD,UAAA;AAAA,QAAA,gBAAAO;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,OAAOb,EAAK,SAAS;AAAA,YACrB,UAAU;AAAA,YACV,aAAAS;AAAA,YACA,aAAaT,EAAK;AAAA,YAClB,aAAAE;AAAA,YACA,UAAAC;AAAA,YACA,QAAAC;AAAA,UAAA;AAAA,QACF;AAAA,QAECE,EAAY,IAAI,CAACQ,GAASC,MACxB,gBAAAL,EAAAC,GAAA,EAA6B,aAAY,SACxC,UAAA;AAAA,UAAA,gBAAAC,EAACD,GAAS,EAAA,OAAO,KAAK,UAAU,MAC9B,UAAA,gBAAAC;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,qBAAqB,CAAC,CAACX;AAAA,cACvB,iBAAiBJ;AAAA,cACjB,SAAAa;AAAA,cACA,OAAOA,EAAQ;AAAA,YAAA;AAAA,UAAA,GAEnB;AAAA,UACCC,MAAUT,EAAY,SAAS,uBAAMK,GAAS,EAAA,SAAS,GAAG,aAAY,aAAa,CAAA;AAAA,QAAA,KATvEG,EAAQ,KAUvB,CACD;AAAA,QAED,gBAAAJ,EAACC,GAAS,EAAA,UAAU,GAAG,iBAAiB,GAAG,OAAO,GAAG,cAAc,GAAG,aAAY,UAChF,UAAA;AAAA,UAAC,gBAAAC,EAAAD,GAAA,EAAS,gBAAe,OAAM,iBAAiB,GAAG,aAAY,UAC5D,UAAaM,EAAA,IAAI,CAChBC,MAAA,gBAAAR;AAAA,YAACC;AAAA,YAAA;AAAA,cAEC,gBAAe;AAAA,cACf,iBAAiB;AAAA,cACjB,aAAY;AAAA,cAEZ,UAAA;AAAA,gBAAA,gBAAAC,EAACO,KAAK,WAAU,OAAM,QAAO,cAC1B,YAAK,OACR;AAAA,gBACA,gBAAAP;AAAA,kBAACD;AAAA,kBAAA;AAAA,oBACC,QAAQ;AAAA,oBACR,SAAS;AAAA,oBACT,gBAAgB;AAAA,oBAChB,aAAaS,EAAyBF,EAAK,KAAK;AAAA,kBAAA;AAAA,gBAClD;AAAA,cAAA;AAAA,YAAA;AAAA,YAbKA,EAAK;AAAA,UAeb,CAAA,GACH;AAAA,UACC,CAACb,KACC,gBAAAK,EAAAC,GAAA,EAAS,cAAc,MAAM,gBAAgB,KAAK,aAAY,UAC7D,UAAA;AAAA,YAAA,gBAAAC,EAACO,KAAK,WAAU,YAAW,QAAO,WAAU,QAAO,UAAS,UAE5D,6BAAA,CAAA;AAAA,YACA,gBAAAP,EAACO,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAAS,UAEvD,mEAAA,CAAA;AAAA,UAAA,GACF;AAAA,QAAA,GAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC,GAEDE,IAAevB;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"milestone-config.js","sources":["../../../../../src/features/milestone/create/api/milestone-config.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\nimport { stringify } from '../../../../helpers/query-string';\nimport type { IMilestoneConfig } from '../milestone-create-types';\n\nconst { useGet: useGetMileStoneConfig } = createGetAPI<\n IMilestoneConfig,\n { demo_type?:
|
|
1
|
+
{"version":3,"file":"milestone-config.js","sources":["../../../../../src/features/milestone/create/api/milestone-config.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\nimport { stringify } from '../../../../helpers/query-string';\nimport type { IMilestoneConfig } from '../milestone-create-types';\n\nconst { useGet: useGetMileStoneConfig } = createGetAPI<\n IMilestoneConfig,\n { demo_type?: 'TRIAL_V3' } | undefined\n>({\n getURL: (_, query) => `${BASE_URL_V3}/milestone/config/${query ? `?${stringify(query)}` : ''}`,\n});\n\nexport { useGetMileStoneConfig };\n"],"names":["useGetMileStoneConfig","createGetAPI","_","query","BASE_URL_V3","stringify"],"mappings":";;;AAMA,MAAM,EAAE,QAAQA,EAAsB,IAAIC,EAGxC;AAAA,EACA,QAAQ,CAACC,GAAGC,MAAU,GAAGC,CAAW,qBAAqBD,IAAQ,IAAIE,EAAUF,CAAK,CAAC,KAAK,EAAE;AAC9F,CAAC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as p, useCallback as f, useEffect as d } from "react";
|
|
3
|
-
import { useGetSessionReports as u } from "../../../trial-session/api/trial-
|
|
3
|
+
import { useGetSessionReports as u } from "../../../trial-session/api/trial-home.js";
|
|
4
4
|
import l from "../../../trial-session/comps/session-report/report-information/report-information.js";
|
|
5
5
|
import c from "../../../ui/error/error.js";
|
|
6
6
|
import h from "../../../ui/loader/app-loader/app-loader.js";
|