@cuemath/leap 2.9.4-as5 → 2.9.4-as7

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.
Files changed (22) hide show
  1. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js +2 -2
  2. package/dist/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.js.map +1 -1
  3. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js +61 -61
  4. package/dist/features/chapters-v2/comps/node-card/student-actions/student-actions.js.map +1 -1
  5. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js +62 -62
  6. package/dist/features/chapters-v2/comps/node-card/teacher-actions/teacher-actions.js.map +1 -1
  7. package/dist/features/communication/pub-sub/constants.js +9 -6
  8. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  9. package/dist/features/homework/hw-card-list/hw-card-list.js +3 -4
  10. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  11. package/dist/features/journey/hooks/use-home-page-journey.js +34 -34
  12. package/dist/features/journey/hooks/use-home-page-journey.js.map +1 -1
  13. package/dist/features/journey/use-journey/journey-context-provider.js +48 -48
  14. package/dist/features/journey/use-journey/journey-context-provider.js.map +1 -1
  15. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +43 -43
  16. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
  17. package/dist/features/milestone/milestone-list-container/milestone-list-container.js +116 -115
  18. package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
  19. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js +8 -8
  20. package/dist/features/milestone/milestone-resources/resources-assign/resources-assign.js.map +1 -1
  21. package/dist/index.d.ts +23 -6
  22. package/package.json +1 -1
@@ -17,7 +17,7 @@ const a = 52, l = 54, c = 54, ee = B((I) => {
17
17
  };
18
18
  }, [r]);
19
19
  if (!o) return null;
