@cuemath/leap 2.8.60-as4 → 2.8.60-gs1
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/chapters/chapters-list/chapter-item/chapter-item.js +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js +16 -15
- package/dist/features/chapters-v2/comps/node-card/node-card-styled.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js +8 -12
- package/dist/features/chapters-v2/comps/node-card/node-card-tags.js.map +1 -1
- package/dist/features/chapters-v2/utils/index.js +4 -5
- package/dist/features/chapters-v2/utils/index.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +34 -62
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-milestone-resources.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-tests-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +81 -79
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +61 -59
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js +85 -83
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +90 -88
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +98 -82
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js +71 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-cta.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js +31 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js +38 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item-utils.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js +79 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheet-item/test-sheet-item.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js +18 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js +51 -0
- package/dist/features/milestone/milestone-tests/tests-list/test-sheets-list/test-sheets-list.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js +11 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list-styled.js.map +1 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js +144 -0
- package/dist/features/milestone/milestone-tests/tests-list/tests-list.js.map +1 -0
- package/dist/features/sheets/resources-list/resource-item/styled.js +1 -1
- package/dist/features/sheets/resources-list/resource-item/styled.js.map +1 -1
- package/dist/index.d.ts +11 -33
- package/dist/index.js +29 -31
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/features/homework/card-menu-options.js +0 -25
- package/dist/features/homework/card-menu-options.js.map +0 -1
- package/dist/features/homework/homework-card.js +0 -210
- package/dist/features/homework/homework-card.js.map +0 -1
- package/dist/features/homework/styles.js +0 -114
- package/dist/features/homework/styles.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +0 -165
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js +0 -25
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view-styled.js.map +0 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +0 -82
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +0 -1
- package/dist/features/recent-chapters/api/get-recent-chapters.js +0 -9
- package/dist/features/recent-chapters/api/get-recent-chapters.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters-styled.js +0 -16
- package/dist/features/recent-chapters/recent-chapters-styled.js.map +0 -1
- package/dist/features/recent-chapters/recent-chapters.js +0 -43
- package/dist/features/recent-chapters/recent-chapters.js.map +0 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +0 -52
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItemProps } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, useState, memo } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(\n ({ milestoneId, chapter, onChapterClick, itemIndex }) => {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { completed = 0, total = 0 } = chapterProgressStat || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n\n const completionPercentage = completed > 0 ? Math.floor((completed / total || 1) * 100) : 0;\n\n const handleOnChapterClick = useCallback(() => {\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick]);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <Styled.ChapterItemWrapper\n id={`milestone-chapter-${milestoneId
|
1
|
+
{"version":3,"file":"chapter-item.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item.tsx"],"sourcesContent":["import type { IChapterItemProps } from './chapter-item-types';\nimport type { FC } from 'react';\n\nimport { useCallback, useLayoutEffect, useRef, useState, memo } from 'react';\n\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport ArrowTooltip from '../../../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../../../ui/layout/flex-view';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(\n ({ milestoneId, chapter, onChapterClick, itemIndex }) => {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { completed = 0, total = 0 } = chapterProgressStat || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n\n const completionPercentage = completed > 0 ? Math.floor((completed / total || 1) * 100) : 0;\n\n const handleOnChapterClick = useCallback(() => {\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick]);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, [titleTextRef]);\n\n return (\n <Styled.ChapterItemWrapper\n id={`milestone-chapter-${milestoneId}-${itemIndex}`}\n $alignItems=\"center\"\n $gapX={1}\n $gutterX={1}\n $flexGap={8}\n $background=\"WHITE_1\"\n onClick={handleOnChapterClick}\n className=\"goal-widget-chapter-item\"\n $bgColor={`${imageHue}_1`}\n >\n <Styled.ChapterImageWrapper\n $width=\"fit-content\"\n $position=\"relative\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Styled.ChapterProgressWrapper>\n <Styled.ChapterProgressSVG width=\"96px\" height=\"96px\">\n <Styled.ChapterProgressSVGCircle $progress={0} r=\"47\" cx=\"48\" cy=\"48\" />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progress={completionPercentage * 2.98}\n r=\"47\"\n cx=\"48\"\n cy=\"48\"\n />\n </Styled.ChapterProgressSVG>\n </Styled.ChapterProgressWrapper>\n\n <Styled.ChapterImage src={imageUrl} alt=\"Chapter Image\" />\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIconWrapper>\n <Check2Icon width={20} height={20} />\n </Styled.StyledCheckIconWrapper>\n )}\n </Styled.ChapterImageWrapper>\n\n <FlexView $justifyContent=\"center\" $alignItems=\"center\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={name}\n hidden={!showTitleTooltip}\n widthX={21.75}\n zIndex={5}\n >\n <Styled.ChapterName\n ref={titleTextRef}\n $renderAs=\"ab2\"\n $color=\"BLACK_T_87\"\n $align=\"center\"\n >\n {name}\n </Styled.ChapterName>\n </ArrowTooltip>\n </FlexView>\n </Styled.ChapterItemWrapper>\n );\n },\n);\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","name","imageUrl","chapterProgressStat","imageHue","completed","total","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","handleOnChapterClick","useCallback","useLayoutEffect","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","jsx","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","ArrowTooltip","Styled.ChapterName"],"mappings":";;;;;;AAUA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,aAAAC,GAAa,SAAAC,GAAS,gBAAAC,GAAgB,WAAAC,QAAgB;AACjD,UAAA;AAAA,MACJ,MAAAC;AAAA,MACA,WAAWC;AAAA,MACX,eAAeC;AAAA,MACf,WAAWC;AAAA,IACT,IAAAN,GACE,EAAE,WAAAO,IAAY,GAAG,OAAAC,IAAQ,EAAE,IAAIH,KAAuB,IACtD,CAACI,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxDC,IAAeC,EAAuB,IAAI,GAE1CC,IAAuBP,IAAY,IAAI,KAAK,OAAOA,IAAYC,KAAS,KAAK,GAAG,IAAI,GAEpFO,IAAuBC,EAAY,MAAM;AAC7C,MAAAf,EAAeD,GAASD,CAAW;AAAA,IAClC,GAAA,CAACC,GAASD,GAAaE,CAAc,CAAC;AAEzC,WAAAgB,EAAgB,MAAM;AACpB,MACEL,EAAa,WACbA,EAAa,QAAQ,eAAeA,EAAa,QAAQ,gBAEzDF,EAAoB,EAAI;AAAA,IAC1B,GACC,CAACE,CAAY,CAAC,GAGf,gBAAAM;AAAA,MAACC;AAAAA,MAAA;AAAA,QACC,IAAI,qBAAqBpB,CAAW,IAAIG,CAAS;AAAA,QACjD,aAAY;AAAA,QACZ,OAAO;AAAA,QACP,UAAU;AAAA,QACV,UAAU;AAAA,QACV,aAAY;AAAA,QACZ,SAASa;AAAA,QACT,WAAU;AAAA,QACV,UAAU,GAAGT,CAAQ;AAAA,QAErB,UAAA;AAAA,UAAA,gBAAAY;AAAA,YAACE;AAAAA,YAAA;AAAA,cACC,QAAO;AAAA,cACP,WAAU;AAAA,cACV,iBAAgB;AAAA,cAChB,aAAY;AAAA,cAEZ,UAAA;AAAA,gBAAC,gBAAAC,EAAAC,GAAA,EACC,UAAC,gBAAAJ,EAAAK,GAAA,EAA0B,OAAM,QAAO,QAAO,QAC7C,UAAA;AAAA,kBAAC,gBAAAF,EAAAG,GAAA,EAAgC,WAAW,GAAG,GAAE,MAAK,IAAG,MAAK,IAAG,KAAK,CAAA;AAAA,kBACtE,gBAAAH;AAAA,oBAACG;AAAAA,oBAAA;AAAA,sBACC,iBAAe;AAAA,sBACf,WAAWV,IAAuB;AAAA,sBAClC,GAAE;AAAA,sBACF,IAAG;AAAA,sBACH,IAAG;AAAA,oBAAA;AAAA,kBACL;AAAA,gBAAA,EAAA,CACF,EACF,CAAA;AAAA,kCAECW,GAAA,EAAoB,KAAKrB,GAAU,KAAI,iBAAgB;AAAA,gBAEvDU,MAAyB,OACvB,gBAAAO,EAAAK,GAAA,EACC,UAAC,gBAAAL,EAAAM,GAAA,EAAW,OAAO,IAAI,QAAQ,GAAA,CAAI,EACrC,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,UAEC,gBAAAN,EAAAO,GAAA,EAAS,iBAAgB,UAAS,aAAY,UAC7C,UAAA,gBAAAP;AAAA,YAACQ;AAAA,YAAA;AAAA,cACC,UAAS;AAAA,cACT,UAAS;AAAA,cACT,aAAa1B;AAAA,cACb,QAAQ,CAACM;AAAA,cACT,QAAQ;AAAA,cACR,QAAQ;AAAA,cAER,UAAA,gBAAAY;AAAA,gBAACS;AAAAA,gBAAA;AAAA,kBACC,KAAKlB;AAAA,kBACL,WAAU;AAAA,kBACV,QAAO;AAAA,kBACP,QAAO;AAAA,kBAEN,UAAAT;AAAA,gBAAA;AAAA,cACH;AAAA,YAAA;AAAA,UAAA,GAEJ;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1,9 +1,9 @@
|
|
1
|
-
import
|
1
|
+
import e from "styled-components";
|
2
2
|
import d from "../../../../assets/line-icons/icons/important.js";
|
3
3
|
import c from "../../../../assets/line-icons/icons/lock2.js";
|
4
|
-
import
|
4
|
+
import t from "../../../ui/layout/flex-view.js";
|
5
5
|
import l from "../../../ui/text/text.js";
|
6
|
-
const
|
6
|
+
const m = e(t)(({
|
7
7
|
$showOutline: o,
|
8
8
|
theme: r,
|
9
9
|
$disabled: n,
|
@@ -64,7 +64,7 @@ const f = t(e)(({
|
|
64
64
|
${o && !s && `outline: 1px solid ${a};`};
|
65
65
|
}
|
66
66
|
`;
|
67
|
-
}), g =
|
67
|
+
}), g = e(d)(({ theme: o }) => {
|
68
68
|
const { layout: r } = o;
|
69
69
|
return `
|
70
70
|
width: ${r.gutter * 0.75}px;
|
@@ -73,54 +73,55 @@ const f = t(e)(({
|
|
73
73
|
top: -2.5px;
|
74
74
|
right: -2.5px;
|
75
75
|
`;
|
76
|
-
}), k = t
|
76
|
+
}), k = e(t)(({ $bgImage: o }) => `
|
77
77
|
background-image: url(${o});
|
78
78
|
|
79
79
|
& .context-menu {
|
80
80
|
justify-self: flex-end;
|
81
81
|
margin-left: auto;
|
82
82
|
}
|
83
|
-
`), $ = t
|
83
|
+
`), $ = e(t)`
|
84
84
|
border-radius: 50%;
|
85
|
-
`, v = t
|
85
|
+
`, v = e(t)(() => `
|
86
86
|
position: relative;
|
87
87
|
padding: 12px 8px 12px 12px;
|
88
|
-
`), w = t
|
88
|
+
`), w = e(t)(({ $top: o, $right: r }) => `
|
89
89
|
position: absolute;
|
90
90
|
top: ${o ?? 0}px;
|
91
91
|
right: ${r ?? 0}px;
|
92
92
|
z-index: 3;
|
93
93
|
`);
|
94
|
-
|
94
|
+
e(c)(({}) => `
|
95
95
|
width: 28px;
|
96
96
|
height: 28px;
|
97
97
|
`);
|
98
|
-
const I = t
|
98
|
+
const I = e(t)(({ theme: o }) => {
|
99
99
|
const { BLACK_1: r, WHITE_1: n } = o.colors;
|
100
100
|
return `
|
101
101
|
position: absolute;
|
102
102
|
top: -10px;
|
103
|
-
|
103
|
+
left: -10px;
|
104
|
+
border-radius: 50%;
|
104
105
|
background: ${r};
|
105
106
|
|
106
107
|
path {
|
107
108
|
fill: ${n};
|
108
109
|
}
|
109
110
|
`;
|
110
|
-
}), y =
|
111
|
+
}), y = e(l)(() => `
|
111
112
|
display: -webkit-box;
|
112
113
|
-webkit-box-orient: vertical;
|
113
114
|
-webkit-line-clamp: 2;
|
114
115
|
text-overflow: ellipsis;
|
115
116
|
overflow: hidden;
|
116
|
-
`), C = t
|
117
|
+
`), C = e(t)(({ theme: o }) => `
|
117
118
|
cursor: pointer;
|
118
119
|
|
119
120
|
&:hover {
|
120
121
|
border-radius: 50%;
|
121
122
|
background: ${o.colors.WHITE_5};
|
122
123
|
}
|
123
|
-
`), W = t
|
124
|
+
`), W = e(t)(({ theme: o, $visible: r }) => `
|
124
125
|
cursor: pointer;
|
125
126
|
|
126
127
|
position: absolute;
|
@@ -141,7 +142,7 @@ const I = t(e)(({ theme: o }) => {
|
|
141
142
|
export {
|
142
143
|
$ as IconWrapper,
|
143
144
|
I as InProgressIconWrapper,
|
144
|
-
|
145
|
+
m as NodeCardContainer,
|
145
146
|
v as NodeCardContentWrapper,
|
146
147
|
k as NodeCardInfoWrapper,
|
147
148
|
y as NodeCardTitle,
|
@@ -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 $showOutline?: boolean;\n $disabled: boolean;\n $isSheetLocked?: boolean;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({\n $showOutline,\n theme,\n $disabled,\n $isSheetLocked,\n}) => {\n const { BLACK_1, BLACK, BLACK_T_15 } = theme.colors;\n\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n ${$disabled ? 'pointer-events: none;' : 'pointer-events: auto;'};\n position: relative;\n border-image: linear-gradient(to right, ${BLACK_T_15} 0%, ${BLACK_T_15} 100%);\n ${$showOutline && `outline: 1px solid ${BLACK_T_15};`};\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 .node-card-border > .border-path {\n fill: none;\n stroke: ${BLACK_T_15};\n stroke-width: 1.5;\n }\n\n .node-card-border > .border-path-animation {\n fill: none;\n stroke: ${BLACK};\n stroke-width: 1.5;\n //* view box size 170 + 56 + 170 + 56 = 452\n //* 452 / 2 = 226\n stroke-dasharray: 226 226;\n stroke-dashoffset: 0;\n\n animation: dashmove 6s linear infinite;\n }\n \n @keyframes dashmove {\n to {\n stroke-dashoffset: -900;\n }\n }\n \n &:hover {\n ${\n !$disabled &&\n `\n .node-card-border > .border-path-animation {\n stroke: ${BLACK_1};\n stroke-dasharray: 452;\n animation: none;\n }\n `\n }\n\n ${$showOutline && !$isSheetLocked && `outline: 1px solid ${BLACK};`};\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)(({ theme }) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n
|
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 $showOutline?: boolean;\n $disabled: boolean;\n $isSheetLocked?: boolean;\n}\n\nconst NodeCardContainer = styled(FlexView)<INodeCardContainer>(({\n $showOutline,\n theme,\n $disabled,\n $isSheetLocked,\n}) => {\n const { BLACK_1, BLACK, BLACK_T_15 } = theme.colors;\n\n return `\n cursor: ${$disabled ? 'not-allowed' : 'pointer'};\n ${$disabled ? 'pointer-events: none;' : 'pointer-events: auto;'};\n position: relative;\n border-image: linear-gradient(to right, ${BLACK_T_15} 0%, ${BLACK_T_15} 100%);\n ${$showOutline && `outline: 1px solid ${BLACK_T_15};`};\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 .node-card-border > .border-path {\n fill: none;\n stroke: ${BLACK_T_15};\n stroke-width: 1.5;\n }\n\n .node-card-border > .border-path-animation {\n fill: none;\n stroke: ${BLACK};\n stroke-width: 1.5;\n //* view box size 170 + 56 + 170 + 56 = 452\n //* 452 / 2 = 226\n stroke-dasharray: 226 226;\n stroke-dashoffset: 0;\n\n animation: dashmove 6s linear infinite;\n }\n \n @keyframes dashmove {\n to {\n stroke-dashoffset: -900;\n }\n }\n \n &:hover {\n ${\n !$disabled &&\n `\n .node-card-border > .border-path-animation {\n stroke: ${BLACK_1};\n stroke-dasharray: 452;\n animation: none;\n }\n `\n }\n\n ${$showOutline && !$isSheetLocked && `outline: 1px solid ${BLACK};`};\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)(({ theme }) => {\n const { BLACK_1, WHITE_1 } = theme.colors;\n\n return `\n position: absolute;\n top: -10px;\n left: -10px;\n border-radius: 50%;\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 \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","$showOutline","theme","$disabled","$isSheetLocked","BLACK_1","BLACK","BLACK_T_15","StyledImportantIcon","ImportantIcon","layout","NodeCardInfoWrapper","$bgImage","IconWrapper","NodeCardContentWrapper","SheetTagWrapper","$top","$right","Lock2Icon","InProgressIconWrapper","WHITE_1","NodeCardTitle","Text","NodeKebabMenuWrapper","NodeMenuOptionsWrapper","$visible"],"mappings":";;;;;AAaA,MAAMA,IAAoBC,EAAOC,CAAQ,EAAsB,CAAC;AAAA,EAC9D,cAAAC;AAAA,EACA,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,SAAAC,GAAS,OAAAC,GAAO,YAAAC,EAAA,IAAeL,EAAM;AAEtC,SAAA;AAAA,cACKC,IAAY,gBAAgB,SAAS;AAAA,MAC7CA,IAAY,0BAA0B,uBAAuB;AAAA;AAAA,8CAErBI,CAAU,QAAQA,CAAU;AAAA,MACpEN,KAAgB,sBAAsBM,CAAU,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAezCA,CAAU;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,gBAMVD,CAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,QAkBb,CAACH,KACD;AAAA;AAAA,sBAEcE,CAAO;AAAA;AAAA;AAAA;AAAA,SAKvB;AAAA;AAAA,QAEEJ,KAAgB,CAACG,KAAkB,sBAAsBE,CAAK,GAAG;AAAA;AAAA;AAGzE,CAAC,GAEKE,IAAsBT,EAAOU,CAAa,EAAE,CAAC,EAAE,OAAAP,QAAY;AACzD,QAAA,EAAE,QAAAQ,EAAW,IAAAR;AAEZ,SAAA;AAAA,aACIQ,EAAO,SAAS,IAAI;AAAA,cACnBA,EAAO,SAAS,IAAI;AAAA;AAAA;AAAA;AAAA;AAKlC,CAAC,GAMKC,IAAsBZ,EAAOC,CAAQ,EAAwB,CAAC,EAAE,UAAAY,QAC7D;AAAA,4BACmBA,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOnC,GAEKC,IAAcd,EAAOC,CAAQ;AAAA;AAAA,GAI7Bc,IAAyBf,EAAOC,CAAQ,EAAE,MACvC;AAAA;AAAA;AAAA,GAIR,GAOKe,IAAkBhB,EAAOC,CAAQ,EAAoB,CAAC,EAAE,MAAAgB,GAAM,QAAAC,QAC3D;AAAA;AAAA,SAEAD,KAAQ,CAAC;AAAA,WACPC,KAAU,CAAC;AAAA;AAAA,CAGrB;AAEsBlB,EAAOmB,CAAS,EAAE,CAAC,OACjC;AAAA;AAAA;AAAA,GAIR;AAED,MAAMC,IAAwBpB,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QAAY;AAC5D,QAAM,EAAE,SAAAG,GAAS,SAAAe,MAAYlB,EAAM;AAE5B,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAKSG,CAAO;AAAA;AAAA;AAAA,cAGXe,CAAO;AAAA;AAAA;AAGrB,CAAC,GAEKC,IAAgBtB,EAAOuB,CAAI,EAAE,MAC1B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAOR,GAEKC,IAAuBxB,EAAOC,CAAQ,EAAE,CAAC,EAAE,OAAAE,QACxC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKWA,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC,GAMKsB,IAAyBzB,EAAOC,CAAQ,EAA2B,CAAC,EAAE,OAAAE,GAAO,UAAAuB,QAC1E;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,wBASeA,IAAW,IAAI,CAAC;AAAA,eACzBA,IAAW,IAAI,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA,oBAKXvB,EAAM,OAAO,OAAO;AAAA;AAAA,GAGvC;"}
|
@@ -1,16 +1,12 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import { memo as
|
3
|
-
import { getNodeStateBasedTagInfo as
|
4
|
-
import { SheetTagWrapper as
|
5
|
-
const
|
6
|
-
const { state: t, accuracy: e, nodeType:
|
7
|
-
|
8
|
-
top: n,
|
9
|
-
right: s
|
10
|
-
} = p(t, c, r);
|
11
|
-
return /* @__PURE__ */ d(g, { $top: n, $right: s, children: i });
|
1
|
+
import { jsx as m } from "react/jsx-runtime";
|
2
|
+
import { memo as s } from "react";
|
3
|
+
import { getNodeStateBasedTagInfo as d } from "../../utils/node-card-utils.js";
|
4
|
+
import { SheetTagWrapper as p } from "./node-card-styled.js";
|
5
|
+
const T = s((o) => {
|
6
|
+
const { state: t, accuracy: e, nodeType: r } = o, a = r === "DYNAMIC" ? e : void 0, { icon: c, top: i, right: n } = d(t, a);
|
7
|
+
return /* @__PURE__ */ m(p, { $top: i, $right: n, children: c });
|
12
8
|
});
|
13
9
|
export {
|
14
|
-
|
10
|
+
T as default
|
15
11
|
};
|
16
12
|
//# sourceMappingURL=node-card-tags.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType
|
1
|
+
{"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType } = props;\n\n const isDynamicNode = nodeType === 'DYNAMIC';\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const { icon: NodeTagIcon, top, right } = getNodeStateBasedTagInfo(state, accuracyValue);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["NodeCardTags","memo","props","state","accuracy","nodeType","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAQM,MAAAA,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,EAAA,IAAaH,GAGhCI,IADgBD,MAAa,YACGD,IAAW,QAE3C,EAAE,MAAMG,GAAa,KAAAC,GAAK,OAAAC,MAAUC,EAAyBP,GAAOG,CAAa;AAGrF,SAAA,gBAAAK,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { ILLUSTRATIONS as e } from "../../../assets/illustrations/illustrations.js";
|
2
2
|
const _ = (t) => {
|
3
3
|
if (!t) return 0;
|
4
|
-
const { mandatory: E } = t, { completed:
|
5
|
-
return Math.floor(
|
4
|
+
const { mandatory: E } = t, { completed: n, total: r } = E;
|
5
|
+
return Math.floor(n / r * 100);
|
6
6
|
}, o = (t) => {
|
7
7
|
switch (t) {
|
8
8
|
case "LEARNING":
|
@@ -15,7 +15,6 @@ const _ = (t) => {
|
|
15
15
|
case "PRACTICE":
|
16
16
|
case "EXTRA_PRACTICE":
|
17
17
|
case "TARGET_PRACTICE":
|
18
|
-
case "MASTERY":
|
19
18
|
return e.NODE_PRACTICE_BG;
|
20
19
|
case "PUZZLE_EASY":
|
21
20
|
case "PUZZLE_MEDIUM":
|
@@ -26,9 +25,9 @@ const _ = (t) => {
|
|
26
25
|
default:
|
27
26
|
return e.NODE_CUSTOM_TEST_BG;
|
28
27
|
}
|
29
|
-
}, T = (t, E,
|
28
|
+
}, T = (t, E, n, r) => {
|
30
29
|
if (!t) {
|
31
|
-
if (!
|
30
|
+
if (!n) return `(${E})`;
|
32
31
|
if (r !== void 0 && r > 0)
|
33
32
|
return `${r}`;
|
34
33
|
}
|
@@ -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 const percentage = Math.floor((completed / total) * 100);\n\n return percentage;\n};\n\nconst getNodeTypeBasedBgImage = (nodeType: INodeDataProps['node_type']) => {\n switch (nodeType) {\n case 'LEARNING':\n return ILLUSTRATIONS.NODE_LEARN_BG;\n case 'RECAP':\n return ILLUSTRATIONS.NODE_RECAP_BG;\n\n case 'ASSESSMENT':\n case 'DYNAMIC':\n return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n\n case 'PRACTICE':\n case 'EXTRA_PRACTICE':\n case 'TARGET_PRACTICE':\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 const percentage = Math.floor((completed / total) * 100);\n\n return percentage;\n};\n\nconst getNodeTypeBasedBgImage = (nodeType: INodeDataProps['node_type']) => {\n switch (nodeType) {\n case 'LEARNING':\n return ILLUSTRATIONS.NODE_LEARN_BG;\n case 'RECAP':\n return ILLUSTRATIONS.NODE_RECAP_BG;\n\n case 'ASSESSMENT':\n case 'DYNAMIC':\n return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n\n case 'PRACTICE':\n case 'EXTRA_PRACTICE':\n case 'TARGET_PRACTICE':\n return ILLUSTRATIONS.NODE_PRACTICE_BG;\n\n case 'PUZZLE_EASY':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE_HARD':\n return ILLUSTRATIONS.NODE_PUZZLE_BG;\n\n case 'VIDEO':\n return ILLUSTRATIONS.NODE_VIDEO_BG;\n\n default:\n return ILLUSTRATIONS.NODE_CUSTOM_TEST_BG;\n }\n};\n\nconst getSheetNLessonCount = (\n isSkipped: boolean,\n sheetsLength: number,\n isGoalBlock?: boolean,\n lessonIdx?: number,\n) => {\n if (isSkipped) return undefined;\n\n if (!isGoalBlock) return `(${sheetsLength})`;\n\n if (lessonIdx !== undefined && lessonIdx > 0) {\n return `${lessonIdx}`;\n }\n};\n\nexport { getChapterCompletionPercentage, getNodeTypeBasedBgImage, getSheetNLessonCount };\n"],"names":["getChapterCompletionPercentage","progressStats","mandatory","completed","total","getNodeTypeBasedBgImage","nodeType","ILLUSTRATIONS","getSheetNLessonCount","isSkipped","sheetsLength","isGoalBlock","lessonIdx"],"mappings":";AASM,MAAAA,IAAiC,CAACC,MAAgD;AAClF,MAAA,CAACA,EAAsB,QAAA;AAErB,QAAA,EAAE,WAAAC,EAAc,IAAAD,GAChB,EAAE,WAAAE,GAAW,OAAAC,EAAU,IAAAF;AAItB,SAFY,KAAK,MAAOC,IAAYC,IAAS,GAAG;AAGzD,GAEMC,IAA0B,CAACC,MAA0C;AACzE,UAAQA,GAAU;AAAA,IAChB,KAAK;AACH,aAAOC,EAAc;AAAA,IACvB,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB,KAAK;AACH,aAAOA,EAAc;AAAA,IAEvB;AACE,aAAOA,EAAc;AAAA,EACzB;AACF,GAEMC,IAAuB,CAC3BC,GACAC,GACAC,GACAC,MACG;AACH,MAAI,CAAAH,GAEJ;AAAA,QAAI,CAACE,EAAoB,QAAA,IAAID,CAAY;AAErC,QAAAE,MAAc,UAAaA,IAAY;AACzC,aAAO,GAAGA,CAAS;AAAA;AAEvB;"}
|
@@ -1,63 +1,36 @@
|
|
1
|
-
import { jsx as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import
|
15
|
-
|
16
|
-
|
17
|
-
const g = 60 * 60 * 24, $ = ["NOT_STARTED", "IN_PROGRESS"], C = (r) => {
|
18
|
-
if (!r)
|
19
|
-
return { isOverdue: !1, daysText: "" };
|
20
|
-
const c = Math.floor(Date.now() / 1e3), n = r - c, o = Math.ceil(n / g), t = o < 0, a = o > 0 ? `${Math.abs(o)}D` : "";
|
21
|
-
return { isOverdue: t, daysText: a };
|
22
|
-
}, W = (r, c, n) => {
|
23
|
-
const { isOverdue: o, daysText: t } = C(n);
|
24
|
-
if (o && $.includes(r))
|
25
|
-
return {
|
26
|
-
icon: /* @__PURE__ */ e(h, { $background: "RED", $borderRadius: 16, $gapX: 0.24, $gutterX: 0.5, children: /* @__PURE__ */ e(s, { $renderAs: "ac4-black", $color: "WHITE", children: "OVERDUE" }) }),
|
27
|
-
top: -10,
|
28
|
-
right: -10
|
29
|
-
};
|
30
|
-
switch (r) {
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
2
|
+
import c from "../../../assets/line-icons/icons/alarm.js";
|
3
|
+
import n from "../../../assets/line-icons/icons/bulb2.js";
|
4
|
+
import m from "../../../assets/line-icons/icons/check2.js";
|
5
|
+
import a from "../../../assets/line-icons/icons/dart.js";
|
6
|
+
import i from "../../../assets/line-icons/icons/exclamation.js";
|
7
|
+
import I from "../../../assets/line-icons/icons/lock2.js";
|
8
|
+
import s from "../../../assets/line-icons/icons/play2.js";
|
9
|
+
import p from "../../../assets/line-icons/icons/puzzle.js";
|
10
|
+
import E from "../../../assets/line-icons/icons/recap.js";
|
11
|
+
import f from "../../../assets/line-icons/icons/status.js";
|
12
|
+
import u from "../../../assets/line-icons/icons/testtube.js";
|
13
|
+
import { InProgressIconWrapper as A } from "../comps/node-card/node-card-styled.js";
|
14
|
+
import e from "../comps/tag/tag.js";
|
15
|
+
const M = (o, t) => {
|
16
|
+
switch (o) {
|
31
17
|
case "LOCKED":
|
32
18
|
return {
|
33
|
-
icon: /* @__PURE__ */
|
19
|
+
icon: /* @__PURE__ */ r(I, { width: 32, height: 32 }),
|
34
20
|
top: -12,
|
35
21
|
right: -12
|
36
22
|
};
|
37
23
|
case "IN_PROGRESS":
|
38
24
|
return {
|
39
|
-
icon: /* @__PURE__ */
|
40
|
-
S,
|
41
|
-
{
|
42
|
-
$flexDirection: "row",
|
43
|
-
$alignItems: "center",
|
44
|
-
$justifyContent: "center",
|
45
|
-
$gutterX: t ? 0.5 : 0,
|
46
|
-
$borderRadius: 16,
|
47
|
-
children: [
|
48
|
-
t && /* @__PURE__ */ e(s, { $renderAs: "ac4-black", $color: "WHITE", children: t }),
|
49
|
-
/* @__PURE__ */ e(A, {})
|
50
|
-
]
|
51
|
-
}
|
52
|
-
)
|
25
|
+
icon: /* @__PURE__ */ r(A, { children: /* @__PURE__ */ r(f, {}) })
|
53
26
|
};
|
54
27
|
case "COMPLETED":
|
55
28
|
return {
|
56
|
-
icon: /* @__PURE__ */
|
57
|
-
|
29
|
+
icon: /* @__PURE__ */ r(
|
30
|
+
e,
|
58
31
|
{
|
59
|
-
Icon:
|
60
|
-
label: typeof
|
32
|
+
Icon: m,
|
33
|
+
label: typeof t == "number" ? `${t}%` : void 0
|
61
34
|
}
|
62
35
|
),
|
63
36
|
top: -10,
|
@@ -65,7 +38,7 @@ const g = 60 * 60 * 24, $ = ["NOT_STARTED", "IN_PROGRESS"], C = (r) => {
|
|
65
38
|
};
|
66
39
|
case "WAIT_FOR_REVIEW":
|
67
40
|
return {
|
68
|
-
icon: /* @__PURE__ */ e
|
41
|
+
icon: /* @__PURE__ */ r(e, { Icon: i }),
|
69
42
|
//<AlertIcon width={32} height={32} fill="white" />,
|
70
43
|
top: -10,
|
71
44
|
right: -10
|
@@ -75,32 +48,31 @@ const g = 60 * 60 * 24, $ = ["NOT_STARTED", "IN_PROGRESS"], C = (r) => {
|
|
75
48
|
icon: void 0
|
76
49
|
};
|
77
50
|
}
|
78
|
-
},
|
79
|
-
switch (
|
51
|
+
}, O = (o) => {
|
52
|
+
switch (o) {
|
80
53
|
case "LEARNING":
|
81
|
-
return
|
54
|
+
return n;
|
82
55
|
case "RECAP":
|
83
|
-
return
|
56
|
+
return E;
|
84
57
|
case "DYNAMIC":
|
85
58
|
case "ASSESSMENT":
|
86
|
-
return
|
59
|
+
return c;
|
87
60
|
case "PRACTICE":
|
88
61
|
case "EXTRA_PRACTICE":
|
89
62
|
case "TARGET_PRACTICE":
|
90
|
-
|
91
|
-
return f;
|
63
|
+
return a;
|
92
64
|
case "PUZZLE_EASY":
|
93
65
|
case "PUZZLE_MEDIUM":
|
94
66
|
case "PUZZLE_HARD":
|
95
|
-
return
|
67
|
+
return p;
|
96
68
|
case "VIDEO":
|
97
|
-
return
|
69
|
+
return s;
|
98
70
|
default:
|
99
|
-
return
|
71
|
+
return u;
|
100
72
|
}
|
101
73
|
};
|
102
74
|
export {
|
103
|
-
|
104
|
-
|
75
|
+
O as getNodeCardBasedIcon,
|
76
|
+
M as getNodeStateBasedTagInfo
|
105
77
|
};
|
106
78
|
//# sourceMappingURL=node-card-utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"node-card-utils.js","sources":["../../../../src/features/chapters-v2/utils/node-card-utils.tsx"],"sourcesContent":["import type { INodeDataProps } from '../comps/node-card/node-card-types';\n\nimport AlarmIcon from '../../../assets/line-icons/icons/alarm';\nimport Bulb2Icon from '../../../assets/line-icons/icons/bulb2';\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport DartIcon from '../../../assets/line-icons/icons/dart';\nimport ExclamationIcon from '../../../assets/line-icons/icons/exclamation';\nimport Lock2Icon from '../../../assets/line-icons/icons/lock2';\nimport Play2Icon from '../../../assets/line-icons/icons/play2';\nimport PuzzleIcon from '../../../assets/line-icons/icons/puzzle';\nimport RecapIcon from '../../../assets/line-icons/icons/recap';\nimport StatusIcon from '../../../assets/line-icons/icons/status';\nimport TestTubeIcon from '../../../assets/line-icons/icons/testtube';\nimport
|
1
|
+
{"version":3,"file":"node-card-utils.js","sources":["../../../../src/features/chapters-v2/utils/node-card-utils.tsx"],"sourcesContent":["import type { INodeDataProps } from '../comps/node-card/node-card-types';\n\nimport AlarmIcon from '../../../assets/line-icons/icons/alarm';\nimport Bulb2Icon from '../../../assets/line-icons/icons/bulb2';\nimport Check2Icon from '../../../assets/line-icons/icons/check2';\nimport DartIcon from '../../../assets/line-icons/icons/dart';\nimport ExclamationIcon from '../../../assets/line-icons/icons/exclamation';\nimport Lock2Icon from '../../../assets/line-icons/icons/lock2';\nimport Play2Icon from '../../../assets/line-icons/icons/play2';\nimport PuzzleIcon from '../../../assets/line-icons/icons/puzzle';\nimport RecapIcon from '../../../assets/line-icons/icons/recap';\nimport StatusIcon from '../../../assets/line-icons/icons/status';\nimport TestTubeIcon from '../../../assets/line-icons/icons/testtube';\nimport { InProgressIconWrapper } from '../comps/node-card/node-card-styled';\nimport Tag from '../comps/tag/tag';\n\nconst getNodeStateBasedTagInfo = (nodeState: INodeDataProps['state'], accuracy?: number | null) => {\n switch (nodeState) {\n case 'LOCKED':\n return {\n icon: <Lock2Icon width={32} height={32} />,\n top: -12,\n right: -12,\n };\n case 'IN_PROGRESS':\n return {\n icon: (\n <InProgressIconWrapper>\n <StatusIcon />\n </InProgressIconWrapper>\n ),\n };\n case 'COMPLETED':\n return {\n icon: (\n <Tag\n Icon={Check2Icon}\n label={typeof accuracy === 'number' ? `${accuracy}%` : undefined}\n />\n ),\n top: -10,\n right: -10,\n };\n case 'WAIT_FOR_REVIEW':\n return {\n icon: <Tag Icon={ExclamationIcon} />, //<AlertIcon width={32} height={32} fill=\"white\" />,\n top: -10,\n right: -10,\n };\n\n default:\n return {\n icon: undefined,\n };\n }\n};\n\nconst getNodeCardBasedIcon = (nodeType: INodeDataProps['node_type']) => {\n switch (nodeType) {\n case 'LEARNING':\n return Bulb2Icon;\n case 'RECAP':\n return RecapIcon;\n case 'DYNAMIC':\n case 'ASSESSMENT':\n return AlarmIcon;\n case 'PRACTICE':\n case 'EXTRA_PRACTICE':\n case 'TARGET_PRACTICE':\n return DartIcon;\n case 'PUZZLE_EASY':\n case 'PUZZLE_MEDIUM':\n case 'PUZZLE_HARD':\n return PuzzleIcon;\n case 'VIDEO':\n return Play2Icon;\n\n default:\n return TestTubeIcon;\n }\n};\n\nexport { getNodeStateBasedTagInfo, getNodeCardBasedIcon };\n"],"names":["getNodeStateBasedTagInfo","nodeState","accuracy","jsx","Lock2Icon","InProgressIconWrapper","StatusIcon","Tag","Check2Icon","ExclamationIcon","getNodeCardBasedIcon","nodeType","Bulb2Icon","RecapIcon","AlarmIcon","DartIcon","PuzzleIcon","Play2Icon","TestTubeIcon"],"mappings":";;;;;;;;;;;;;;AAgBM,MAAAA,IAA2B,CAACC,GAAoCC,MAA6B;AACjG,UAAQD,GAAW;AAAA,IACjB,KAAK;AACI,aAAA;AAAA,QACL,MAAO,gBAAAE,EAAAC,GAAA,EAAU,OAAO,IAAI,QAAQ,IAAI;AAAA,QACxC,KAAK;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IAEX,KAAK;AACI,aAAA;AAAA,QACL,MACE,gBAAAD,EAACE,GACC,EAAA,UAAA,gBAAAF,EAACG,IAAW,CAAA,GACd;AAAA,MAAA;AAAA,IAGN,KAAK;AACI,aAAA;AAAA,QACL,MACE,gBAAAH;AAAA,UAACI;AAAA,UAAA;AAAA,YACC,MAAMC;AAAA,YACN,OAAO,OAAON,KAAa,WAAW,GAAGA,CAAQ,MAAM;AAAA,UAAA;AAAA,QACzD;AAAA,QAEF,KAAK;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IAEX,KAAK;AACI,aAAA;AAAA,QACL,MAAM,gBAAAC,EAACI,GAAI,EAAA,MAAME,EAAiB,CAAA;AAAA;AAAA,QAClC,KAAK;AAAA,QACL,OAAO;AAAA,MAAA;AAAA,IAGX;AACS,aAAA;AAAA,QACL,MAAM;AAAA,MAAA;AAAA,EAEZ;AACF,GAEMC,IAAuB,CAACC,MAA0C;AACtE,UAAQA,GAAU;AAAA,IAChB,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACI,aAAAC;AAAA,IACT,KAAK;AACI,aAAAC;AAAA,IAET;AACS,aAAAC;AAAA,EACX;AACF;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-milestone-resources.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-milestone-resources.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"get-milestone-resources.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-milestone-resources.ts"],"sourcesContent":["import type { ISheetDataProps } from '../../../sheets/sheets-list/sheet-item/sheet-item-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\n\ninterface IGetMilestoneResourcesAPIMetaData {\n studentId: string;\n}\n\nconst { useGet: useGetMilestoneResources, invalidate: invalidateMilestoneResources } = createGetAPI<\n ISheetDataProps[],\n void,\n IGetMilestoneResourcesAPIMetaData\n>({\n getURL: (userMilestoneId, _, { studentId }) =>\n `${BASE_URL_V3}/users/${studentId}/user-milestone/${userMilestoneId}/resources`,\n});\n\nexport { useGetMilestoneResources, invalidateMilestoneResources };\n"],"names":["useGetMilestoneResources","invalidateMilestoneResources","createGetAPI","userMilestoneId","_","studentId","BASE_URL_V3"],"mappings":";;AAUA,MAAM,EAAE,QAAQA,GAA0B,YAAYC,EAAA,IAAiCC,EAIrF;AAAA,EACA,QAAQ,CAACC,GAAiBC,GAAG,EAAE,WAAAC,EAAA,MAC7B,GAAGC,CAAW,UAAUD,CAAS,mBAAmBF,CAAe;AACvE,CAAC;"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"get-tests-list.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-tests-list.ts"],"sourcesContent":["import type {
|
1
|
+
{"version":3,"file":"get-tests-list.js","sources":["../../../../../src/features/milestone/milestone-list-container/api/get-tests-list.ts"],"sourcesContent":["import type { ISheetDataProps } from '../../../sheets/sheets-list/sheet-item/sheet-item-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\n\n//* Home page test help data.\nconst { useGet: useGetTestHelpData, invalidate: invalidateTestHelpData } = createGetAPI<\n ISheetDataProps[],\n void,\n {\n studentId: string;\n }\n>({\n getURL: (userMilestoneId, _, { studentId }) =>\n `${BASE_URL_V3}/users/${studentId}/user-milestone/${userMilestoneId}/tests`,\n});\n\nexport { useGetTestHelpData, invalidateTestHelpData };\n"],"names":["useGetTestHelpData","invalidateTestHelpData","createGetAPI","userMilestoneId","_","studentId","BASE_URL_V3"],"mappings":";;AAOA,MAAM,EAAE,QAAQA,GAAoB,YAAYC,EAAA,IAA2BC,EAMzE;AAAA,EACA,QAAQ,CAACC,GAAiBC,GAAG,EAAE,WAAAC,EAAA,MAC7B,GAAGC,CAAW,UAAUD,CAAS,mBAAmBF,CAAe;AACvE,CAAC;"}
|