@cuemath/leap 3.0.26-gs2 → 3.0.26-guru.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js +20 -20
- package/dist/features/chapters-v2/chapter-details/block-sections/block-section-view.js.map +1 -1
- 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 +144 -128
- package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +25 -25
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/package.json +2 -3
@@ -3,15 +3,15 @@ import O from "../../../../assets/line-icons/icons/more-vertical.js";
|
|
3
3
|
import j from "../../../../assets/line-icons/icons/skip.js";
|
4
4
|
import k from "../../../ui/context-menu/context-menu.js";
|
5
5
|
import c from "../../../ui/layout/flex-view.js";
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import { BLOCK_NAME as
|
10
|
-
import { getSheetNLessonCount as
|
6
|
+
import u from "../../../ui/text/text.js";
|
7
|
+
import H from "../../comps/node-card/node-card.js";
|
8
|
+
import M from "../../comps/node-card/node-menu-options/node-menu-options.js";
|
9
|
+
import { BLOCK_NAME as W } from "../../constants/block-constants.js";
|
10
|
+
import { getSheetNLessonCount as y } from "../../utils/index.js";
|
11
11
|
import { BlockSectionWrapper as B, BlockOptionsWrapper as K, BlockSheetContainer as V } from "./block-sections-styled.js";
|
12
12
|
const Q = ({
|
13
13
|
userType: o,
|
14
|
-
imageHue:
|
14
|
+
imageHue: $,
|
15
15
|
blockData: m,
|
16
16
|
lessonIdx: l,
|
17
17
|
isLastBlock: g,
|
@@ -21,16 +21,16 @@ const Q = ({
|
|
21
21
|
onNodeMarkAsDone: _,
|
22
22
|
onNodeReattempt: E,
|
23
23
|
onNodeReview: b,
|
24
|
-
onNodeView:
|
24
|
+
onNodeView: A,
|
25
25
|
onBlockSkipUnskip: i,
|
26
|
-
onNodeUnassign:
|
27
|
-
onNodeUnlock:
|
26
|
+
onNodeUnassign: N,
|
27
|
+
onNodeUnlock: w,
|
28
28
|
onNodeSkipUnSkip: I
|
29
29
|
}) => {
|
30
|
-
const { block_type: s, name: p, sheets: a, permissions: L } = m, { can_skip: d, can_un_skip: e } = L, h =
|
30
|
+
const { block_type: s, name: p, sheets: a, permissions: L } = m, { can_skip: d, can_un_skip: e } = L, h = W[s], S = y(e, a.length, r, l), T = [
|
31
31
|
{
|
32
32
|
id: "node-card-skip",
|
33
|
-
label: e ? "Revert 'Skip'" : "Skip",
|
33
|
+
label: e ? "Revert 'Skip'" : "Skip All",
|
34
34
|
icon: j,
|
35
35
|
disabled: !1,
|
36
36
|
onClick: () => i == null ? void 0 : i(m, d)
|
@@ -47,7 +47,7 @@ const Q = ({
|
|
47
47
|
/* @__PURE__ */ n(c, { $flexDirection: "row", $alignItems: "center", $justifyContent: "space-between", children: [
|
48
48
|
/* @__PURE__ */ n(c, { $opacity: e ? 0.5 : 1, children: [
|
49
49
|
/* @__PURE__ */ n(
|
50
|
-
|
50
|
+
u,
|
51
51
|
{
|
52
52
|
$renderAs: "ac4",
|
53
53
|
$color: "BLACK_T_60",
|
@@ -60,7 +60,7 @@ const Q = ({
|
|
60
60
|
}
|
61
61
|
),
|
62
62
|
!!r && !!l && /* @__PURE__ */ t(
|
63
|
-
|
63
|
+
u,
|
64
64
|
{
|
65
65
|
$renderAs: "ab2-bold",
|
66
66
|
$color: "BLACK_1",
|
@@ -82,16 +82,16 @@ const Q = ({
|
|
82
82
|
children: /* @__PURE__ */ t(O, { width: 18, height: 18 })
|
83
83
|
}
|
84
84
|
),
|
85
|
-
menuElement: /* @__PURE__ */ t(
|
85
|
+
menuElement: /* @__PURE__ */ t(M, { options: T }),
|
86
86
|
menuOffset: 5,
|
87
87
|
menuZIndex: 4
|
88
88
|
}
|
89
89
|
)
|
90
90
|
] }),
|
91
|
-
/* @__PURE__ */ t(V, {
|
92
|
-
|
91
|
+
/* @__PURE__ */ t(V, { children: a.map((f) => /* @__PURE__ */ t(
|
92
|
+
H,
|
93
93
|
{
|
94
|
-
imageHue:
|
94
|
+
imageHue: $ || "BLUE",
|
95
95
|
userType: o,
|
96
96
|
nodeData: f,
|
97
97
|
blockType: s,
|
@@ -101,9 +101,9 @@ const Q = ({
|
|
101
101
|
onNodeMarkAsDone: _,
|
102
102
|
onNodeReattempt: E,
|
103
103
|
onNodeReview: b,
|
104
|
-
onNodeView:
|
105
|
-
onNodeUnassign:
|
106
|
-
onNodeUnlock:
|
104
|
+
onNodeView: A,
|
105
|
+
onNodeUnassign: N,
|
106
|
+
onNodeUnlock: w,
|
107
107
|
onNodeSkipUnSkip: I
|
108
108
|
},
|
109
109
|
f.node_id
|
@@ -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 onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onBlockSkipUnskip,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\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 ? `WHITE_1` : 'WHITE_3'}\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={18} height={18} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <Styled.BlockSheetContainer
|
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 onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\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 All',\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 ? `WHITE_1` : 'WHITE_3'}\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={18} height={18} />\n </Styled.BlockOptionsWrapper>\n }\n menuElement={<NodeMenuOptions options={menuOptions} />}\n menuOffset={5}\n menuZIndex={4}\n />\n )}\n </FlexView>\n\n <Styled.BlockSheetContainer>\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 onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\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","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","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","nodeData","NodeCard"],"mappings":";;;;;;;;;;;AAeA,MAAMA,IAA2C,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,kBAAAC;AACF,MAAM;AACJ,QAAM,EAAE,YAAYC,GAAW,MAAAC,GAAM,QAAAC,GAAQ,aAAAC,EAAgB,IAAAjB,GAEvD,EAAE,UAAUkB,GAAS,aAAaC,MAAcF,GAChDG,IAAYC,EAAWP,CAAS,GAEhCQ,IAAoBC,EAAqBJ,GAAWH,EAAO,QAAQb,GAAaF,CAAS,GAEzFuB,IAAiC;AAAA,IACrC;AAAA,MACE,IAAI;AAAA,MACJ,OAAOL,IAAY,kBAAkB;AAAA,MACrC,MAAMM;AAAA,MACN,UAAU;AAAA,MACV,SAAS,MAAMf,KAAA,gBAAAA,EAAoBV,GAAWkB;AAAA,IAChD;AAAA,EAAA;AAGE,SAAApB,MAAa,aAAaqB,IAAkB,OAG9C,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAaxB,IAAc,YAAY;AAAA,MACvC,UAAU;AAAA,MACV,YAAYD;AAAA,MACZ,UAAU;AAAA,MAEV,UAAA,gBAAA0B,EAACC,GAAS,EAAA,UAAU,IAClB,UAAA;AAAA,QAAA,gBAAAD,EAACC,KAAS,gBAAe,OAAM,aAAY,UAA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,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,YACA,gBAAAE;AAAA,YACA,cAAAC;AAAA,YACA,kBAAAC;AAAA,UAAA;AAAA,UAdKuB,EAAS;AAAA,QAgBjB,CAAA,GACH;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
@@ -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 { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\n\nimport { memo, useCallback, useRef, 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 * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\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 isStudent,\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 user_attempt_id: userAttemptId,\n } = nodeData;\n const {\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n can_reset: canReset,\n can_un_skip: canUnSkip,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const inClassSheet = attemptLocation === 'INCLASS';\n const canStartOrResume = canStart || canResume;\n\n const renderOptions = !canStartOrResume && (canReset || canReview);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-review':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\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 [canReview, nodeData, onNodeReattempt, onNodeReview, onNodeView, userAttemptId],\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 if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\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 if (canUnSkip) return null;\n\n return (\n <ContextMenu\n targetElement={\n <Styled.NodeCardContainer\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={!sheetStatement}\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 onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\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 <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n isStudent={isStudent}\n />\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} /> : <></>}\n />\n );\n});\n\nexport default StudentActions;\n"],"names":["renderSettings","StudentActions","memo","props","nodeData","imageHue","blockType","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeView","isStudent","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","teacherMarkedAsCompleted","userAttemptId","canReview","canStart","canResume","canReset","canUnSkip","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","inClassSheet","renderOptions","animationRef","useRef","nodeBgImage","getNodeTypeBasedBgImage","nodeCardLottie","getNodeCardBasedIcon","handleOnMenuOptionClick","useCallback","optionId","handleOnNodeCardClick","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","RedoIcon","jsx","ContextMenu","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","NodeMenuOptions","Fragment"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAEvDC,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,IACA,WAAAC;AAAA,EACE,IAAAR,GACE;AAAA,IACJ,UAAAS;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,IACrB,iBAAiBC;AAAA,EACf,IAAAlB,GACE;AAAA,IACJ,YAAYmB;AAAA,IACZ,WAAWC;AAAA,IACX,YAAYC;AAAA,IACZ,WAAWC;AAAA,IACX,aAAaC;AAAA,EACX,IAAAP,GAEEQ,IA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AChC,UAAA;AAAA,wBAAA5C;AAAA,wBAAW;AAAA,wBAAEiB,KAAgB;AAAA,sBAAA,GAChC;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAEA,gBAAAkB;AAAA,kBAACU;AAAA,kBAAA;AAAA,oBACC,UAAA9C;AAAA,oBACA,OAAAG;AAAA,oBACA,UAAAL;AAAA,oBACA,WAAAD;AAAA,kBAAA;AAAA,gBACF;AAAA,gBAEC,CAACiB,KACC,gBAAAsB,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,UAAAd;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,aAAaiB,IAAgB,gBAAAiB,EAACa,MAAgB,SAAShB,EAAA,CAAa,IAAO,gBAAAG,EAAAc,GAAA,EAAA;AAAA,IAAA;AAAA,EAAA;AAGjF,CAAC;"}
|
1
|
+
{"version":3,"file":"student-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/student-actions/student-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\n\nimport { memo, useCallback, useRef, 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 * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\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 isStudent,\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 user_attempt_id: userAttemptId,\n } = nodeData;\n const {\n can_review: canReview,\n can_start: canStart,\n can_resume: canResume,\n can_reset: canReset,\n can_un_skip: canUnSkip,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED;\n const inClassSheet = attemptLocation === 'INCLASS';\n const canStartOrResume = canStart || canResume;\n\n const renderOptions = !canStartOrResume && (canReset || canReview);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-review':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\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 [canReview, nodeData, onNodeReattempt, onNodeReview, onNodeView, userAttemptId],\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 if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\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 //* If a node is skipped we don't show that node to student.\n //* But teacher can still see that node.\n if (canUnSkip) return null;\n\n return (\n <ContextMenu\n targetElement={\n <Styled.NodeCardContainer\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={!sheetStatement}\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 onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\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 <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text $renderAs=\"ac4-black\" $color=\"BLACK\">\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n isStudent={isStudent}\n />\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} /> : <></>}\n />\n );\n});\n\nexport default StudentActions;\n"],"names":["renderSettings","StudentActions","memo","props","nodeData","imageHue","blockType","onNodeAttempt","onNodeReattempt","onNodeReview","onNodeView","isStudent","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","teacherMarkedAsCompleted","userAttemptId","canReview","canStart","canResume","canReset","canUnSkip","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","inClassSheet","renderOptions","animationRef","useRef","nodeBgImage","getNodeTypeBasedBgImage","nodeCardLottie","getNodeCardBasedIcon","handleOnMenuOptionClick","useCallback","optionId","handleOnNodeCardClick","handleOnMouseEnter","_a","handleOnMouseLeave","menuOptions","Eye2Icon","RedoIcon","jsx","ContextMenu","Styled.NodeCardContainer","jsxs","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","NodeMenuOptions","Fragment"],"mappings":";;;;;;;;;;;;;;;AAoBA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAA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A,MACZ,aAAaiB,IAAgB,gBAAAiB,EAACa,MAAgB,SAAShB,EAAA,CAAa,IAAO,gBAAAG,EAAAc,GAAA,EAAA;AAAA,IAAA;AAAA,EAAA;AAGjF,CAAC;"}
|
@@ -1,192 +1,208 @@
|
|
1
1
|
import { jsxs as l, jsx as t } from "react/jsx-runtime";
|
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
|
-
import { BLOCK_TYPE as
|
17
|
-
import { NODE_CARD_STATES as
|
18
|
-
import { getNodeTypeBasedBgImage as
|
19
|
-
import { getNodeCardBasedIcon as
|
20
|
-
import { NodeCardContainer as
|
21
|
-
import
|
22
|
-
import
|
23
|
-
const
|
2
|
+
import { memo as ar, useRef as T, useCallback as d, useEffect as sr } from "react";
|
3
|
+
import lr from "../../../../../assets/line-icons/icons/check2.js";
|
4
|
+
import or from "../../../../../assets/line-icons/icons/eye2.js";
|
5
|
+
import mr from "../../../../../assets/line-icons/icons/home2.js";
|
6
|
+
import dr from "../../../../../assets/line-icons/icons/lock3.js";
|
7
|
+
import v from "../../../../../assets/line-icons/icons/more-vertical.js";
|
8
|
+
import pr from "../../../../../assets/line-icons/icons/redo.js";
|
9
|
+
import ur from "../../../../../assets/line-icons/icons/skip.js";
|
10
|
+
import hr from "../../../../../assets/line-icons/icons/unlock2.js";
|
11
|
+
import fr from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
|
12
|
+
import Cr from "../../../../ui/hooks/use-context-menu-click-handler.js";
|
13
|
+
import A from "../../../../ui/layout/flex-view.js";
|
14
|
+
import _r from "../../../../ui/lottie-animation/lottie-animation.js";
|
15
|
+
import $r from "../../../../ui/text/text.js";
|
16
|
+
import { BLOCK_TYPE as Ir } from "../../../constants/block-constants.js";
|
17
|
+
import { NODE_CARD_STATES as G, TEACHER_MENU_LABELS as br } from "../../../constants/node-constants.js";
|
18
|
+
import { getNodeTypeBasedBgImage as Er } from "../../../utils/index.js";
|
19
|
+
import { getNodeCardBasedIcon as kr } from "../../../utils/node-card-utils.js";
|
20
|
+
import { NodeCardContainer as gr, NodeCardInfoWrapper as Lr, IconWrapper as Or, StyledImportantIcon as Tr, NodeKebabMenuWrapper as j, NodeCardContentWrapper as yr, NodeCardTitle as xr, NodeMenuOptionsWrapper as Sr } from "../node-card-styled.js";
|
21
|
+
import Wr from "../node-card-tags.js";
|
22
|
+
import Mr from "../node-menu-options/node-menu-options.js";
|
23
|
+
const Br = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: Kr, REVIEW: vr, VIEW: Ar, MARK_AS_DONE: Gr, RESET: jr, LOCK: Xr, UNLOCK: Hr } = br, y = "cue_cp_close_other_node_card_menu_options", le = ar(
|
24
24
|
({
|
25
25
|
nodeData: r,
|
26
|
-
imageHue:
|
27
|
-
blockType:
|
28
|
-
isSkipped:
|
26
|
+
imageHue: X,
|
27
|
+
blockType: H,
|
28
|
+
isSkipped: q,
|
29
29
|
onNodeAssignAsHomework: p,
|
30
|
-
onNodeMarkAsDone:
|
30
|
+
onNodeMarkAsDone: u,
|
31
31
|
onNodeView: c,
|
32
|
-
onNodeReview:
|
32
|
+
onNodeReview: n,
|
33
33
|
onNodeReattempt: h,
|
34
|
-
onNodeUnlock:
|
35
|
-
onNodeUnassign:
|
36
|
-
onNodeSkipUnSkip:
|
34
|
+
onNodeUnlock: f,
|
35
|
+
onNodeUnassign: C,
|
36
|
+
onNodeSkipUnSkip: _
|
37
37
|
}) => {
|
38
|
-
const
|
39
|
-
accuracy:
|
40
|
-
attempt_location:
|
41
|
-
node_type:
|
42
|
-
card_header:
|
43
|
-
title:
|
44
|
-
state:
|
45
|
-
is_optional:
|
46
|
-
sheet_statement:
|
47
|
-
permissions:
|
48
|
-
user_attempt_id:
|
49
|
-
} = r, { lottie:
|
50
|
-
can_mark_familiar:
|
51
|
-
can_review:
|
52
|
-
can_assign_as_homework:
|
53
|
-
can_reset:
|
38
|
+
const x = T(r.node_id), b = T(null), { menuVisible: a, onMenuClick: S, hideMenu: W } = Cr(b), {
|
39
|
+
accuracy: F,
|
40
|
+
attempt_location: P,
|
41
|
+
node_type: E,
|
42
|
+
card_header: z,
|
43
|
+
title: Y,
|
44
|
+
state: k,
|
45
|
+
is_optional: J,
|
46
|
+
sheet_statement: M,
|
47
|
+
permissions: Q,
|
48
|
+
user_attempt_id: o
|
49
|
+
} = r, { lottie: Z } = kr(E), g = T(null), {
|
50
|
+
can_mark_familiar: R,
|
51
|
+
can_review: m,
|
52
|
+
can_assign_as_homework: w,
|
53
|
+
can_reset: V,
|
54
54
|
can_unlock: $,
|
55
|
-
can_unassign:
|
56
|
-
can_un_skip:
|
57
|
-
can_skip:
|
58
|
-
} =
|
55
|
+
can_unassign: U,
|
56
|
+
can_un_skip: L,
|
57
|
+
can_skip: O
|
58
|
+
} = Q, B = H === Ir.GOAL, i = k === G.LOCKED || L, D = k === G.NOT_STARTED, N = P === "INCLASS", rr = (i || D) && ($ || U), er = Er(E), s = d(
|
59
59
|
(e) => {
|
60
60
|
switch (e) {
|
61
61
|
case "node-card-view":
|
62
|
-
|
62
|
+
m && o ? n == null || n(r) : c == null || c(r);
|
63
63
|
return;
|
64
64
|
case "node-card-assign-as-hw":
|
65
65
|
p == null || p(r);
|
66
66
|
return;
|
67
67
|
case "node-card-mark-as-done":
|
68
|
-
|
68
|
+
u == null || u(r);
|
69
69
|
return;
|
70
70
|
case "node-card-reset":
|
71
71
|
h == null || h(r);
|
72
72
|
return;
|
73
73
|
case "node-card-unlock":
|
74
|
-
|
74
|
+
f == null || f(r);
|
75
75
|
return;
|
76
76
|
case "node-card-lock":
|
77
|
-
|
77
|
+
C == null || C(r);
|
78
78
|
return;
|
79
79
|
case "node-card-skip":
|
80
80
|
case "node-card-revert-skip":
|
81
|
-
|
81
|
+
_ == null || _(r);
|
82
82
|
return;
|
83
83
|
default:
|
84
84
|
throw new Error(`No callback function for ${e}`);
|
85
85
|
}
|
86
86
|
},
|
87
87
|
[
|
88
|
-
|
88
|
+
m,
|
89
89
|
r,
|
90
90
|
p,
|
91
|
-
|
91
|
+
u,
|
92
92
|
h,
|
93
|
-
|
93
|
+
n,
|
94
|
+
_,
|
94
95
|
C,
|
95
96
|
f,
|
96
|
-
u,
|
97
97
|
c,
|
98
|
-
|
98
|
+
o
|
99
99
|
]
|
100
|
-
),
|
100
|
+
), tr = d(() => {
|
101
101
|
var e;
|
102
|
-
|
103
|
-
}, [
|
102
|
+
i || (e = g.current) == null || e.play();
|
103
|
+
}, [i]), cr = d(() => {
|
104
104
|
var e;
|
105
|
-
(e =
|
106
|
-
}, []),
|
107
|
-
|
108
|
-
}, [
|
105
|
+
(e = g.current) == null || e.stop();
|
106
|
+
}, []), nr = d(() => {
|
107
|
+
m && o ? n == null || n(r) : c == null || c(r);
|
108
|
+
}, [m, r, n, c, o]), K = d(
|
109
109
|
(e) => {
|
110
|
-
e.stopPropagation(),
|
110
|
+
if (e.stopPropagation(), !a) {
|
111
|
+
const I = new CustomEvent(y, {
|
112
|
+
detail: { sourceId: x.current }
|
113
|
+
});
|
114
|
+
document.dispatchEvent(I);
|
115
|
+
}
|
116
|
+
S();
|
111
117
|
},
|
112
|
-
[
|
113
|
-
)
|
118
|
+
[S, a]
|
119
|
+
);
|
120
|
+
sr(() => {
|
121
|
+
const e = (I) => {
|
122
|
+
I.detail && I.detail.sourceId !== x.current && a && W();
|
123
|
+
};
|
124
|
+
return document.addEventListener(y, e), () => {
|
125
|
+
document.removeEventListener(y, e);
|
126
|
+
};
|
127
|
+
}, [a, W]);
|
128
|
+
const ir = [
|
114
129
|
{
|
115
130
|
id: "node-card-view",
|
116
|
-
label:
|
117
|
-
icon:
|
131
|
+
label: m && o ? vr : Ar,
|
132
|
+
icon: or,
|
118
133
|
disabled: !1,
|
119
|
-
onClick:
|
134
|
+
onClick: s
|
120
135
|
},
|
121
136
|
{
|
122
137
|
id: "node-card-assign-as-hw",
|
123
|
-
label:
|
124
|
-
icon:
|
125
|
-
disabled: !
|
126
|
-
onClick:
|
138
|
+
label: Kr,
|
139
|
+
icon: mr,
|
140
|
+
disabled: !w,
|
141
|
+
onClick: s
|
127
142
|
},
|
128
143
|
{
|
129
144
|
id: "node-card-reset",
|
130
|
-
label:
|
131
|
-
icon:
|
132
|
-
disabled: !
|
133
|
-
onClick:
|
145
|
+
label: jr,
|
146
|
+
icon: pr,
|
147
|
+
disabled: !V,
|
148
|
+
onClick: s
|
134
149
|
},
|
135
150
|
{
|
136
151
|
id: "node-card-mark-as-done",
|
137
|
-
label:
|
138
|
-
icon:
|
139
|
-
disabled: !
|
140
|
-
onClick:
|
152
|
+
label: Gr,
|
153
|
+
icon: lr,
|
154
|
+
disabled: !R,
|
155
|
+
onClick: s
|
141
156
|
},
|
142
157
|
{
|
143
158
|
id: `node-card-${$ ? "unlock" : "lock"}`,
|
144
|
-
label: $ ?
|
145
|
-
icon: $ ?
|
146
|
-
disabled: !
|
147
|
-
onClick:
|
159
|
+
label: $ ? Hr : Xr,
|
160
|
+
icon: $ ? hr : dr,
|
161
|
+
disabled: !rr,
|
162
|
+
onClick: s
|
148
163
|
},
|
149
164
|
{
|
150
|
-
id: `node-card-${
|
151
|
-
label:
|
152
|
-
icon:
|
153
|
-
disabled: !
|
154
|
-
onClick:
|
165
|
+
id: `node-card-${O ? "skip" : "revert-skip"}`,
|
166
|
+
label: O ? "Skip" : "Revert 'Skip'",
|
167
|
+
icon: ur,
|
168
|
+
disabled: !L && !O,
|
169
|
+
onClick: s
|
155
170
|
}
|
156
171
|
];
|
157
|
-
return /* @__PURE__ */ l(
|
172
|
+
return /* @__PURE__ */ l(A, { $position: "relative", children: [
|
158
173
|
/* @__PURE__ */ t(
|
159
|
-
|
174
|
+
gr,
|
160
175
|
{
|
161
|
-
$background: `${
|
162
|
-
$disabled:
|
163
|
-
onClick:
|
176
|
+
$background: `${X}_2`,
|
177
|
+
$disabled: i,
|
178
|
+
onClick: nr,
|
179
|
+
$opacity: q ? 0.5 : 1,
|
164
180
|
children: /* @__PURE__ */ l(
|
165
|
-
|
181
|
+
fr,
|
166
182
|
{
|
167
183
|
renderAs: "primary",
|
168
|
-
tooltipItem:
|
184
|
+
tooltipItem: M,
|
169
185
|
position: "bottom",
|
170
186
|
zIndex: 5,
|
171
|
-
hidden:
|
187
|
+
hidden: a || !M,
|
172
188
|
parentWidth: "100%",
|
173
189
|
widthX: 11.25,
|
174
190
|
children: [
|
175
191
|
/* @__PURE__ */ l(
|
176
|
-
|
192
|
+
Lr,
|
177
193
|
{
|
178
194
|
$flexDirection: "row",
|
179
195
|
$alignItems: "center",
|
180
196
|
$width: "100%",
|
181
197
|
$heightX: 3.5,
|
182
|
-
$bgImage:
|
198
|
+
$bgImage: er,
|
183
199
|
$gutterX: 0.78125,
|
184
200
|
$flexGap: 8.5,
|
185
|
-
onMouseEnter:
|
186
|
-
onMouseLeave:
|
201
|
+
onMouseEnter: tr,
|
202
|
+
onMouseLeave: cr,
|
187
203
|
children: [
|
188
204
|
/* @__PURE__ */ l(
|
189
|
-
|
205
|
+
Or,
|
190
206
|
{
|
191
207
|
$width: 31,
|
192
208
|
$height: 31,
|
@@ -194,41 +210,41 @@ const yr = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: xr, REVIEW: Sr,
|
|
194
210
|
$position: "relative",
|
195
211
|
$alignItems: "center",
|
196
212
|
$justifyContent: "center",
|
197
|
-
$opacity:
|
213
|
+
$opacity: i ? 0.5 : 1,
|
198
214
|
children: [
|
199
215
|
/* @__PURE__ */ t(
|
200
|
-
|
216
|
+
_r,
|
201
217
|
{
|
202
|
-
src:
|
203
|
-
ref:
|
204
|
-
settings:
|
218
|
+
src: Z,
|
219
|
+
ref: g,
|
220
|
+
settings: Br
|
205
221
|
}
|
206
222
|
),
|
207
|
-
!
|
223
|
+
!J && /* @__PURE__ */ t(Tr, {})
|
208
224
|
]
|
209
225
|
}
|
210
226
|
),
|
211
227
|
/* @__PURE__ */ l(
|
212
|
-
|
228
|
+
$r,
|
213
229
|
{
|
214
230
|
$renderAs: "ac4-black",
|
215
231
|
$color: "BLACK",
|
216
|
-
$opacity:
|
217
|
-
$textDecoration:
|
232
|
+
$opacity: i ? 0.5 : 1,
|
233
|
+
$textDecoration: L ? "line-through" : "none",
|
218
234
|
children: [
|
219
|
-
|
235
|
+
z,
|
220
236
|
" ",
|
221
|
-
|
237
|
+
N && "• CW"
|
222
238
|
]
|
223
239
|
}
|
224
240
|
),
|
225
|
-
/* @__PURE__ */ t(
|
241
|
+
/* @__PURE__ */ t(A, { className: "context-menu", children: B && /* @__PURE__ */ t(j, { ref: b, onClick: K, children: /* @__PURE__ */ t(v, { width: 18, height: 18 }) }) })
|
226
242
|
]
|
227
243
|
}
|
228
244
|
),
|
229
|
-
/* @__PURE__ */ t(
|
230
|
-
!
|
231
|
-
|
245
|
+
/* @__PURE__ */ t(Wr, { nodeType: E, state: k, accuracy: F }),
|
246
|
+
!B && /* @__PURE__ */ l(
|
247
|
+
yr,
|
232
248
|
{
|
233
249
|
$flexDirection: "row",
|
234
250
|
$alignItems: "center",
|
@@ -238,15 +254,15 @@ const yr = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: xr, REVIEW: Sr,
|
|
238
254
|
$justifyContent: "space-between",
|
239
255
|
children: [
|
240
256
|
/* @__PURE__ */ t(
|
241
|
-
|
257
|
+
xr,
|
242
258
|
{
|
243
259
|
$renderAs: "ab3",
|
244
260
|
$color: "BLACK_1",
|
245
|
-
$opacity:
|
246
|
-
children:
|
261
|
+
$opacity: i ? 0.5 : 1,
|
262
|
+
children: Y
|
247
263
|
}
|
248
264
|
),
|
249
|
-
/* @__PURE__ */ t(
|
265
|
+
/* @__PURE__ */ t(j, { ref: b, onClick: K, children: /* @__PURE__ */ t(v, { width: 18, height: 18 }) })
|
250
266
|
]
|
251
267
|
}
|
252
268
|
)
|
@@ -255,11 +271,11 @@ const yr = { renderer: "canvas", autoplay: !1 }, { ASSIGN_AS_HW: xr, REVIEW: Sr,
|
|
255
271
|
)
|
256
272
|
}
|
257
273
|
),
|
258
|
-
/* @__PURE__ */ t(
|
274
|
+
/* @__PURE__ */ t(Sr, { $visible: a, children: /* @__PURE__ */ t(Mr, { options: ir }) })
|
259
275
|
] });
|
260
276
|
}
|
261
277
|
);
|
262
278
|
export {
|
263
|
-
|
279
|
+
le as default
|
264
280
|
};
|
265
281
|
//# sourceMappingURL=teacher-actions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useRef } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport Lock3Icon from '../../../../../assets/line-icons/icons/lock3';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport RedoIcon from '../../../../../assets/line-icons/icons/redo';\nimport SkipIcon from '../../../../../assets/line-icons/icons/skip';\nimport Unlock2Icon from '../../../../../assets/line-icons/icons/unlock2';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../../../../ui/layout/flex-view';\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, TEACHER_MENU_LABELS } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\nconst { ASSIGN_AS_HW, REVIEW, VIEW, MARK_AS_DONE, RESET, LOCK, UNLOCK } = TEACHER_MENU_LABELS;\n\nconst TeacherActions: FC<Omit<INodeCardProps, 'userType'>> = memo(\n ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeView,\n onNodeReview,\n onNodeReattempt,\n onNodeUnlock,\n onNodeUnassign,\n onNodeSkipUnSkip,\n }) => {\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick } = useContextMenuClickHandler(containerRef);\n\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 user_attempt_id: userAttemptId,\n } = nodeData;\n\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const {\n can_mark_familiar: canMarkFamiliar,\n can_review: canReview,\n can_assign_as_homework: canAssignAsHw,\n can_reset: canReset,\n can_unlock: canUnlock,\n can_unassign: canUnassign,\n can_un_skip: canUnSkip,\n can_skip: canSkip,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED || canUnSkip;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const inClassSheet = attemptLocation === 'INCLASS';\n const canLockUnlockSheet = (sheetLocked || sheetNotStarted) && (canUnlock || canUnassign);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAssignAsHomework?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n\n case 'node-card-reset':\n onNodeReattempt?.(nodeData);\n\n return;\n case 'node-card-unlock':\n onNodeUnlock?.(nodeData);\n\n return;\n case 'node-card-lock':\n onNodeUnassign?.(nodeData);\n\n return;\n case 'node-card-skip':\n case 'node-card-revert-skip':\n onNodeSkipUnSkip?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n canReview,\n nodeData,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeSkipUnSkip,\n onNodeUnassign,\n onNodeUnlock,\n onNodeView,\n userAttemptId,\n ],\n );\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const handleOnNodeCardClick = useCallback(() => {\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n }, [canReview, nodeData, onNodeReview, onNodeView, userAttemptId]);\n\n const handleOnKebabMenuClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n e.stopPropagation();\n onMenuClick();\n },\n [onMenuClick],\n );\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: canReview && userAttemptId ? REVIEW : VIEW,\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: ASSIGN_AS_HW,\n icon: Home2Icon,\n disabled: !canAssignAsHw,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-reset',\n label: RESET,\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: MARK_AS_DONE,\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: `node-card-${canUnlock ? 'unlock' : 'lock'}`,\n label: canUnlock ? UNLOCK : LOCK,\n icon: canUnlock ? Unlock2Icon : Lock3Icon,\n disabled: !canLockUnlockSheet,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: `node-card-${canSkip ? 'skip' : `revert-skip`}`,\n label: canSkip ? 'Skip' : `Revert 'Skip'`,\n icon: SkipIcon,\n disabled: !canUnSkip && !canSkip,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <FlexView $position=\"relative\">\n <Styled.NodeCardContainer\n $background={`${imageHue}_2`}\n $disabled={Boolean(isSkipped || sheetLocked)}\n onClick={handleOnNodeCardClick}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={menuVisible || !sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text\n $renderAs=\"ac4-black\"\n $color=\"BLACK\"\n $opacity={sheetLocked ? 0.5 : 1}\n $textDecoration={canUnSkip ? 'line-through' : 'none'}\n >\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={handleOnKebabMenuClick}>\n <MoreVerticalIcon width={18} height={18} />\n </Styled.NodeKebabMenuWrapper>\n )}\n </FlexView>\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={handleOnKebabMenuClick}>\n <MoreVerticalIcon width={18} height={18} />\n </Styled.NodeKebabMenuWrapper>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n <Styled.NodeMenuOptionsWrapper $visible={menuVisible}>\n <NodeMenuOptions options={menuOptions} />\n </Styled.NodeMenuOptionsWrapper>\n </FlexView>\n );\n },\n);\n\nexport default TeacherActions;\n"],"names":["renderSettings","ASSIGN_AS_HW","REVIEW","VIEW","MARK_AS_DONE","RESET","LOCK","UNLOCK","TEACHER_MENU_LABELS","TeacherActions","memo","nodeData","imageHue","blockType","isSkipped","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeView","onNodeReview","onNodeReattempt","onNodeUnlock","onNodeUnassign","onNodeSkipUnSkip","containerRef","useRef","menuVisible","onMenuClick","useContextMenuClickHandler","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","userAttemptId","nodeCardLottie","getNodeCardBasedIcon","animationRef","canMarkFamiliar","canReview","canAssignAsHw","canReset","canUnlock","canUnassign","canUnSkip","canSkip","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","inClassSheet","canLockUnlockSheet","nodeBgImage","getNodeTypeBasedBgImage","handleOnMenuOptionClick","useCallback","optionId","handleOnMouseEnter","_a","handleOnMouseLeave","handleOnNodeCardClick","handleOnKebabMenuClick","menuOptions","Eye2Icon","Home2Icon","RedoIcon","Check2Icon","Unlock2Icon","Lock3Icon","SkipIcon","jsxs","FlexView","jsx","Styled.NodeCardContainer","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","Styled.NodeKebabMenuWrapper","MoreVerticalIcon","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","Styled.NodeMenuOptionsWrapper","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GACvD,EAAE,cAAAC,IAAc,QAAAC,IAAQ,MAAAC,IAAM,cAAAC,IAAc,OAAAC,IAAO,MAAAC,IAAM,QAAAC,GAAW,IAAAC,IAEpEC,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,YAAAC;AAAA,IACA,cAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAC;AAAA,EAAA,MACI;AACE,UAAAC,IAAeC,EAAuB,IAAI,GAC1C,EAAE,aAAAC,GAAa,aAAAC,EAAY,IAAIC,GAA2BJ,CAAY,GAEtE;AAAA,MACJ,UAAAK;AAAA,MACA,kBAAkBC;AAAA,MAClB,WAAWC;AAAA,MACX,aAAaC;AAAA,MACb,OAAAC;AAAA,MACA,OAAAC;AAAA,MACA,aAAaC;AAAA,MACb,iBAAiBC;AAAA,MACjB,aAAAC;AAAA,MACA,iBAAiBC;AAAA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AAAT,EAACa,IAAA,EAA8B,UAAUhE,GACvC,UAAC,gBAAAmD,EAAAc,IAAA,EAAgB,SAASxB,GAAA,CAAa,EACzC,CAAA;AAAA,IACF,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
1
|
+
{"version":3,"file":"teacher-actions.js","sources":["../../../../../../src/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.tsx"],"sourcesContent":["import type { ILottieAnimationRef } from '../../../../ui/lottie-animation/types';\nimport type { INodeCardProps } from '../node-card-types';\nimport type { INodeMenuOption } from '../node-menu-options/node-menu-options-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useRef } from 'react';\n\nimport Check2Icon from '../../../../../assets/line-icons/icons/check2';\nimport Eye2Icon from '../../../../../assets/line-icons/icons/eye2';\nimport Home2Icon from '../../../../../assets/line-icons/icons/home2';\nimport Lock3Icon from '../../../../../assets/line-icons/icons/lock3';\nimport MoreVerticalIcon from '../../../../../assets/line-icons/icons/more-vertical';\nimport RedoIcon from '../../../../../assets/line-icons/icons/redo';\nimport SkipIcon from '../../../../../assets/line-icons/icons/skip';\nimport Unlock2Icon from '../../../../../assets/line-icons/icons/unlock2';\nimport ArrowTooltip from '../../../../ui/arrow-tooltip/arrow-tooltip';\nimport useContextMenuClickHandler from '../../../../ui/hooks/use-context-menu-click-handler';\nimport FlexView from '../../../../ui/layout/flex-view';\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, TEACHER_MENU_LABELS } from '../../../constants/node-constants';\nimport { getNodeTypeBasedBgImage } from '../../../utils';\nimport { getNodeCardBasedIcon } from '../../../utils/node-card-utils';\nimport * as Styled from '../node-card-styled';\nimport NodeCardTags from '../node-card-tags';\nimport NodeMenuOptions from '../node-menu-options/node-menu-options';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\nconst { ASSIGN_AS_HW, REVIEW, VIEW, MARK_AS_DONE, RESET, LOCK, UNLOCK } = TEACHER_MENU_LABELS;\n\nconst customEventName = 'cue_cp_close_other_node_card_menu_options';\n\nconst TeacherActions: FC<Omit<INodeCardProps, 'userType'>> = memo(\n ({\n nodeData,\n imageHue,\n blockType,\n isSkipped,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeView,\n onNodeReview,\n onNodeReattempt,\n onNodeUnlock,\n onNodeUnassign,\n onNodeSkipUnSkip,\n }) => {\n const componentUniqueIdRef = useRef(nodeData.node_id);\n const containerRef = useRef<HTMLDivElement>(null);\n const { menuVisible, onMenuClick, hideMenu } = useContextMenuClickHandler(containerRef);\n\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 user_attempt_id: userAttemptId,\n } = nodeData;\n\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n\n const {\n can_mark_familiar: canMarkFamiliar,\n can_review: canReview,\n can_assign_as_homework: canAssignAsHw,\n can_reset: canReset,\n can_unlock: canUnlock,\n can_unassign: canUnassign,\n can_un_skip: canUnSkip,\n can_skip: canSkip,\n } = permissions;\n\n const isGoalBlock = blockType === BLOCK_TYPE.GOAL;\n const sheetLocked = state === NODE_CARD_STATES.LOCKED || canUnSkip;\n const sheetNotStarted = state === NODE_CARD_STATES.NOT_STARTED;\n const inClassSheet = attemptLocation === 'INCLASS';\n const canLockUnlockSheet = (sheetLocked || sheetNotStarted) && (canUnlock || canUnassign);\n\n const nodeBgImage = getNodeTypeBasedBgImage(nodeType);\n\n const handleOnMenuOptionClick = useCallback(\n (optionId: string) => {\n switch (optionId) {\n case 'node-card-view':\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n\n return;\n\n case 'node-card-assign-as-hw':\n onNodeAssignAsHomework?.(nodeData);\n\n return;\n\n case 'node-card-mark-as-done':\n onNodeMarkAsDone?.(nodeData);\n\n return;\n\n case 'node-card-reset':\n onNodeReattempt?.(nodeData);\n\n return;\n case 'node-card-unlock':\n onNodeUnlock?.(nodeData);\n\n return;\n case 'node-card-lock':\n onNodeUnassign?.(nodeData);\n\n return;\n case 'node-card-skip':\n case 'node-card-revert-skip':\n onNodeSkipUnSkip?.(nodeData);\n\n return;\n default:\n throw new Error(`No callback function for ${optionId}`);\n }\n },\n [\n canReview,\n nodeData,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeSkipUnSkip,\n onNodeUnassign,\n onNodeUnlock,\n onNodeView,\n userAttemptId,\n ],\n );\n\n const handleOnMouseEnter = useCallback(() => {\n if (sheetLocked) return;\n animationRef.current?.play();\n }, [sheetLocked]);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n const handleOnNodeCardClick = useCallback(() => {\n if (canReview && userAttemptId) {\n onNodeReview?.(nodeData);\n } else {\n onNodeView?.(nodeData);\n }\n }, [canReview, nodeData, onNodeReview, onNodeView, userAttemptId]);\n\n const handleOnKebabMenuClick = useCallback(\n (e: React.MouseEvent<HTMLDivElement, MouseEvent>) => {\n e.stopPropagation();\n\n //* If this menu is not currently visible, it means onMenuClick will attempt to open it.\n //* In that case, dispatch an event to close other menus.\n //* This check ensures we only dispatch, When this menu is about to be opened.\n if (!menuVisible) {\n const event = new CustomEvent(customEventName, {\n detail: { sourceId: componentUniqueIdRef.current },\n });\n\n document.dispatchEvent(event);\n }\n\n //* This will toggle the current menu's visibility.\n onMenuClick();\n },\n [onMenuClick, menuVisible],\n );\n\n useEffect(() => {\n const handleCloseRequest = (event: CustomEvent) => {\n //*() Ensure event.detail and event.detail.sourceId exist before accessing\n if (event.detail && event.detail.sourceId !== componentUniqueIdRef.current && menuVisible) {\n hideMenu();\n }\n };\n\n document.addEventListener(customEventName, handleCloseRequest as EventListener);\n\n return () => {\n document.removeEventListener(customEventName, handleCloseRequest as EventListener);\n };\n }, [menuVisible, hideMenu]);\n\n const menuOptions: INodeMenuOption[] = [\n {\n id: 'node-card-view',\n label: canReview && userAttemptId ? REVIEW : VIEW,\n icon: Eye2Icon,\n disabled: false,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-assign-as-hw',\n label: ASSIGN_AS_HW,\n icon: Home2Icon,\n disabled: !canAssignAsHw,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-reset',\n label: RESET,\n icon: RedoIcon,\n disabled: !canReset,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: 'node-card-mark-as-done',\n label: MARK_AS_DONE,\n icon: Check2Icon,\n disabled: !canMarkFamiliar,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: `node-card-${canUnlock ? 'unlock' : 'lock'}`,\n label: canUnlock ? UNLOCK : LOCK,\n icon: canUnlock ? Unlock2Icon : Lock3Icon,\n disabled: !canLockUnlockSheet,\n onClick: handleOnMenuOptionClick,\n },\n {\n id: `node-card-${canSkip ? 'skip' : `revert-skip`}`,\n label: canSkip ? 'Skip' : `Revert 'Skip'`,\n icon: SkipIcon,\n disabled: !canUnSkip && !canSkip,\n onClick: handleOnMenuOptionClick,\n },\n ];\n\n return (\n <FlexView $position=\"relative\">\n <Styled.NodeCardContainer\n $background={`${imageHue}_2`}\n $disabled={sheetLocked}\n onClick={handleOnNodeCardClick}\n $opacity={isSkipped ? 0.5 : 1}\n >\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem={sheetStatement}\n position=\"bottom\"\n zIndex={5}\n hidden={menuVisible || !sheetStatement}\n parentWidth=\"100%\"\n widthX={11.25}\n >\n <Styled.NodeCardInfoWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={nodeBgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n <LottieAnimation\n src={nodeCardLottie}\n ref={animationRef}\n settings={renderSettings}\n />\n {!isOptional && <Styled.StyledImportantIcon />}\n </Styled.IconWrapper>\n\n <Text\n $renderAs=\"ac4-black\"\n $color=\"BLACK\"\n $opacity={sheetLocked ? 0.5 : 1}\n $textDecoration={canUnSkip ? 'line-through' : 'none'}\n >\n {cardHeader} {inClassSheet && `• CW`}\n </Text>\n\n <FlexView className=\"context-menu\">\n {isGoalBlock && (\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={handleOnKebabMenuClick}>\n <MoreVerticalIcon width={18} height={18} />\n </Styled.NodeKebabMenuWrapper>\n )}\n </FlexView>\n </Styled.NodeCardInfoWrapper>\n\n <NodeCardTags nodeType={nodeType} state={state} accuracy={accuracy} />\n\n {!isGoalBlock && (\n <Styled.NodeCardContentWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $background=\"WHITE_1\"\n $flexGap={8}\n $heightX={4}\n $justifyContent=\"space-between\"\n >\n <Styled.NodeCardTitle\n $renderAs=\"ab3\"\n $color=\"BLACK_1\"\n $opacity={sheetLocked ? 0.5 : 1}\n >\n {title}\n </Styled.NodeCardTitle>\n\n <Styled.NodeKebabMenuWrapper ref={containerRef} onClick={handleOnKebabMenuClick}>\n <MoreVerticalIcon width={18} height={18} />\n </Styled.NodeKebabMenuWrapper>\n </Styled.NodeCardContentWrapper>\n )}\n </ArrowTooltip>\n </Styled.NodeCardContainer>\n <Styled.NodeMenuOptionsWrapper $visible={menuVisible}>\n <NodeMenuOptions options={menuOptions} />\n </Styled.NodeMenuOptionsWrapper>\n </FlexView>\n );\n },\n);\n\nexport default TeacherActions;\n"],"names":["renderSettings","ASSIGN_AS_HW","REVIEW","VIEW","MARK_AS_DONE","RESET","LOCK","UNLOCK","TEACHER_MENU_LABELS","customEventName","TeacherActions","memo","nodeData","imageHue","blockType","isSkipped","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeView","onNodeReview","onNodeReattempt","onNodeUnlock","onNodeUnassign","onNodeSkipUnSkip","componentUniqueIdRef","useRef","containerRef","menuVisible","onMenuClick","hideMenu","useContextMenuClickHandler","accuracy","attemptLocation","nodeType","cardHeader","title","state","isOptional","sheetStatement","permissions","userAttemptId","nodeCardLottie","getNodeCardBasedIcon","animationRef","canMarkFamiliar","canReview","canAssignAsHw","canReset","canUnlock","canUnassign","canUnSkip","canSkip","isGoalBlock","BLOCK_TYPE","sheetLocked","NODE_CARD_STATES","sheetNotStarted","inClassSheet","canLockUnlockSheet","nodeBgImage","getNodeTypeBasedBgImage","handleOnMenuOptionClick","useCallback","optionId","handleOnMouseEnter","_a","handleOnMouseLeave","handleOnNodeCardClick","handleOnKebabMenuClick","event","useEffect","handleCloseRequest","menuOptions","Eye2Icon","Home2Icon","RedoIcon","Check2Icon","Unlock2Icon","Lock3Icon","SkipIcon","jsxs","FlexView","jsx","Styled.NodeCardContainer","ArrowTooltip","Styled.NodeCardInfoWrapper","Styled.IconWrapper","LottieAnimation","Styled.StyledImportantIcon","Text","Styled.NodeKebabMenuWrapper","MoreVerticalIcon","NodeCardTags","Styled.NodeCardContentWrapper","Styled.NodeCardTitle","Styled.NodeMenuOptionsWrapper","NodeMenuOptions"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAMA,KAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GACvD,EAAE,cAAAC,IAAc,QAAAC,IAAQ,MAAAC,IAAM,cAAAC,IAAc,OAAAC,IAAO,MAAAC,IAAM,QAAAC,GAAW,IAAAC,IAEpEC,IAAkB,6CAElBC,KAAuDC;AAAA,EAC3D,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBA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
|
2
|
+
import { memo as N, useState as v, useRef as u, useCallback as g, useLayoutEffect as B } from "react";
|
3
3
|
import R from "../../assets/line-icons/icons/closed-eye.js";
|
4
4
|
import L from "../chapters-v2/comps/node-card/node-card-tags.js";
|
5
5
|
import { getNodeTypeBasedBgImage as O } from "../chapters-v2/utils/index.js";
|
6
6
|
import { getNodeCardBasedIcon as S } from "../chapters-v2/utils/node-card-utils.js";
|
7
|
-
import
|
7
|
+
import h from "../ui/arrow-tooltip/arrow-tooltip.js";
|
8
8
|
import r from "../ui/layout/flex-view.js";
|
9
9
|
import W from "../ui/lottie-animation/lottie-animation.js";
|
10
10
|
import D from "./card-title.js";
|
@@ -12,27 +12,27 @@ import j from "./node-progress.js";
|
|
12
12
|
import { CardWrapper as G, IconWrapper as M, BannerImageWrapper as V, BannerImage as z, HeaderText as U, SubHeaderText as F } from "./styles.js";
|
13
13
|
const K = { renderer: "canvas", autoplay: !1 }, P = ({
|
14
14
|
header: d,
|
15
|
-
isInQueue:
|
16
|
-
nodeData:
|
17
|
-
studentContainerRef:
|
18
|
-
subHeader:
|
19
|
-
userType:
|
20
|
-
isMilestone:
|
15
|
+
isInQueue: $,
|
16
|
+
nodeData: f,
|
17
|
+
studentContainerRef: T,
|
18
|
+
subHeader: w,
|
19
|
+
userType: I,
|
20
|
+
isMilestone: c = !1
|
21
21
|
}) => {
|
22
22
|
const {
|
23
23
|
node_type: o,
|
24
24
|
state: b,
|
25
25
|
accuracy: y,
|
26
26
|
due_date_ts: a,
|
27
|
-
image_url:
|
28
|
-
image_hue:
|
27
|
+
image_url: l,
|
28
|
+
image_hue: m,
|
29
29
|
card_header: _ = "",
|
30
|
-
unlocked_on_ts:
|
30
|
+
unlocked_on_ts: p,
|
31
31
|
course_type: x
|
32
|
-
} =
|
32
|
+
} = f, [C, H] = v(!1), n = u(null), k = O(o), s = u(null), { lottie: A } = S(o), E = g(() => {
|
33
33
|
var t;
|
34
34
|
(t = s.current) == null || t.play();
|
35
|
-
}, []), X =
|
35
|
+
}, []), X = g(() => {
|
36
36
|
var t;
|
37
37
|
(t = s.current) == null || t.stop();
|
38
38
|
}, []);
|
@@ -41,10 +41,10 @@ const K = { renderer: "canvas", autoplay: !1 }, P = ({
|
|
41
41
|
}, []), /* @__PURE__ */ i(
|
42
42
|
r,
|
43
43
|
{
|
44
|
-
ref:
|
44
|
+
ref: T,
|
45
45
|
$widthX: 12.38,
|
46
46
|
$position: "relative",
|
47
|
-
$background: `${
|
47
|
+
$background: `${m || "ORANGE"}_2`,
|
48
48
|
onMouseEnter: E,
|
49
49
|
onMouseLeave: X,
|
50
50
|
children: [
|
@@ -74,8 +74,8 @@ const K = { renderer: "canvas", autoplay: !1 }, P = ({
|
|
74
74
|
}
|
75
75
|
),
|
76
76
|
/* @__PURE__ */ e(D, { cardHeader: _, nodeType: o, courseType: x }),
|
77
|
-
|
78
|
-
|
77
|
+
$ && /* @__PURE__ */ e(
|
78
|
+
h,
|
79
79
|
{
|
80
80
|
renderAs: "primary",
|
81
81
|
tooltipItem: "Not visible to student",
|
@@ -84,7 +84,7 @@ const K = { renderer: "canvas", autoplay: !1 }, P = ({
|
|
84
84
|
children: /* @__PURE__ */ e(R, {})
|
85
85
|
}
|
86
86
|
),
|
87
|
-
!!
|
87
|
+
!!l && /* @__PURE__ */ e(V, { children: /* @__PURE__ */ e(z, { src: l, alt: "Chapter image" }) })
|
88
88
|
]
|
89
89
|
}
|
90
90
|
),
|
@@ -95,21 +95,21 @@ const K = { renderer: "canvas", autoplay: !1 }, P = ({
|
|
95
95
|
state: b,
|
96
96
|
accuracy: y,
|
97
97
|
dueDateTs: a,
|
98
|
-
isStudent:
|
99
|
-
isMilestone:
|
98
|
+
isStudent: I === "STUDENT",
|
99
|
+
isMilestone: c
|
100
100
|
}
|
101
101
|
),
|
102
|
-
a &&
|
102
|
+
!c && a && p && /* @__PURE__ */ e(
|
103
103
|
j,
|
104
104
|
{
|
105
105
|
dueDate: a * 1e3,
|
106
|
-
unlockedOn:
|
107
|
-
progressBg: `${
|
106
|
+
unlockedOn: p * 1e3,
|
107
|
+
progressBg: `${m || "ORANGE"}_4`
|
108
108
|
}
|
109
109
|
),
|
110
110
|
/* @__PURE__ */ i(r, { $gutterX: 0.75, $gapX: 1, $flexRowGapX: 0.5, $background: "WHITE", children: [
|
111
111
|
/* @__PURE__ */ e(
|
112
|
-
|
112
|
+
h,
|
113
113
|
{
|
114
114
|
renderAs: "primary",
|
115
115
|
position: "bottom",
|
@@ -129,7 +129,7 @@ const K = { renderer: "canvas", autoplay: !1 }, P = ({
|
|
129
129
|
$alignItems: "center",
|
130
130
|
$justifyContent: "space-between",
|
131
131
|
children: [
|
132
|
-
/* @__PURE__ */ e(F, { $renderAs: "ub3", $color: "BLACK_T_60", children:
|
132
|
+
/* @__PURE__ */ e(F, { $renderAs: "ub3", $color: "BLACK_T_60", children: w }),
|
133
133
|
/* @__PURE__ */ e(r, { $width: 32 })
|
134
134
|
]
|
135
135
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"homework-card-view.js","sources":["../../../src/features/homework/homework-card-view.tsx"],"sourcesContent":["import type { INodeDataProps } from '../chapters-v2/comps/node-card/node-card-types';\nimport type { ILottieAnimationRef } from '../ui/lottie-animation/types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';\n\nimport ClosedEyeIcon from '../../assets/line-icons/icons/closed-eye';\nimport NodeCardTags from '../chapters-v2/comps/node-card/node-card-tags';\nimport { getNodeTypeBasedBgImage } from '../chapters-v2/utils';\nimport { getNodeCardBasedIcon } from '../chapters-v2/utils/node-card-utils';\nimport ArrowTooltip from '../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../ui/layout/flex-view';\nimport LottieAnimation from '../ui/lottie-animation/lottie-animation';\nimport CardTitle from './card-title';\nimport NodeProgress from './node-progress';\nimport * as Styled from './styles';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\ninterface IHomeworkCardViewProps {\n header: string;\n isInQueue?: boolean;\n nodeData: INodeDataProps;\n studentContainerRef: React.RefObject<HTMLDivElement>;\n subHeader: string;\n userType: TUserTypes;\n isMilestone?: boolean;\n}\n\nconst HomeworkView: FC<IHomeworkCardViewProps> = ({\n header,\n isInQueue,\n nodeData,\n studentContainerRef,\n subHeader,\n userType,\n isMilestone = false,\n}) => {\n const {\n node_type: nodeType,\n state,\n accuracy,\n due_date_ts: dueDateTs,\n image_url: imageUrl,\n image_hue: imageHue,\n card_header: cardHeader = '',\n unlocked_on_ts: unlockedOnTs,\n course_type: courseType,\n } = nodeData;\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const bgImage = getNodeTypeBasedBgImage(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, []);\n\n return (\n <FlexView\n ref={studentContainerRef}\n $widthX={12.38}\n $position=\"relative\"\n $background={`${imageHue || 'ORANGE'}_2`}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.CardWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={bgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $position=\"relative\"\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $borderRadiusX={2}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n </Styled.IconWrapper>\n <CardTitle cardHeader={cardHeader} nodeType={nodeType} courseType={courseType} />\n {isInQueue && (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Not visible to student\"\n position=\"bottom\"\n zIndex={6}\n >\n <ClosedEyeIcon />\n </ArrowTooltip>\n )}\n {!!imageUrl && (\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n </Styled.BannerImageWrapper>\n )}\n </Styled.CardWrapper>\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n isStudent={userType === 'STUDENT'}\n isMilestone={isMilestone}\n />\n {dueDateTs && unlockedOnTs && (\n <NodeProgress\n dueDate={dueDateTs * 1000}\n unlockedOn={unlockedOnTs * 1000}\n progressBg={`${imageHue || 'ORANGE'}_4`}\n />\n )}\n <FlexView $gutterX={0.75} $gapX={1} $flexRowGapX={0.5} $background=\"WHITE\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={header}\n width={300}\n hidden={!showTitleTooltip}\n parentWidth=\"auto\"\n zIndex={6}\n >\n <FlexView $heightX={2.5}>\n <Styled.HeaderText ref={titleTextRef} $renderAs=\"ab3\">\n {header}\n </Styled.HeaderText>\n </FlexView>\n </ArrowTooltip>\n <FlexView\n $flexDirection=\"row\"\n $heightX={1.25}\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <Styled.SubHeaderText $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subHeader}\n </Styled.SubHeaderText>\n <FlexView $width={32} />\n </FlexView>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(HomeworkView);\n"],"names":["renderSettings","HomeworkView","header","isInQueue","nodeData","studentContainerRef","subHeader","userType","isMilestone","nodeType","state","accuracy","dueDateTs","imageUrl","imageHue","cardHeader","unlockedOnTs","courseType","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","bgImage","getNodeTypeBasedBgImage","animationRef","nodeCardLottie","getNodeCardBasedIcon","handleOnMouseEnter","useCallback","_a","handleOnMouseLeave","useLayoutEffect","jsxs","FlexView","Styled.CardWrapper","jsx","Styled.IconWrapper","LottieAnimation","CardTitle","ArrowTooltip","ClosedEyeIcon","Styled.BannerImageWrapper","Styled.BannerImage","NodeCardTags","NodeProgress","Styled.HeaderText","Styled.SubHeaderText","HomeworkView$1","memo"],"mappings":";;;;;;;;;;;;AAkBA,MAAMA,IAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAYvDC,IAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAChB,MAAM;AACE,QAAA;AAAA,IACJ,WAAWC;AAAA,IACX,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,aAAaC;AAAA,IACb,WAAWC;AAAA,IACX,WAAWC;AAAA,IACX,aAAaC,IAAa;AAAA,IAC1B,gBAAgBC;AAAA,IAChB,aAAaC;AAAA,EACX,IAAAb,GACE,CAACc,GAAkBC,CAAmB,IAAIC,EAAS,EAAK,GACxDC,IAAeC,EAAuB,IAAI,GAC1CC,IAAUC,EAAwBf,CAAQ,GAC1CgB,IAAeH,EAAmC,IAAI,GACtD,EAAE,QAAQI,EAAe,IAAIC,EAAqBlB,CAAQ,GAE1DmB,IAAqBC,EAAY,MAAM;;AAC3C,KAAAC,IAAAL,EAAa,YAAb,QAAAK,EAAsB;AAAA,EACxB,GAAG,CAAE,CAAA,GAECC,IAAqBF,EAAY,MAAM;;AAC3C,KAAAC,IAAAL,EAAa,YAAb,QAAAK,EAAsB;AAAA,EACxB,GAAG,CAAE,CAAA;AAEL,SAAAE,EAAgB,MAAM;AACpB,IACEX,EAAa,WACbA,EAAa,QAAQ,eAAeA,EAAa,QAAQ,gBAEzDF,EAAoB,EAAI;AAAA,EAE5B,GAAG,CAAE,CAAA,G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ACA,WAAAC;AAAA,YACA,WAAWL,MAAa;AAAA,YACxB,aAAAC;AAAA,UAAA;AAAA,QACF;AAAA,
|
1
|
+
{"version":3,"file":"homework-card-view.js","sources":["../../../src/features/homework/homework-card-view.tsx"],"sourcesContent":["import type { INodeDataProps } from '../chapters-v2/comps/node-card/node-card-types';\nimport type { ILottieAnimationRef } from '../ui/lottie-animation/types';\nimport type { TUserTypes } from '../ui/types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useLayoutEffect, useRef, useState } from 'react';\n\nimport ClosedEyeIcon from '../../assets/line-icons/icons/closed-eye';\nimport NodeCardTags from '../chapters-v2/comps/node-card/node-card-tags';\nimport { getNodeTypeBasedBgImage } from '../chapters-v2/utils';\nimport { getNodeCardBasedIcon } from '../chapters-v2/utils/node-card-utils';\nimport ArrowTooltip from '../ui/arrow-tooltip/arrow-tooltip';\nimport FlexView from '../ui/layout/flex-view';\nimport LottieAnimation from '../ui/lottie-animation/lottie-animation';\nimport CardTitle from './card-title';\nimport NodeProgress from './node-progress';\nimport * as Styled from './styles';\n\nconst renderSettings = { renderer: 'canvas', autoplay: false };\n\ninterface IHomeworkCardViewProps {\n header: string;\n isInQueue?: boolean;\n nodeData: INodeDataProps;\n studentContainerRef: React.RefObject<HTMLDivElement>;\n subHeader: string;\n userType: TUserTypes;\n isMilestone?: boolean;\n}\n\nconst HomeworkView: FC<IHomeworkCardViewProps> = ({\n header,\n isInQueue,\n nodeData,\n studentContainerRef,\n subHeader,\n userType,\n isMilestone = false,\n}) => {\n const {\n node_type: nodeType,\n state,\n accuracy,\n due_date_ts: dueDateTs,\n image_url: imageUrl,\n image_hue: imageHue,\n card_header: cardHeader = '',\n unlocked_on_ts: unlockedOnTs,\n course_type: courseType,\n } = nodeData;\n const [showTitleTooltip, setShowTitleTooltip] = useState(false);\n const titleTextRef = useRef<HTMLDivElement>(null);\n const bgImage = getNodeTypeBasedBgImage(nodeType);\n const animationRef = useRef<ILottieAnimationRef | null>(null);\n const { lottie: nodeCardLottie } = getNodeCardBasedIcon(nodeType);\n\n const handleOnMouseEnter = useCallback(() => {\n animationRef.current?.play();\n }, []);\n\n const handleOnMouseLeave = useCallback(() => {\n animationRef.current?.stop();\n }, []);\n\n useLayoutEffect(() => {\n if (\n titleTextRef.current &&\n titleTextRef.current.scrollHeight > titleTextRef.current.clientHeight\n ) {\n setShowTitleTooltip(true);\n }\n }, []);\n\n return (\n <FlexView\n ref={studentContainerRef}\n $widthX={12.38}\n $position=\"relative\"\n $background={`${imageHue || 'ORANGE'}_2`}\n onMouseEnter={handleOnMouseEnter}\n onMouseLeave={handleOnMouseLeave}\n >\n <Styled.CardWrapper\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $width=\"100%\"\n $heightX={3.5}\n $bgImage={bgImage}\n $gutterX={0.78125}\n $flexGap={8.5}\n $position=\"relative\"\n >\n <Styled.IconWrapper\n $width={31}\n $height={31}\n $borderRadiusX={2}\n $background=\"WHITE_1\"\n $position=\"relative\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n >\n <LottieAnimation src={nodeCardLottie} ref={animationRef} settings={renderSettings} />\n </Styled.IconWrapper>\n <CardTitle cardHeader={cardHeader} nodeType={nodeType} courseType={courseType} />\n {isInQueue && (\n <ArrowTooltip\n renderAs=\"primary\"\n tooltipItem=\"Not visible to student\"\n position=\"bottom\"\n zIndex={6}\n >\n <ClosedEyeIcon />\n </ArrowTooltip>\n )}\n {!!imageUrl && (\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n </Styled.BannerImageWrapper>\n )}\n </Styled.CardWrapper>\n <NodeCardTags\n nodeType={nodeType}\n state={state}\n accuracy={accuracy}\n dueDateTs={dueDateTs}\n isStudent={userType === 'STUDENT'}\n isMilestone={isMilestone}\n />\n {!isMilestone && dueDateTs && unlockedOnTs && (\n <NodeProgress\n dueDate={dueDateTs * 1000}\n unlockedOn={unlockedOnTs * 1000}\n progressBg={`${imageHue || 'ORANGE'}_4`}\n />\n )}\n <FlexView $gutterX={0.75} $gapX={1} $flexRowGapX={0.5} $background=\"WHITE\">\n <ArrowTooltip\n renderAs=\"primary\"\n position=\"bottom\"\n tooltipItem={header}\n width={300}\n hidden={!showTitleTooltip}\n parentWidth=\"auto\"\n zIndex={6}\n >\n <FlexView $heightX={2.5}>\n <Styled.HeaderText ref={titleTextRef} $renderAs=\"ab3\">\n {header}\n </Styled.HeaderText>\n </FlexView>\n </ArrowTooltip>\n <FlexView\n $flexDirection=\"row\"\n $heightX={1.25}\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n >\n <Styled.SubHeaderText $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {subHeader}\n </Styled.SubHeaderText>\n <FlexView $width={32} />\n </FlexView>\n </FlexView>\n </FlexView>\n );\n};\n\nexport default memo(HomeworkView);\n"],"names":["renderSettings","HomeworkView","header","isInQueue","nodeData","studentContainerRef","subHeader","userType","isMilestone","nodeType","state","accuracy","dueDateTs","imageUrl","imageHue","cardHeader","unlockedOnTs","courseType","showTitleTooltip","setShowTitleTooltip","useState","titleTextRef","useRef","bgImage","getNodeTypeBasedBgImage","animationRef","nodeCardLottie","getNodeCardBasedIcon","handleOnMouseEnter","useCallback","_a","handleOnMouseLeave","useLayoutEffect","jsxs","FlexView","Styled.CardWrapper","jsx","Styled.IconWrapper","LottieAnimation","CardTitle","ArrowTooltip","ClosedEyeIcon","Styled.BannerImageWrapper","Styled.BannerImage","NodeCardTags","NodeProgress","Styled.HeaderText","Styled.SubHeaderText","HomeworkView$1","memo"],"mappings":";;;;;;;;;;;;AAkBA,MAAMA,IAAiB,EAAE,UAAU,UAAU,UAAU,GAAM,GAYvDC,IAA2C,CAAC;AAAA,EAChD,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC,IAAc;AAChB,MAAM;AACE,QAAA;AAAA,IACJ,WAAWC;AA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Q;AAAA,cAER,UAAC,gBAAAkB,EAAAF,GAAA,EAAS,UAAU,KAClB,UAAC,gBAAAE,EAAAU,GAAA,EAAkB,KAAKzB,GAAc,WAAU,OAC7C,YACH,CAAA,GACF;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAY;AAAA,YAACC;AAAA,YAAA;AAAA,cACC,gBAAe;AAAA,cACf,UAAU;AAAA,cACV,aAAY;AAAA,cACZ,iBAAgB;AAAA,cAEhB,UAAA;AAAA,gBAAA,gBAAAE,EAACW,GAAA,EAAqB,WAAU,OAAM,QAAO,cAC1C,UACHzC,GAAA;AAAA,gBACA,gBAAA8B,EAACF,GAAS,EAAA,QAAQ,GAAI,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACxB;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN,GAEec,KAAAC,EAAKhD,CAAY;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cuemath/leap",
|
3
|
-
"version": "3.0.26-
|
3
|
+
"version": "3.0.26-guru.0",
|
4
4
|
"type": "module",
|
5
5
|
"files": [
|
6
6
|
"dist"
|
@@ -94,6 +94,5 @@
|
|
94
94
|
"vite-plugin-dts": "3.6.4",
|
95
95
|
"vite-plugin-svgr": "3.2.0",
|
96
96
|
"vite-tsconfig-paths": "^4.2.2"
|
97
|
-
}
|
98
|
-
"packageManager": "yarn@4.4.1"
|
97
|
+
}
|
99
98
|
}
|