@cuemath/leap 3.0.24 → 3.0.26-gs1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,15 @@
1
1
  import { jsx as t, jsxs as n } from "react/jsx-runtime";
2
- import T from "../../../../assets/line-icons/icons/more-vertical.js";
3
- import O from "../../../../assets/line-icons/icons/skip.js";
4
- import j from "../../../ui/context-menu/context-menu.js";
2
+ import O from "../../../../assets/line-icons/icons/more-vertical.js";
3
+ import j from "../../../../assets/line-icons/icons/skip.js";
4
+ import k from "../../../ui/context-menu/context-menu.js";
5
5
  import c from "../../../ui/layout/flex-view.js";
6
6
  import $ from "../../../ui/text/text.js";
7
- import k from "../../comps/node-card/node-card.js";
8
- import y from "../../comps/node-card/node-menu-options/node-menu-options.js";
9
- import { BLOCK_NAME as H } from "../../constants/block-constants.js";
10
- import { getSheetNLessonCount as M } from "../../utils/index.js";
11
- import { BlockSectionWrapper as W, BlockOptionsWrapper as B, BlockSheetContainer as K } from "./block-sections-styled.js";
12
- const J = ({
7
+ import y from "../../comps/node-card/node-card.js";
8
+ import H from "../../comps/node-card/node-menu-options/node-menu-options.js";
9
+ import { BLOCK_NAME as M } from "../../constants/block-constants.js";
10
+ import { getSheetNLessonCount as W } from "../../utils/index.js";
11
+ import { BlockSectionWrapper as B, BlockOptionsWrapper as K, BlockSheetContainer as V } from "./block-sections-styled.js";
12
+ const Q = ({
13
13
  userType: o,
14
14
  imageHue: u,
15
15
  blockData: m,
@@ -24,19 +24,20 @@ const J = ({
24
24
  onNodeView: N,
25
25
  onBlockSkipUnskip: i,
26
26
  onNodeUnassign: w,
27
- onNodeUnlock: A
27
+ onNodeUnlock: A,
28
+ onNodeSkipUnSkip: I
28
29
  }) => {
29
- const { block_type: s, name: p, sheets: a, permissions: I } = m, { can_skip: d, can_un_skip: e } = I, h = H[s], L = M(e, a.length, r, l), S = [
30
+ const { block_type: s, name: p, sheets: a, permissions: L } = m, { can_skip: d, can_un_skip: e } = L, h = M[s], S = W(e, a.length, r, l), T = [
30
31
  {
31
32
  id: "node-card-skip",
32
33
  label: e ? "Revert 'Skip'" : "Skip",
33
- icon: O,
34
+ icon: j,
34
35
  disabled: !1,
35
36
  onClick: () => i == null ? void 0 : i(m, d)
36
37
  }
37
38
  ];
38
39
  return o === "STUDENT" && e ? null : /* @__PURE__ */ t(
39
- W,
40
+ B,
40
41
  {
41
42
  $background: r ? "WHITE_1" : "WHITE_3",
42
43
  $gutterX: 1,
@@ -54,7 +55,7 @@ const J = ({
54
55
  children: [
55
56
  h === "Puzzles" ? p : h,
56
57
  " ",
57
- L
58
+ S
58
59
  ]
59
60
  }
60
61
  ),
@@ -69,26 +70,26 @@ const J = ({
69
70
  )
70
71
  ] }),
71
72
  o === "TEACHER" && (d || e) && /* @__PURE__ */ t(
72
- j,
73
+ k,
73
74
  {
74
75
  targetElement: /* @__PURE__ */ t(
75
- B,
76
+ K,
76
77
  {
77
78
  $width: 20,
78
79
  $height: 20,
79
80
  $justifyContent: "center",
80
81
  $alignItems: "center",
81
- children: /* @__PURE__ */ t(T, { width: 18, height: 18 })
82
+ children: /* @__PURE__ */ t(O, { width: 18, height: 18 })
82
83
  }
83
84
  ),
84
- menuElement: /* @__PURE__ */ t(y, { options: S }),
85
+ menuElement: /* @__PURE__ */ t(H, { options: T }),
85
86
  menuOffset: 5,
86
87
  menuZIndex: 4
87
88
  }
88
89
  )
89
90
  ] }),
90
- /* @__PURE__ */ t(K, { $opacity: e ? 0.5 : 1, children: a.map((f) => /* @__PURE__ */ t(
91
- k,
91
+ /* @__PURE__ */ t(V, { $opacity: e ? 0.5 : 1, children: a.map((f) => /* @__PURE__ */ t(
92
+ y,
92
93
  {
93
94
  imageHue: u || "BLUE",
94
95
  userType: o,
@@ -102,7 +103,8 @@ const J = ({
102
103
  onNodeReview: b,
103
104
  onNodeView: N,
104
105
  onNodeUnassign: w,
105
- onNodeUnlock: A
106
+ onNodeUnlock: A,
107
+ onNodeSkipUnSkip: I
106
108
  },
107
109
  f.node_id
108
110
  )) })
@@ -111,6 +113,6 @@ const J = ({
111
113
  );
112
114
  };
113
115
  export {
114
- J as default
116
+ Q as default
115
117
  };
116
118
  //# sourceMappingURL=block-section-view.js.map
@@ -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}) => {\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 $opacity={canUnskip ? 0.5 : 1}>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\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","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;AACF,MAAM;AACJ,QAAM,EAAE,YAAYC,GAAW,MAAAC,GAAM,QAAAC,GAAQ,aAAAC,EAAgB,IAAAhB,GAEvD,EAAE,UAAUiB,GAAS,aAAaC,MAAcF,GAChDG,IAAYC,EAAWP,CAAS,GAEhCQ,IAAoBC,EAAqBJ,GAAWH,EAAO,QAAQZ,GAAaF,CAAS,GAEzFsB,IAAiC;AAAA,IACrC;AAAA,MACE,IAAI;AAAA,MACJ,OAAOL,IAAY,kBAAkB;AAAA,MACrC,MAAMM;AAAA,MACN,UAAU;AAAA,MACV,SAAS,MAAMd,KAAA,gBAAAA,EAAoBV,GAAWiB;AAAA,IAChD;AAAA,EAAA;AAGE,SAAAnB,MAAa,aAAaoB,IAAkB,OAG9C,gBAAAO;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,aAAavB,IAAc,YAAY;AAAA,MACvC,UAAU;AAA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I,CACVoB,MAAA,gBAAAV;AAAA,UAACW;AAAA,UAAA;AAAA,YAEC,UAAUrC,KAAY;AAAA,YACtB,UAAAD;AAAA,YACA,UAAAqC;AAAA,YACA,WAAAtB;AAAA,YACA,WAAWK;AAAA,YACX,eAAAd;AAAA,YACA,wBAAAC;AAAA,YACA,kBAAAC;AAAA,YACA,iBAAAC;AAAA,YACA,cAAAC;AAAA,YACA,YAAAC;AAAA,YACA,gBAAAE;AAAA,YACA,cAAAC;AAAA,UAAA;AAAA,UAbKuB,EAAS;AAAA,QAejB,CAAA,GACH;AAAA,MAAA,GACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
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 $opacity={canUnskip ? 0.5 : 1}>\n {sheets.map(nodeData => (\n <NodeCard\n key={nodeData.node_id}\n imageHue={imageHue || 'BLUE'}\n userType={userType}\n nodeData={nodeData}\n blockType={blockType}\n isSkipped={canUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n 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,G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,kBAEZ,UAAC,gBAAAN,EAAAO,GAAA,EAAiB,OAAO,IAAI,QAAQ,IAAI;AAAA,gBAAA;AAAA,cAC3C;AAAA,cAEF,aAAa,gBAAAP,EAACQ,GAAgB,EAAA,SAASV,EAAa,CAAA;AAAA,cACpD,YAAY;AAAA,cACZ,YAAY;AAAA,YAAA;AAAA,UACd;AAAA,QAAA,GAEJ;AAAA,QAEA,gBAAAE,EAACS,GAAA,EAA2B,UAAUhB,IAAY,MAAM,GACrD,UAAOH,EAAA,IAAI,CACVoB,MAAA,gBAAAV;AAAA,UAACW;AAAA,UAAA;AAAA,YAEC,UAAUtC,KAAY;AAAA,YACtB,UAAAD;AAAA,YACA,UAAAsC;AAAA,YACA,WAAAtB;AAAA,YACA,WAAWK;AAAA,YACX,eAAAf;AAAA,YACA,wBAAAC;AAAA,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,18 +1,18 @@
1
- import { jsxs as m, jsx as r, Fragment as b } from "react/jsx-runtime";
2
- import { memo as _, useCallback as v, useEffect as c } from "react";
3
- import { ILLUSTRATIONS as D } from "../../../assets/illustrations/illustrations.js";
4
- import E from "../../../assets/line-icons/icons/back2.js";
5
- import { useJourney as L } from "../../journey/use-journey/use-journey.js";
6
- import P from "../../ui/buttons/button/button.js";
7
- import T from "../../ui/buttons/icon-button/icon-button.js";
8
- import U from "../../ui/layout/flex-view.js";
9
- import j from "../../ui/loader/app-loader/app-loader.js";
10
- import H from "../../ui/text/text.js";
11
- import { useGetChapterDetails as J } from "../api/chapter.js";
12
- import F from "./block-sections/block-sections.js";
13
- import O from "./chapter-banner/chapter-banner.js";
14
- import { ContentWrapper as W, BackButtonContainer as X, BackButtonWrapper as z, LoaderWrapper as G } from "./chapter-details-styled.js";
15
- const V = _((f) => {
1
+ import { jsxs as m, jsx as r, Fragment as _ } from "react/jsx-runtime";
2
+ import { memo as v, useCallback as D, useEffect as p } from "react";
3
+ import { ILLUSTRATIONS as E } from "../../../assets/illustrations/illustrations.js";
4
+ import L from "../../../assets/line-icons/icons/back2.js";
5
+ import { useJourney as P } from "../../journey/use-journey/use-journey.js";
6
+ import T from "../../ui/buttons/button/button.js";
7
+ import U from "../../ui/buttons/icon-button/icon-button.js";
8
+ import j from "../../ui/layout/flex-view.js";
9
+ import H from "../../ui/loader/app-loader/app-loader.js";
10
+ import J from "../../ui/text/text.js";
11
+ import { useGetChapterDetails as F } from "../api/chapter.js";
12
+ import O from "./block-sections/block-sections.js";
13
+ import W from "./chapter-banner/chapter-banner.js";
14
+ import { ContentWrapper as X, BackButtonContainer as z, BackButtonWrapper as G, LoaderWrapper as V } from "./chapter-details-styled.js";
15
+ const q = v((f) => {
16
16
  const {
17
17
  userChapterId: n,
18
18
  studentId: i,
@@ -25,45 +25,46 @@ const V = _((f) => {
25
25
  onNodeReview: A,
26
26
  onNodeView: B,
27
27
  onExit: $,
28
- onNodeUnassign: x,
29
- onNodeUnlock: I,
28
+ onNodeUnassign: N,
29
+ onNodeUnlock: S,
30
+ onNodeSkipUnSkip: x,
30
31
  startChapterPageJourney: s,
31
- chapterPageRef: N,
32
+ chapterPageRef: I,
32
33
  bannerRef: w,
33
34
  coreBlocksRef: R,
34
- canStartJourney: l
35
- } = f, { isJourneyActive: p } = L(), {
35
+ canStartJourney: c
36
+ } = f, { isJourneyActive: l } = P(), {
36
37
  get: d,
37
38
  data: e,
38
39
  isProcessing: t,
39
- isProcessingFailed: S,
40
+ isProcessingFailed: b,
40
41
  isStale: h
41
- } = J(), o = v(() => {
42
+ } = F(), o = D(() => {
42
43
  d(n, void 0, { studentId: i });
43
44
  }, [d, n, i]);
44
- return c(() => {
45
+ return p(() => {
45
46
  o();
46
- }, [o]), c(() => {
47
- e && l && !p && s && s({
47
+ }, [o]), p(() => {
48
+ e && c && !l && s && s({
48
49
  chapterDetails: e,
49
50
  userChapterId: n,
50
51
  studentId: i,
51
52
  userType: a
52
53
  });
53
54
  }, [
54
- l,
55
+ c,
55
56
  e,
56
- p,
57
+ l,
57
58
  s,
58
59
  i,
59
60
  n,
60
61
  a
61
- ]), c(() => {
62
+ ]), p(() => {
62
63
  !t && h && o();
63
- }, [o, t, h]), S ? /* @__PURE__ */ m(U, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
64
- /* @__PURE__ */ r(H, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
64
+ }, [o, t, h]), b ? /* @__PURE__ */ m(j, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
65
+ /* @__PURE__ */ r(J, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
65
66
  /* @__PURE__ */ r(
66
- P,
67
+ T,
67
68
  {
68
69
  widthX: 14,
69
70
  size: "small",
@@ -73,29 +74,29 @@ const V = _((f) => {
73
74
  onClick: o
74
75
  }
75
76
  )
76
- ] }) : !e && t ? /* @__PURE__ */ r(j, { height: "80vh" }) : /* @__PURE__ */ m(
77
- W,
77
+ ] }) : !e && t ? /* @__PURE__ */ r(H, { height: "80vh" }) : /* @__PURE__ */ m(
78
+ X,
78
79
  {
79
- ref: N,
80
+ ref: I,
80
81
  $widthX: 50,
81
82
  $disablePointerEvents: t,
82
83
  $justifyContent: "center",
83
84
  $alignItems: "center",
84
85
  children: [
85
- a === "TEACHER" && /* @__PURE__ */ r(X, { $height: "100%", children: /* @__PURE__ */ r(z, { children: /* @__PURE__ */ r(
86
- T,
86
+ a === "TEACHER" && /* @__PURE__ */ r(z, { $height: "100%", children: /* @__PURE__ */ r(G, { children: /* @__PURE__ */ r(
87
+ U,
87
88
  {
88
- Icon: E,
89
+ Icon: L,
89
90
  renderAs: "secondary-gray",
90
91
  analyticsLabel: "chapter_page_exit",
91
92
  size: "xsmall",
92
93
  onClick: $
93
94
  }
94
95
  ) }) }),
95
- t && /* @__PURE__ */ r(G, { children: /* @__PURE__ */ r("img", { src: D.LOADER_1, alt: "loader" }) }),
96
- e && /* @__PURE__ */ m(b, { children: [
96
+ t && /* @__PURE__ */ r(V, { children: /* @__PURE__ */ r("img", { src: E.LOADER_1, alt: "loader" }) }),
97
+ e && /* @__PURE__ */ m(_, { children: [
97
98
  /* @__PURE__ */ r(
98
- O,
99
+ W,
99
100
  {
100
101
  title: e.name,
101
102
  imageHue: e.image_hue,
@@ -105,7 +106,7 @@ const V = _((f) => {
105
106
  }
106
107
  ),
107
108
  /* @__PURE__ */ r(
108
- F,
109
+ O,
109
110
  {
110
111
  imageHue: e.image_hue,
111
112
  userType: a,
@@ -118,16 +119,17 @@ const V = _((f) => {
118
119
  onNodeReview: A,
119
120
  onNodeView: B,
120
121
  coreBlocksRef: R,
121
- onNodeUnassign: x,
122
- onNodeUnlock: I
122
+ onNodeUnassign: N,
123
+ onNodeUnlock: S,
124
+ onNodeSkipUnSkip: x
123
125
  }
124
126
  )
125
127
  ] })
126
128
  ]
127
129
  }
128
130
  );
129
- }), me = V;
131
+ }), pe = q;
130
132
  export {
131
- me as default
133
+ pe as default
132
134
  };
133
135
  //# sourceMappingURL=chapter-details.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n startChapterPageJourney,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n } = props;\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n useEffect(() => {\n if (chapterDetails && canStartJourney && !isJourneyActive && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n }, [\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChapterPageJourney,\n studentId,\n userChapterId,\n userType,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"80vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","startChapterPageJourney","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,QAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,EACE,IAAAlB,GACE,EAAE,iBAAAmB,MAAoBC,KACtB;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAsBC,EAAY,MAAM;AAC5C,IAAAP,EAAkBpB,GAAe,QAAW,EAAE,WAAAC,EAAW,CAAA;AAAA,EACxD,GAAA,CAACmB,GAAmBpB,GAAeC,CAAS,CAAC;AA+BhD,SA7BA2B,EAAU,MAAM;AACM,IAAAF;EAAA,GACnB,CAACA,CAAmB,CAAC,GAExBE,EAAU,MAAM;AACd,IAAIP,KAAkBJ,KAAmB,CAACC,KAAmBL,KACnCA,EAAA;AAAA,MACtB,gBAAAQ;AAAA,MACA,eAAArB;AAAA,MACA,WAAAC;AAAA,MACA,UAAAC;AAAA,IAAA,CACD;AAAA,EACH,GACC;AAAA,IACDe;AAAA,IACAI;AAAA,IACAH;AAAA,IACAL;AAAA,IACAZ;AAAA,IACAD;AAAA,IACAE;AAAA,EAAA,CACD,GAED0B,EAAU,M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zB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,cAC/B,WAAAN;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAgB;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,UAAUvB,EAAe;AAAA,cACzB,UAAAnB;AAAA,cACA,QAAQmB,EAAe;AAAA,cACvB,mBAAAlB;AAAA,cACA,eAAAC;AAAA,cACA,wBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAO;AAAA,cACA,gBAAAL;AAAA,cACA,cAAAC;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDiC,KAAehD;"}
1
+ {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import type { IChapterDetails } from './chapter-details-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport Button from '../../ui/buttons/button/button';\nimport IconButton from '../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../ui/layout/flex-view';\nimport AppLoader from '../../ui/loader/app-loader/app-loader';\nimport Text from '../../ui/text/text';\nimport { useGetChapterDetails } from '../api/chapter';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(props => {\n const {\n userChapterId,\n studentId,\n userType,\n onBlockSkipUnskip,\n onNodeAttempt,\n onNodeAssignAsHomework,\n onNodeMarkAsDone,\n onNodeReattempt,\n onNodeReview,\n onNodeView,\n onExit,\n onNodeUnassign,\n onNodeUnlock,\n onNodeSkipUnSkip,\n startChapterPageJourney,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n } = props;\n const { isJourneyActive } = useJourney();\n const {\n get: getChapterDetails,\n data: chapterDetails,\n isProcessing,\n isProcessingFailed,\n isStale,\n } = useGetChapterDetails();\n\n const fetchChapterDetails = useCallback(() => {\n getChapterDetails(userChapterId, undefined, { studentId });\n }, [getChapterDetails, userChapterId, studentId]);\n\n useEffect(() => {\n fetchChapterDetails();\n }, [fetchChapterDetails]);\n\n useEffect(() => {\n if (chapterDetails && canStartJourney && !isJourneyActive && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n }, [\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChapterPageJourney,\n studentId,\n userChapterId,\n userType,\n ]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchChapterDetails();\n }\n }, [fetchChapterDetails, isProcessing, isStale]);\n\n if (isProcessingFailed) {\n return (\n <FlexView $flexGapX={1.5} $height=\"100vh\" $justifyContent=\"center\" $alignItems=\"center\">\n <Text $renderAs=\"h6\">Oops! Something went wrong. Please try again later.</Text>\n <Button\n widthX={14}\n size=\"small\"\n shape=\"square\"\n renderAs=\"primary\"\n label=\"Try again\"\n onClick={fetchChapterDetails}\n />\n </FlexView>\n );\n }\n\n if (!chapterDetails && isProcessing) {\n return <AppLoader height=\"80vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\">\n <Styled.BackButtonWrapper>\n <IconButton\n Icon={Back2Icon}\n renderAs=\"secondary-gray\"\n analyticsLabel=\"chapter_page_exit\"\n size=\"xsmall\"\n onClick={onExit}\n />\n </Styled.BackButtonWrapper>\n </Styled.BackButtonContainer>\n )}\n\n {isProcessing && (\n <Styled.LoaderWrapper>\n <img src={ILLUSTRATIONS.LOADER_1} alt=\"loader\" />\n </Styled.LoaderWrapper>\n )}\n\n {chapterDetails && (\n <>\n <ChapterBanner\n title={chapterDetails.name}\n imageHue={chapterDetails.image_hue}\n imageUrl={chapterDetails.image_url}\n progressStats={chapterDetails?.progress_stat}\n bannerRef={bannerRef}\n />\n <BlockSections\n imageHue={chapterDetails.image_hue}\n userType={userType}\n blocks={chapterDetails.blocks}\n onBlockSkipUnskip={onBlockSkipUnskip}\n onNodeAttempt={onNodeAttempt}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onNodeMarkAsDone={onNodeMarkAsDone}\n onNodeReattempt={onNodeReattempt}\n onNodeReview={onNodeReview}\n onNodeView={onNodeView}\n coreBlocksRef={coreBlocksRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n />\n </>\n )}\n </Styled.ContentWrapper>\n );\n});\n\nexport default ChapterDetails;\n"],"names":["ChapterDetails","memo","props","userChapterId","studentId","userType","onBlockSkipUnskip","onNodeAttempt","onNodeAssignAsHomework","onNodeMarkAsDone","onNodeReattempt","onNodeReview","onNodeView","onExit","onNodeUnassign","onNodeUnlock","onNodeSkipUnSkip","startChapterPageJourney","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;AAkBA,MAAMA,IAAsCC,EAAK,CAASC,MAAA;AAClD,QAAA;AAAA,IACJ,eAAAC;AAAA,IACA,WAAAC;AAAA,IACA,UAAAC;AAAA,IACA,mBAAAC;AAAA,I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,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAQ;AAAA,cACA,gBAAAN;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDiC,KAAejD;"}
@@ -1,14 +1,14 @@
1
- import { jsx as m } from "react/jsx-runtime";
2
- import { memo as p } from "react";
3
- import { getNodeStateBasedTagInfo as S } from "../../utils/node-card-utils.js";
4
- import { SheetTagWrapper as T } from "./node-card-styled.js";
5
- const h = p((o) => {
6
- const { state: e, accuracy: t, nodeType: a, dueDateTs: c, isStudent: r } = o, d = ["DYNAMIC", "ASSESSMENT", "CHAPTER_ASSESSMENT"].includes(a) ? t : void 0, {
7
- icon: n,
8
- top: s,
9
- right: i
10
- } = S(e, !!r, d, c);
11
- return /* @__PURE__ */ m(T, { $top: s, $right: i, children: n });
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { memo as S } from "react";
3
+ import { getNodeStateBasedTagInfo as T } from "../../utils/node-card-utils.js";
4
+ import { SheetTagWrapper as N } from "./node-card-styled.js";
5
+ const h = S((o) => {
6
+ const { state: e, accuracy: t, nodeType: a, dueDateTs: c, isStudent: s, isMilestone: i } = o, n = ["DYNAMIC", "ASSESSMENT", "CHAPTER_ASSESSMENT"].includes(a) ? t : void 0, {
7
+ icon: r,
8
+ top: d,
9
+ right: m
10
+ } = T(e, !!s, n, c, i);
11
+ return /* @__PURE__ */ p(N, { $top: d, $right: m, children: r });
12
12
  });
13
13
  export {
14
14
  h as default
@@ -1 +1 @@
1
- {"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType, dueDateTs, isStudent } = props;\n const dynamicNodeTypes = ['DYNAMIC', 'ASSESSMENT', 'CHAPTER_ASSESSMENT'];\n const isDynamicNode = dynamicNodeTypes.includes(nodeType);\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const {\n icon: NodeTagIcon,\n top,\n right,\n } = getNodeStateBasedTagInfo(state, !!isStudent, accuracyValue, dueDateTs);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["NodeCardTags","memo","props","state","accuracy","nodeType","dueDateTs","isStudent","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAQM,MAAAA,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,WAAAC,EAAc,IAAAL,GAGtDM,IAFmB,CAAC,WAAW,cAAc,oBAAoB,EAChC,SAASH,CAAQ,IAClBD,IAAW,QAE3C;AAAA,IACJ,MAAMK;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACEC,EAAyBT,GAAO,CAAC,CAACI,GAAWC,GAAeF,CAAS;AAGvE,SAAA,gBAAAO,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}
1
+ {"version":3,"file":"node-card-tags.js","sources":["../../../../../src/features/chapters-v2/comps/node-card/node-card-tags.tsx"],"sourcesContent":["import type { INodeCardTagsProps } from './node-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport { getNodeStateBasedTagInfo } from '../../utils/node-card-utils';\nimport * as Styled from './node-card-styled';\n\nconst NodeCardTags: FC<INodeCardTagsProps> = memo(props => {\n const { state, accuracy, nodeType, dueDateTs, isStudent, isMilestone } = props;\n const dynamicNodeTypes = ['DYNAMIC', 'ASSESSMENT', 'CHAPTER_ASSESSMENT'];\n const isDynamicNode = dynamicNodeTypes.includes(nodeType);\n const accuracyValue = isDynamicNode ? accuracy : undefined;\n\n const {\n icon: NodeTagIcon,\n top,\n right,\n } = getNodeStateBasedTagInfo(state, !!isStudent, accuracyValue, dueDateTs, isMilestone);\n\n return (\n <Styled.SheetTagWrapper $top={top} $right={right}>\n {NodeTagIcon}\n </Styled.SheetTagWrapper>\n );\n});\n\nexport default NodeCardTags;\n"],"names":["NodeCardTags","memo","props","state","accuracy","nodeType","dueDateTs","isStudent","isMilestone","accuracyValue","NodeTagIcon","top","right","getNodeStateBasedTagInfo","jsx","Styled.SheetTagWrapper"],"mappings":";;;;AAQM,MAAAA,IAAuCC,EAAK,CAASC,MAAA;AACzD,QAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,UAAAC,GAAU,WAAAC,GAAW,WAAAC,GAAW,aAAAC,EAAgB,IAAAN,GAGnEO,IAFmB,CAAC,WAAW,cAAc,oBAAoB,EAChC,SAASJ,CAAQ,IAClBD,IAAW,QAE3C;AAAA,IACJ,MAAMM;AAAA,IACN,KAAAC;AAAA,IACA,OAAAC;AAAA,EAAA,IACEC,EAAyBV,GAAO,CAAC,CAACI,GAAWE,GAAeH,GAAWE,CAAW;AAGpF,SAAA,gBAAAM,EAACC,GAAA,EAAuB,MAAMJ,GAAK,QAAQC,GACxC,UACHF,EAAA,CAAA;AAEJ,CAAC;"}