20
- const { mandatory: _, optional: w, class_work: T } = o, { completed: k = 0, total: s = 0 } = _ || {}, { completed: y = 0, total: p = 0 } = w || {}, { completed: G = 0, total: m = 0 } = T || {}, L = m > 0 && G === m;
20
+ const { mandatory: w, optional: T, classwork: _ } = o, { completed: k = 0, total: s = 0 } = w || {}, { completed: y = 0, total: p = 0 } = T || {}, { completed: G = 0, total: m = 0 } = _ || {}, L = m > 0 && G === m;
21
21
  return /* @__PURE__ */ e(
22
22
  b,
23
23
  {
@@ -69,7 +69,7 @@ const a = 52, l = 54, c = 54, ee = B((I) => {
69
69
  /* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGapX: 2.75, children: [
70
70
  !!s && /* @__PURE__ */ t(n, { $position: "relative", $flexDirection: "row", children: [
71
71
  /* @__PURE__ */ e(f, {}),
72
- /* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGap: 4, children: [
72
+ /* @__PURE__ */ t(n, { $flexDirection: "row", $alignItems: "center", $flexGap: 8, children: [
73
73
  /* @__PURE__ */ t(i, { $renderAs: "ab2", children: [
74
74
  "Core - ",
75
75
  k,
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-banner.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.tsx"],"sourcesContent":["import type { IChapterBannerProps } from './chapter-banner-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport Tag from '../../comps/tag/tag';\nimport { getChapterCompletionPercentage } from '../../utils';\nimport * as Styled from './chapter-banner-styled';\n\nconst PROGRESS_CIRCLE_RADIUS = 52;\nconst PROGRESS_CIRCLE_CENTER_X = 54;\nconst PROGRESS_CIRCLE_CENTER_Y = 54;\n\n// This component renders a banner for a chapter, displaying its title, progress, and associated tags.\n// It includes an image, progress visualization, and details about the chapter's core and supplementary sheets.\n// It calculates the completion percentage and dynamically positions an icon based on progress.\nconst ChapterBanner: FC<IChapterBannerProps> = memo(props => {\n const { progressStats, imageHue, title, imageUrl } = props;\n\n const completionPercentage = useMemo(() => {\n return getChapterCompletionPercentage(progressStats);\n }, [progressStats]);\n\n const { iconTopVal, iconLeftVal } = useMemo(() => {\n //* Calculate the position of the important icon based on the completion percentage\n //* Convert degrees to radians\n const angleInDegree = completionPercentage === 100 ? 60 : completionPercentage;\n\n const angleInRadian = ((-angleInDegree * 3.6 - 180) * Math.PI) / 180;\n const positionX = PROGRESS_CIRCLE_CENTER_Y + PROGRESS_CIRCLE_RADIUS * Math.sin(angleInRadian);\n const positionY = PROGRESS_CIRCLE_CENTER_X + PROGRESS_CIRCLE_RADIUS * Math.cos(angleInRadian);\n\n return {\n iconLeftVal: positionX,\n iconTopVal: positionY,\n };\n }, [completionPercentage]);\n\n if (!progressStats) return null;\n\n const { mandatory, optional, class_work: classWork } = progressStats;\n const { completed: completedMandatorySheets = 0, total: totalMandatorySheets = 0 } =\n mandatory || {};\n const { completed: completedOptionalSheets = 0, total: totalOptionalSheets = 0 } = optional || {};\n const { completed: completedClassWorkSheets = 0, total: totalClassWorkSheets = 0 } =\n classWork || {};\n const showClassWorkTag =\n totalClassWorkSheets > 0 && completedClassWorkSheets === totalClassWorkSheets;\n\n return (\n <Styled.BannerContainer\n $flexDirection=\"row\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={50}\n $background={`${imageHue}_4`}\n >\n <FlexView $height={168} $position=\"relative\">\n <Image\n width=\"100%\"\n height=\"168px\"\n src={ILLUSTRATIONS.CHAPTER_HEADER_BG}\n alt=\"Chapter header background\"\n withLoader\n />\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n <Styled.ChapterProgressSVG width=\"108px\" height=\"108px\">\n <Styled.ChapterProgressSVGCircle\n $progress={0}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={'BLACK'}\n $progress={3.3 * completionPercentage}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n </Styled.ChapterProgressSVG>\n\n {completionPercentage > 0 && (\n <Styled.StyledImportantIcon $progress $top={iconTopVal} $left={iconLeftVal} />\n )}\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIcon>\n <Tag Icon={Check2Icon} />\n </Styled.StyledCheckIcon>\n )}\n </Styled.BannerImageWrapper>\n <Styled.BannerTitleWrapper $flexGap={4}>\n <Text $renderAs=\"ah4-bold\">{title}</Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={2.75}>\n {!!totalMandatorySheets && (\n <FlexView $position=\"relative\" $flexDirection=\"row\">\n <Styled.StyledImportantIcon />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={4}>\n <Text $renderAs=\"ab2\">\n Core - {completedMandatorySheets}/{totalMandatorySheets}\n </Text>\n {showClassWorkTag && <Tag Icon={Check2Icon} label=\"CW\" />}\n </FlexView>\n </FlexView>\n )}\n {totalOptionalSheets > 0 && (\n <Text $renderAs=\"ab2\">\n Supplementary - {completedOptionalSheets}/{totalOptionalSheets}\n </Text>\n )}\n </FlexView>\n </Styled.BannerTitleWrapper>\n </FlexView>\n </Styled.BannerContainer>\n );\n});\n\nexport default ChapterBanner;\n"],"names":["PROGRESS_CIRCLE_RADIUS","PROGRESS_CIRCLE_CENTER_X","PROGRESS_CIRCLE_CENTER_Y","ChapterBanner","memo","props","progressStats","imageHue","title","imageUrl","completionPercentage","useMemo","getChapterCompletionPercentage","iconTopVal","iconLeftVal","angleInRadian","positionX","positionY","mandatory","optional","classWork","completedMandatorySheets","totalMandatorySheets","completedOptionalSheets","totalOptionalSheets","completedClassWorkSheets","totalClassWorkSheets","showClassWorkTag","jsx","Styled.BannerContainer","jsxs","FlexView","Image","ILLUSTRATIONS","Styled.BannerImageWrapper","Styled.BannerImage","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.StyledImportantIcon","Styled.StyledCheckIcon","Tag","Check2Icon","Styled.BannerTitleWrapper","Text"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAyB,IACzBC,IAA2B,IAC3BC,IAA2B,IAK3BC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,eAAAC,GAAe,UAAAC,GAAU,OAAAC,GAAO,UAAAC,MAAaJ,GAE/CK,IAAuBC,EAAQ,MAC5BC,EAA+BN,CAAa,GAClD,CAACA,CAAa,CAAC,GAEZ,EAAE,YAAAO,GAAY,aAAAC,EAAY,IAAIH,EAAQ,MAAM;AAKhD,UAAMI,KAAkB,EAFFL,MAAyB,MAAM,KAAKA,KAEjB,MAAM,OAAO,KAAK,KAAM,KAC3DM,IAAYd,IAA2BF,IAAyB,KAAK,IAAIe,CAAa,GACtFE,IAAYhB,IAA2BD,IAAyB,KAAK,IAAIe,CAAa;AAErF,WAAA;AAAA,MACL,aAAaC;AAAA,MACb,YAAYC;AAAA,IAAA;AAAA,EACd,GACC,CAACP,CAAoB,CAAC;AAErB,MAAA,CAACJ,EAAsB,QAAA;AAE3B,QAAM,EAAE,WAAAY,GAAW,UAAAC,GAAU,YAAYC,MAAcd,GACjD,EAAE,WAAWe,IAA2B,GAAG,OAAOC,IAAuB,EAAA,IAC7EJ,KAAa,IACT,EAAE,WAAWK,IAA0B,GAAG,OAAOC,IAAsB,EAAA,IAAML,KAAY,IACzF,EAAE,WAAWM,IAA2B,GAAG,OAAOC,IAAuB,EAAA,IAC7EN,KAAa,IACTO,IACJD,IAAuB,KAAKD,MAA6BC;AAGzD,SAAA,gBAAAE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,gBAAe;AAAA,MACf,iBAAgB;AAAA,MACh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AM,aAAY,UAAS,WAAW,MAC5D,UAAA;AAAA,YAAA,CAAC,CAACT,KACD,gBAAAQ,EAACC,KAAS,WAAU,YAAW,gBAAe,OAC5C,UAAA;AAAA,cAAC,gBAAAH,EAAAU,GAAA,EAA2B;AAAA,gCAC3BP,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC5D,UAAA;AAAA,gBAAC,gBAAAD,EAAAa,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,kBAAA;AAAA,kBACZtB;AAAA,kBAAyB;AAAA,kBAAEC;AAAA,gBAAA,GACrC;AAAA,gBACCK,KAAqB,gBAAAC,EAAAY,GAAA,EAAI,MAAMC,GAAY,OAAM,MAAK;AAAA,cAAA,GACzD;AAAA,YAAA,GACF;AAAA,YAEDjB,IAAsB,KACpB,gBAAAM,EAAAa,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,cAAA;AAAA,cACHpB;AAAA,cAAwB;AAAA,cAAEC;AAAA,YAAA,GAC7C;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
1
+ {"version":3,"file":"chapter-banner.js","sources":["../../../../../src/features/chapters-v2/chapter-details/chapter-banner/chapter-banner.tsx"],"sourcesContent":["import type { IChapterBannerProps } from './chapter-banner-types';\nimport type { FC } from 'react';\n\nimport { memo, useMemo } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Check2Icon from '../../../../assets/line-icons/icons/check2';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport Tag from '../../comps/tag/tag';\nimport { getChapterCompletionPercentage } from '../../utils';\nimport * as Styled from './chapter-banner-styled';\n\nconst PROGRESS_CIRCLE_RADIUS = 52;\nconst PROGRESS_CIRCLE_CENTER_X = 54;\nconst PROGRESS_CIRCLE_CENTER_Y = 54;\n\n// This component renders a banner for a chapter, displaying its title, progress, and associated tags.\n// It includes an image, progress visualization, and details about the chapter's core and supplementary sheets.\n// It calculates the completion percentage and dynamically positions an icon based on progress.\nconst ChapterBanner: FC<IChapterBannerProps> = memo(props => {\n const { progressStats, imageHue, title, imageUrl } = props;\n\n const completionPercentage = useMemo(() => {\n return getChapterCompletionPercentage(progressStats);\n }, [progressStats]);\n\n const { iconTopVal, iconLeftVal } = useMemo(() => {\n //* Calculate the position of the important icon based on the completion percentage\n //* Convert degrees to radians\n const angleInDegree = completionPercentage === 100 ? 60 : completionPercentage;\n\n const angleInRadian = ((-angleInDegree * 3.6 - 180) * Math.PI) / 180;\n const positionX = PROGRESS_CIRCLE_CENTER_Y + PROGRESS_CIRCLE_RADIUS * Math.sin(angleInRadian);\n const positionY = PROGRESS_CIRCLE_CENTER_X + PROGRESS_CIRCLE_RADIUS * Math.cos(angleInRadian);\n\n return {\n iconLeftVal: positionX,\n iconTopVal: positionY,\n };\n }, [completionPercentage]);\n\n if (!progressStats) return null;\n\n const { mandatory, optional, classwork: classWork } = progressStats;\n const { completed: completedMandatorySheets = 0, total: totalMandatorySheets = 0 } =\n mandatory || {};\n const { completed: completedOptionalSheets = 0, total: totalOptionalSheets = 0 } = optional || {};\n const { completed: completedClassWorkSheets = 0, total: totalClassWorkSheets = 0 } =\n classWork || {};\n const showClassWorkTag =\n totalClassWorkSheets > 0 && completedClassWorkSheets === totalClassWorkSheets;\n\n return (\n <Styled.BannerContainer\n $flexDirection=\"row\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $widthX={50}\n $background={`${imageHue}_4`}\n >\n <FlexView $height={168} $position=\"relative\">\n <Image\n width=\"100%\"\n height=\"168px\"\n src={ILLUSTRATIONS.CHAPTER_HEADER_BG}\n alt=\"Chapter header background\"\n withLoader\n />\n <Styled.BannerImageWrapper>\n <Styled.BannerImage src={imageUrl} alt=\"Chapter image\" />\n <Styled.ChapterProgressSVG width=\"108px\" height=\"108px\">\n <Styled.ChapterProgressSVGCircle\n $progress={0}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n <Styled.ChapterProgressSVGCircle\n $progressCircle\n $progressBackground={'BLACK'}\n $progress={3.3 * completionPercentage}\n r={PROGRESS_CIRCLE_RADIUS}\n cx={PROGRESS_CIRCLE_CENTER_X}\n cy={PROGRESS_CIRCLE_CENTER_Y}\n />\n </Styled.ChapterProgressSVG>\n\n {completionPercentage > 0 && (\n <Styled.StyledImportantIcon $progress $top={iconTopVal} $left={iconLeftVal} />\n )}\n\n {completionPercentage === 100 && (\n <Styled.StyledCheckIcon>\n <Tag Icon={Check2Icon} />\n </Styled.StyledCheckIcon>\n )}\n </Styled.BannerImageWrapper>\n <Styled.BannerTitleWrapper $flexGap={4}>\n <Text $renderAs=\"ah4-bold\">{title}</Text>\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGapX={2.75}>\n {!!totalMandatorySheets && (\n <FlexView $position=\"relative\" $flexDirection=\"row\">\n <Styled.StyledImportantIcon />\n <FlexView $flexDirection=\"row\" $alignItems=\"center\" $flexGap={8}>\n <Text $renderAs=\"ab2\">\n Core - {completedMandatorySheets}/{totalMandatorySheets}\n </Text>\n {showClassWorkTag && <Tag Icon={Check2Icon} label=\"CW\" />}\n </FlexView>\n </FlexView>\n )}\n {totalOptionalSheets > 0 && (\n <Text $renderAs=\"ab2\">\n Supplementary - {completedOptionalSheets}/{totalOptionalSheets}\n </Text>\n )}\n </FlexView>\n </Styled.BannerTitleWrapper>\n </FlexView>\n </Styled.BannerContainer>\n );\n});\n\nexport default ChapterBanner;\n"],"names":["PROGRESS_CIRCLE_RADIUS","PROGRESS_CIRCLE_CENTER_X","PROGRESS_CIRCLE_CENTER_Y","ChapterBanner","memo","props","progressStats","imageHue","title","imageUrl","completionPercentage","useMemo","getChapterCompletionPercentage","iconTopVal","iconLeftVal","angleInRadian","positionX","positionY","mandatory","optional","classWork","completedMandatorySheets","totalMandatorySheets","completedOptionalSheets","totalOptionalSheets","completedClassWorkSheets","totalClassWorkSheets","showClassWorkTag","jsx","Styled.BannerContainer","jsxs","FlexView","Image","ILLUSTRATIONS","Styled.BannerImageWrapper","Styled.BannerImage","Styled.ChapterProgressSVG","Styled.ChapterProgressSVGCircle","Styled.StyledImportantIcon","Styled.StyledCheckIcon","Tag","Check2Icon","Styled.BannerTitleWrapper","Text"],"mappings":";;;;;;;;;;AAcA,MAAMA,IAAyB,IACzBC,IAA2B,IAC3BC,IAA2B,IAK3BC,KAAyCC,EAAK,CAASC,MAAA;AAC3D,QAAM,EAAE,eAAAC,GAAe,UAAAC,GAAU,OAAAC,GAAO,UAAAC,MAAaJ,GAE/CK,IAAuBC,EAAQ,MAC5BC,EAA+BN,CAAa,GAClD,CAACA,CAAa,CAAC,GAEZ,EAAE,YAAAO,GAAY,aAAAC,EAAY,IAAIH,EAAQ,MAAM;AAKhD,UAAMI,KAAkB,EAFFL,MAAyB,MAAM,KAAKA,KAEjB,MAAM,OAAO,KAAK,KAAM,KAC3DM,IAAYd,IAA2BF,IAAyB,KAAK,IAAIe,CAAa,GACtFE,IAAYhB,IAA2BD,IAAyB,KAAK,IAAIe,CAAa;AAErF,WAAA;AAAA,MACL,aAAaC;AAAA,MACb,YAAYC;AAAA,IAAA;AAAA,EACd,GACC,CAACP,CAAoB,CAAC;AAErB,MAAA,CAACJ,EAAsB,QAAA;AAE3B,QAAM,EAAE,WAAAY,GAAW,UAAAC,GAAU,WAAWC,MAAcd,GAChD,EAAE,WAAWe,IAA2B,GAAG,OAAOC,IAAuB,EAAA,IAC7EJ,KAAa,IACT,EAAE,WAAWK,IAA0B,GAAG,OAAOC,IAAsB,EAAA,IAAML,KAAY,IACzF,EAAE,WAAWM,IAA2B,GAAG,OAAOC,IAAuB,EAAA,IAC7EN,KAAa,IACTO,IACJD,IAAuB,KAAKD,MAA6BC;AAGzD,SAAA,gBAAAE;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,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AAA,4BACjCuB,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,WAAW,MAC5D,UAAA;AAAA,YAAA,CAAC,CAACT,KACD,gBAAAQ,EAACC,KAAS,WAAU,YAAW,gBAAe,OAC5C,UAAA;AAAA,cAAC,gBAAAH,EAAAU,GAAA,EAA2B;AAAA,gCAC3BP,GAAS,EAAA,gBAAe,OAAM,aAAY,UAAS,UAAU,GAC5D,UAAA;AAAA,gBAAC,gBAAAD,EAAAa,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,kBAAA;AAAA,kBACZtB;AAAA,kBAAyB;AAAA,kBAAEC;AAAA,gBAAA,GACrC;AAAA,gBACCK,KAAqB,gBAAAC,EAAAY,GAAA,EAAI,MAAMC,GAAY,OAAM,MAAK;AAAA,cAAA,GACzD;AAAA,YAAA,GACF;AAAA,YAEDjB,IAAsB,KACpB,gBAAAM,EAAAa,GAAA,EAAK,WAAU,OAAM,UAAA;AAAA,cAAA;AAAA,cACHpB;AAAA,cAAwB;AAAA,cAAEC;AAAA,YAAA,GAC7C;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN,CAAC;"}
@@ -1,47 +1,47 @@
1
- import { jsx as e, jsxs as d, Fragment as F } from "react/jsx-runtime";
2
- import { memo as Y, useState as Z, useCallback as m } from "react";
3
- import q from "../../../../../assets/line-icons/icons/eye2.js";
4
- import J from "../../../../../assets/line-icons/icons/redo.js";
5
- import Q from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
6
- import U from "../../../../ui/context-menu/context-menu.js";
7
- import V from "../../../../ui/lottie-animation/lottie-animation.js";
8
- import ee from "../../../../ui/text/text.js";
9
- import { BLOCK_TYPE as te } from "../../../constants/block-constants.js";
1
+ import { jsx as e, jsxs as d, Fragment as z } from "react/jsx-runtime";
2
+ import { memo as F, useState as Y, useCallback as m } from "react";
3
+ import Z from "../../../../../assets/line-icons/icons/eye2.js";
4
+ import q from "../../../../../assets/line-icons/icons/redo.js";
5
+ import J from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
6
+ import Q from "../../../../ui/context-menu/context-menu.js";
7
+ import U from "../../../../ui/lottie-animation/lottie-animation.js";
8
+ import V from "../../../../ui/text/text.js";
9
+ import { BLOCK_TYPE as ee } from "../../../constants/block-constants.js";
10
10
  import { NODE_CARD_STATES as f } from "../../../constants/node-constants.js";
11
- import { getNodeTypeBasedBgImage as oe } from "../../../utils/index.js";
12
- import { getNodeCardBasedIcon as re } from "../../../utils/node-card-utils.js";
13
- import ne from "../border-path-animation.js";
14
- import { NodeCardContainer as ae, NodeCardInfoWrapper as ie, IconWrapper as ce, StyledImportantIcon as se, NodeCardContentWrapper as de, NodeCardTitle as me } from "../node-card-styled.js";
15
- import le from "../node-card-tags.js";
16
- import pe from "../node-menu-options/node-menu-options.js";
17
- const we = Y((L) => {
11
+ import { getNodeTypeBasedBgImage as te } from "../../../utils/index.js";
12
+ import { getNodeCardBasedIcon as oe } from "../../../utils/node-card-utils.js";
13
+ import re from "../border-path-animation.js";
14
+ import { NodeCardContainer as ne, NodeCardInfoWrapper as ae, IconWrapper as ie, StyledImportantIcon as ce, NodeCardContentWrapper as se, NodeCardTitle as de } from "../node-card-styled.js";
15
+ import me from "../node-card-tags.js";
16
+ import le from "../node-menu-options/node-menu-options.js";
17
+ const Ee = F((A) => {
18
18
  const {
19
19
  nodeData: t,
20
- imageHue: S,
21
- blockType: T,
20
+ imageHue: L,
21
+ blockType: S,
22
22
  onNodeAttempt: n,
23
23
  onNodeReattempt: a,
24
24
  onNodeReview: i,
25
25
  onNodeView: o
26
- } = L, {
27
- accuracy: E,
28
- attempt_location: w,
26
+ } = A, {
27
+ accuracy: T,
28
+ attempt_location: E,
29
29
  node_type: l,
30
- card_header: y,
31
- title: N,
30
+ card_header: w,
31
+ title: y,
32
32
  state: c,
33
33
  is_optional: C,
34
34
  sheet_statement: $,
35
- permissions: R,
35
+ permissions: N,
36
36
  marked_as_completed: s
37
37
  } = t, {
38
38
  can_review: g,
39
39
  can_start: p,
40
40
  can_resume: h,
41
41
  can_reset: I
42
- } = R, _ = T === te.GOAL, r = c === f.LOCKED, x = c === f.NOT_STARTED, B = c === f.IN_PROGRESS, v = w === "INCLASS", M = !$ || !_, W = p || h, O = !C && (B || x), u = !W && (I || g), [D, k] = Z(!1), H = oe(l), { icon: G, lottie: K } = re(l), b = m(
43
- (A) => {
44
- switch (A) {
42
+ } = N, R = S === ee.GOAL, r = c === f.LOCKED, x = c === f.NOT_STARTED, B = c === f.IN_PROGRESS, v = E === "INCLASS", M = p || h, _ = !C && (B || x), u = !M && (I || g), [W, O] = Y(!1), D = te(l), { icon: G, lottie: H } = oe(l), k = m(
43
+ (b) => {
44
+ switch (b) {
45
45
  case "node-card-review":
46
46
  s ? o == null || o(t) : i == null || i(t);
47
47
  return;
@@ -49,11 +49,11 @@ const we = Y((L) => {
49
49
  a == null || a(t);
50
50
  return;
51
51
  default:
52
- throw new Error(`No callback function for ${A}`);
52
+ throw new Error(`No callback function for ${b}`);
53
53
  }
54
54
  },
55
55
  [t, a, i, o, s]
56
- ), P = m(() => {
56
+ ), K = m(() => {
57
57
  u || r || (p || h ? n == null || n(t) : s && (o == null || o(t)));
58
58
  }, [
59
59
  h,
@@ -64,62 +64,62 @@ const we = Y((L) => {
64
64
  u,
65
65
  r,
66
66
  s
67
- ]), X = m(() => {
68
- k(!0);
69
- }, []), j = m(() => {
70
- k(!1);
71
- }, []), z = [
67
+ ]), P = m(() => {
68
+ O(!0);
69
+ }, []), X = m(() => {
70
+ O(!1);
71
+ }, []), j = [
72
72
  {
73
73
  id: "node-card-review",
74
74
  label: "Review",
75
- icon: q,
75
+ icon: Z,
76
76
  disabled: !g,
77
- onClick: b
77
+ onClick: k
78
78
  },
79
79
  {
80
80
  id: "node-card-reattempt",
81
81
  label: "Reattempt",
82
- icon: J,
82
+ icon: q,
83
83
  disabled: !I,
84
- onClick: b
84
+ onClick: k
85
85
  }
86
86
  ];
87
87
  return /* @__PURE__ */ e(
88
- U,
88
+ Q,
89
89
  {
90
90
  targetElement: /* @__PURE__ */ e(
91
- ae,
91
+ ne,
92
92
  {
93
- $showOutline: !O,
94
- $background: `${S}_2`,
93
+ $showOutline: !_,
94
+ $background: `${L}_2`,
95
95
  $disabled: r,
96
- onClick: P,
97
- onMouseEnter: X,
98
- onMouseLeave: j,
96
+ onClick: K,
97
+ onMouseEnter: P,
98
+ onMouseLeave: X,
99
99
  children: /* @__PURE__ */ d(
100
- Q,
100
+ J,
101
101
  {
102
102
  renderAs: "primary",
103
103
  tooltipItem: $,
104
104
  position: "bottom",
105
105
  zIndex: 5,
106
- hidden: M,
106
+ hidden: !$,
107
107
  parentWidth: "100%",
108
108
  widthX: 11.25,
109
109
  children: [
110
110
  /* @__PURE__ */ d(
111
- ie,
111
+ ae,
112
112
  {
113
113
  $flexDirection: "row",
114
114
  $alignItems: "center",
115
115
  $heightX: 3.5,
116
- $bgImage: H,
116
+ $bgImage: D,
117
117
  $gutterX: 0.78125,
118
118
  $flexGap: 8.5,
119
119
  $opacity: r ? 0.5 : 1,
120
120
  children: [
121
121
  /* @__PURE__ */ d(
122
- ce,
122
+ ie,
123
123
  {
124
124
  $width: 31,
125
125
  $height: 31,
@@ -128,28 +128,28 @@ const we = Y((L) => {
128
128
  $alignItems: "center",
129
129
  $justifyContent: "center",
130
130
  children: [
131
- D ? /* @__PURE__ */ e(V, { src: K }) : /* @__PURE__ */ e(G, { width: 20, height: 20 }),
132
- !C && /* @__PURE__ */ e(se, {})
131
+ W ? /* @__PURE__ */ e(U, { src: H }) : /* @__PURE__ */ e(G, { width: 20, height: 20 }),
132
+ !C && /* @__PURE__ */ e(ce, {})
133
133
  ]
134
134
  }
135
135
  ),
136
- /* @__PURE__ */ d(ee, { $renderAs: "ac4-black", $color: "BLACK", children: [
137
- y,
136
+ /* @__PURE__ */ d(V, { $renderAs: "ac4-black", $color: "BLACK", children: [
137
+ w,
138
138
  " ",
139
139
  v && ". CW"
140
140
  ] }),
141
- O && /* @__PURE__ */ e(ne, {})
141
+ _ && /* @__PURE__ */ e(re, {})
142
142
  ]
143
143
  }
144
144
  ),
145
- /* @__PURE__ */ e(le, { nodeType: l, state: c, accuracy: E }),
146
- !_ && /* @__PURE__ */ e(de, { $background: "WHITE_1", $heightX: 4, children: /* @__PURE__ */ e(
147
- me,
145
+ /* @__PURE__ */ e(me, { nodeType: l, state: c, accuracy: T }),
146
+ !R && /* @__PURE__ */ e(se, { $background: "WHITE_1", $heightX: 4, children: /* @__PURE__ */ e(
147
+ de,
148
148
  {
149
149
  $renderAs: "ab3",
150
150
  $color: "BLACK_1",
151
151
  $opacity: r ? 0.5 : 1,
152
- children: N
152
+ children: y
153
153
  }
154
154
  ) })
155
155
  ]
@@ -161,11 +161,11 @@ const we = Y((L) => {
161
161
  menuWidth: "100%",
162
162
  menuZIndex: 6,
163
163
  menuOffset: 2,
164
- menuElement: /* @__PURE__ */ e(F, { children: u ? /* @__PURE__ */ e(pe, { options: z }) : void 0 })
164
+ menuElement: /* @__PURE__ */ e(z, { children: u ? /* @__PURE__ */ e(le, { options: j }) : void 0 })
165
165
  }
166
166
  );
167
167
  });
168
168
  export {
169
- we as default
169
+ Ee as default
170
170
  };
171
171
  //# 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","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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, 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 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={!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 >\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","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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C,UAAA;AAAA,wBAAA/C;AAAA,wBAAW;AAAA,wBAAEiB,KAAgB;AAAA,sBAAA,GAChC;AAAA,sBAECE,uBAAsB6B,IAAoB,EAAA;AAAA,oBAAA;AAAA,kBAAA;AAAA,gBAC7C;AAAA,gBAEC,gBAAAV,EAAAW,IAAA,EAAa,UAAAlD,GAAoB,OAAAG,GAAc,UAAAL,EAAoB,CAAA;AAAA,gBAEnE,CAACc,KACC,gBAAA2B,EAAAY,IAAA,EAA8B,aAAY,WAAU,UAAU,GAC7D,UAAA,gBAAAZ;AAAA,kBAACa;AAAAA,kBAAA;AAAA,oBACC,WAAU;AAAA,oBACV,QAAO;AAAA,oBACP,UAAUtC,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,UAAgBmB,IAAA,gBAAAkB,EAACc,MAAgB,SAASjB,EAAa,CAAA,IAAK,OAAU,CAAA;AAAA,IAAA;AAAA,EAAA;AAG5F,CAAC;"}
@@ -1,53 +1,53 @@
1
1
  import { jsxs as r, jsx as e } from "react/jsx-runtime";
2
- import { memo as Y, useState as q, useRef as J, useCallback as u } from "react";
3
- import Q from "../../../../../assets/line-icons/icons/check2.js";
4
- import V from "../../../../../assets/line-icons/icons/eye2.js";
5
- import Z from "../../../../../assets/line-icons/icons/home2.js";
2
+ import { memo as U, useState as Y, useRef as q, useCallback as f } from "react";
3
+ import J from "../../../../../assets/line-icons/icons/check2.js";
4
+ import Q from "../../../../../assets/line-icons/icons/eye2.js";
5
+ import V from "../../../../../assets/line-icons/icons/home2.js";
6
6
  import O from "../../../../../assets/line-icons/icons/more-vertical.js";
7
- import D from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
8
- import ee from "../../../../ui/hooks/use-context-menu-click-handler.js";
9
- import te from "../../../../ui/layout/flex-view.js";
10
- import re from "../../../../ui/lottie-animation/lottie-animation.js";
11
- import oe from "../../../../ui/text/text.js";
12
- import { BLOCK_TYPE as ie } from "../../../constants/block-constants.js";
13
- import { NODE_CARD_STATES as $, TEACHER_MENU_LABELS as ne } from "../../../constants/node-constants.js";
14
- import { getNodeTypeBasedBgImage as ce } from "../../../utils/index.js";
7
+ import Z from "../../../../ui/arrow-tooltip/arrow-tooltip.js";
8
+ import D from "../../../../ui/hooks/use-context-menu-click-handler.js";
9
+ import ee from "../../../../ui/layout/flex-view.js";
10
+ import te from "../../../../ui/lottie-animation/lottie-animation.js";
11
+ import re from "../../../../ui/text/text.js";
12
+ import { BLOCK_TYPE as oe } from "../../../constants/block-constants.js";
13
+ import { NODE_CARD_STATES as u, TEACHER_MENU_LABELS as ie } from "../../../constants/node-constants.js";
14
+ import { getNodeTypeBasedBgImage as ne } from "../../../utils/index.js";
15
15
  import { getNodeCardBasedIcon as ae } from "../../../utils/node-card-utils.js";
16
- import se from "../border-path-animation.js";
17
- import { NodeCardContainer as le, NodeCardInfoWrapper as de, IconWrapper as me, StyledImportantIcon as pe, NodeKebabMenuWrapper as T, NodeCardContentWrapper as he, NodeCardTitle as fe, NodeMenuOptionsWrapper as ue } from "../node-card-styled.js";
18
- import $e from "../node-card-tags.js";
19
- import Ce from "../node-menu-options/node-menu-options.js";
20
- const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
16
+ import ce from "../border-path-animation.js";
17
+ import { NodeCardContainer as se, NodeCardInfoWrapper as le, IconWrapper as de, StyledImportantIcon as me, NodeKebabMenuWrapper as T, NodeCardContentWrapper as pe, NodeCardTitle as he, NodeMenuOptionsWrapper as fe } from "../node-card-styled.js";
18
+ import ue from "../node-card-tags.js";
19
+ import $e from "../node-menu-options/node-menu-options.js";
20
+ const { ASSIGN_AS_HW: Ce, REVIEW: _e, VIEW: Ie, MARK_AS_DONE: ge } = ie, Pe = U(
21
21
  ({
22
22
  nodeData: t,
23
23
  imageHue: A,
24
24
  blockType: L,
25
- isSkipped: C,
25
+ isSkipped: $,
26
26
  onNodeAttemptLocationChange: o,
27
27
  onNodeMarkAsDone: i,
28
28
  onNodeView: n,
29
- onNodeReview: c
29
+ onNodeReview: a
30
30
  }) => {
31
- const [w, _] = q(!1), l = J(null), { menuVisible: x, onMenuClick: I } = ee(l), {
31
+ const [w, C] = Y(!1), l = q(null), { menuVisible: x, onMenuClick: _ } = D(l), {
32
32
  accuracy: y,
33
33
  attempt_location: W,
34
34
  node_type: d,
35
35
  card_header: B,
36
36
  title: M,
37
- state: a,
38
- is_optional: g,
39
- sheet_statement: b,
37
+ state: c,
38
+ is_optional: I,
39
+ sheet_statement: g,
40
40
  permissions: H,
41
41
  user_attempt_id: m
42
42
  } = t, {
43
43
  can_change_attempt_location: G,
44
44
  can_mark_familiar: K,
45
45
  can_review: p
46
- } = H, h = L === ie.GOAL, s = a === $.LOCKED, R = a === $.NOT_STARTED, j = a === $.IN_PROGRESS, E = W === "INCLASS", P = !b || !h, S = !g && (j || R), X = ce(d), { icon: v, lottie: F } = ae(d), f = u(
46
+ } = H, b = L === oe.GOAL, s = c === u.LOCKED, R = c === u.NOT_STARTED, j = c === u.IN_PROGRESS, E = W === "INCLASS", S = !I && (j || R), P = ne(d), { icon: X, lottie: v } = ae(d), h = f(
47
47
  (k) => {
48
48
  switch (k) {
49
49
  case "node-card-view":
50
- p && m ? c == null || c(t) : n == null || n(t);
50
+ p && m ? a == null || a(t) : n == null || n(t);
51
51
  return;
52
52
  case "node-card-assign-as-hw":
53
53
  o == null || o(t);
@@ -64,71 +64,71 @@ const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
64
64
  t,
65
65
  o,
66
66
  i,
67
- c,
67
+ a,
68
68
  n,
69
69
  m
70
70
  ]
71
- ), z = u(() => {
72
- _(!0);
73
- }, []), N = u(() => {
74
- _(!1);
75
- }, []), U = [
71
+ ), F = f(() => {
72
+ C(!0);
73
+ }, []), z = f(() => {
74
+ C(!1);
75
+ }, []), N = [
76
76
  {
77
77
  id: "node-card-view",
78
- label: p && m ? Ie : ge,
79
- icon: V,
78
+ label: p && m ? _e : Ie,
79
+ icon: Q,
80
80
  disabled: !1,
81
- onClick: f
81
+ onClick: h
82
82
  },
83
83
  {
84
84
  id: "node-card-assign-as-hw",
85
- label: _e,
86
- icon: Z,
85
+ label: Ce,
86
+ icon: V,
87
87
  disabled: !G || !E,
88
- onClick: f
88
+ onClick: h
89
89
  },
90
90
  {
91
91
  id: "node-card-mark-as-done",
92
- label: be,
93
- icon: Q,
92
+ label: ge,
93
+ icon: J,
94
94
  disabled: !K,
95
- onClick: f
95
+ onClick: h
96
96
  }
97
97
  ];
98
98
  return /* @__PURE__ */ r(
99
- le,
99
+ se,
100
100
  {
101
101
  $showOutline: !S,
102
102
  $isSheetLocked: s,
103
103
  $background: `${A}_2`,
104
- $disabled: !!C,
105
- onMouseEnter: z,
106
- onMouseLeave: N,
104
+ $disabled: !!$,
105
+ onMouseEnter: F,
106
+ onMouseLeave: z,
107
107
  children: [
108
108
  /* @__PURE__ */ r(
109
- D,
109
+ Z,
110
110
  {
111
111
  renderAs: "primary",
112
- tooltipItem: b,
112
+ tooltipItem: g,
113
113
  position: "bottom",
114
114
  zIndex: 5,
115
- hidden: P,
115
+ hidden: !g,
116
116
  parentWidth: "100%",
117
117
  widthX: 11.25,
118
118
  children: [
119
119
  /* @__PURE__ */ r(
120
- de,
120
+ le,
121
121
  {
122
122
  $flexDirection: "row",
123
123
  $alignItems: "center",
124
124
  $width: "100%",
125
125
  $heightX: 3.5,
126
- $bgImage: X,
126
+ $bgImage: P,
127
127
  $gutterX: 0.78125,
128
128
  $flexGap: 8.5,
129
129
  children: [
130
130
  /* @__PURE__ */ r(
131
- me,
131
+ de,
132
132
  {
133
133
  $width: 31,
134
134
  $height: 31,
@@ -138,24 +138,24 @@ const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
138
138
  $justifyContent: "center",
139
139
  $opacity: s ? 0.5 : 1,
140
140
  children: [
141
- w ? /* @__PURE__ */ e(re, { src: F }) : /* @__PURE__ */ e(v, { width: 20, height: 20 }),
142
- !g && /* @__PURE__ */ e(pe, {})
141
+ w ? /* @__PURE__ */ e(te, { src: v }) : /* @__PURE__ */ e(X, { width: 20, height: 20 }),
142
+ !I && /* @__PURE__ */ e(me, {})
143
143
  ]
144
144
  }
145
145
  ),
146
- /* @__PURE__ */ r(oe, { $renderAs: "ac4-black", $color: "BLACK", $opacity: s ? 0.5 : 1, children: [
146
+ /* @__PURE__ */ r(re, { $renderAs: "ac4-black", $color: "BLACK", $opacity: s ? 0.5 : 1, children: [
147
147
  B,
148
148
  " ",
149
149
  E && ". CW"
150
150
  ] }),
151
- /* @__PURE__ */ e(te, { className: "context-menu", children: h && /* @__PURE__ */ e(T, { ref: l, onClick: I, children: /* @__PURE__ */ e(O, { width: 16, height: 16 }) }) }),
152
- S && !C && /* @__PURE__ */ e(se, {})
151
+ /* @__PURE__ */ e(ee, { className: "context-menu", children: b && /* @__PURE__ */ e(T, { ref: l, onClick: _, children: /* @__PURE__ */ e(O, { width: 16, height: 16 }) }) }),
152
+ S && !$ && /* @__PURE__ */ e(ce, {})
153
153
  ]
154
154
  }
155
155
  ),
156
- /* @__PURE__ */ e($e, { nodeType: d, state: a, accuracy: y }),
157
- !h && /* @__PURE__ */ r(
158
- he,
156
+ /* @__PURE__ */ e(ue, { nodeType: d, state: c, accuracy: y }),
157
+ !b && /* @__PURE__ */ r(
158
+ pe,
159
159
  {
160
160
  $flexDirection: "row",
161
161
  $alignItems: "center",
@@ -165,7 +165,7 @@ const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
165
165
  $justifyContent: "space-between",
166
166
  children: [
167
167
  /* @__PURE__ */ e(
168
- fe,
168
+ he,
169
169
  {
170
170
  $renderAs: "ab3",
171
171
  $color: "BLACK_1",
@@ -173,20 +173,20 @@ const { ASSIGN_AS_HW: _e, REVIEW: Ie, VIEW: ge, MARK_AS_DONE: be } = ne, Xe = Y(
173
173
  children: M
174
174
  }
175
175
  ),
176
- /* @__PURE__ */ e(T, { ref: l, onClick: I, children: /* @__PURE__ */ e(O, { width: 16, height: 16 }) })
176
+ /* @__PURE__ */ e(T, { ref: l, onClick: _, children: /* @__PURE__ */ e(O, { width: 16, height: 16 }) })
177
177
  ]
178
178
  }
179
179
  )
180
180
  ]
181
181
  }
182
182
  ),
183
- /* @__PURE__ */ e(ue, { $visible: x, children: /* @__PURE__ */ e(Ce, { options: U }) })
183
+ /* @__PURE__ */ e(fe, { $visible: x, children: /* @__PURE__ */ e($e, { options: N }) })
184
184
  ]
185
185
  }
186
186
  );
187
187
  }
188
188
  );
189
189
  export {
190
- Xe as default
190
+ Pe as default
191
191
  };
192
192
  //# sourceMappingURL=teacher-actions.js.map