@cuemath/leap 3.0.10 → 3.0.11-akm-2
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-styled.js +36 -27
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js +43 -31
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapters-list.js +16 -15
- package/dist/features/chapters/chapters-list/chapters-list.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +2 -2
- 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 +30 -30
- 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 +35 -35
- package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +44 -44
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +74 -74
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/homework/homework-card.js +146 -131
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/journey/hooks/use-chapter-journey.js +28 -28
- package/dist/features/journey/hooks/use-chapter-journey.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +40 -38
- 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 +53 -50
- 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 +64 -62
- 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 +44 -42
- 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 +39 -37
- package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +38 -31
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
- package/dist/features/post-game-stats/accuracy/accuracy.js +40 -39
- package/dist/features/post-game-stats/accuracy/accuracy.js.map +1 -1
- package/dist/features/post-game-stats/clock/clock.js +45 -45
- package/dist/features/post-game-stats/clock/clock.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/package.json +1 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import
|
1
|
+
import e, { keyframes as l, css as d } from "styled-components";
|
2
2
|
import o from "../../../ui/layout/flex-view.js";
|
3
3
|
import h from "../../../ui/text/text.js";
|
4
4
|
const g = l`
|
@@ -11,9 +11,9 @@ const g = l`
|
|
11
11
|
transform: translate(-150%, 100%) skewX(45deg);
|
12
12
|
opacity: 1;
|
13
13
|
}
|
14
|
-
`, u =
|
14
|
+
`, u = e(o)`
|
15
15
|
transition: scale 0.3s ease-in-out;
|
16
|
-
`,
|
16
|
+
`, b = e(o)`
|
17
17
|
position: absolute;
|
18
18
|
width: 100%;
|
19
19
|
height: 100%;
|
@@ -40,80 +40,89 @@ const g = l`
|
|
40
40
|
transform: translate(100%, -100%) skew(45deg);
|
41
41
|
pointer-events: none;
|
42
42
|
}
|
43
|
-
`, w =
|
43
|
+
`, w = e.svg(({ theme: t }) => `
|
44
44
|
position: absolute;
|
45
45
|
z-index: ${t.zIndex.CHAPTER_PROGRESS_SVG};
|
46
46
|
inset: 50%;
|
47
47
|
transform: translate(-50%, -50%) rotate(-90deg);
|
48
|
-
`),
|
49
|
-
({ theme: t, $progressCircle:
|
50
|
-
const { GREY_2:
|
48
|
+
`), $ = e.circle(
|
49
|
+
({ theme: t, $progressCircle: r, $progress: s }) => {
|
50
|
+
const { GREY_2: i, BLACK: p } = t.colors, { gutter: a } = t.layout, n = a * 18.625, c = r ? n - s : s;
|
51
51
|
return `
|
52
|
-
stroke-dasharray: ${
|
52
|
+
stroke-dasharray: ${n};
|
53
53
|
stroke-dashoffset: ${c};
|
54
|
-
stroke: ${
|
54
|
+
stroke: ${r ? p : i};
|
55
55
|
|
56
56
|
stroke-width: ${a * 0.125}px;
|
57
57
|
fill: none;
|
58
58
|
`;
|
59
59
|
}
|
60
|
-
),
|
61
|
-
const { gutter:
|
60
|
+
), y = e.img(({ theme: t }) => {
|
61
|
+
const { gutter: r } = t.layout;
|
62
62
|
return `
|
63
63
|
display: block;
|
64
|
-
width: ${
|
65
|
-
height: ${
|
64
|
+
width: ${r * 6}px;
|
65
|
+
height: ${r * 6}px;
|
66
66
|
border-radius: 50%;
|
67
67
|
`;
|
68
|
-
}),
|
69
|
-
const { layout:
|
68
|
+
}), C = e.div(({ theme: t }) => {
|
69
|
+
const { layout: r } = t;
|
70
70
|
return `
|
71
71
|
position: absolute;
|
72
72
|
top: 5px;
|
73
73
|
right: 5px;
|
74
74
|
z-index: 2;
|
75
75
|
|
76
|
-
width: ${
|
77
|
-
height: ${
|
76
|
+
width: ${r.gutter * 1.25}px;
|
77
|
+
height: ${r.gutter * 1.25}px;
|
78
78
|
border-radius: 50%;
|
79
79
|
background: ${t.colors.WHITE_1};
|
80
80
|
outline: 1px solid ${t.colors.BLACK_1};
|
81
81
|
`;
|
82
|
-
}),
|
82
|
+
}), v = e(h)`
|
83
83
|
display: -webkit-box;
|
84
84
|
-webkit-box-orient: vertical;
|
85
85
|
-webkit-line-clamp: 2;
|
86
86
|
text-overflow: ellipsis;
|
87
87
|
overflow: hidden;
|
88
88
|
height: 44px;
|
89
|
-
`,
|
89
|
+
`, x = e(o)`
|
90
|
+
position: absolute;
|
91
|
+
left: 0;
|
92
|
+
top: 0;
|
93
|
+
`, I = e(o)`
|
90
94
|
cursor: ${({ shouldHideClick: t }) => t ? "not-allowed" : "pointer"};
|
91
95
|
position: relative;
|
92
96
|
box-shadow: inset 0px 0px 0px 0.5px ${({ theme: t }) => t.colors.BLACK_T_15};
|
93
97
|
aspect-ratio: 1;
|
94
98
|
|
95
99
|
&:hover {
|
96
|
-
background: ${({ theme: t, $bgColor:
|
100
|
+
background: ${({ theme: t, $bgColor: r }) => r ? t.colors[r] : "none"};
|
97
101
|
|
98
102
|
${u} {
|
99
103
|
scale: 1.05;
|
100
104
|
}
|
101
105
|
|
102
|
-
${
|
106
|
+
${b}::after {
|
103
107
|
${d`
|
104
108
|
animation: ${g} 1.2s ease-out forwards;
|
105
109
|
`}
|
106
110
|
}
|
111
|
+
|
112
|
+
${x} {
|
113
|
+
background-color: transparent;
|
114
|
+
}
|
107
115
|
}
|
108
116
|
`;
|
109
117
|
export {
|
110
|
-
|
118
|
+
y as ChapterImage,
|
111
119
|
u as ChapterImageWrapper,
|
112
|
-
|
113
|
-
|
120
|
+
x as ChapterItemNumberWrapper,
|
121
|
+
I as ChapterItemWrapper,
|
122
|
+
v as ChapterName,
|
114
123
|
w as ChapterProgressSVG,
|
115
|
-
|
116
|
-
|
117
|
-
|
124
|
+
$ as ChapterProgressSVGCircle,
|
125
|
+
b as ChapterProgressWrapper,
|
126
|
+
C as StyledCheckIconWrapper
|
118
127
|
};
|
119
128
|
//# sourceMappingURL=chapter-item-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapter-item-styled.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../ui/types';\n\nimport styled, { css, keyframes } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nconst shimmerEffect = keyframes`\n 0% {\n transform: translate(100%, -100%) skewX(45deg);\n opacity: 0;\n }\n\n 100% {\n transform: translate(-150%, 100%) skewX(45deg);\n opacity: 1;\n }\n`;\n\nconst ChapterImageWrapper = styled(FlexView)`\n transition: scale 0.3s ease-in-out;\n`;\n\nconst ChapterProgressWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n overflow: hidden;\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n width: 40%;\n height: 150%;\n background: linear-gradient(\n to right,\n rgba(255, 255, 255, 0.7) 0%,\n rgba(255, 255, 255, 0.1) 35%,\n rgba(255, 255, 255, 0.7) 40%,\n rgba(255, 255, 255, 0.7) 80%,\n rgba(255, 255, 255, 0) 100%\n );\n opacity: 0;\n transform: translate(100%, -100%) skew(45deg);\n pointer-events: none;\n }\n`;\n\nconst ChapterProgressSVG = styled.svg(({ theme }) => {\n return `\n position: absolute;\n z-index: ${theme.zIndex.CHAPTER_PROGRESS_SVG};\n inset: 50%;\n transform: translate(-50%, -50%) rotate(-90deg);\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress }) => {\n const { GREY_2, BLACK } = theme.colors;\n const { gutter } = theme.layout;\n\n const strokeDashArray = gutter * 18.625;\n const strokeDashOffset = $progressCircle ? strokeDashArray - $progress : $progress;\n\n return `\n stroke-dasharray: ${strokeDashArray};\n stroke-dashoffset: ${strokeDashOffset};\n stroke: ${$progressCircle ? BLACK : GREY_2};\n\n stroke-width: ${gutter * 0.125}px;\n fill: none;\n `;\n },\n);\n\nconst ChapterImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n display: block;\n width: ${gutter * 6}px;\n height: ${gutter * 6}px;\n border-radius: 50%;\n `;\n});\n\nconst StyledCheckIconWrapper = styled.div(({ theme }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n top: 5px;\n right: 5px;\n z-index: 2;\n\n width: ${layout.gutter * 1.25}px;\n height: ${layout.gutter * 1.25}px;\n border-radius: 50%;\n background: ${theme.colors.WHITE_1};\n outline: 1px solid ${theme.colors.BLACK_1};\n `;\n});\n\nconst ChapterName = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n height: 44px;\n`;\n\ninterface IChapterItemWrapperProps {\n $bgColor?: TColorNames;\n shouldHideClick?: boolean;\n}\n\nconst ChapterItemWrapper = styled(FlexView)<IChapterItemWrapperProps>`\n cursor: ${({ shouldHideClick }) => (shouldHideClick ? 'not-allowed' : 'pointer')};\n position: relative;\n box-shadow: inset 0px 0px 0px 0.5px ${({ theme }) => theme.colors.BLACK_T_15};\n aspect-ratio: 1;\n\n &:hover {\n background: ${({ theme, $bgColor }) => ($bgColor ? theme.colors[$bgColor] : 'none')};\n\n ${ChapterImageWrapper} {\n scale: 1.05;\n }\n\n ${ChapterProgressWrapper}::after {\n ${css`\n animation: ${shimmerEffect} 1.2s ease-out forwards;\n `}\n }\n }\n`;\n\nexport {\n ChapterImageWrapper,\n ChapterProgressWrapper,\n ChapterImage,\n ChapterItemWrapper,\n ChapterName,\n ChapterProgressSVG,\n ChapterProgressSVGCircle,\n StyledCheckIconWrapper,\n};\n"],"names":["shimmerEffect","keyframes","ChapterImageWrapper","styled","FlexView","ChapterProgressWrapper","ChapterProgressSVG","theme","ChapterProgressSVGCircle","$progressCircle","$progress","GREY_2","BLACK","gutter","strokeDashArray","strokeDashOffset","ChapterImage","StyledCheckIconWrapper","layout","ChapterName","Text","ChapterItemWrapper","shouldHideClick","$bgColor","css"],"mappings":";;;AAOA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYhBC,IAAsBC,EAAOC,CAAQ;A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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAczBC,
|
1
|
+
{"version":3,"file":"chapter-item-styled.js","sources":["../../../../../src/features/chapters/chapters-list/chapter-item/chapter-item-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../ui/types';\n\nimport styled, { css, keyframes } from 'styled-components';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\nconst shimmerEffect = keyframes`\n 0% {\n transform: translate(100%, -100%) skewX(45deg);\n opacity: 0;\n }\n\n 100% {\n transform: translate(-150%, 100%) skewX(45deg);\n opacity: 1;\n }\n`;\n\nconst ChapterImageWrapper = styled(FlexView)`\n transition: scale 0.3s ease-in-out;\n`;\n\nconst ChapterProgressWrapper = styled(FlexView)`\n position: absolute;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n overflow: hidden;\n\n &::after {\n content: '';\n position: absolute;\n top: 0;\n right: 0;\n z-index: 1;\n width: 40%;\n height: 150%;\n background: linear-gradient(\n to right,\n rgba(255, 255, 255, 0.7) 0%,\n rgba(255, 255, 255, 0.1) 35%,\n rgba(255, 255, 255, 0.7) 40%,\n rgba(255, 255, 255, 0.7) 80%,\n rgba(255, 255, 255, 0) 100%\n );\n opacity: 0;\n transform: translate(100%, -100%) skew(45deg);\n pointer-events: none;\n }\n`;\n\nconst ChapterProgressSVG = styled.svg(({ theme }) => {\n return `\n position: absolute;\n z-index: ${theme.zIndex.CHAPTER_PROGRESS_SVG};\n inset: 50%;\n transform: translate(-50%, -50%) rotate(-90deg);\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress }) => {\n const { GREY_2, BLACK } = theme.colors;\n const { gutter } = theme.layout;\n\n const strokeDashArray = gutter * 18.625;\n const strokeDashOffset = $progressCircle ? strokeDashArray - $progress : $progress;\n\n return `\n stroke-dasharray: ${strokeDashArray};\n stroke-dashoffset: ${strokeDashOffset};\n stroke: ${$progressCircle ? BLACK : GREY_2};\n\n stroke-width: ${gutter * 0.125}px;\n fill: none;\n `;\n },\n);\n\nconst ChapterImage = styled.img(({ theme }) => {\n const { gutter } = theme.layout;\n\n return `\n display: block;\n width: ${gutter * 6}px;\n height: ${gutter * 6}px;\n border-radius: 50%;\n `;\n});\n\nconst StyledCheckIconWrapper = styled.div(({ theme }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n top: 5px;\n right: 5px;\n z-index: 2;\n\n width: ${layout.gutter * 1.25}px;\n height: ${layout.gutter * 1.25}px;\n border-radius: 50%;\n background: ${theme.colors.WHITE_1};\n outline: 1px solid ${theme.colors.BLACK_1};\n `;\n});\n\nconst ChapterName = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n height: 44px;\n`;\n\ninterface IChapterItemWrapperProps {\n $bgColor?: TColorNames;\n shouldHideClick?: boolean;\n}\n\nconst ChapterItemNumberWrapper = styled(FlexView)`\n position: absolute;\n left: 0;\n top: 0;\n`;\n\nconst ChapterItemWrapper = styled(FlexView)<IChapterItemWrapperProps>`\n cursor: ${({ shouldHideClick }) => (shouldHideClick ? 'not-allowed' : 'pointer')};\n position: relative;\n box-shadow: inset 0px 0px 0px 0.5px ${({ theme }) => theme.colors.BLACK_T_15};\n aspect-ratio: 1;\n\n &:hover {\n background: ${({ theme, $bgColor }) => ($bgColor ? theme.colors[$bgColor] : 'none')};\n\n ${ChapterImageWrapper} {\n scale: 1.05;\n }\n\n ${ChapterProgressWrapper}::after {\n ${css`\n animation: ${shimmerEffect} 1.2s ease-out forwards;\n `}\n }\n\n ${ChapterItemNumberWrapper} {\n background-color: transparent;\n }\n }\n`;\n\nexport {\n ChapterImageWrapper,\n ChapterProgressWrapper,\n ChapterImage,\n ChapterItemWrapper,\n ChapterName,\n ChapterProgressSVG,\n ChapterProgressSVGCircle,\n StyledCheckIconWrapper,\n ChapterItemNumberWrapper,\n};\n"],"names":["shimmerEffect","keyframes","ChapterImageWrapper","styled","FlexView","ChapterProgressWrapper","ChapterProgressSVG","theme","ChapterProgressSVGCircle","$progressCircle","$progress","GREY_2","BLACK","gutter","strokeDashArray","strokeDashOffset","ChapterImage","StyledCheckIconWrapper","layout","ChapterName","Text","ChapterItemNumberWrapper","ChapterItemWrapper","shouldHideClick","$bgColor","css"],"mappings":";;;AAOA,MAAMA,IAAgBC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAYhBC,IAAsBC,EAAOC,CAAQ;AAAA;AAAA,GAIrCC,IAAyBF,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GA6BxCE,IAAqBH,EAAO,IAAI,CAAC,EAAE,OAAAI,QAChC;AAAA;AAAA,eAEMA,EAAM,OAAO,oBAAoB;AAAA;AAAA;AAAA,GAI/C,GAOKC,IAA2BL,EAAO;AAAA,EACtC,CAAC,EAAE,OAAAI,GAAO,iBAAAE,GAAiB,WAAAC,QAAgB;AACzC,UAAM,EAAE,QAAAC,GAAQ,OAAAC,MAAUL,EAAM,QAC1B,EAAE,QAAAM,EAAO,IAAIN,EAAM,QAEnBO,IAAkBD,IAAS,QAC3BE,IAAmBN,IAAkBK,IAAkBJ,IAAYA;AAElE,WAAA;AAAA,0BACeI,CAAe;AAAA,2BACdC,CAAgB;AAAA,gBAC3BN,IAAkBG,IAAQD,CAAM;AAAA;AAAA,sBAE1BE,IAAS,KAAK;AAAA;AAAA;AAAA,EAGlC;AACF,GAEMG,IAAeb,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AACvC,QAAA,EAAE,QAAAM,EAAO,IAAIN,EAAM;AAElB,SAAA;AAAA;AAAA,aAEIM,IAAS,CAAC;AAAA,cACTA,IAAS,CAAC;AAAA;AAAA;AAGxB,CAAC,GAEKI,IAAyBd,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AACjD,QAAA,EAAE,QAAAW,EAAW,IAAAX;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMIW,EAAO,SAAS,IAAI;AAAA,cACnBA,EAAO,SAAS,IAAI;AAAA;AAAA,kBAEhBX,EAAM,OAAO,OAAO;AAAA,yBACbA,EAAM,OAAO,OAAO;AAAA;AAE7C,CAAC,GAEKY,IAAchB,EAAOiB,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAczBC,IAA2BlB,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAM1CkB,IAAqBnB,EAAOC,CAAQ;AAAA,YAC9B,CAAC,EAAE,iBAAAmB,EAAA,MAAuBA,IAAkB,gBAAgB,SAAU;AAAA;AAAA,wCAE1C,CAAC,EAAE,OAAAhB,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;AAAA,kBAI5D,CAAC,EAAE,OAAAA,GAAO,UAAAiB,QAAgBA,IAAWjB,EAAM,OAAOiB,CAAQ,IAAI,MAAO;AAAA;AAAA,MAEjFtB,CAAmB;AAAA;AAAA;AAAA;AAAA,MAInBG,CAAsB;AAAA,QACpBoB;AAAA,qBACazB,CAAa;AAAA,OAC3B;AAAA;AAAA;AAAA,MAGDqB,CAAwB;AAAA;AAAA;AAAA;AAAA;"}
|
@@ -1,25 +1,26 @@
|
|
1
1
|
import { jsx as e, jsxs as n } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
|
8
|
-
|
2
|
+
import { memo as w, useState as W, useRef as _, useCallback as k, useLayoutEffect as A } from "react";
|
3
|
+
import S from "../../../../assets/line-icons/icons/check2.js";
|
4
|
+
import m from "../../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
+
import H from "../../../ui/layout/flex-view.js";
|
6
|
+
import j from "../../../ui/text/text.js";
|
7
|
+
import { ChapterItemWrapper as P, ChapterImageWrapper as X, ChapterProgressWrapper as E, ChapterProgressSVG as G, ChapterProgressSVGCircle as d, ChapterImage as L, StyledCheckIconWrapper as N, ChapterName as V, ChapterItemNumberWrapper as z } from "./chapter-item-styled.js";
|
8
|
+
const U = w(
|
9
|
+
({ milestoneId: o, chapter: i, onChapterClick: a, itemIndex: l, shouldShowItemIndex: g }) => {
|
9
10
|
const {
|
10
|
-
name:
|
11
|
-
image_url:
|
11
|
+
name: c,
|
12
|
+
image_url: $,
|
12
13
|
progress_stat: u,
|
13
14
|
image_hue: C
|
14
|
-
} = i, { mandatory:
|
15
|
+
} = i, { mandatory: f, optional: I } = u || {}, { completed: s = 0, total: p = 0 } = f || {}, { total: x = 0 } = I || {}, [y, T] = W(!1), t = _(null), h = s > 0 ? Math.floor((s / p || 1) * 100) : 0, r = p + x, b = k(() => {
|
15
16
|
if (r === 0)
|
16
17
|
return null;
|
17
18
|
a(i, o);
|
18
19
|
}, [i, o, a, r]);
|
19
|
-
return
|
20
|
-
t.current && t.current.scrollHeight > t.current.clientHeight &&
|
20
|
+
return A(() => {
|
21
|
+
t.current && t.current.scrollHeight > t.current.clientHeight && T(!0);
|
21
22
|
}, [t]), /* @__PURE__ */ e(
|
22
|
-
|
23
|
+
m,
|
23
24
|
{
|
24
25
|
renderAs: "primary",
|
25
26
|
position: "bottom",
|
@@ -28,66 +29,77 @@ const B = T(
|
|
28
29
|
parentWidth: "100%",
|
29
30
|
zIndex: 5,
|
30
31
|
children: /* @__PURE__ */ n(
|
31
|
-
|
32
|
+
P,
|
32
33
|
{
|
33
|
-
id: `milestone-chapter-${o || ""}-${
|
34
|
+
id: `milestone-chapter-${o || ""}-${l}`,
|
34
35
|
$alignItems: "center",
|
35
36
|
$gapX: 1,
|
36
37
|
$gutterX: 1,
|
37
38
|
$flexGap: 8,
|
38
39
|
$background: "WHITE_1",
|
39
|
-
onClick:
|
40
|
+
onClick: b,
|
40
41
|
className: "goal-widget-chapter-item",
|
41
42
|
$bgColor: `${C}_1`,
|
42
43
|
shouldHideClick: r === 0,
|
43
44
|
children: [
|
44
45
|
/* @__PURE__ */ n(
|
45
|
-
|
46
|
+
X,
|
46
47
|
{
|
47
48
|
$width: "fit-content",
|
48
49
|
$position: "relative",
|
49
50
|
$justifyContent: "center",
|
50
51
|
$alignItems: "center",
|
51
52
|
children: [
|
52
|
-
/* @__PURE__ */ e(
|
53
|
-
/* @__PURE__ */ e(
|
53
|
+
/* @__PURE__ */ e(E, { children: /* @__PURE__ */ n(G, { width: "96px", height: "96px", children: [
|
54
|
+
/* @__PURE__ */ e(d, { $progress: 0, r: "47", cx: "48", cy: "48" }),
|
54
55
|
/* @__PURE__ */ e(
|
55
|
-
|
56
|
+
d,
|
56
57
|
{
|
57
58
|
$progressCircle: !0,
|
58
|
-
$progress:
|
59
|
+
$progress: h * 2.98,
|
59
60
|
r: "47",
|
60
61
|
cx: "48",
|
61
62
|
cy: "48"
|
62
63
|
}
|
63
64
|
)
|
64
65
|
] }) }),
|
65
|
-
/* @__PURE__ */ e(
|
66
|
-
|
66
|
+
/* @__PURE__ */ e(L, { src: $, alt: "Chapter Image" }),
|
67
|
+
h === 100 && /* @__PURE__ */ e(N, { children: /* @__PURE__ */ e(S, { width: 20, height: 20 }) })
|
67
68
|
]
|
68
69
|
}
|
69
70
|
),
|
70
|
-
/* @__PURE__ */ e(
|
71
|
-
|
71
|
+
/* @__PURE__ */ e(H, { $justifyContent: "center", $alignItems: "center", children: /* @__PURE__ */ e(
|
72
|
+
m,
|
72
73
|
{
|
73
74
|
renderAs: "primary",
|
74
75
|
position: "bottom",
|
75
|
-
tooltipItem:
|
76
|
-
hidden: !
|
76
|
+
tooltipItem: c,
|
77
|
+
hidden: !y,
|
77
78
|
widthX: 21.75,
|
78
79
|
zIndex: 5,
|
79
80
|
children: /* @__PURE__ */ e(
|
80
|
-
|
81
|
+
V,
|
81
82
|
{
|
82
83
|
ref: t,
|
83
84
|
$renderAs: "ab2",
|
84
85
|
$color: "BLACK_T_87",
|
85
86
|
$align: "center",
|
86
|
-
children:
|
87
|
+
children: c
|
87
88
|
}
|
88
89
|
)
|
89
90
|
}
|
90
|
-
) })
|
91
|
+
) }),
|
92
|
+
!!g && /* @__PURE__ */ e(
|
93
|
+
z,
|
94
|
+
{
|
95
|
+
$background: "WHITE_4",
|
96
|
+
$widthX: 1.75,
|
97
|
+
$heightX: 1.75,
|
98
|
+
$alignItems: "center",
|
99
|
+
$justifyContent: "center",
|
100
|
+
children: /* @__PURE__ */ e(j, { $renderAs: "ab2", $color: "BLACK_1", $align: "center", children: l + 1 })
|
101
|
+
}
|
102
|
+
)
|
91
103
|
]
|
92
104
|
}
|
93
105
|
)
|
@@ -96,6 +108,6 @@ const B = T(
|
|
96
108
|
}
|
97
109
|
);
|
98
110
|
export {
|
99
|
-
|
111
|
+
U as default
|
100
112
|
};
|
101
113
|
//# sourceMappingURL=chapter-item.js.map
|
@@ -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 { mandatory, optional } = chapterProgressStat || {};\n const { completed = 0, total: totalMandatory = 0 } = mandatory || {};\n const { total: optionalTotal = 0 } = optional || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const completionPercentage =\n completed > 0 ? Math.floor((completed / totalMandatory || 1) * 100) : 0;\n const totalSheets = totalMandatory + optionalTotal;\n const handleOnChapterClick = useCallback(() => {\n if (totalSheets === 0) {\n return null;\n }\n\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick, totalSheets]);\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 <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem=\"Coming soon! We’re building this chapter\"\n hidden={totalSheets > 0}\n parentWidth=\"100%\"\n zIndex={5}\n >\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 shouldHideClick={totalSheets === 0}\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 </ArrowTooltip>\n );\n },\n);\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","name","imageUrl","chapterProgressStat","imageHue","mandatory","optional","completed","totalMandatory","optionalTotal","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","totalSheets","handleOnChapterClick","useCallback","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","Styled.ChapterName"],"mappings":"
|
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 Text from '../../../ui/text/text';\nimport * as Styled from './chapter-item-styled';\n\nconst ChapterItem: FC<IChapterItemProps> = memo(\n ({ milestoneId, chapter, onChapterClick, itemIndex, shouldShowItemIndex }) => {\n const {\n name,\n image_url: imageUrl,\n progress_stat: chapterProgressStat,\n image_hue: imageHue,\n } = chapter;\n const { mandatory, optional } = chapterProgressStat || {};\n const { completed = 0, total: totalMandatory = 0 } = mandatory || {};\n const { total: optionalTotal = 0 } = optional || {};\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const completionPercentage =\n completed > 0 ? Math.floor((completed / totalMandatory || 1) * 100) : 0;\n const totalSheets = totalMandatory + optionalTotal;\n const handleOnChapterClick = useCallback(() => {\n if (totalSheets === 0) {\n return null;\n }\n\n onChapterClick(chapter, milestoneId);\n }, [chapter, milestoneId, onChapterClick, totalSheets]);\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 <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem=\"Coming soon! We’re building this chapter\"\n hidden={totalSheets > 0}\n parentWidth=\"100%\"\n zIndex={5}\n >\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 shouldHideClick={totalSheets === 0}\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 {!!shouldShowItemIndex && (\n <Styled.ChapterItemNumberWrapper\n $background=\"WHITE_4\"\n $widthX={1.75}\n $heightX={1.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <Text $renderAs=\"ab2\" $color=\"BLACK_1\" $align=\"center\">\n {itemIndex + 1}\n </Text>\n </Styled.ChapterItemNumberWrapper>\n )}\n </Styled.ChapterItemWrapper>\n </ArrowTooltip>\n );\n },\n);\n\nexport default ChapterItem;\n"],"names":["ChapterItem","memo","milestoneId","chapter","onChapterClick","itemIndex","shouldShowItemIndex","name","imageUrl","chapterProgressStat","imageHue","mandatory","optional","completed","totalMandatory","optionalTotal","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","completionPercentage","totalSheets","handleOnChapterClick","useCallback","useLayoutEffect","jsx","ArrowTooltip","jsxs","Styled.ChapterItemWrapper","Styled.ChapterImageWrapper","Styled.ChapterProgressWrapper","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.ChapterImage","Styled.StyledCheckIconWrapper","Check2Icon","FlexView","Styled.ChapterName","Styled.ChapterItemNumberWrapper","Text"],"mappings":";;;;;;;AAWA,MAAMA,IAAqCC;AAAA,EACzC,CAAC,EAAE,aAAAC,GAAa,SAAAC,GAAS,gBAAAC,GAAgB,WAAAC,GAAW,qBAAAC,QAA0B;AACtE,UAAA;AAAA,MACJ,MAAAC;AAAA,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;AAAA,kBACZ,SAAS;AAAA,kBACT,UAAU;AAAA,kBACV,aAAY;AAAA,kBACZ,iBAAgB;AAAA,kBAEhB,UAAA,gBAAAb,EAACc,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAC3C,UAAAnC,IAAY,EACf,CAAA;AAAA,gBAAA;AAAA,cACF;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
|
@@ -1,14 +1,14 @@
|
|
1
|
-
import { jsxs as
|
1
|
+
import { jsxs as m, jsx as r, Fragment as A } from "react/jsx-runtime";
|
2
2
|
import { memo as T, useCallback as b } from "react";
|
3
3
|
import { IMAGES as g } from "../../../assets/images/images.js";
|
4
|
-
import
|
5
|
-
import
|
4
|
+
import x from "../../ui/arrow-tooltip/arrow-tooltip.js";
|
5
|
+
import k from "../../ui/buttons/button/button.js";
|
6
6
|
import { useUIContext as $ } from "../../ui/context/context.js";
|
7
|
-
import
|
7
|
+
import p from "../../ui/separator/separator.js";
|
8
8
|
import y from "../../ui/text/text.js";
|
9
9
|
import E from "./chapter-item/chapter-item.js";
|
10
|
-
import { ChaptersListContainer as l, ChaptersWrapper as
|
11
|
-
const
|
10
|
+
import { ChaptersListContainer as l, ChaptersWrapper as I } from "./chapters-list-styled.js";
|
11
|
+
const S = T(
|
12
12
|
({ milestoneId: t, canUpdatePlan: c, chapters: o, ...d }) => {
|
13
13
|
const { isGoalCreation: i, userType: h, onChapterClick: C, onAddChapter: e, isMilestoneActive: a } = d, { onClick: n } = $(), f = b(() => {
|
14
14
|
n({
|
@@ -18,7 +18,7 @@ const I = T(
|
|
18
18
|
}
|
19
19
|
}), e == null || e({ milestoneId: t, isGoalCreation: i });
|
20
20
|
}, [t, i, e, n]);
|
21
|
-
return o.length ? /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(
|
21
|
+
return o.length ? /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(I, { children: o.map((s, u) => {
|
22
22
|
const { id: _ } = s;
|
23
23
|
return /* @__PURE__ */ r(
|
24
24
|
E,
|
@@ -26,11 +26,12 @@ const I = T(
|
|
26
26
|
milestoneId: t,
|
27
27
|
chapter: s,
|
28
28
|
onChapterClick: C,
|
29
|
-
itemIndex: u
|
29
|
+
itemIndex: u,
|
30
|
+
shouldShowItemIndex: !0
|
30
31
|
},
|
31
32
|
_
|
32
33
|
);
|
33
|
-
}) }) }) : /* @__PURE__ */
|
34
|
+
}) }) }) : /* @__PURE__ */ m(
|
34
35
|
l,
|
35
36
|
{
|
36
37
|
$gapX: 6.75,
|
@@ -39,17 +40,17 @@ const I = T(
|
|
39
40
|
$background: "WHITE",
|
40
41
|
children: [
|
41
42
|
/* @__PURE__ */ r("img", { src: g.EMPTY_MIX_TESTS, alt: "empty_mix_tests" }),
|
42
|
-
/* @__PURE__ */ r(
|
43
|
-
h === "TEACHER" ? /* @__PURE__ */
|
43
|
+
/* @__PURE__ */ r(p, { heightX: 2 }),
|
44
|
+
h === "TEACHER" ? /* @__PURE__ */ m(A, { children: [
|
44
45
|
/* @__PURE__ */ r(
|
45
|
-
|
46
|
+
x,
|
46
47
|
{
|
47
48
|
renderAs: "primary",
|
48
49
|
position: "bottom",
|
49
50
|
hidden: a,
|
50
51
|
tooltipItem: "Plan is completed",
|
51
52
|
children: /* @__PURE__ */ r(
|
52
|
-
|
53
|
+
k,
|
53
54
|
{
|
54
55
|
widthX: 10,
|
55
56
|
renderAs: "primary",
|
@@ -65,13 +66,13 @@ const I = T(
|
|
65
66
|
)
|
66
67
|
}
|
67
68
|
),
|
68
|
-
/* @__PURE__ */ r(
|
69
|
+
/* @__PURE__ */ r(p, { heightX: 2 })
|
69
70
|
] }) : /* @__PURE__ */ r(y, { $renderAs: "ab2-bold", $color: "BLACK_T_87", children: "Wait for the teacher to add a chapter" })
|
70
71
|
]
|
71
72
|
}
|
72
73
|
);
|
73
74
|
}
|
74
|
-
), O =
|
75
|
+
), O = S;
|
75
76
|
export {
|
76
77
|
O as default
|
77
78
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapters-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport { IMAGES } from '../../../assets/images/images';\nimport ArrowTooltip from '../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../ui/buttons/button/button';\nimport { useUIContext } from '../../ui/context/context';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport ChapterItem from './chapter-item/chapter-item';\nimport * as Styled from './chapters-list-styled';\n\nconst ChaptersList: FC<IChaptersListProps> = memo(\n ({ milestoneId, canUpdatePlan, chapters, ...restChaptersList }) => {\n const { isGoalCreation, userType, onChapterClick, onAddChapter, isMilestoneActive } =\n restChaptersList;\n\n const { onClick: trackOnClick } = useUIContext();\n\n const handleOnAddChapter = useCallback(() => {\n trackOnClick({\n label: 'add_chapter_icon',\n props: {\n milestone_id: milestoneId,\n },\n });\n onAddChapter?.({ milestoneId, isGoalCreation });\n }, [milestoneId, isGoalCreation, onAddChapter, trackOnClick]);\n\n if (!chapters.length) {\n return (\n <Styled.ChaptersListContainer\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={isMilestoneActive}\n tooltipItem=\"Plan is completed\"\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Add chapter\"\n onClick={handleOnAddChapter}\n disabled={!isMilestoneActive || !canUpdatePlan}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to add a chapter\n </Text>\n )}\n </Styled.ChaptersListContainer>\n );\n }\n\n return (\n <Styled.ChaptersListContainer>\n <Styled.ChaptersWrapper>\n {chapters.map((chapter, idx) => {\n const { id } = chapter;\n\n return (\n <ChapterItem\n key={id}\n milestoneId={milestoneId}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n />\n );\n })}\n </Styled.ChaptersWrapper>\n </Styled.ChaptersListContainer>\n );\n },\n);\n\nexport default ChaptersList;\n"],"names":["ChaptersList","memo","milestoneId","canUpdatePlan","chapters","restChaptersList","isGoalCreation","userType","onChapterClick","onAddChapter","isMilestoneActive","trackOnClick","useUIContext","handleOnAddChapter","useCallback","jsx","Styled.ChaptersListContainer","Styled.ChaptersWrapper","chapter","idx","id","ChapterItem","jsxs","IMAGES","Separator","Fragment","ArrowTooltip","Button","Text","ChaptersList$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAuCC;AAAA,EAC3C,CAAC,EAAE,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,GAAGC,QAAuB;AACjE,UAAM,EAAE,gBAAAC,GAAgB,UAAAC,GAAU,gBAAAC,GAAgB,cAAAC,GAAc,mBAAAC,EAC9D,IAAAL,GAEI,EAAE,SAASM,EAAa,IAAIC,EAAa,GAEzCC,IAAqBC,EAAY,MAAM;AAC9B,MAAAH,EAAA;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,UACL,cAAcT;AAAA,QAChB;AAAA,MAAA,CACD,GACcO,KAAA,QAAAA,EAAA,EAAE,aAAAP,GAAa,gBAAAI,EAAA;AAAA,OAC7B,CAACJ,GAAaI,GAAgBG,GAAcE,CAAY,CAAC;AAExD,WAACP,EAAS,SA2CX,gBAAAW,EAAAC,GAAA,EACC,UAAC,gBAAAD,EAAAE,GAAA,EACE,UAASb,EAAA,IAAI,CAACc,GAASC,MAAQ;AACxB,YAAA,EAAE,IAAAC,EAAO,IAAAF;AAGb,aAAA,gBAAAH;AAAA,QAACM;AAAA,QAAA;AAAA,UAEC,aAAAnB;AAAA,UACA,SAAAgB;AAAA,UACA,gBAAAV;AAAA,UACA,WAAWW;AAAA,QAAA;AAAA,
|
1
|
+
{"version":3,"file":"chapters-list.js","sources":["../../../../src/features/chapters/chapters-list/chapters-list.tsx"],"sourcesContent":["import type { IChaptersListProps } from './chapters-list-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback } from 'react';\n\nimport { IMAGES } from '../../../assets/images/images';\nimport ArrowTooltip from '../../ui/arrow-tooltip/arrow-tooltip';\nimport Button from '../../ui/buttons/button/button';\nimport { useUIContext } from '../../ui/context/context';\nimport Separator from '../../ui/separator/separator';\nimport Text from '../../ui/text/text';\nimport ChapterItem from './chapter-item/chapter-item';\nimport * as Styled from './chapters-list-styled';\n\nconst ChaptersList: FC<IChaptersListProps> = memo(\n ({ milestoneId, canUpdatePlan, chapters, ...restChaptersList }) => {\n const { isGoalCreation, userType, onChapterClick, onAddChapter, isMilestoneActive } =\n restChaptersList;\n\n const { onClick: trackOnClick } = useUIContext();\n\n const handleOnAddChapter = useCallback(() => {\n trackOnClick({\n label: 'add_chapter_icon',\n props: {\n milestone_id: milestoneId,\n },\n });\n onAddChapter?.({ milestoneId, isGoalCreation });\n }, [milestoneId, isGoalCreation, onAddChapter, trackOnClick]);\n\n if (!chapters.length) {\n return (\n <Styled.ChaptersListContainer\n $gapX={6.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $background=\"WHITE\"\n >\n <img src={IMAGES.EMPTY_MIX_TESTS} alt=\"empty_mix_tests\" />\n <Separator heightX={2} />\n {userType === 'TEACHER' ? (\n <>\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n hidden={isMilestoneActive}\n tooltipItem=\"Plan is completed\"\n >\n <Button\n widthX={10}\n renderAs=\"primary\"\n shape=\"square\"\n size=\"small\"\n label=\"Add chapter\"\n onClick={handleOnAddChapter}\n disabled={!isMilestoneActive || !canUpdatePlan}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </ArrowTooltip>\n <Separator heightX={2} />\n </>\n ) : (\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_87\">\n Wait for the teacher to add a chapter\n </Text>\n )}\n </Styled.ChaptersListContainer>\n );\n }\n\n return (\n <Styled.ChaptersListContainer>\n <Styled.ChaptersWrapper>\n {chapters.map((chapter, idx) => {\n const { id } = chapter;\n\n return (\n <ChapterItem\n key={id}\n milestoneId={milestoneId}\n chapter={chapter}\n onChapterClick={onChapterClick}\n itemIndex={idx}\n shouldShowItemIndex\n />\n );\n })}\n </Styled.ChaptersWrapper>\n </Styled.ChaptersListContainer>\n );\n },\n);\n\nexport default ChaptersList;\n"],"names":["ChaptersList","memo","milestoneId","canUpdatePlan","chapters","restChaptersList","isGoalCreation","userType","onChapterClick","onAddChapter","isMilestoneActive","trackOnClick","useUIContext","handleOnAddChapter","useCallback","jsx","Styled.ChaptersListContainer","Styled.ChaptersWrapper","chapter","idx","id","ChapterItem","jsxs","IMAGES","Separator","Fragment","ArrowTooltip","Button","Text","ChaptersList$1"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAuCC;AAAA,EAC3C,CAAC,EAAE,aAAAC,GAAa,eAAAC,GAAe,UAAAC,GAAU,GAAGC,QAAuB;AACjE,UAAM,EAAE,gBAAAC,GAAgB,UAAAC,GAAU,gBAAAC,GAAgB,cAAAC,GAAc,mBAAAC,EAC9D,IAAAL,GAEI,EAAE,SAASM,EAAa,IAAIC,EAAa,GAEzCC,IAAqBC,EAAY,MAAM;AAC9B,MAAAH,EAAA;AAAA,QACX,OAAO;AAAA,QACP,OAAO;AAAA,UACL,cAAcT;AAAA,QAChB;AAAA,MAAA,CACD,GACcO,KAAA,QAAAA,EAAA,EAAE,aAAAP,GAAa,gBAAAI,EAAA;AAAA,OAC7B,CAACJ,GAAaI,GAAgBG,GAAcE,CAAY,CAAC;AAExD,WAACP,EAAS,SA2CX,g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E/C,yCAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EA0BV;AACF,GAEAC,IAAe7B;"}
|
@@ -17,7 +17,7 @@ const q = ({
|
|
17
17
|
isLastBlock: C,
|
18
18
|
isGoalBlock: r,
|
19
19
|
onNodeAttempt: g,
|
20
|
-
|
20
|
+
onNodeAssignAsHomework: x,
|
21
21
|
onNodeMarkAsDone: _,
|
22
22
|
onNodeReattempt: b,
|
23
23
|
onNodeReview: E,
|
@@ -94,7 +94,7 @@ const q = ({
|
|
94
94
|
blockType: p,
|
95
95
|
isSkipped: e,
|
96
96
|
onNodeAttempt: g,
|
97
|
-
|
97
|
+
onNodeAssignAsHomework: x,
|
98
98
|
onNodeMarkAsDone: _,
|
99
99
|
onNodeReattempt: b,
|
100
100
|
onNodeReview: E,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport { BLOCK_NAME } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n onNodeAttempt,\n
|
1
|
+
{"version":3,"file":"block-section-view.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-section-view.tsx"],"sourcesContent":["import type { INodeMenuOption } from '../../comps/node-card/node-menu-options/node-menu-options-types';\nimport type { IBlockSectionProps } from './block-sections-types';\nimport type { FC } from 'react';\n\nimport MoreVerticalIcon from '../../../../assets/line-icons/icons/more-vertical';\nimport SkipIcon from '../../../../assets/line-icons/icons/skip';\nimport ContextMenu from '../../../ui/context-menu/context-menu';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport NodeCard from '../../comps/node-card/node-card';\nimport NodeMenuOptions from '../../comps/node-card/node-menu-options/node-menu-options';\nimport { BLOCK_NAME } from '../../constants/block-constants';\nimport { getSheetNLessonCount } from '../../utils';\nimport * as Styled from './block-sections-styled';\n\nconst BlockSectionView: FC<IBlockSectionProps> = ({\n userType,\n imageHue,\n blockData,\n lessonIdx,\n isLastBlock,\n isGoalBlock,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n}) => {\n const { block_type: blockType, name, sheets, permissions } = blockData;\n\n const { can_skip: canSkip, can_un_skip: canUnskip } = permissions;\n const blockName = BLOCK_NAME[blockType];\n\n const sheetNLessonCount = getSheetNLessonCount(canUnskip, sheets.length, isGoalBlock, lessonIdx);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-skip',\n label: canUnskip ? `Revert 'Skip'` : 'Skip',\n icon: SkipIcon,\n disabled: false,\n onClick: () => onBlockSkipUnskip?.(blockData, canSkip),\n },\n ];\n\n if (userType === 'STUDENT' && canUnskip) return null;\n\n return (\n <Styled.BlockSectionWrapper\n $background={isGoalBlock ? `${imageHue}_1` : 'WHITE_1'}\n $gutterX={1}\n $lastBlock={isLastBlock}\n $flexGap={12}\n >\n <FlexView $flexGap={12}>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $justifyContent=\"space-between\">\n <FlexView $opacity={canUnskip ? 0.5 : 1}>\n <Text\n $renderAs=\"ac4\"\n $color=\"BLACK_T_60\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {blockName === 'Puzzles' ? name : blockName} {sheetNLessonCount}\n </Text>\n\n {!!isGoalBlock && !!lessonIdx && (\n <Text\n $renderAs=\"ab2-bold\"\n $color=\"BLACK_1\"\n $textDecoration={canUnskip ? 'line-through' : 'none'}\n >\n {name}\n </Text>\n )}\n </FlexView>\n\n {userType === 'TEACHER' && (canSkip || canUnskip) && (\n <ContextMenu\n targetElement={\n <Styled.BlockOptionsWrapper\n $width={20}\n $height={20}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <MoreVerticalIcon width={16} height={16} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <Styled.BlockSheetContainer $opacity={canUnskip ? 0.5 : 1}>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n />\n ))}\n </Styled.BlockSheetContainer>\n </FlexView>\n </Styled.BlockSectionWrapper>\n );\n};\n\nexport default BlockSectionView;\n"],"names":["BlockSectionView","userType","imageHue","blockData","lessonIdx","isLastBlock","isGoalBlock","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onBlockSkipUnskip","blockType","name","sheets","permissions","canSkip","canUnskip","blockName","BLOCK_NAME","sheetNLessonCount","getSheetNLessonCount","menuOptions","SkipIcon","jsx","Styled.BlockSectionWrapper","jsxs","FlexView","Text","ContextMenu","Styled.BlockOptionsWrapper","MoreVerticalIcon","NodeMenuOptions","Styled.BlockSheetContainer","nod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-1,69 +1,69 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import { ChapterDetailsWrapper as
|
5
|
-
const
|
1
|
+
import { jsxs as w, jsx as n } from "react/jsx-runtime";
|
2
|
+
import { memo as I, useMemo as x } from "react";
|
3
|
+
import _ from "./block-section-view.js";
|
4
|
+
import { ChapterDetailsWrapper as R } from "./block-sections-styled.js";
|
5
|
+
const L = I((g) => {
|
6
6
|
const {
|
7
7
|
blocks: t,
|
8
|
-
imageHue:
|
8
|
+
imageHue: s,
|
9
9
|
userType: l,
|
10
|
-
coreBlocksRef:
|
11
|
-
onNodeAttempt:
|
12
|
-
|
10
|
+
coreBlocksRef: h,
|
11
|
+
onNodeAttempt: r,
|
12
|
+
onNodeAssignAsHomework: i,
|
13
13
|
onNodeMarkAsDone: c,
|
14
14
|
onNodeReattempt: p,
|
15
15
|
onNodeReview: d,
|
16
16
|
onNodeView: k,
|
17
17
|
onBlockSkipUnskip: m
|
18
|
-
} =
|
19
|
-
let
|
20
|
-
const { goalBlocks:
|
18
|
+
} = g;
|
19
|
+
let u = 0;
|
20
|
+
const { goalBlocks: a, nonGoalBlocks: B } = x(
|
21
21
|
() => t.reduce(
|
22
22
|
(o, e) => (e.section_code === "GOALS" || e.section_code === "READINESS" ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
|
23
23
|
{ goalBlocks: [], nonGoalBlocks: [] }
|
24
24
|
),
|
25
25
|
[t]
|
26
26
|
);
|
27
|
-
return /* @__PURE__ */
|
28
|
-
|
27
|
+
return /* @__PURE__ */ w(
|
28
|
+
R,
|
29
29
|
{
|
30
30
|
$width: "100%",
|
31
|
-
$background: B.length ? "WHITE_1" : `${
|
31
|
+
$background: B.length ? "WHITE_1" : `${s}_1`,
|
32
32
|
children: [
|
33
|
-
/* @__PURE__ */
|
34
|
-
const { block_type:
|
33
|
+
/* @__PURE__ */ n("div", { ref: h, children: a.map((o, e) => {
|
34
|
+
const { block_type: A, block_id: N, permissions: G } = o;
|
35
35
|
let f = 0;
|
36
|
-
const S = e ===
|
37
|
-
return
|
38
|
-
|
36
|
+
const S = e === a.length - 1;
|
37
|
+
return A === "GOAL" && (G.can_un_skip || (u += 1), f = u), /* @__PURE__ */ n(
|
38
|
+
_,
|
39
39
|
{
|
40
40
|
blockData: o,
|
41
41
|
userType: l,
|
42
42
|
isLastBlock: S,
|
43
43
|
lessonIdx: f,
|
44
|
-
imageHue:
|
44
|
+
imageHue: s,
|
45
45
|
isGoalBlock: !0,
|
46
|
-
onNodeAttempt:
|
47
|
-
|
46
|
+
onNodeAttempt: r,
|
47
|
+
onNodeAssignAsHomework: i,
|
48
48
|
onNodeMarkAsDone: c,
|
49
49
|
onNodeReattempt: p,
|
50
50
|
onNodeReview: d,
|
51
51
|
onNodeView: k,
|
52
52
|
onBlockSkipUnskip: m
|
53
53
|
},
|
54
|
-
|
54
|
+
N
|
55
55
|
);
|
56
56
|
}) }),
|
57
57
|
B.map((o) => {
|
58
58
|
const { block_id: e } = o;
|
59
|
-
return /* @__PURE__ */
|
60
|
-
|
59
|
+
return /* @__PURE__ */ n(
|
60
|
+
_,
|
61
61
|
{
|
62
62
|
blockData: o,
|
63
63
|
userType: l,
|
64
|
-
imageHue:
|
65
|
-
onNodeAttempt:
|
66
|
-
|
64
|
+
imageHue: s,
|
65
|
+
onNodeAttempt: r,
|
66
|
+
onNodeAssignAsHomework: i,
|
67
67
|
onNodeMarkAsDone: c,
|
68
68
|
onNodeReattempt: p,
|
69
69
|
onNodeReview: d,
|
@@ -78,6 +78,6 @@ const E = w((_) => {
|
|
78
78
|
);
|
79
79
|
});
|
80
80
|
export {
|
81
|
-
|
81
|
+
L as default
|
82
82
|
};
|
83
83
|
//# sourceMappingURL=block-sections.js.map
|