@cuemath/leap 3.3.10-j2 → 3.3.11-guru.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +4 -4
- package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +1 -1
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js +2 -2
- package/dist/features/auth/pla-signup/onboarding-guide/onboarding-guide.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/question-overview.js +19 -18
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/question-overview.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary-styled.js +7 -7
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary-styled.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary.js +26 -24
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/sat-sheet-summary.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/summary-module.js +15 -13
- package/dist/features/chapters/lpar-chapter/block-section/sat-sheet-item/sat-sheet-summary/summary-module.js.map +1 -1
- package/dist/features/chapters/lpar-chapter/constants/index.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +129 -69
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +24 -23
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/chapter-details.js +71 -68
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +36 -31
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -1
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test-styled.js +22 -0
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test-styled.js.map +1 -0
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test.js +151 -0
- package/dist/features/chapters-v2/comps/sat-mock-test/sat-mock-test.js.map +1 -0
- package/dist/features/chapters-v2/constants/block-constants.js +7 -5
- package/dist/features/chapters-v2/constants/block-constants.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +8 -2
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/chapters-v2/utils/sat-sheet-utils.js +12 -0
- package/dist/features/chapters-v2/utils/sat-sheet-utils.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +8 -4
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js +2 -2
- package/dist/features/parent-dashboard/comps/cuemath-app-features/cuemath-app-features.js.map +1 -1
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js +12 -12
- package/dist/features/parent-dashboard/comps/math-practice/math-practice.js.map +1 -1
- package/dist/features/sheets/constants/sheet.js +12 -4
- package/dist/features/sheets/constants/sheet.js.map +1 -1
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js +6 -6
- package/dist/features/trial-session/comps/pla/next-steps/next-steps.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-status/session-status.js.map +1 -1
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js +13 -13
- package/dist/features/trial-session/comps/pla/session-summary/summary-card/summary-card.js.map +1 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions-types.js.map +1 -1
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js +9 -9
- package/dist/features/trial-session/comps/pla/upcoming-sessions/upcoming-sessions.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js +38 -38
- package/dist/features/worksheet/worksheet/worksheet-behavior-helper.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +128 -126
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/index.d.ts +27 -27
- package/dist/index.js +146 -149
- package/dist/index.js.map +1 -1
- package/dist/node_modules/query-string/base.js +1 -1
- package/dist/node_modules/query-string/node_modules/decode-uri-component/index.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js +5 -0
- package/dist/node_modules/uuid/dist/esm-browser/regex.js.map +1 -0
- package/dist/node_modules/uuid/dist/esm-browser/rng.js +2 -3
- package/dist/node_modules/uuid/dist/esm-browser/rng.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js +10 -6
- package/dist/node_modules/uuid/dist/esm-browser/stringify.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/v4.js +9 -12
- package/dist/node_modules/uuid/dist/esm-browser/v4.js.map +1 -1
- package/dist/node_modules/uuid/dist/esm-browser/validate.js +8 -0
- package/dist/node_modules/uuid/dist/esm-browser/validate.js.map +1 -0
- package/package.json +2 -3
- package/dist/features/parent-dashboard/api/parent-home.js +0 -10
- package/dist/features/parent-dashboard/api/parent-home.js.map +0 -1
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js +0 -30
- package/dist/features/parent-dashboard/comps/compact-header/compact-header.js.map +0 -1
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js +0 -64
- package/dist/features/parent-dashboard/hooks/use-parent-home-data.js.map +0 -1
- package/dist/features/parent-dashboard/parent-dashboard-constants.js +0 -26
- package/dist/features/parent-dashboard/parent-dashboard-constants.js.map +0 -1
- package/dist/features/parent-dashboard/parent-dashboard-styled.js +0 -33
- package/dist/features/parent-dashboard/parent-dashboard-styled.js.map +0 -1
- package/dist/features/parent-dashboard/parent-dashboard-view.js +0 -203
- package/dist/features/parent-dashboard/parent-dashboard-view.js.map +0 -1
- package/dist/features/parent-dashboard/parent-dashboard.js +0 -8
- package/dist/features/parent-dashboard/parent-dashboard.js.map +0 -1
- package/dist/node_modules/decode-uri-component/index.js.map +0 -1
- package/dist/node_modules/uuid/dist/esm-browser/native.js +0 -7
- package/dist/node_modules/uuid/dist/esm-browser/native.js.map +0 -1
- /package/dist/node_modules/{decode-uri-component → query-string/node_modules/decode-uri-component}/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n } = props;\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n const { blockSectionRef, startJourney: startChallengeArenaJourney } = useChallengeArenaJourney();\n\n useEffect(() => {\n if (chapterDetails && canStartJourney && !isJourneyActive && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (chapterDetails && !canStartJourney && canStartChallengeArenaJourney && !isJourneyActive) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n studentId,\n userChapterId,\n userType,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"
|
|
1
|
+
{"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n } = props;\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n const { blockSectionRef, startJourney: startChallengeArenaJourney } = useChallengeArenaJourney();\n\n useEffect(() => {\n if (chapterDetails && canStartJourney && !isJourneyActive && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (chapterDetails && !canStartJourney && canStartChallengeArenaJourney && !isJourneyActive) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n studentId,\n userChapterId,\n userType,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n blockSectionRef={blockSectionRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","startChapterPageJourney","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","blockSectionRef","startChallengeArenaJourney","useChallengeArenaJourney","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;;AAmBA,MAAMA,IAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;A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,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAS;AAAA,cACA,iBAAAc;AAAA,cACA,gBAAArB;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,cAAAE;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDoC,KAAetD;"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
1
|
import t from "styled-components";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
2
|
+
import s from "../../../../assets/line-icons/icons/important.js";
|
|
3
|
+
import d from "../../../../assets/line-icons/icons/lock2.js";
|
|
4
4
|
import e from "../../../ui/layout/flex-view.js";
|
|
5
|
-
import
|
|
6
|
-
const
|
|
7
|
-
|
|
5
|
+
import c from "../../../ui/text/text.js";
|
|
6
|
+
const h = t(e)(({
|
|
7
|
+
theme: o,
|
|
8
|
+
$disabled: r,
|
|
9
|
+
$minWidth: n
|
|
10
|
+
}) => {
|
|
11
|
+
const { BLACK: p, BLACK_T_15: i, WHITE_5: a } = o.colors;
|
|
8
12
|
return `
|
|
13
|
+
${n ? `min-width: ${n}px;` : ""}
|
|
9
14
|
cursor: ${r ? "not-allowed" : "pointer"};
|
|
10
15
|
position: relative;
|
|
11
|
-
border-image: linear-gradient(to right, ${
|
|
12
|
-
outline: 1px solid ${
|
|
16
|
+
border-image: linear-gradient(to right, ${i} 0%, ${i} 100%);
|
|
17
|
+
outline: 1px solid ${a};
|
|
13
18
|
|
|
14
19
|
.node-card-border {
|
|
15
20
|
position: absolute;
|
|
@@ -24,11 +29,11 @@ const b = t(e)(({ theme: o, $disabled: r }) => {
|
|
|
24
29
|
|
|
25
30
|
&:hover {
|
|
26
31
|
${!r && `
|
|
27
|
-
outline: 1px solid ${
|
|
32
|
+
outline: 1px solid ${p};
|
|
28
33
|
`}
|
|
29
34
|
}
|
|
30
35
|
`;
|
|
31
|
-
}),
|
|
36
|
+
}), m = t(s)(({ theme: o }) => {
|
|
32
37
|
const { layout: r } = o;
|
|
33
38
|
return `
|
|
34
39
|
width: ${r.gutter * 0.75}px;
|
|
@@ -37,54 +42,54 @@ const b = t(e)(({ theme: o, $disabled: r }) => {
|
|
|
37
42
|
top: -2.5px;
|
|
38
43
|
right: -2.5px;
|
|
39
44
|
`;
|
|
40
|
-
}),
|
|
45
|
+
}), f = t(e)(({ $bgImage: o }) => `
|
|
41
46
|
background-image: url(${o});
|
|
42
47
|
|
|
43
48
|
& .context-menu {
|
|
44
49
|
justify-self: flex-end;
|
|
45
50
|
margin-left: auto;
|
|
46
51
|
}
|
|
47
|
-
`),
|
|
52
|
+
`), $ = t(e)`
|
|
48
53
|
border-radius: 50%;
|
|
49
|
-
`,
|
|
54
|
+
`, I = t(e)(() => `
|
|
50
55
|
position: relative;
|
|
51
56
|
padding: 12px 8px 12px 12px;
|
|
52
|
-
`),
|
|
57
|
+
`), w = t(e)(({ $top: o, $right: r }) => `
|
|
53
58
|
position: absolute;
|
|
54
59
|
top: ${o ?? 0}px;
|
|
55
60
|
right: ${r ?? 0}px;
|
|
56
61
|
z-index: 3;
|
|
57
62
|
`);
|
|
58
|
-
t(
|
|
63
|
+
t(d)(({}) => `
|
|
59
64
|
width: 28px;
|
|
60
65
|
height: 28px;
|
|
61
66
|
`);
|
|
62
67
|
const W = t(e)(({
|
|
63
68
|
theme: o,
|
|
64
69
|
$paddingRight: r,
|
|
65
|
-
$paddingLeft:
|
|
70
|
+
$paddingLeft: n
|
|
66
71
|
}) => {
|
|
67
|
-
const { BLACK_1:
|
|
72
|
+
const { BLACK_1: p, WHITE_1: i } = o.colors;
|
|
68
73
|
return `
|
|
69
74
|
position: absolute;
|
|
70
75
|
top: -10px;
|
|
71
76
|
right: -10px;
|
|
72
77
|
padding: 0px;
|
|
73
|
-
padding-left: ${
|
|
78
|
+
padding-left: ${n}px;
|
|
74
79
|
padding-right: ${r}px;
|
|
75
|
-
background: ${
|
|
80
|
+
background: ${p};
|
|
76
81
|
|
|
77
82
|
path {
|
|
78
|
-
fill: ${
|
|
83
|
+
fill: ${i};
|
|
79
84
|
}
|
|
80
85
|
`;
|
|
81
|
-
}),
|
|
86
|
+
}), k = t(c)(() => `
|
|
82
87
|
display: -webkit-box;
|
|
83
88
|
-webkit-box-orient: vertical;
|
|
84
89
|
-webkit-line-clamp: 2;
|
|
85
90
|
text-overflow: ellipsis;
|
|
86
91
|
overflow: hidden;
|
|
87
|
-
`),
|
|
92
|
+
`), C = t(e)(({ theme: o }) => `
|
|
88
93
|
cursor: pointer;
|
|
89
94
|
padding: 4px;
|
|
90
95
|
|
|
@@ -92,7 +97,7 @@ const W = t(e)(({
|
|
|
92
97
|
border-radius: 50%;
|
|
93
98
|
background: ${o.colors.WHITE_5};
|
|
94
99
|
}
|
|
95
|
-
`),
|
|
100
|
+
`), v = t(e)(({ theme: o, $visible: r }) => `
|
|
96
101
|
cursor: pointer;
|
|
97
102
|
|
|
98
103
|
position: absolute;
|
|
@@ -111,15 +116,15 @@ const W = t(e)(({
|
|
|
111
116
|
}
|
|
112
117
|
`);
|
|
113
118
|
export {
|
|
114
|
-
|
|
119
|
+
$ as IconWrapper,
|
|
115
120
|
W as InProgressIconWrapper,
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
h as NodeCardContainer,
|
|
122
|
+
I as NodeCardContentWrapper,
|
|
123
|
+
f as NodeCardInfoWrapper,
|
|
124
|
+
k as NodeCardTitle,
|
|
125
|
+
C as NodeKebabMenuWrapper,
|
|
126
|
+
v as NodeMenuOptionsWrapper,
|
|
127
|
+
w as SheetTagWrapper,
|
|
128
|
+
m as StyledImportantIcon
|
|
124
129
|
};
|
|
125
130
|
//# sourceMappingURL=node-card-styled.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"node-card-styled.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ImportantIcon from '../../../../assets/line-icons/icons/important';\nimport Lock2Icon from '../../../../assets/line-icons/icons/lock2';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface INodeCardContainer {\n $disabled: boolean;\n $isSheetLocked?: boolean;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({
|
|
1
|
+
{"version":3,"file":"node-card-styled.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport ImportantIcon from '../../../../assets/line-icons/icons/important';\nimport Lock2Icon from '../../../../assets/line-icons/icons/lock2';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface INodeCardContainer {\n $disabled: boolean;\n $isSheetLocked?: boolean;\n $minWidth?: number;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({\n theme,\n $disabled,\n $minWidth,\n}) => {\n const { BLACK, BLACK_T_15, WHITE_5 } = theme.colors;\n\n return `\n ${$minWidth ? `min-width: ${$minWidth}px;` : ''}\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n position: relative;\n border-image: linear-gradient(to right, ${BLACK_T_15} 0%, ${BLACK_T_15} 100%);\n outline: 1px solid ${WHITE_5};\n\n .node-card-border {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 2;\n width: 100%;\n height: 100%;\n pointer-events: none;\n background: transparent;\n }\n\n &:hover {\n ${\n !$disabled &&\n `\n outline: 1px solid ${BLACK};\n `\n } \n }\n `;\n});\n\nconst StyledImportantIcon = styled(ImportantIcon)(({ theme }) => {\n const { layout } = theme;\n\n return `\n width: ${layout.gutter * 0.75}px;\n height: ${layout.gutter * 0.75}px;\n position: absolute;\n top: -2.5px;\n right: -2.5px;\n `;\n});\n\ninterface INodeCardInfoWrapper {\n $bgImage: string;\n}\n\nconst NodeCardInfoWrapper = styled(FlexView)<INodeCardInfoWrapper>(({ $bgImage }) => {\n return `\n background-image: url(${$bgImage});\n\n & .context-menu {\n justify-self: flex-end;\n margin-left: auto;\n }\n `;\n});\n\nconst IconWrapper = styled(FlexView)`\n border-radius: 50%;\n`;\n\nconst NodeCardContentWrapper = styled(FlexView)(() => {\n return `\n position: relative;\n padding: 12px 8px 12px 12px;\n `;\n});\n\ninterface ISheetTagWrapper {\n $top?: number;\n $right?: number;\n}\n\nconst SheetTagWrapper = styled(FlexView)<ISheetTagWrapper>(({ $top, $right }) => {\n return `\n position: absolute;\n top: ${$top ?? 0}px;\n right: ${$right ?? 0}px;\n z-index: 3;\n`;\n});\n\nconst StyledLockIcon = styled(Lock2Icon)(({}) => {\n return `\n width: 28px;\n height: 28px;\n `;\n});\n\nconst InProgressIconWrapper = styled(FlexView)<{ $paddingRight: number; $paddingLeft: number }>(({\n theme,\n $paddingRight,\n $paddingLeft,\n}) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n right: -10px;\n padding: 0px;\n padding-left: ${$paddingLeft}px;\n padding-right: ${$paddingRight}px;\n background: ${BLACK_1};\n\n path {\n fill: ${WHITE_1};\n }\n `;\n});\n\nconst NodeCardTitle = styled(Text)(() => {\n return `\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n `;\n});\n\nconst NodeKebabMenuWrapper = styled(FlexView)(({ theme }) => {\n return `\n cursor: pointer;\n padding: 4px;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\ninterface INodeOptionsMenuWrapper {\n $visible: boolean;\n}\n\nconst NodeMenuOptionsWrapper = styled(FlexView)<INodeOptionsMenuWrapper>(({ theme, $visible }) => {\n return `\n cursor: pointer;\n\n position: absolute;\n z-index: 6;\n top: calc(100% + 4px);\n left: 0;\n\n transform-origin: top;\n transform: scaleY(${$visible ? 1 : 0});\n opacity: ${$visible ? 1 : 0};\n transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;\n \n &:hover {\n border-radius: 50%;\n background: ${theme.colors.WHITE_5}; \n }\n `;\n});\n\nexport {\n NodeCardContainer,\n StyledImportantIcon,\n NodeCardInfoWrapper,\n IconWrapper,\n NodeCardContentWrapper,\n SheetTagWrapper,\n StyledLockIcon,\n InProgressIconWrapper,\n NodeCardTitle,\n NodeKebabMenuWrapper,\n NodeMenuOptionsWrapper,\n};\n"],"names":["NodeCardContainer","styled","FlexView","theme","$disabled","$minWidth","BLACK","BLACK_T_15","WHITE_5","StyledImportantIcon","ImportantIcon","layout","NodeCardInfoWrapper","$bgImage","IconWrapper","NodeCardContentWrapper","SheetTagWrapper","$top","$right","Lock2Icon","InProgressIconWrapper","$paddingRight","$paddingLeft","BLACK_1","WHITE_1","NodeCardTitle","Text","NodeKebabMenuWrapper","NodeMenuOptionsWrapper","$visible"],"mappings":";;;;;AAaA,MAAMA,IAAoBC,EAAOC,CAAQ,EAAsB,CAAC;AAAA,EAC9D,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AACF,MAAM;AACJ,QAAM,EAAE,OAAAC,GAAO,YAAAC,GAAY,SAAAC,EAAA,IAAYL,EAAM;AAEtC,SAAA;AAAA,MACHE,IAAY,cAAcA,CAAS,QAAQ,EAAE;AAAA,cACrCD,IAAY,gBAAgB,SAAS;AAAA;AAAA,8CAELG,CAAU,QAAQA,CAAU;AAAA,yBACjDC,CAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAexB,CAACJ,KACD;AAAA,+BACuBE,CAAK;AAAA,SAE9B;AAAA;AAAA;AAGN,CAAC,GAEKG,IAAsBR,EAAOS,CAAa,EAAE,CAAC,EAAE,OAAAP,QAAY;AACzD,QAAA,EAAE,QAAAQ,EAAW,IAAAR;AAEZ,SAAA;AAAA,aACIQ,EAAO,SAAS,IAAI;AAAA,cACnB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AAAA,eACzBA,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKX1B,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import t from "styled-components";
|
|
2
|
+
import e from "../../../ui/layout/flex-view.js";
|
|
3
|
+
import i from "../../../ui/text/text.js";
|
|
4
|
+
const n = t(e)`
|
|
5
|
+
& div {
|
|
6
|
+
line-height: 1;
|
|
7
|
+
}
|
|
8
|
+
`, p = t(i)`
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
gap: 4px;
|
|
12
|
+
|
|
13
|
+
& span:last-child {
|
|
14
|
+
font-family: 'UntitledSans-Regular';
|
|
15
|
+
font-weight: 400;
|
|
16
|
+
}
|
|
17
|
+
`;
|
|
18
|
+
export {
|
|
19
|
+
n as ScoreTextWrapper,
|
|
20
|
+
p as StyledText
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=sat-mock-test-styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sat-mock-test-styled.js","sources":["../../../../../src/features/chapters-v2/comps/sat-mock-test/sat-mock-test-styled.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nconst ScoreTextWrapper = styled(FlexView)`\n & div {\n line-height: 1;\n }\n`;\n\nconst StyledText = styled(Text)`\n display: flex;\n align-items: center;\n gap: 4px;\n\n & span:last-child {\n font-family: 'UntitledSans-Regular';\n font-weight: 400;\n }\n`;\n\nexport { ScoreTextWrapper, StyledText };\n"],"names":["ScoreTextWrapper","styled","FlexView","StyledText","Text"],"mappings":";;;AAKM,MAAAA,IAAmBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMlCC,IAAaF,EAAOG,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;"}
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
import { jsxs as e, jsx as t, Fragment as b } from "react/jsx-runtime";
|
|
2
|
+
import { memo as N, useRef as R, useMemo as m, useCallback as h } from "react";
|
|
3
|
+
import X from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
|
4
|
+
import A from "../../../ui/layout/flex-view.js";
|
|
5
|
+
import j from "../../../ui/lottie-animation/lottie-animation.js";
|
|
6
|
+
import c from "../../../ui/text/text.js";
|
|
7
|
+
import { NodeCardContainer as G, NodeCardInfoWrapper as q, IconWrapper as F, StyledImportantIcon as H } from "../node-card/node-card-styled.js";
|
|
8
|
+
import { BLOCK_STATES as C } from "../../constants/block-constants.js";
|
|
9
|
+
import { getNodeTypeBasedBgImage as P } from "../../utils/index.js";
|
|
10
|
+
import { getNodeCardBasedIcon as z } from "../../utils/node-card-utils.js";
|
|
11
|
+
import { getSatSheetQuestionsCount as Q, getActiveSATSheet as U } from "../../utils/sat-sheet-utils.js";
|
|
12
|
+
import V from "../node-card/node-card-tags.js";
|
|
13
|
+
import { ScoreTextWrapper as J, StyledText as _ } from "./sat-mock-test-styled.js";
|
|
14
|
+
const Y = { renderer: "canvas", autoplay: !1 }, he = N((x) => {
|
|
15
|
+
const {
|
|
16
|
+
userType: p,
|
|
17
|
+
imageHue: k,
|
|
18
|
+
sheets: i,
|
|
19
|
+
blockStats: I,
|
|
20
|
+
blockState: n,
|
|
21
|
+
blockStatement: $,
|
|
22
|
+
blockPermissions: L,
|
|
23
|
+
onNodeAttempt: a,
|
|
24
|
+
onNodeReview: s
|
|
25
|
+
} = x, d = R(null), u = m(() => p === "STUDENT", [p]), { can_resume: f, can_review: g, can_start: T } = L, o = m(() => n === C.LOCKED, [n]), S = m(() => n === C.COMPLETED, [n]), { sat_max_score: w, sat_total_score: B } = I || {}, M = i[0], { node_type: l } = M, y = P(l), { lottie: v } = z(l), { readingWriting: E, math: W } = Q(i), D = h(() => {
|
|
26
|
+
var r;
|
|
27
|
+
o || (r = d.current) == null || r.play();
|
|
28
|
+
}, [o]), K = h(() => {
|
|
29
|
+
var r;
|
|
30
|
+
(r = d.current) == null || r.stop();
|
|
31
|
+
}, []), O = h(() => {
|
|
32
|
+
if (o)
|
|
33
|
+
return;
|
|
34
|
+
const r = U(i);
|
|
35
|
+
if (!r)
|
|
36
|
+
throw new Error("Active SAT sheet is not available");
|
|
37
|
+
if (u && (T || f)) {
|
|
38
|
+
a == null || a(r);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
g && (s == null || s(r));
|
|
42
|
+
}, [
|
|
43
|
+
f,
|
|
44
|
+
g,
|
|
45
|
+
T,
|
|
46
|
+
o,
|
|
47
|
+
u,
|
|
48
|
+
a,
|
|
49
|
+
s,
|
|
50
|
+
i
|
|
51
|
+
]);
|
|
52
|
+
return /* @__PURE__ */ e(A, { $flexDirection: "row", $flexGapX: 1.5, $alignItems: "center", children: [
|
|
53
|
+
/* @__PURE__ */ t(
|
|
54
|
+
G,
|
|
55
|
+
{
|
|
56
|
+
$minWidth: 180,
|
|
57
|
+
$background: `${k}_2`,
|
|
58
|
+
$disabled: o,
|
|
59
|
+
onClick: O,
|
|
60
|
+
children: /* @__PURE__ */ e(
|
|
61
|
+
X,
|
|
62
|
+
{
|
|
63
|
+
renderAs: "primary",
|
|
64
|
+
position: "bottom",
|
|
65
|
+
tooltipItem: $,
|
|
66
|
+
zIndex: 5,
|
|
67
|
+
hidden: !$,
|
|
68
|
+
parentWidth: "100%",
|
|
69
|
+
widthX: 11.25,
|
|
70
|
+
children: [
|
|
71
|
+
/* @__PURE__ */ e(
|
|
72
|
+
q,
|
|
73
|
+
{
|
|
74
|
+
$flexDirection: "row",
|
|
75
|
+
$alignItems: "center",
|
|
76
|
+
$width: "100%",
|
|
77
|
+
$heightX: 3.5,
|
|
78
|
+
$bgImage: y,
|
|
79
|
+
$gutterX: 0.78125,
|
|
80
|
+
$flexGap: 8.5,
|
|
81
|
+
$opacity: o ? 0.5 : 1,
|
|
82
|
+
onMouseEnter: D,
|
|
83
|
+
onMouseLeave: K,
|
|
84
|
+
children: [
|
|
85
|
+
/* @__PURE__ */ e(
|
|
86
|
+
F,
|
|
87
|
+
{
|
|
88
|
+
$width: 31,
|
|
89
|
+
$height: 31,
|
|
90
|
+
$background: "WHITE_1",
|
|
91
|
+
$position: "relative",
|
|
92
|
+
$alignItems: "center",
|
|
93
|
+
$justifyContent: "center",
|
|
94
|
+
children: [
|
|
95
|
+
/* @__PURE__ */ t(
|
|
96
|
+
j,
|
|
97
|
+
{
|
|
98
|
+
src: v,
|
|
99
|
+
ref: d,
|
|
100
|
+
settings: Y,
|
|
101
|
+
width: 31,
|
|
102
|
+
height: 31
|
|
103
|
+
}
|
|
104
|
+
),
|
|
105
|
+
/* @__PURE__ */ t(H, {})
|
|
106
|
+
]
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ t(c, { $renderAs: "ac4-black", $color: "BLACK", children: "Mock Test" })
|
|
110
|
+
]
|
|
111
|
+
}
|
|
112
|
+
),
|
|
113
|
+
/* @__PURE__ */ t(V, { nodeType: l, state: n })
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
),
|
|
119
|
+
/* @__PURE__ */ t(A, { $flexGap: S ? 8 : 4, children: S ? /* @__PURE__ */ e(b, { children: [
|
|
120
|
+
/* @__PURE__ */ t(c, { $renderAs: "ub3", $color: "BLACK_T_60", children: "Total Score" }),
|
|
121
|
+
/* @__PURE__ */ e(J, { $flexDirection: "row", $alignItems: "flex-end", children: [
|
|
122
|
+
/* @__PURE__ */ t(c, { $renderAs: "ah4-bold", children: B }),
|
|
123
|
+
/* @__PURE__ */ e(c, { $renderAs: "ac3-black", $color: "BLACK_T_38", children: [
|
|
124
|
+
"/",
|
|
125
|
+
w
|
|
126
|
+
] })
|
|
127
|
+
] })
|
|
128
|
+
] }) : /* @__PURE__ */ e(b, { children: [
|
|
129
|
+
/* @__PURE__ */ e(_, { $renderAs: "ub3-bold", $color: "BLACK_T_60", children: [
|
|
130
|
+
/* @__PURE__ */ t("span", { children: "Reading & Writing:" }),
|
|
131
|
+
/* @__PURE__ */ e("span", { children: [
|
|
132
|
+
"2 Modules, ",
|
|
133
|
+
E,
|
|
134
|
+
" questions"
|
|
135
|
+
] })
|
|
136
|
+
] }),
|
|
137
|
+
/* @__PURE__ */ e(_, { $renderAs: "ub3-bold", $color: "BLACK_T_60", children: [
|
|
138
|
+
/* @__PURE__ */ t("span", { children: "Math:" }),
|
|
139
|
+
/* @__PURE__ */ e("span", { children: [
|
|
140
|
+
"2 Modules, ",
|
|
141
|
+
W,
|
|
142
|
+
" questions"
|
|
143
|
+
] })
|
|
144
|
+
] })
|
|
145
|
+
] }) })
|
|
146
|
+
] });
|
|
147
|
+
});
|
|
148
|
+
export {
|
|
149
|
+
he as default
|
|
150
|
+
};
|
|
151
|
+
//# sourceMappingURL=sat-mock-test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sat-mock-test.js","sources":["../../../../../src/features/chapters-v2/comps/sat-mock-test/sat-mock-test.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../ui/lottie-animation/types';\nimport type { ISatMockTestProps } from './sat-mock-test-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo, useRef } from 'react';\n\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport LottieAnimation from '../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../ui/text/text';\nimport {\n NodeCardContainer,\n NodeCardInfoWrapper,\n IconWrapper,\n StyledImportantIcon,\n} from '../../comps/node-card/node-card-styled';\nimport { BLOCK_STATES } from '../../constants/block-constants';\nimport { getNodeTypeBasedBgImage } from '../../utils';\nimport { getNodeCardBasedIcon } from '../../utils/node-card-utils';\nimport { getActiveSATSheet, getSatSheetQuestionsCount } from '../../utils/sat-sheet-utils';\nimport NodeCardTags from '../node-card/node-card-tags';\nimport * as Styled from './sat-mock-test-styled';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\nconst SatMockTest: FC<ISatMockTestProps> = memo(props => {\n const {\n userType,\n imageHue,\n sheets,\n blockStats,\n blockState,\n blockStatement,\n blockPermissions,\n onNodeAttempt,\n onNodeReview,\n } = props;\n\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const isStudent = useMemo(() => userType === 'STUDENT', [userType]);\n\n const { can_resume: canResume, can_review: canReview, can_start: canStart } = blockPermissions;\n\n const isBlockLocked = useMemo(() => blockState === BLOCK_STATES.LOCKED, [blockState]);\n const isBlockCompleted = useMemo(() => blockState === BLOCK_STATES.COMPLETED, [blockState]);\n const { sat_max_score: satMaxScore, sat_total_score: satTotalScore } = blockStats || {};\n const nodeData = sheets[0] as ISatMockTestProps['sheets'][0];\n\n const { node_type: nodeType } = nodeData;\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const { readingWriting, math } = getSatSheetQuestionsCount(sheets);\n\n const handleOnMouseEnter = useCallback(() => {\n if (isBlockLocked) return;\n\n animationRef.current?.play();\n }, [isBlockLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const handleOnNodeAttempt = useCallback(() => {\n if (isBlockLocked) {\n return;\n }\n\n const activeSheet = getActiveSATSheet(sheets);\n\n if (!activeSheet) {\n throw new Error('Active SAT sheet is not available');\n }\n\n if (isStudent) {\n if (canStart || canResume) {\n onNodeAttempt?.(activeSheet);\n\n return;\n }\n }\n\n if (canReview) {\n onNodeReview?.(activeSheet);\n }\n }, [\n canResume,\n canReview,\n canStart,\n isBlockLocked,\n isStudent,\n onNodeAttempt,\n onNodeReview,\n sheets,\n ]);\n\n return (\n <FlexView $flexDirection=\"row\" $flexGapX={1.5} $alignItems=\"center\">\n <NodeCardContainer\n $minWidth={180}\n $background={`${imageHue}_2`}\n $disabled={isBlockLocked}\n onClick={handleOnNodeAttempt}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={blockStatement}\n zIndex={5}\n hidden={!blockStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $opacity={isBlockLocked ? 0.5 : 1}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n width={31}\n height={31}\n />\n <StyledImportantIcon />\n </IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n Mock Test\n </Text>\n </NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={blockState} />\n </ArrowTooltip>\n </NodeCardContainer>\n\n <FlexView $flexGap={isBlockCompleted ? 8 : 4}>\n {isBlockCompleted ? (\n <>\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n Total Score\n </Text>\n\n <Styled.ScoreTextWrapper $flexDirection=\"row\" $alignItems=\"flex-end\">\n <Text $renderAs=\"ah4-bold\">{satTotalScore}</Text>\n <Text $renderAs=\"ac3-black\" $color=\"BLACK_T_38\">\n /{satMaxScore}\n </Text>\n </Styled.ScoreTextWrapper>\n </>\n ) : (\n <>\n <Styled.StyledText $renderAs=\"ub3-bold\" $color=\"BLACK_T_60\">\n <span>Reading & Writing:</span>\n <span>2 Modules, {readingWriting} questions</span>\n </Styled.StyledText>\n\n <Styled.StyledText $renderAs=\"ub3-bold\" $color=\"BLACK_T_60\">\n <span>Math:</span>\n <span>2 Modules, {math} questions</span>\n </Styled.StyledText>\n </>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default SatMockTest;\n"],"names":["renderSettings","SatMockTest","memo","props","userType","imageHue","sheets","blockStats","blockState","blockStatement","blockPermissions","onNodeAttempt","onNodeReview","animationRef","useRef","isStudent","useMemo","canResume","canReview","canStart","isBlockLocked","BLOCK_STATES","isBlockCompleted","satMaxScore","satTotalScore","nodeData","nodeType","nodeBgImage","getNodeTypeBasedBgImage","nodeCardLottie","getNodeCardBasedIcon","readingWriting","math","getSatSheetQuestionsCount","handleOnMouseEnter","useCallback","_a","handleOnMouseLeave","handleOnNodeAttempt","activeSheet","getActiveSATSheet","FlexView","jsx","NodeCardContainer","jsxs","ArrowTooltip","NodeCardInfoWrapper","IconWrapper","LottieAnimation","StyledImportantIcon","Text","NodeCardTags","Fragment","Styled.ScoreTextWrapper","Styled.StyledText"],"mappings":";;;;;;;;;;;;;AAuBA,MAAMA,IAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAEvDC,KAAqCC,EAAK,CAASC,MAAA;AACjD,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,YAAAC;AAAA,IACA,YAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,cAAAC;AAAA,EACE,IAAAT,GAEEU,IAAeC,EAAmC,IAAI,GAEtDC,IAAYC,EAAQ,MAAMZ,MAAa,WAAW,CAACA,CAAQ,CAAC,GAE5D,EAAE,YAAYa,GAAW,YAAYC,GAAW,WAAWC,EAAa,IAAAT,GAExEU,IAAgBJ,EAAQ,MAAMR,MAAea,EAAa,QAAQ,CAACb,CAAU,CAAC,GAC9Ec,IAAmBN,EAAQ,MAAMR,MAAea,EAAa,WAAW,CAACb,CAAU,CAAC,GACpF,EAAE,eAAee,GAAa,iBAAiBC,EAAc,IAAIjB,KAAc,IAC/EkB,IAAWnB,EAAO,CAAC,GAEnB,EAAE,WAAWoB,EAAa,IAAAD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O,cAAa,UAAA;AAAA,UAAA;AAAA,UAC5C3B;AAAA,QAAA,GACJ;AAAA,MAAA,GACF;AAAA,IAAA,EAAA,CACF,IAGE,gBAAAqB,EAAAQ,GAAA,EAAA,UAAA;AAAA,MAAA,gBAAAR,EAACU,GAAA,EAAkB,WAAU,YAAW,QAAO,cAC7C,UAAA;AAAA,QAAA,gBAAAZ,EAAC,UAAK,UAAkB,qBAAA,CAAA;AAAA,0BACvB,QAAK,EAAA,UAAA;AAAA,UAAA;AAAA,UAAYX;AAAA,UAAe;AAAA,QAAA,GAAU;AAAA,MAAA,GAC7C;AAAA,wBAECuB,GAAA,EAAkB,WAAU,YAAW,QAAO,cAC7C,UAAA;AAAA,QAAA,gBAAAZ,EAAC,UAAK,UAAK,QAAA,CAAA;AAAA,0BACV,QAAK,EAAA,UAAA;AAAA,UAAA;AAAA,UAAYV;AAAA,UAAK;AAAA,QAAA,GAAU;AAAA,MAAA,GACnC;AAAA,IAAA,EAAA,CACF,EAEJ,CAAA;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC;"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
var A = /* @__PURE__ */ ((S) => (S.DEFAULT = "DEFAULT", S.PREREQ = "PREREQ", S.RECAP = "RECAP", S.GOAL = "GOAL", S.TESTS = "TESTS", S.PLAYLIST = "PLAYLIST", S.SOLUTIONS = "SOLUTIONS", S.NOTES = "NOTES", S.FLASHCARDS = "FLASHCARDS", S.SUBJECTIVES = "SUBJECTIVES", S.PUZZLE_CARDS = "PUZZLE_CARDS", S.SAT_MOCK_TEST = "SAT_MOCK_TEST", S.STEP_UP = "STEP_UP", S.CHALLENGE_ARENA = "CHALLENGE_ARENA", S.DOWNLOADS = "DOWNLOADS", S))(A || {});
|
|
2
|
-
const
|
|
1
|
+
var A = /* @__PURE__ */ ((S) => (S.DEFAULT = "DEFAULT", S.PREREQ = "PREREQ", S.RECAP = "RECAP", S.GOAL = "GOAL", S.TESTS = "TESTS", S.PLAYLIST = "PLAYLIST", S.SOLUTIONS = "SOLUTIONS", S.NOTES = "NOTES", S.FLASHCARDS = "FLASHCARDS", S.SUBJECTIVES = "SUBJECTIVES", S.PUZZLE_CARDS = "PUZZLE_CARDS", S.SAT_MOCK_TEST = "SAT_MOCK_TEST", S.STEP_UP = "STEP_UP", S.CHALLENGE_ARENA = "CHALLENGE_ARENA", S.DOWNLOADS = "DOWNLOADS", S))(A || {}), E = /* @__PURE__ */ ((S) => (S.READINESS = "READINESS", S.GOALS = "GOALS", S.TESTS = "TESTS", S.ENRICHMENT = "ENRICHMENT", S.SUBJECTIVE = "SUBJECTIVE", S.VIDEOS = "VIDEOS", S.NOTES = "NOTES", S.FLASHCARDS = "FLASHCARDS", S.PUZZLE_CARDS = "PUZZLE_CARDS", S))(E || {}), R = /* @__PURE__ */ ((S) => (S.LOCKED = "LOCKED", S.NOT_STARTED = "NOT_STARTED", S.IN_PROGRESS = "IN_PROGRESS", S.COMPLETED = "COMPLETED", S))(R || {});
|
|
2
|
+
const L = {
|
|
3
3
|
DEFAULT: "Default",
|
|
4
4
|
PREREQ: "Prerequisite",
|
|
5
5
|
RECAP: "Recap",
|
|
@@ -11,13 +11,15 @@ const E = {
|
|
|
11
11
|
FLASHCARDS: "Flashcards",
|
|
12
12
|
SUBJECTIVES: "Subjective Questions",
|
|
13
13
|
PUZZLE_CARDS: "Puzzles",
|
|
14
|
-
SAT_MOCK_TEST: "
|
|
14
|
+
SAT_MOCK_TEST: "Mock Test",
|
|
15
15
|
STEP_UP: "Step Up",
|
|
16
16
|
CHALLENGE_ARENA: "Challenge Arena",
|
|
17
17
|
DOWNLOADS: "Downloads"
|
|
18
18
|
};
|
|
19
19
|
export {
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
L as BLOCK_NAME,
|
|
21
|
+
R as BLOCK_STATES,
|
|
22
|
+
A as BLOCK_TYPE,
|
|
23
|
+
E as SECTION_CODE
|
|
22
24
|
};
|
|
23
25
|
//# sourceMappingURL=block-constants.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"block-constants.js","sources":["../../../../src/features/chapters-v2/constants/block-constants.ts"],"sourcesContent":["export enum BLOCK_TYPE {\n DEFAULT = 'DEFAULT',\n PREREQ = 'PREREQ',\n RECAP = 'RECAP',\n GOAL = 'GOAL',\n TESTS = 'TESTS',\n PLAYLIST = 'PLAYLIST',\n SOLUTIONS = 'SOLUTIONS',\n NOTES = 'NOTES',\n FLASHCARDS = 'FLASHCARDS',\n SUBJECTIVES = 'SUBJECTIVES',\n PUZZLE_CARDS = 'PUZZLE_CARDS',\n SAT_MOCK_TEST = 'SAT_MOCK_TEST',\n STEP_UP = 'STEP_UP',\n CHALLENGE_ARENA = 'CHALLENGE_ARENA',\n DOWNLOADS = 'DOWNLOADS',\n}\n\nexport enum SECTION_CODE {\n READINESS = 'READINESS',\n GOALS = 'GOALS',\n TESTS = 'TESTS',\n ENRICHMENT = 'ENRICHMENT',\n SUBJECTIVE = 'SUBJECTIVE',\n VIDEOS = 'VIDEOS',\n NOTES = 'NOTES',\n FLASHCARDS = 'FLASHCARDS',\n PUZZLE_CARDS = 'PUZZLE_CARDS',\n}\n\nexport const BLOCK_NAME: Record<BLOCK_TYPE, string> = {\n [BLOCK_TYPE.DEFAULT]: 'Default',\n [BLOCK_TYPE.PREREQ]: 'Prerequisite',\n [BLOCK_TYPE.RECAP]: 'Recap',\n [BLOCK_TYPE.GOAL]: 'Lesson',\n [BLOCK_TYPE.TESTS]: 'Tests',\n [BLOCK_TYPE.PLAYLIST]: 'Videos',\n [BLOCK_TYPE.SOLUTIONS]: 'Solutions',\n [BLOCK_TYPE.NOTES]: 'Notes',\n [BLOCK_TYPE.FLASHCARDS]: 'Flashcards',\n [BLOCK_TYPE.SUBJECTIVES]: 'Subjective Questions',\n [BLOCK_TYPE.PUZZLE_CARDS]: 'Puzzles',\n [BLOCK_TYPE.SAT_MOCK_TEST]: '
|
|
1
|
+
{"version":3,"file":"block-constants.js","sources":["../../../../src/features/chapters-v2/constants/block-constants.ts"],"sourcesContent":["export enum BLOCK_TYPE {\n DEFAULT = 'DEFAULT',\n PREREQ = 'PREREQ',\n RECAP = 'RECAP',\n GOAL = 'GOAL',\n TESTS = 'TESTS',\n PLAYLIST = 'PLAYLIST',\n SOLUTIONS = 'SOLUTIONS',\n NOTES = 'NOTES',\n FLASHCARDS = 'FLASHCARDS',\n SUBJECTIVES = 'SUBJECTIVES',\n PUZZLE_CARDS = 'PUZZLE_CARDS',\n SAT_MOCK_TEST = 'SAT_MOCK_TEST',\n STEP_UP = 'STEP_UP',\n CHALLENGE_ARENA = 'CHALLENGE_ARENA',\n DOWNLOADS = 'DOWNLOADS',\n}\n\nexport enum SECTION_CODE {\n READINESS = 'READINESS',\n GOALS = 'GOALS',\n TESTS = 'TESTS',\n ENRICHMENT = 'ENRICHMENT',\n SUBJECTIVE = 'SUBJECTIVE',\n VIDEOS = 'VIDEOS',\n NOTES = 'NOTES',\n FLASHCARDS = 'FLASHCARDS',\n PUZZLE_CARDS = 'PUZZLE_CARDS',\n}\n\nexport enum BLOCK_STATES {\n LOCKED = 'LOCKED',\n NOT_STARTED = 'NOT_STARTED',\n IN_PROGRESS = 'IN_PROGRESS',\n COMPLETED = 'COMPLETED',\n}\n\nexport const BLOCK_NAME: Record<BLOCK_TYPE, string> = {\n [BLOCK_TYPE.DEFAULT]: 'Default',\n [BLOCK_TYPE.PREREQ]: 'Prerequisite',\n [BLOCK_TYPE.RECAP]: 'Recap',\n [BLOCK_TYPE.GOAL]: 'Lesson',\n [BLOCK_TYPE.TESTS]: 'Tests',\n [BLOCK_TYPE.PLAYLIST]: 'Videos',\n [BLOCK_TYPE.SOLUTIONS]: 'Solutions',\n [BLOCK_TYPE.NOTES]: 'Notes',\n [BLOCK_TYPE.FLASHCARDS]: 'Flashcards',\n [BLOCK_TYPE.SUBJECTIVES]: 'Subjective Questions',\n [BLOCK_TYPE.PUZZLE_CARDS]: 'Puzzles',\n [BLOCK_TYPE.SAT_MOCK_TEST]: 'Mock Test',\n [BLOCK_TYPE.STEP_UP]: 'Step Up',\n [BLOCK_TYPE.CHALLENGE_ARENA]: 'Challenge Arena',\n [BLOCK_TYPE.DOWNLOADS]: 'Downloads',\n};\n"],"names":["BLOCK_TYPE","SECTION_CODE","BLOCK_STATES","BLOCK_NAME"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,QAAQ,SACRA,EAAA,aAAa,cACbA,EAAA,cAAc,eACdA,EAAA,eAAe,gBACfA,EAAA,gBAAgB,iBAChBA,EAAA,UAAU,WACVA,EAAA,kBAAkB,mBAClBA,EAAA,YAAY,aAfFA,IAAAA,KAAA,CAAA,CAAA,GAkBAC,sBAAAA,OACVA,EAAA,YAAY,aACZA,EAAA,QAAQ,SACRA,EAAA,QAAQ,SACRA,EAAA,aAAa,cACbA,EAAA,aAAa,cACbA,EAAA,SAAS,UACTA,EAAA,QAAQ,SACRA,EAAA,aAAa,cACbA,EAAA,eAAe,gBATLA,IAAAA,KAAA,CAAA,CAAA,GAYAC,sBAAAA,OACVA,EAAA,SAAS,UACTA,EAAA,cAAc,eACdA,EAAA,cAAc,eACdA,EAAA,YAAY,aAJFA,IAAAA,KAAA,CAAA,CAAA;AAOL,MAAMC,IAAyC;AAAA,EACnD,SAAqB;AAAA,EACrB,QAAoB;AAAA,EACpB,OAAmB;AAAA,EACnB,MAAkB;AAAA,EAClB,OAAmB;AAAA,EACnB,UAAsB;AAAA,EACtB,WAAuB;AAAA,EACvB,OAAmB;AAAA,EACnB,YAAwB;AAAA,EACxB,aAAyB;AAAA,EACzB,cAA0B;AAAA,EAC1B,eAA2B;AAAA,EAC3B,SAAqB;AAAA,EACrB,iBAA6B;AAAA,EAC7B,WAAuB;AAC1B;"}
|
|
@@ -52,8 +52,14 @@ const A = (E) => {
|
|
|
52
52
|
default:
|
|
53
53
|
return e.NODE_PROJECT_BG;
|
|
54
54
|
}
|
|
55
|
-
}, t = (
|
|
56
|
-
|
|
55
|
+
}, t = ({
|
|
56
|
+
isSkipped: E,
|
|
57
|
+
sheetsLength: c,
|
|
58
|
+
isGoalBlock: S,
|
|
59
|
+
lessonIdx: _,
|
|
60
|
+
isSatMockTestBlock: T
|
|
61
|
+
}) => {
|
|
62
|
+
if (!S && !T) return `(${c})`;
|
|
57
63
|
if (!(E || !_))
|
|
58
64
|
return `${_}`;
|
|
59
65
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/features/chapters-v2/utils/index.ts"],"sourcesContent":["import type { IChapterProgressStats } from '../chapter-details/chapter-details-types';\nimport type { INodeDataProps } from '../comps/node-card/node-card-types';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\n// This function calculates the completion percentage of a chapter based on progress stats.\n// If no progress stats are provided, it returns 0.\n// It uses the `mandatory` field from the progress stats to determine the completed and total items.\n// It returns an integer representing the percentage of completion, rounded down to the nearest whole number.\nconst getChapterCompletionPercentage = (progressStats: IChapterProgressStats | null) => {\n if (!progressStats) return 0;\n\n const { mandatory } = progressStats;\n const { completed, total } = mandatory;\n\n if (total === 0) {\n return 0;\n }\n\n const percentage = Math.floor((completed / total) * 100);\n\n return percentage;\n};\n\nconst getNodeTypeBasedBgImage = (nodeType: INodeDataProps['node_type']) => {\n switch (nodeType) {\n case 'LEVEL2':\n case 'LEVEL3':\n case 'HIDDEN_BASIC':\n return ILLUSTRATIONS.NODE_TEST_PREP_BG;\n case 'LEARNING':\n case 'SAT_MATH_LEARNING':\n case 'SAT_ENGLISH_LEARNING':\n return ILLUSTRATIONS.NODE_LEARN_BG;\n case 'RECAP':\n case 'REMEDIAL':\n case 'REVISION':\n case 'PPT_BASIC':\n case 'SAT_MATH_RECAP':\n case 'SAT_ENGLISH_RECAP':\n return ILLUSTRATIONS.NODE_RECAP_BG;\n\n case 'DYNAMIC':\n case 'ASSESSMENT':\n case 'CHAPTER_ASSESSMENT':\n case 'DIAGNOSTIC':\n case 'TURING_ASSESSMENT':\n return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n\n case 'PRACTICE':\n case 'EXTRA_PRACTICE':\n case 'TARGET_PRACTICE':\n case 'MASTERY':\n case 'TURING_PRACTICE':\n case 'SAT_MATH_ASSESSMENT':\n case 'SAT_ENGLISH_ASSESSMENT':\n return ILLUSTRATIONS.NODE_PRACTICE_BG;\n\n case 'PUZZLE':\n case 'PUZZLE_EASY':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE_HARD':\n return ILLUSTRATIONS.NODE_PUZZLE_BG;\n\n case 'TURING_SUBJECTIVE':\n return ILLUSTRATIONS.NODE_SUBJECTIVE_BG;\n\n case 'TURING_BASIC':\n case 'PYTHON_BASIC':\n case 'PYTHON_VISUAL':\n return ILLUSTRATIONS.NODE_ACTIVITY_BG;\n\n case 'VIDEO':\n return ILLUSTRATIONS.NODE_VIDEO_BG;\n\n case 'PDF':\n return ILLUSTRATIONS.NODE_DOWNLOAD_BG;\n\n default:\n return ILLUSTRATIONS.NODE_PROJECT_BG;\n }\n};\n\
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/features/chapters-v2/utils/index.ts"],"sourcesContent":["import type { IChapterProgressStats } from '../chapter-details/chapter-details-types';\nimport type { INodeDataProps } from '../comps/node-card/node-card-types';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\n\n// This function calculates the completion percentage of a chapter based on progress stats.\n// If no progress stats are provided, it returns 0.\n// It uses the `mandatory` field from the progress stats to determine the completed and total items.\n// It returns an integer representing the percentage of completion, rounded down to the nearest whole number.\nconst getChapterCompletionPercentage = (progressStats: IChapterProgressStats | null) => {\n if (!progressStats) return 0;\n\n const { mandatory } = progressStats;\n const { completed, total } = mandatory;\n\n if (total === 0) {\n return 0;\n }\n\n const percentage = Math.floor((completed / total) * 100);\n\n return percentage;\n};\n\nconst getNodeTypeBasedBgImage = (nodeType: INodeDataProps['node_type']) => {\n switch (nodeType) {\n case 'LEVEL2':\n case 'LEVEL3':\n case 'HIDDEN_BASIC':\n return ILLUSTRATIONS.NODE_TEST_PREP_BG;\n case 'LEARNING':\n case 'SAT_MATH_LEARNING':\n case 'SAT_ENGLISH_LEARNING':\n return ILLUSTRATIONS.NODE_LEARN_BG;\n case 'RECAP':\n case 'REMEDIAL':\n case 'REVISION':\n case 'PPT_BASIC':\n case 'SAT_MATH_RECAP':\n case 'SAT_ENGLISH_RECAP':\n return ILLUSTRATIONS.NODE_RECAP_BG;\n\n case 'DYNAMIC':\n case 'ASSESSMENT':\n case 'CHAPTER_ASSESSMENT':\n case 'DIAGNOSTIC':\n case 'TURING_ASSESSMENT':\n return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n\n case 'PRACTICE':\n case 'EXTRA_PRACTICE':\n case 'TARGET_PRACTICE':\n case 'MASTERY':\n case 'TURING_PRACTICE':\n case 'SAT_MATH_ASSESSMENT':\n case 'SAT_ENGLISH_ASSESSMENT':\n return ILLUSTRATIONS.NODE_PRACTICE_BG;\n\n case 'PUZZLE':\n case 'PUZZLE_EASY':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE_HARD':\n return ILLUSTRATIONS.NODE_PUZZLE_BG;\n\n case 'TURING_SUBJECTIVE':\n return ILLUSTRATIONS.NODE_SUBJECTIVE_BG;\n\n case 'TURING_BASIC':\n case 'PYTHON_BASIC':\n case 'PYTHON_VISUAL':\n return ILLUSTRATIONS.NODE_ACTIVITY_BG;\n\n case 'VIDEO':\n return ILLUSTRATIONS.NODE_VIDEO_BG;\n\n case 'PDF':\n return ILLUSTRATIONS.NODE_DOWNLOAD_BG;\n\n default:\n return ILLUSTRATIONS.NODE_PROJECT_BG;\n }\n};\n\ninterface IGetSheetNLessonCountParams {\n isSkipped: boolean;\n sheetsLength: number;\n isGoalBlock?: boolean;\n lessonIdx?: number;\n isSatMockTestBlock?: boolean;\n}\n\nconst getSheetNLessonCount = ({\n isSkipped,\n sheetsLength,\n isGoalBlock,\n lessonIdx,\n isSatMockTestBlock,\n}: IGetSheetNLessonCountParams) => {\n if (!isGoalBlock && !isSatMockTestBlock) return `(${sheetsLength})`;\n\n if (isSkipped || !lessonIdx) return undefined;\n\n return `${lessonIdx}`;\n};\n\nexport { getChapterCompletionPercentage, getNodeTypeBasedBgImage, getSheetNLessonCount };\n"],"names":["getChapterCompletionPercentage","progressStats","mandatory","completed","total","getNodeTypeBasedBgImage","nodeType","ILLUSTRATIONS","getSheetNLessonCount","isSkipped","sheetsLength","isGoalBlock","lessonIdx","isSatMockTestBlock"],"mappings":";AASM,MAAAA,IAAiC,CAACC,MAAgD;AAClF,MAAA,CAACA,EAAsB,QAAA;AAErB,QAAA,EAAE,WAAAC,EAAc,IAAAD,GAChB,EAAE,WAAAE,GAAW,OAAAC,EAAU,IAAAF;AAE7B,SAAIE,MAAU,IACL,IAGU,KAAK,MAAOD,IAAYC,IAAS,GAAG;AAGzD,GAEMC,IAA0B,CAACC,MAA0C;AACzE,UAAQA,GAAU;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOC,EAAc;AAAA,IACvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IACvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB;AACE,aAAOA,EAAc;AAAA,EACzB;AACF,GAUMC,IAAuB,CAAC;AAAA,EAC5B,WAAAC;AAAA,EACA,cAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,oBAAAC;AACF,MAAmC;AACjC,MAAI,CAACF,KAAe,CAACE,EAAoB,QAAO,IAAIH,CAAY;AAE5D,MAAA,EAAAD,KAAa,CAACG;AAElB,WAAO,GAAGA,CAAS;AACrB;"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { SAT_NODE_TYPE as S } from "../../sheets/constants/sheet.js";
|
|
2
|
+
const u = (t) => {
|
|
3
|
+
if (!t || t.length === 0)
|
|
4
|
+
return { readingWriting: 0, math: 0 };
|
|
5
|
+
const o = t.reduce((n, r) => r.node_type === S.SAT_ENGLISH_ASSESSMENT ? n + (r.total_questions || 0) : n, 0), i = t.reduce((n, r) => r.node_type === S.SAT_MATH_ASSESSMENT ? n + (r.total_questions || 0) : n, 0);
|
|
6
|
+
return { readingWriting: o, math: i };
|
|
7
|
+
}, _ = (t) => t.find((i) => i.permissions.can_start || i.permissions.can_resume) ?? (t == null ? void 0 : t[0]);
|
|
8
|
+
export {
|
|
9
|
+
_ as getActiveSATSheet,
|
|
10
|
+
u as getSatSheetQuestionsCount
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=sat-sheet-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sat-sheet-utils.js","sources":["../../../../src/features/chapters-v2/utils/sat-sheet-utils.ts"],"sourcesContent":["import type { ISatMockTestProps } from '../comps/sat-mock-test/sat-mock-test-types';\n\nimport { SAT_NODE_TYPE } from '../../sheets/constants/sheet';\n\nconst getSatSheetQuestionsCount = (sheets: ISatMockTestProps['sheets']) => {\n if (!sheets || sheets.length === 0) {\n return { readingWriting: 0, math: 0 };\n }\n\n const readingWriting = sheets.reduce((acc, sheet) => {\n if (sheet.node_type === SAT_NODE_TYPE.SAT_ENGLISH_ASSESSMENT) {\n return acc + (sheet.total_questions || 0);\n }\n\n return acc;\n }, 0);\n\n const math = sheets.reduce((acc, sheet) => {\n if (sheet.node_type === SAT_NODE_TYPE.SAT_MATH_ASSESSMENT) {\n return acc + (sheet.total_questions || 0);\n }\n\n return acc;\n }, 0);\n\n return { readingWriting, math };\n};\n\nconst getActiveSATSheet = (sheets: ISatMockTestProps['sheets']) => {\n const activeSheet =\n sheets.find(sheet => sheet.permissions.can_start || sheet.permissions.can_resume) ??\n sheets?.[0];\n\n return activeSheet;\n};\n\nexport { getSatSheetQuestionsCount, getActiveSATSheet };\n"],"names":["getSatSheetQuestionsCount","sheets","readingWriting","acc","sheet","SAT_NODE_TYPE","math","getActiveSATSheet"],"mappings":";AAIM,MAAAA,IAA4B,CAACC,MAAwC;AACzE,MAAI,CAACA,KAAUA,EAAO,WAAW;AAC/B,WAAO,EAAE,gBAAgB,GAAG,MAAM,EAAE;AAGtC,QAAMC,IAAiBD,EAAO,OAAO,CAACE,GAAKC,MACrCA,EAAM,cAAcC,EAAc,yBAC7BF,KAAOC,EAAM,mBAAmB,KAGlCD,GACN,CAAC,GAEEG,IAAOL,EAAO,OAAO,CAACE,GAAKC,MAC3BA,EAAM,cAAcC,EAAc,sBAC7BF,KAAOC,EAAM,mBAAmB,KAGlCD,GACN,CAAC;AAEG,SAAA,EAAE,gBAAAD,GAAgB,MAAAI;AAC3B,GAEMC,IAAoB,CAACN,MAEvBA,EAAO,KAAK,CAAAG,MAASA,EAAM,YAAY,aAAaA,EAAM,YAAY,UAAU,MAChFH,KAAA,gBAAAA,EAAS;"}
|
|
@@ -50,7 +50,8 @@ const e = Math.floor(Date.now() / 1e3), a = e + 5 * 24 * 60 * 60, s = {
|
|
|
50
50
|
user_chapter_id: null,
|
|
51
51
|
is_turing: !1,
|
|
52
52
|
student_instructions_ref: null,
|
|
53
|
-
instructions_ref: null
|
|
53
|
+
instructions_ref: null,
|
|
54
|
+
user_block_id: null
|
|
54
55
|
},
|
|
55
56
|
{
|
|
56
57
|
accuracy: null,
|
|
@@ -102,7 +103,8 @@ const e = Math.floor(Date.now() / 1e3), a = e + 5 * 24 * 60 * 60, s = {
|
|
|
102
103
|
user_chapter_id: null,
|
|
103
104
|
is_turing: !1,
|
|
104
105
|
student_instructions_ref: null,
|
|
105
|
-
instructions_ref: null
|
|
106
|
+
instructions_ref: null,
|
|
107
|
+
user_block_id: null
|
|
106
108
|
},
|
|
107
109
|
{
|
|
108
110
|
accuracy: null,
|
|
@@ -154,7 +156,8 @@ const e = Math.floor(Date.now() / 1e3), a = e + 5 * 24 * 60 * 60, s = {
|
|
|
154
156
|
user_chapter_id: null,
|
|
155
157
|
is_turing: !1,
|
|
156
158
|
student_instructions_ref: null,
|
|
157
|
-
instructions_ref: null
|
|
159
|
+
instructions_ref: null,
|
|
160
|
+
user_block_id: null
|
|
158
161
|
},
|
|
159
162
|
{
|
|
160
163
|
accuracy: null,
|
|
@@ -206,7 +209,8 @@ const e = Math.floor(Date.now() / 1e3), a = e + 5 * 24 * 60 * 60, s = {
|
|
|
206
209
|
user_chapter_id: null,
|
|
207
210
|
is_turing: !1,
|
|
208
211
|
student_instructions_ref: null,
|
|
209
|
-
instructions_ref: null
|
|
212
|
+
instructions_ref: null,
|
|
213
|
+
user_block_id: null
|
|
210
214
|
}
|
|
211
215
|
],
|
|
212
216
|
queued_homeworks: []
|