@cuemath/leap 2.8.61-as16 → 2.8.61-as2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/line-icons/icons/chevron-left.js.map +1 -1
- package/dist/assets/line-icons/icons/recap.js +3 -3
- package/dist/assets/line-icons/icons/recap.js.map +1 -1
- package/dist/assets/lottie/lottie.js +1 -9
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js +19 -20
- package/dist/features/chapters/chapters-list/chapter-item/chapter-item-styled.js.map +1 -1
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +25 -25
- 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 +28 -32
- package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +78 -85
- package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +90 -98
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/chapters-v2/constants/node-constants.js +1 -0
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +39 -77
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +2 -5
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/card-menu-options.js +44 -34
- package/dist/features/homework/card-menu-options.js.map +1 -1
- package/dist/features/homework/homework-card.js +227 -157
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +1 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +99 -177
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/styles.js +31 -36
- package/dist/features/homework/styles.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js +49 -48
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-info.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js +35 -36
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-tabs/milestone-tabs.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +38 -40
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +36 -25
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
- package/dist/index.d.ts +2 -40
- package/dist/index.js +379 -381
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/closed-eye.js +0 -23
- package/dist/assets/line-icons/icons/closed-eye.js.map +0 -1
- package/dist/features/homework/card-title.js +0 -21
- package/dist/features/homework/card-title.js.map +0 -1
- package/dist/features/homework/homework-card-view.js +0 -133
- package/dist/features/homework/homework-card-view.js.map +0 -1
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js +0 -71
- package/dist/features/homework/hw-card-list/hw-card-list-styled.js.map +0 -1
- package/dist/static/competitive-arena.b9c40801.json +0 -1
- package/dist/static/learn.71b13323.json +0 -1
- package/dist/static/practice.158dd488.json +0 -1
- package/dist/static/project.eb665827.json +0 -1
- package/dist/static/puzzle.b298c7e4.json +0 -1
- package/dist/static/recap.0dd2c1e2.json +0 -1
- package/dist/static/test.803d6036.json +0 -1
- package/dist/static/video.b41451e2.json +0 -1
@@ -1,114 +1,107 @@
|
|
1
|
-
import { jsx as e, jsxs as d, Fragment as
|
2
|
-
import { memo as
|
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
|
-
import
|
16
|
-
|
17
|
-
const we = Y((L) => {
|
1
|
+
import { jsx as e, jsxs as d, Fragment as M } from "react/jsx-runtime";
|
2
|
+
import { memo as P, useCallback as T } from "react";
|
3
|
+
import X from "../../../../../assets/line-icons/icons/eye2.js";
|
4
|
+
import j from "../../../../../assets/line-icons/icons/redo.js";
|
5
|
+
import z from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
6
|
+
import F from "../../../../ui/context-menu/context-menu.js";
|
7
|
+
import Y from "../../../../ui/text/text.js";
|
8
|
+
import { BLOCK_TYPE as Z } from "../../../constants/block-constants.js";
|
9
|
+
import { NODE_CARD_STATES as h } from "../../../constants/node-constants.js";
|
10
|
+
import { getNodeTypeBasedBgImage as q } from "../../../utils/index.js";
|
11
|
+
import { getNodeCardBasedIcon as J } from "../../../utils/node-card-utils.js";
|
12
|
+
import Q from "../border-path-animation.js";
|
13
|
+
import { NodeCardContainer as U, NodeCardInfoWrapper as V, IconWrapper as ee, StyledImportantIcon as te, NodeCardContentWrapper as oe, NodeCardTitle as re } from "../node-card-styled.js";
|
14
|
+
import ne from "../node-card-tags.js";
|
15
|
+
import ae from "../node-menu-options/node-menu-options.js";
|
16
|
+
const ke = P((A) => {
|
18
17
|
const {
|
19
18
|
nodeData: t,
|
20
19
|
imageHue: S,
|
21
|
-
blockType:
|
22
|
-
onNodeAttempt:
|
23
|
-
onNodeReattempt:
|
24
|
-
onNodeReview:
|
25
|
-
onNodeView:
|
26
|
-
} =
|
20
|
+
blockType: w,
|
21
|
+
onNodeAttempt: r,
|
22
|
+
onNodeReattempt: n,
|
23
|
+
onNodeReview: a,
|
24
|
+
onNodeView: i
|
25
|
+
} = A, {
|
27
26
|
accuracy: E,
|
28
|
-
attempt_location:
|
29
|
-
node_type:
|
27
|
+
attempt_location: N,
|
28
|
+
node_type: s,
|
30
29
|
card_header: y,
|
31
|
-
title:
|
30
|
+
title: x,
|
32
31
|
state: c,
|
33
|
-
is_optional:
|
34
|
-
sheet_statement:
|
35
|
-
permissions:
|
36
|
-
marked_as_completed:
|
32
|
+
is_optional: f,
|
33
|
+
sheet_statement: u,
|
34
|
+
permissions: B,
|
35
|
+
marked_as_completed: C
|
37
36
|
} = t, {
|
38
|
-
can_review:
|
39
|
-
can_start:
|
40
|
-
can_resume:
|
41
|
-
can_reset:
|
42
|
-
} =
|
43
|
-
(
|
44
|
-
switch (
|
37
|
+
can_review: $,
|
38
|
+
can_start: m,
|
39
|
+
can_resume: l,
|
40
|
+
can_reset: g
|
41
|
+
} = B, I = w === Z.GOAL, o = c === h.LOCKED, L = c === h.NOT_STARTED, R = c === h.IN_PROGRESS, W = N === "INCLASS", v = !u || !I, D = m || l, _ = !f && (R || L), p = !D && (g || $), H = q(s), k = J(s), O = T(
|
42
|
+
(b) => {
|
43
|
+
switch (b) {
|
45
44
|
case "node-card-review":
|
46
|
-
|
45
|
+
a == null || a(t);
|
47
46
|
return;
|
48
47
|
case "node-card-reattempt":
|
49
|
-
|
48
|
+
n == null || n(t);
|
50
49
|
return;
|
51
50
|
default:
|
52
|
-
throw new Error(`No callback function for ${
|
51
|
+
throw new Error(`No callback function for ${b}`);
|
53
52
|
}
|
54
53
|
},
|
55
|
-
[t,
|
56
|
-
),
|
57
|
-
|
54
|
+
[t, n, a]
|
55
|
+
), G = T(() => {
|
56
|
+
p || o || (m || l ? r == null || r(t) : C && (i == null || i(t)));
|
58
57
|
}, [
|
59
|
-
|
60
|
-
|
58
|
+
l,
|
59
|
+
m,
|
61
60
|
t,
|
62
|
-
n,
|
63
|
-
o,
|
64
|
-
u,
|
65
61
|
r,
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
}, []), z = [
|
62
|
+
i,
|
63
|
+
p,
|
64
|
+
o,
|
65
|
+
C
|
66
|
+
]), K = [
|
72
67
|
{
|
73
68
|
id: "node-card-review",
|
74
69
|
label: "Review",
|
75
|
-
icon:
|
76
|
-
disabled:
|
77
|
-
onClick:
|
70
|
+
icon: X,
|
71
|
+
disabled: !$,
|
72
|
+
onClick: O
|
78
73
|
},
|
79
74
|
{
|
80
75
|
id: "node-card-reattempt",
|
81
76
|
label: "Reattempt",
|
82
|
-
icon:
|
83
|
-
disabled: !
|
84
|
-
onClick:
|
77
|
+
icon: j,
|
78
|
+
disabled: !g,
|
79
|
+
onClick: O
|
85
80
|
}
|
86
81
|
];
|
87
82
|
return /* @__PURE__ */ e(
|
88
|
-
|
83
|
+
F,
|
89
84
|
{
|
90
85
|
targetElement: /* @__PURE__ */ e(
|
91
|
-
|
86
|
+
U,
|
92
87
|
{
|
93
|
-
$showOutline: !
|
88
|
+
$showOutline: !_,
|
94
89
|
$background: `${S}_2`,
|
95
|
-
$disabled:
|
96
|
-
onClick:
|
97
|
-
onMouseEnter: X,
|
98
|
-
onMouseLeave: j,
|
90
|
+
$disabled: o,
|
91
|
+
onClick: G,
|
99
92
|
children: /* @__PURE__ */ d(
|
100
|
-
|
93
|
+
z,
|
101
94
|
{
|
102
95
|
renderAs: "primary",
|
103
|
-
tooltipItem:
|
96
|
+
tooltipItem: u,
|
104
97
|
position: "bottom",
|
105
98
|
zIndex: 5,
|
106
|
-
hidden:
|
99
|
+
hidden: v,
|
107
100
|
parentWidth: "100%",
|
108
101
|
widthX: 11.25,
|
109
102
|
children: [
|
110
103
|
/* @__PURE__ */ d(
|
111
|
-
|
104
|
+
V,
|
112
105
|
{
|
113
106
|
$flexDirection: "row",
|
114
107
|
$alignItems: "center",
|
@@ -116,10 +109,10 @@ const we = Y((L) => {
|
|
116
109
|
$bgImage: H,
|
117
110
|
$gutterX: 0.78125,
|
118
111
|
$flexGap: 8.5,
|
119
|
-
$opacity:
|
112
|
+
$opacity: o ? 0.5 : 1,
|
120
113
|
children: [
|
121
114
|
/* @__PURE__ */ d(
|
122
|
-
|
115
|
+
ee,
|
123
116
|
{
|
124
117
|
$width: 31,
|
125
118
|
$height: 31,
|
@@ -128,28 +121,28 @@ const we = Y((L) => {
|
|
128
121
|
$alignItems: "center",
|
129
122
|
$justifyContent: "center",
|
130
123
|
children: [
|
131
|
-
|
132
|
-
!
|
124
|
+
k && /* @__PURE__ */ e(k, { width: 20, height: 20 }),
|
125
|
+
!f && /* @__PURE__ */ e(te, {})
|
133
126
|
]
|
134
127
|
}
|
135
128
|
),
|
136
|
-
/* @__PURE__ */ d(
|
129
|
+
/* @__PURE__ */ d(Y, { $renderAs: "ac4-black", $color: "BLACK", children: [
|
137
130
|
y,
|
138
131
|
" ",
|
139
|
-
|
132
|
+
W && ". CW"
|
140
133
|
] }),
|
141
|
-
|
134
|
+
_ && /* @__PURE__ */ e(Q, {})
|
142
135
|
]
|
143
136
|
}
|
144
137
|
),
|
145
|
-
/* @__PURE__ */ e(
|
146
|
-
!
|
147
|
-
|
138
|
+
/* @__PURE__ */ e(ne, { nodeType: s, state: c, accuracy: E }),
|
139
|
+
!I && /* @__PURE__ */ e(oe, { $background: "WHITE_1", $heightX: 4, children: /* @__PURE__ */ e(
|
140
|
+
re,
|
148
141
|
{
|
149
142
|
$renderAs: "ab3",
|
150
143
|
$color: "BLACK_1",
|
151
|
-
$opacity:
|
152
|
-
children:
|
144
|
+
$opacity: o ? 0.5 : 1,
|
145
|
+
children: x
|
153
146
|
}
|
154
147
|
) })
|
155
148
|
]
|
@@ -161,11 +154,11 @@ const we = Y((L) => {
|
|
161
154
|
menuWidth: "100%",
|
162
155
|
menuZIndex: 6,
|
163
156
|
menuOffset: 2,
|
164
|
-
menuElement: /* @__PURE__ */ e(
|
157
|
+
menuElement: /* @__PURE__ */ e(M, { children: p ? /* @__PURE__ */ e(ae, { options: K }) : void 0 })
|
165
158
|
}
|
166
159
|
);
|
167
160
|
});
|
168
161
|
export {
|
169
|
-
|
162
|
+
ke as default
|
170
163
|
};
|
171
164
|
//# sourceMappingURL=student-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"student-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/student-actions/student-actions.tsx"],"sourcesContent":["import type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\n\nimport { memo, useCallback, useState, type FC } from 'react';\n\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport RedoIcon from '../../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport LottieAnimation from '../../../../ui/lottie-animation/lottie-animation';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst StudentActions: FC<Omit<INodeCardProps, 'userType'>> = memo(props => {\n const {\n nodeData,\n imageHue,\n blockType,\n onNodeAttempt,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n } = props;\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n marked_as_completed: teacherMarkedAsCompleted,\n } = nodeData;\n\n const {\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n can_reset: canReset,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n const tooltipHidden = !sheetStatement || !isGoalBlock;\n const canStartOrResume = canStart || canResume;\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n const renderOptions = !canStartOrResume && (canReset || canReview);\n\n const [renderLottie, setRenderLottie] = useState(false);\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const { icon: NodeCardIcon, lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-review':\n teacherMarkedAsCompleted ? onNodeView?.(nodeData) : onNodeReview?.(nodeData);\n\n return;\n\n case 'node-card-reattempt':\n onNodeReattempt?.(nodeData);\n\n return;\n\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [nodeData, onNodeReattempt, onNodeReview, onNodeView, teacherMarkedAsCompleted],\n );\n\n const handleOnNodeCardClick = useCallback(() => {\n if (renderOptions || sheetLocked) return;\n\n if (canStart || canResume) {\n onNodeAttempt?.(nodeData);\n } else if (teacherMarkedAsCompleted) {\n onNodeView?.(nodeData);\n }\n }, [\n canResume,\n canStart,\n nodeData,\n onNodeAttempt,\n onNodeView,\n renderOptions,\n sheetLocked,\n teacherMarkedAsCompleted,\n ]);\n\n const handleOnMouseEnter = useCallback(() => {\n setRenderLottie(true);\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n setRenderLottie(false);\n }, []);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-review',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-reattempt',\n label: 'Reattempt',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <ContextMenu\n targetElement={\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $background={`${imageHue}_2`}\n $disabled={sheetLocked}\n onClick={handleOnNodeCardClick}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={tooltipHidden}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {renderLottie ? (\n <LottieAnimation src={nodeCardLottie} />\n ) : (\n <NodeCardIcon width={20} height={20} />\n )}\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n {cardHeader} {inClassSheet && `. CW`}\n </Text>\n\n {showCardAnimation && <BorderPathAnimation />}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper $background=\"WHITE_1\" $heightX={4}>\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n }\n startLeft\n menuWidth=\"100%\"\n menuZIndex={6}\n menuOffset={2}\n menuElement={<>{renderOptions ? <NodeMenuOptions options={menuOptions} /> : undefined}</>}\n />\n );\n});\n\nexport default StudentActions;\n"],"names":["StudentActions","memo","props","nodeData","imageHue","blockType","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeView","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","teacherMarkedAsCompleted","canReview","canStart","canResume","canReset","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","tooltipHidden","canStartOrResume","showCardAnimation","renderOptions","renderLottie","setRenderLottie","useState","nodeBgImage","getNodeTypeBasedBgImage","NodeCardIcon","nodeCardLottie","getNodeCardBasedIcon","handleOnMenuOptionClick","useCallback","optionId","handleOnNodeCardClick","handleOnMouseEnter","handleOnMouseLeave","menuOptions","Eye2Icon","RedoIcon","jsx","ContextMenu","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;AAoBM,MAAAA,KAAuDC,EAAK,CAASC,MAAA;AACnE,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,EACE,IAAAP,GACE;AAAA,IACJ,UAAAQ;AAAA,IACA,kBAAkBC;AAAA,IAClB,WAAWC;AAAA,IACX,aAAaC;AAAA,IACb,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAaC;AAAA,IACb,iBAAiBC;AAAA,IACjB,aAAAC;AAAA,IACA,qBAAqBC;AAAA,EACnB,IAAAhB,GAEE;AAAA,IACJ,YAAYiB;AAAA,IACZ,WAAWC;AAAA,IACX,YAAYC;AAAA,IACZ,WAAWC;AAAA,EACT,IAAAL,GAEEM,IAAcnB,MAAcoB,GAAW,MACvCC,IAAcX,MAAUY,EAAiB,QACzCC,IAAkBb,MAAUY,EAAiB,aAC7CE,IAAkBd,MAAUY,EAAiB,aAC7CG,IAAenB,MAAoB,WACnCoB,IAAgB,CAACd,KAAkB,CAACO,GACpCQ,IAAmBX,KAAYC,GAE/BW,IAAoB,CAACjB,MAAea,KA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A;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAC7C;AAAA,gBAEC,gBAAAV,EAAAW,IAAA,EAAa,UAAAnD,GAAoB,OAAAG,GAAc,UAAAL,EAAoB,CAAA;AAAA,gBAEnE,CAACc,KACC,gBAAA4B,EAAAY,IAAA,EAA8B,aAAY,WAAU,UAAU,GAC7D,UAAA,gBAAAZ;AAAA,kBAACa;AAAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,QAAO;AAAA,oBACP,UAAUvC,IAAc,MAAM;AAAA,oBAE7B,UAAAZ;AAAA,kBAAA;AAAA,gBAAA,GAEL;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,WAAS;AAAA,MACT,WAAU;AAAA,MACV,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,oCAAgB,UAAgBoB,IAAA,gBAAAkB,EAACc,MAAgB,SAASjB,EAAa,CAAA,IAAK,OAAU,CAAA;AAAA,IAAA;AAAA,EAAA;AAG5F,CAAC;"}
|
1
|
+
{"version":3,"file":"student-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/student-actions/student-actions.tsx"],"sourcesContent":["import type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\n\nimport { memo, useCallback, type FC } from 'react';\n\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport RedoIcon from '../../../../../assets/line-icons/icons/redo';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport ContextMenu from '../../../../ui/context-menu/context-menu';\nimport Text from '../../../../ui/text/text';\nimport { BLOCK_TYPE } from '../../../constants/block-constants';\nimport { NODE_CARD_STATES } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport BorderPathAnimation from '../border-path-animation';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst StudentActions: FC<Omit<INodeCardProps, 'userType'>> = memo(props => {\n const {\n nodeData,\n imageHue,\n blockType,\n onNodeAttempt,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n } = props;\n const {\n accuracy,\n attempt_location: attemptLocation,\n node_type: nodeType,\n card_header: cardHeader,\n title,\n state,\n is_optional: isOptional,\n sheet_statement: sheetStatement,\n permissions,\n marked_as_completed: teacherMarkedAsCompleted,\n } = nodeData;\n\n const {\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n can_reset: canReset,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const sheetInProgress = state === NODE_CARD_STATES.IN_PROGRESS;\n const inClassSheet = attemptLocation === 'INCLASS';\n const tooltipHidden = !sheetStatement || !isGoalBlock;\n const canStartOrResume = canStart || canResume;\n\n const showCardAnimation = !isOptional && (sheetInProgress || sheetNotStarted);\n const renderOptions = !canStartOrResume && (canReset || canReview);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const NodeCardIcon = getNodeCardBasedIcon(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-review':\n onNodeReview?.(nodeData);\n\n return;\n\n case 'node-card-reattempt':\n onNodeReattempt?.(nodeData);\n\n return;\n\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [nodeData, onNodeReattempt, onNodeReview],\n );\n\n const handleOnNodeCardClick = useCallback(() => {\n if (renderOptions || sheetLocked) return;\n\n if (canStart || canResume) {\n onNodeAttempt?.(nodeData);\n } else if (teacherMarkedAsCompleted) {\n onNodeView?.(nodeData);\n }\n }, [\n canResume,\n canStart,\n nodeData,\n onNodeAttempt,\n onNodeView,\n renderOptions,\n sheetLocked,\n teacherMarkedAsCompleted,\n ]);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-review',\n label: 'Review',\n icon: Eye2Icon,\n disabled: !canReview,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-reattempt',\n label: 'Reattempt',\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <ContextMenu\n targetElement={\n <Styled.NodeCardContainer\n $showOutline={!showCardAnimation}\n $background={`${imageHue}_2`}\n $disabled={sheetLocked}\n onClick={handleOnNodeCardClick}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={tooltipHidden}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n {NodeCardIcon && <NodeCardIcon width={20} height={20} />}\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n {cardHeader} {inClassSheet && `. CW`}\n </Text>\n\n {showCardAnimation && <BorderPathAnimation />}\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper $background=\"WHITE_1\" $heightX={4}>\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n }\n startLeft\n menuWidth=\"100%\"\n menuZIndex={6}\n menuOffset={2}\n menuElement={<>{renderOptions ? <NodeMenuOptions options={menuOptions} /> : undefined}</>}\n />\n );\n});\n\nexport default StudentActions;\n"],"names":["StudentActions","memo","props","nodeData","imageHue","blockType","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeView","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","teacherMarkedAsCompleted","canReview","canStart","canResume","canReset","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","sheetInProgress","inClassSheet","tooltipHidden","canStartOrResume","showCardAnimation","renderOptions","nodeBgImage","getNodeTypeBasedBgImage","NodeCardIcon","getNodeCardBasedIcon","handleOnMenuOptionClick","useCallback","optionId","handleOnNodeCardClick","menuOptions","Eye2Icon","RedoIcon","jsx","ContextMenu","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","Styled.StyledImportantIcon","Text","BorderPathAnimation","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;AAmBM,MAAAA,KAAuDC,EAAK,CAASC,MAAA;AACnE,QAAA;AAAA,IACJ,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,EACE,IAAAP,GACE;AAAA,IACJ,UAAAQ;AAAA,IACA,kBAAkBC;AAAA,IAClB,WAAWC;AAAA,IACX,aAAaC;AAAA,IACb,OAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAaC;AAAA,IACb,iBAAiBC;AAAA,IACjB,aAAAC;AAAA,IACA,qBAAqBC;AAAA,EACnB,IAAAhB,GAEE;AAAA,IACJ,YAAYiB;AAAA,IACZ,WAAWC;AAAA,IACX,YAAYC;AAAA,IACZ,WAAWC;AAAA,EACT,IAAAL,GAEEM,IAA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sB,EAAAW,IAAA,EAA8B,aAAY,WAAU,UAAU,GAC7D,UAAA,gBAAAX;AAAA,kBAACY;AAAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,QAAO;AAAA,oBACP,UAAUhC,IAAc,MAAM;AAAA,oBAE7B,UAAAZ;AAAA,kBAAA;AAAA,gBAAA,GAEL;AAAA,cAAA;AAAA,YAAA;AAAA,UAEJ;AAAA,QAAA;AAAA,MACF;AAAA,MAEF,WAAS;AAAA,MACT,WAAU;AAAA,MACV,YAAY;AAAA,MACZ,YAAY;AAAA,MACZ,oCAAgB,UAAgBoB,IAAA,gBAAAY,EAACa,MAAgB,SAAShB,EAAa,CAAA,IAAK,OAAU,CAAA;AAAA,IAAA;AAAA,EAAA;AAG5F,CAAC;"}
|
@@ -1,134 +1,126 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
import
|
12
|
-
import { BLOCK_TYPE as
|
13
|
-
import { NODE_CARD_STATES as $, TEACHER_MENU_LABELS as
|
14
|
-
import { getNodeTypeBasedBgImage as
|
15
|
-
import { getNodeCardBasedIcon as
|
16
|
-
import
|
17
|
-
import { NodeCardContainer as
|
18
|
-
import
|
19
|
-
import
|
20
|
-
const { ASSIGN_AS_HW:
|
1
|
+
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
2
|
+
import { memo as P, useRef as X, useCallback as F } from "react";
|
3
|
+
import v from "../../../../../assets/line-icons/icons/book2.js";
|
4
|
+
import z from "../../../../../assets/line-icons/icons/check2.js";
|
5
|
+
import N from "../../../../../assets/line-icons/icons/eye2.js";
|
6
|
+
import U from "../../../../../assets/line-icons/icons/home2.js";
|
7
|
+
import T from "../../../../../assets/line-icons/icons/more-vertical.js";
|
8
|
+
import V from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
9
|
+
import Y from "../../../../ui/hooks/use-context-menu-click-handler.js";
|
10
|
+
import q from "../../../../ui/layout/flex-view.js";
|
11
|
+
import J from "../../../../ui/text/text.js";
|
12
|
+
import { BLOCK_TYPE as Q } from "../../../constants/block-constants.js";
|
13
|
+
import { NODE_CARD_STATES as $, TEACHER_MENU_LABELS as Z } from "../../../constants/node-constants.js";
|
14
|
+
import { getNodeTypeBasedBgImage as D } from "../../../utils/index.js";
|
15
|
+
import { getNodeCardBasedIcon as ee } from "../../../utils/node-card-utils.js";
|
16
|
+
import re from "../border-path-animation.js";
|
17
|
+
import { NodeCardContainer as te, NodeCardInfoWrapper as ie, IconWrapper as oe, StyledImportantIcon as ne, NodeKebabMenuWrapper as k, NodeCardContentWrapper as ce, NodeCardTitle as ae, NodeMenuOptionsWrapper as se } from "../node-card-styled.js";
|
18
|
+
import le from "../node-card-tags.js";
|
19
|
+
import de from "../node-menu-options/node-menu-options.js";
|
20
|
+
const { ASSIGN_AS_HW: me, REVERT_TO_CW: pe, REVIEW: he, VIEW: fe, MARK_AS_DONE: $e } = Z, Re = P(
|
21
21
|
({
|
22
|
-
nodeData:
|
23
|
-
imageHue:
|
24
|
-
blockType:
|
22
|
+
nodeData: r,
|
23
|
+
imageHue: S,
|
24
|
+
blockType: O,
|
25
25
|
isSkipped: C,
|
26
26
|
onNodeAttemptLocationChange: o,
|
27
|
-
onNodeMarkAsDone:
|
28
|
-
onNodeView:
|
29
|
-
onNodeReview:
|
27
|
+
onNodeMarkAsDone: n,
|
28
|
+
onNodeView: c,
|
29
|
+
onNodeReview: a
|
30
30
|
}) => {
|
31
|
-
const
|
32
|
-
accuracy:
|
33
|
-
attempt_location:
|
31
|
+
const l = X(null), { menuVisible: W, onMenuClick: u } = Y(l), {
|
32
|
+
accuracy: w,
|
33
|
+
attempt_location: x,
|
34
34
|
node_type: d,
|
35
|
-
card_header:
|
36
|
-
title:
|
37
|
-
state:
|
38
|
-
is_optional:
|
39
|
-
sheet_statement:
|
40
|
-
permissions:
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
switch (k) {
|
35
|
+
card_header: y,
|
36
|
+
title: B,
|
37
|
+
state: s,
|
38
|
+
is_optional: _,
|
39
|
+
sheet_statement: I,
|
40
|
+
permissions: A
|
41
|
+
} = r, {
|
42
|
+
can_change_attempt_location: H,
|
43
|
+
can_mark_familiar: L,
|
44
|
+
can_review: m
|
45
|
+
} = A, p = O === Q.GOAL, i = s === $.LOCKED, R = s === $.NOT_STARTED, G = s === $.IN_PROGRESS, h = x === "INCLASS", K = !I || !p || i, g = !_ && (G || R), M = D(d), b = ee(d), f = F(
|
46
|
+
(E) => {
|
47
|
+
switch (E) {
|
49
48
|
case "node-card-view":
|
50
|
-
|
49
|
+
m ? a == null || a(r) : c == null || c(r);
|
51
50
|
return;
|
52
51
|
case "node-card-assign-as-hw":
|
53
|
-
o == null || o(
|
52
|
+
o == null || o(r);
|
54
53
|
return;
|
55
54
|
case "node-card-mark-as-done":
|
56
|
-
|
55
|
+
n == null || n(r);
|
57
56
|
return;
|
58
57
|
default:
|
59
|
-
throw new Error(`No callback function for ${
|
58
|
+
throw new Error(`No callback function for ${E}`);
|
60
59
|
}
|
61
60
|
},
|
62
61
|
[
|
63
|
-
|
64
|
-
|
62
|
+
m,
|
63
|
+
r,
|
65
64
|
o,
|
66
|
-
i,
|
67
|
-
c,
|
68
65
|
n,
|
69
|
-
|
66
|
+
a,
|
67
|
+
c
|
70
68
|
]
|
71
|
-
),
|
72
|
-
_(!0);
|
73
|
-
}, []), N = u(() => {
|
74
|
-
_(!1);
|
75
|
-
}, []), U = [
|
69
|
+
), j = [
|
76
70
|
{
|
77
71
|
id: "node-card-view",
|
78
|
-
label:
|
79
|
-
icon:
|
72
|
+
label: m ? he : fe,
|
73
|
+
icon: N,
|
80
74
|
disabled: !1,
|
81
75
|
onClick: f
|
82
76
|
},
|
83
77
|
{
|
84
78
|
id: "node-card-assign-as-hw",
|
85
|
-
label:
|
86
|
-
icon:
|
87
|
-
disabled: !
|
79
|
+
label: h ? me : pe,
|
80
|
+
icon: h ? U : v,
|
81
|
+
disabled: !H,
|
88
82
|
onClick: f
|
89
83
|
},
|
90
84
|
{
|
91
85
|
id: "node-card-mark-as-done",
|
92
|
-
label:
|
93
|
-
icon:
|
94
|
-
disabled: !
|
86
|
+
label: $e,
|
87
|
+
icon: z,
|
88
|
+
disabled: !L,
|
95
89
|
onClick: f
|
96
90
|
}
|
97
91
|
];
|
98
|
-
return /* @__PURE__ */
|
99
|
-
|
92
|
+
return /* @__PURE__ */ t(
|
93
|
+
te,
|
100
94
|
{
|
101
|
-
$showOutline: !
|
102
|
-
$isSheetLocked:
|
103
|
-
$background: `${
|
95
|
+
$showOutline: !g,
|
96
|
+
$isSheetLocked: i,
|
97
|
+
$background: `${S}_2`,
|
104
98
|
$disabled: !!C,
|
105
|
-
onMouseEnter: z,
|
106
|
-
onMouseLeave: N,
|
107
99
|
children: [
|
108
|
-
/* @__PURE__ */
|
109
|
-
|
100
|
+
/* @__PURE__ */ t(
|
101
|
+
V,
|
110
102
|
{
|
111
103
|
renderAs: "primary",
|
112
|
-
tooltipItem:
|
104
|
+
tooltipItem: I,
|
113
105
|
position: "bottom",
|
114
106
|
zIndex: 5,
|
115
|
-
hidden:
|
107
|
+
hidden: K,
|
116
108
|
parentWidth: "100%",
|
117
109
|
widthX: 11.25,
|
118
110
|
children: [
|
119
|
-
/* @__PURE__ */
|
120
|
-
|
111
|
+
/* @__PURE__ */ t(
|
112
|
+
ie,
|
121
113
|
{
|
122
114
|
$flexDirection: "row",
|
123
115
|
$alignItems: "center",
|
124
116
|
$width: "100%",
|
125
117
|
$heightX: 3.5,
|
126
|
-
$bgImage:
|
118
|
+
$bgImage: M,
|
127
119
|
$gutterX: 0.78125,
|
128
120
|
$flexGap: 8.5,
|
129
121
|
children: [
|
130
|
-
/* @__PURE__ */
|
131
|
-
|
122
|
+
/* @__PURE__ */ t(
|
123
|
+
oe,
|
132
124
|
{
|
133
125
|
$width: 31,
|
134
126
|
$height: 31,
|
@@ -136,26 +128,26 @@ const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
|
|
136
128
|
$position: "relative",
|
137
129
|
$alignItems: "center",
|
138
130
|
$justifyContent: "center",
|
139
|
-
$opacity:
|
131
|
+
$opacity: i ? 0.5 : 1,
|
140
132
|
children: [
|
141
|
-
|
142
|
-
!
|
133
|
+
b && /* @__PURE__ */ e(b, { width: 20, height: 20 }),
|
134
|
+
!_ && /* @__PURE__ */ e(ne, {})
|
143
135
|
]
|
144
136
|
}
|
145
137
|
),
|
146
|
-
/* @__PURE__ */
|
147
|
-
|
138
|
+
/* @__PURE__ */ t(J, { $renderAs: "ac4-black", $color: "BLACK", $opacity: i ? 0.5 : 1, children: [
|
139
|
+
y,
|
148
140
|
" ",
|
149
|
-
|
141
|
+
h && ". CW"
|
150
142
|
] }),
|
151
|
-
/* @__PURE__ */ e(
|
152
|
-
|
143
|
+
/* @__PURE__ */ e(q, { className: "context-menu", children: p && /* @__PURE__ */ e(k, { ref: l, onClick: u, children: /* @__PURE__ */ e(T, { width: 16, height: 16 }) }) }),
|
144
|
+
g && !C && /* @__PURE__ */ e(re, {})
|
153
145
|
]
|
154
146
|
}
|
155
147
|
),
|
156
|
-
/* @__PURE__ */ e(
|
157
|
-
!
|
158
|
-
|
148
|
+
/* @__PURE__ */ e(le, { nodeType: d, state: s, accuracy: w }),
|
149
|
+
!p && /* @__PURE__ */ t(
|
150
|
+
ce,
|
159
151
|
{
|
160
152
|
$flexDirection: "row",
|
161
153
|
$alignItems: "center",
|
@@ -165,28 +157,28 @@ const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
|
|
165
157
|
$justifyContent: "space-between",
|
166
158
|
children: [
|
167
159
|
/* @__PURE__ */ e(
|
168
|
-
|
160
|
+
ae,
|
169
161
|
{
|
170
162
|
$renderAs: "ab3",
|
171
163
|
$color: "BLACK_1",
|
172
|
-
$opacity:
|
173
|
-
children:
|
164
|
+
$opacity: i ? 0.5 : 1,
|
165
|
+
children: B
|
174
166
|
}
|
175
167
|
),
|
176
|
-
/* @__PURE__ */ e(
|
168
|
+
/* @__PURE__ */ e(k, { ref: l, onClick: u, children: /* @__PURE__ */ e(T, { width: 16, height: 16 }) })
|
177
169
|
]
|
178
170
|
}
|
179
171
|
)
|
180
172
|
]
|
181
173
|
}
|
182
174
|
),
|
183
|
-
/* @__PURE__ */ e(
|
175
|
+
/* @__PURE__ */ e(se, { $visible: W, children: /* @__PURE__ */ e(de, { options: j }) })
|
184
176
|
]
|
185
177
|
}
|
186
178
|
);
|
187
179
|
}
|
188
180
|
);
|
189
181
|
export {
|
190
|
-
|
182
|
+
Re as default
|
191
183
|
};
|
192
184
|
//# sourceMappingURL=teacher-actions.js.map
|