@cuemath/leap 4.1.1-link.0 → 4.1.1

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 (47) hide show
  1. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js +17 -15
  2. package/dist/features/chapters-v2/chapter-details/block-sections/block-sections.js.map +1 -1
  3. package/dist/features/chapters-v2/chapter-details/chapter-details.js +9 -7
  4. package/dist/features/chapters-v2/chapter-details/chapter-details.js.map +1 -1
  5. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-chapter-details-journey.js +7 -7
  6. package/dist/features/journey/hooks/use-learning-plan-journey/use-chapter-details-journey.js.map +1 -0
  7. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-learning-plan-journey.js +7 -7
  8. package/dist/features/journey/hooks/use-learning-plan-journey/use-learning-plan-journey.js.map +1 -0
  9. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-resource-assignment-journey.js +7 -7
  10. package/dist/features/journey/hooks/use-learning-plan-journey/use-resource-assignment-journey.js.map +1 -0
  11. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-test-creation-journey.js +7 -7
  12. package/dist/features/journey/hooks/use-learning-plan-journey/use-test-creation-journey.js.map +1 -0
  13. package/dist/features/{trial-session/hooks → journey/hooks/use-learning-plan-journey}/use-worksheet-preview-journey.js +7 -7
  14. package/dist/features/journey/hooks/use-learning-plan-journey/use-worksheet-preview-journey.js.map +1 -0
  15. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js +1 -1
  16. package/dist/features/journey/mocks/chapter-page-journey-mock-data.js.map +1 -1
  17. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js +14 -13
  18. package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/goals/goal-action-ctas.js.map +1 -1
  19. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js +7 -6
  20. package/dist/features/milestone/milestone-resources/resources-list/resources-list.js.map +1 -1
  21. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js +23 -22
  22. package/dist/features/milestone/milestone-tests/test-list-v2/test-list-container.js.map +1 -1
  23. package/dist/features/trial-session/comps/learning-plan/learning-chapter-details.js +1 -1
  24. package/dist/features/trial-session/comps/learning-plan/learning-chapter-details.js.map +1 -1
  25. package/dist/features/trial-session/comps/learning-plan/learning-milestone-sync.js +3 -3
  26. package/dist/features/trial-session/comps/learning-plan/learning-milestone-sync.js.map +1 -1
  27. package/dist/features/trial-session/comps/learning-plan/learning-preview-worksheet.js +1 -1
  28. package/dist/features/trial-session/comps/learning-plan/learning-preview-worksheet.js.map +1 -1
  29. package/dist/features/trial-session/comps/worksheet/worksheet.js +41 -34
  30. package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
  31. package/dist/features/trial-session/right-panel/index.js +26 -26
  32. package/dist/features/trial-session/right-panel/index.js.map +1 -1
  33. package/dist/features/trial-session/right-panel/right-panel-styled.js +27 -31
  34. package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
  35. package/dist/features/ui/buttons/button/button.js +51 -50
  36. package/dist/features/ui/buttons/button/button.js.map +1 -1
  37. package/dist/features/ui/buttons/icon-button/icon-button.js +21 -20
  38. package/dist/features/ui/buttons/icon-button/icon-button.js.map +1 -1
  39. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js +16 -15
  40. package/dist/features/worksheet/worksheet-preview/worksheet-preview-view.js.map +1 -1
  41. package/dist/index.d.ts +12 -12
  42. package/package.json +1 -1
  43. package/dist/features/trial-session/hooks/use-chapter-details-journey.js.map +0 -1
  44. package/dist/features/trial-session/hooks/use-learning-plan-journey.js.map +0 -1
  45. package/dist/features/trial-session/hooks/use-resource-assignment-journey.js.map +0 -1
  46. package/dist/features/trial-session/hooks/use-test-creation-journey.js.map +0 -1
  47. package/dist/features/trial-session/hooks/use-worksheet-preview-journey.js.map +0 -1
@@ -1,9 +1,9 @@
1
- import { jsxs as O, jsx as c } from "react/jsx-runtime";
2
- import { memo as y, useMemo as D } from "react";
3
- import { BLOCK_TYPE as G, SECTION_CODE as I } from "../../constants/block-constants.js";
1
+ import { jsxs as y, jsx as c } from "react/jsx-runtime";
2
+ import { memo as D, useMemo as G } from "react";
3
+ import { BLOCK_TYPE as I, SECTION_CODE as L } from "../../constants/block-constants.js";
4
4
  import m from "./block-section-view.js";
5
- import { ChapterDetailsWrapper as L } from "./block-sections-styled.js";
6
- const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, K = y(function(h) {
5
+ import { ChapterDetailsWrapper as w } from "./block-sections-styled.js";
6
+ const { SAT_MOCK_TEST: _, GOAL: N } = I, { GOALS: x, READINESS: H } = L, M = D(function(h) {
7
7
  const {
8
8
  blocks: t,
9
9
  imageHue: i,
@@ -11,38 +11,40 @@ const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, K = y(f
11
11
  coreBlocksRef: S,
12
12
  challengeBlockRef: C,
13
13
  downloadBlockRef: E,
14
- downloadCoreBlockRef: g,
14
+ downloadCoreBlockRef: R,
15
+ nodeCardsRef: g,
15
16
  ...d
16
17
  } = h;
17
18
  let a = 0, k = !1, f = !1;
18
- const { goalBlocks: p, nonGoalBlocks: B } = D(
19
+ const { goalBlocks: p, nonGoalBlocks: B } = G(
19
20
  () => t.reduce(
20
- (o, e) => (e.section_code === N || e.section_code === x || e.block_type === _ ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
21
+ (o, e) => (e.section_code === x || e.section_code === H || e.block_type === _ ? o.goalBlocks.push(e) : o.nonGoalBlocks.push(e), o),
21
22
  { goalBlocks: [], nonGoalBlocks: [] }
22
23
  ),
23
24
  [t]
24
25
  );
25
- return /* @__PURE__ */ O(
26
- L,
26
+ return /* @__PURE__ */ y(
27
+ w,
27
28
  {
28
29
  $width: "100%",
30
+ ref: g,
29
31
  $background: B.length ? "WHITE_3" : "WHITE_1",
30
32
  children: [
31
33
  /* @__PURE__ */ c("div", { ref: S, children: p.map((o, e) => {
32
34
  const { block_type: l, block_id: n, permissions: s, sheets: A } = o;
33
35
  let u = 0;
34
- const R = e === p.length - 1, T = A.find((b) => b.node_type === "PDF");
35
- return (l === w || l === _) && (s.can_un_skip || (a += 1), u = a), /* @__PURE__ */ c(
36
+ const T = e === p.length - 1, b = A.find((O) => O.node_type === "PDF");
37
+ return (l === N || l === _) && (s.can_un_skip || (a += 1), u = a), /* @__PURE__ */ c(
36
38
  m,
37
39
  {
38
40
  blockData: o,
39
41
  userType: r,
40
- isLastBlock: R,
42
+ isLastBlock: T,
41
43
  lessonIdx: u,
42
44
  imageHue: i,
43
45
  isGoalBlock: !0,
44
46
  ...d,
45
- blockSectionRef: T ? g : void 0
47
+ blockSectionRef: b ? R : void 0
46
48
  },
47
49
  n
48
50
  );
@@ -66,6 +68,6 @@ const { SAT_MOCK_TEST: _, GOAL: w } = G, { GOALS: N, READINESS: x } = I, K = y(f
66
68
  );
67
69
  });
68
70
  export {
69
- K as default
71
+ M as default
70
72
  };
71
73
  //# sourceMappingURL=block-sections.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"block-sections.js","sources":["../../../../../src/features/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\nimport type { IBlockSectionsProps } from './block-sections-types';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(function BlockSections(props) {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings":";;;;;AAOA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,SAAuBC,GAAO;AAC1E,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,GAAGC;AAAA,EACD,IAAAR;AAEJ,MAAIS,IAAc,GACdC,IAAuB,IACvBC,IAAsB;AAEpB,QAAA,EAAE,YAAAC,GAAY,eAAAC,EAAA,IAAkBC;AAAA,IACpC,MACEb,EAAO;AAAA,MACL,CAACc,GAAKC,OAEFA,EAAM,iBAAiBrB,KACvBqB,EAAM,iBAAiBpB,KACvBoB,EAAM,eAAexB,IAEjBuB,EAAA,WAAW,KAAKC,CAAK,IAErBD,EAAA,cAAc,KAAKC,CAAK,GAGvBD;AAAA,MAET,EAAE,YAAY,CAAA,GAAqB,eAAe,GAAoB;AAAA,IACxE;AAAA,IACF,CAACd,CAAM;AAAA,EAAA;AAIP,SAAA,gBAAAgB;AAAA,IAACC;AAAAA,IAAA;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/chapters-v2/chapter-details/block-sections/block-sections.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { BLOCK_TYPE, SECTION_CODE } from '../../constants/block-constants';\nimport BlockSectionView from './block-section-view';\nimport * as Styled from './block-sections-styled';\nimport type { IBlockSectionsProps } from './block-sections-types';\n\nconst { SAT_MOCK_TEST, GOAL } = BLOCK_TYPE;\nconst { GOALS, READINESS } = SECTION_CODE;\n\nconst BlockSections: FC<IBlockSectionsProps> = memo(function BlockSections(props) {\n const {\n blocks,\n imageHue,\n userType,\n coreBlocksRef,\n challengeBlockRef,\n downloadBlockRef,\n downloadCoreBlockRef,\n nodeCardsRef,\n ...blockSectionCallBacks\n } = props;\n\n let lessonCount = 0;\n let addChallengeArenaRef = false;\n let addDownloadBlockRef = false;\n\n const { goalBlocks, nonGoalBlocks } = useMemo(\n () =>\n blocks.reduce(\n (acc, block) => {\n if (\n block.section_code === GOALS ||\n block.section_code === READINESS ||\n block.block_type === SAT_MOCK_TEST\n ) {\n acc.goalBlocks.push(block);\n } else {\n acc.nonGoalBlocks.push(block);\n }\n\n return acc;\n },\n { goalBlocks: [] as typeof blocks, nonGoalBlocks: [] as typeof blocks },\n ),\n [blocks],\n );\n\n return (\n <Styled.ChapterDetailsWrapper\n $width=\"100%\"\n ref={nodeCardsRef}\n $background={!nonGoalBlocks.length ? `WHITE_1` : 'WHITE_3'}\n >\n <div ref={coreBlocksRef}>\n {goalBlocks.map((blockData, idx) => {\n const { block_type: blockType, block_id: blockId, permissions, sheets } = blockData;\n let lessonIdx = 0;\n\n const isLastBlock = idx === goalBlocks.length - 1;\n\n const hasPDFNode = sheets.find(sheet => sheet.node_type === 'PDF');\n\n if (blockType === GOAL || blockType === SAT_MOCK_TEST) {\n if (!permissions.can_un_skip) {\n lessonCount += 1;\n }\n\n lessonIdx = lessonCount;\n }\n\n return (\n <BlockSectionView\n blockData={blockData}\n userType={userType}\n isLastBlock={isLastBlock}\n key={blockId}\n lessonIdx={lessonIdx}\n imageHue={imageHue}\n isGoalBlock\n {...blockSectionCallBacks}\n blockSectionRef={hasPDFNode ? downloadCoreBlockRef : undefined}\n />\n );\n })}\n </div>\n\n {nonGoalBlocks.map(blockData => {\n const { block_id: blockId, block_type: blockType } = blockData;\n\n // Apply blockSectionRef only to the first CHALLENGE_ARENA block\n const isChallengeArenaBlock = blockType === 'CHALLENGE_ARENA' && !addChallengeArenaRef;\n\n const isDownloadBlock = blockType === 'DOWNLOADS' && !addDownloadBlockRef;\n\n if (isChallengeArenaBlock) {\n addChallengeArenaRef = true;\n }\n\n if (isDownloadBlock) {\n addDownloadBlockRef = true;\n }\n\n return (\n <BlockSectionView\n key={blockId}\n blockData={blockData}\n userType={userType}\n imageHue={imageHue}\n {...blockSectionCallBacks}\n blockSectionRef={\n isChallengeArenaBlock\n ? challengeBlockRef\n : isDownloadBlock\n ? downloadBlockRef\n : undefined\n }\n />\n );\n })}\n </Styled.ChapterDetailsWrapper>\n );\n});\n\nexport default BlockSections;\n"],"names":["SAT_MOCK_TEST","GOAL","BLOCK_TYPE","GOALS","READINESS","SECTION_CODE","BlockSections","memo","props","blocks","imageHue","userType","coreBlocksRef","challengeBlockRef","downloadBlockRef","downloadCoreBlockRef","nodeCardsRef","blockSectionCallBacks","lessonCount","addChallengeArenaRef","addDownloadBlockRef","goalBlocks","nonGoalBlocks","useMemo","acc","block","jsxs","Styled.ChapterDetailsWrapper","jsx","blockData","idx","blockType","blockId","permissions","sheets","lessonIdx","isLastBlock","hasPDFNode","sheet","BlockSectionView","isChallengeArenaBlock","isDownloadBlock"],"mappings":";;;;;AAOA,MAAM,EAAE,eAAAA,GAAe,MAAAC,EAAS,IAAAC,GAC1B,EAAE,OAAAC,GAAO,WAAAC,EAAc,IAAAC,GAEvBC,IAAyCC,EAAK,SAAuBC,GAAO;AAC1E,QAAA;AAAA,IACJ,QAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,eAAAC;AAAA,IACA,mBAAAC;AAAA,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AAA,QAQV,CAAA,GACH;AAAA,QAECV,EAAc,IAAI,CAAaO,MAAA;AAC9B,gBAAM,EAAE,UAAUG,GAAS,YAAYD,MAAcF,GAG/CW,IAAwBT,MAAc,qBAAqB,CAACZ,GAE5DsB,IAAkBV,MAAc,eAAe,CAACX;AAEtD,iBAAIoB,MACqBrB,IAAA,KAGrBsB,MACoBrB,IAAA,KAItB,gBAAAQ;AAAA,YAACW;AAAA,YAAA;AAAA,cAEC,WAAAV;AAAA,cACA,UAAAlB;AAAA,cACA,UAAAD;AAAA,cACC,GAAGO;AAAA,cACJ,iBACEuB,IACI3B,IACA4B,IACE3B,IACA;AAAA,YAAA;AAAA,YAVHkB;AAAA,UAAA;AAAA,QAYP,CAEH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGP,CAAC;"}
@@ -26,8 +26,8 @@ const ge = V(function(S) {
26
26
  onNodeAssignAsHomework: A,
27
27
  onNodeMarkAsDone: $,
28
28
  onNodeReattempt: x,
29
- onNodeReview: v,
30
- onNodeView: I,
29
+ onNodeReview: I,
30
+ onNodeView: v,
31
31
  onExit: P,
32
32
  onNodeUnassign: _,
33
33
  onNodeUnlock: E,
@@ -133,9 +133,10 @@ const ge = V(function(S) {
133
133
  $alignItems: "center",
134
134
  $height: "max-content",
135
135
  children: [
136
- t === "TEACHER" && /* @__PURE__ */ o(pe, { $height: "100%", className: "goal-widget-chapter-item", children: /* @__PURE__ */ o(ue, { ref: F, children: /* @__PURE__ */ o(
136
+ t === "TEACHER" && /* @__PURE__ */ o(pe, { $height: "100%", className: "goal-widget-chapter-item", children: /* @__PURE__ */ o(ue, { children: /* @__PURE__ */ o(
137
137
  re,
138
138
  {
139
+ ref: F,
139
140
  Icon: Q,
140
141
  renderAs: "secondary-gray",
141
142
  analyticsLabel: "chapter_page_exit",
@@ -155,7 +156,7 @@ const ge = V(function(S) {
155
156
  bannerRef: U
156
157
  }
157
158
  ),
158
- /* @__PURE__ */ o("div", { ref: j, children: /* @__PURE__ */ o(
159
+ /* @__PURE__ */ o(
159
160
  de,
160
161
  {
161
162
  imageHue: e.image_hue,
@@ -166,18 +167,19 @@ const ge = V(function(S) {
166
167
  onNodeAssignAsHomework: A,
167
168
  onNodeMarkAsDone: $,
168
169
  onNodeReattempt: x,
169
- onNodeReview: v,
170
- onNodeView: I,
170
+ onNodeReview: I,
171
+ onNodeView: v,
171
172
  coreBlocksRef: W,
172
173
  challengeBlockRef: X,
173
174
  downloadCoreBlockRef: z,
174
175
  downloadBlockRef: G,
176
+ nodeCardsRef: j,
175
177
  onNodeUnassign: _,
176
178
  onNodeUnlock: E,
177
179
  onNodeSkipUnSkip: H,
178
180
  onBlockReset: L
179
181
  }
180
- ) })
182
+ )
181
183
  ] })
182
184
  ]
183
185
  }
@@ -1 +1 @@
1
- {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useDownloadBlockJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-block-journey';\nimport { useDownloadNodeJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-node-journey';\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 { getHasDownloadBlock, getHasNonDownloadBlockWithPdfNode } from '../utils';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\nimport type { IChapterDetails } from './chapter-details-types';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(function ChapterDetails(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 onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n nodeCardsRef,\n backButtonRef,\n } = props;\n\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 const { blockSectionRef: challengeBlockRef, startJourney: startChallengeArenaJourney } =\n useChallengeArenaJourney();\n\n const {\n blockSectionRef: downloadBlockRef,\n downloadCoreBlockRef,\n startJourney: startDownloadNodeJourney,\n } = useDownloadNodeJourney();\n\n const { blockSectionRef: downloadBlockSectionRef, startJourney: startDownloadBlockJourney } =\n useDownloadBlockJourney();\n\n const hasDownloadBlock = useMemo(\n () => chapterDetails && getHasDownloadBlock(chapterDetails.blocks),\n [chapterDetails],\n );\n const hasNonDownloadBlockWithPdfNode = useMemo(\n () => chapterDetails && getHasNonDownloadBlockWithPdfNode(chapterDetails.blocks),\n [chapterDetails],\n );\n\n const activeDownloadBlockRef = useMemo(\n () =>\n canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode\n ? downloadBlockRef\n : canStartDownloadBlockJourney\n ? downloadBlockSectionRef\n : undefined,\n [\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n hasNonDownloadBlockWithPdfNode,\n downloadBlockRef,\n downloadBlockSectionRef,\n ],\n );\n\n useEffect(() => {\n if (chapterDetails && !isJourneyActive) {\n if (canStartJourney && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (!canStartJourney && canStartChallengeArenaJourney) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n\n if (!canStartJourney && canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode) {\n startDownloadNodeJourney({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n });\n }\n\n if (!canStartJourney && canStartDownloadBlockJourney && hasDownloadBlock) {\n startDownloadBlockJourney({\n chapterDetails,\n userType,\n });\n }\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n startDownloadBlockJourney,\n startDownloadNodeJourney,\n studentId,\n userChapterId,\n userType,\n hasNonDownloadBlockWithPdfNode,\n hasDownloadBlock,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\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=\"ab1-bold\">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=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper ref={backButtonRef}>\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 <div ref={nodeCardsRef}>\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 challengeBlockRef={challengeBlockRef}\n downloadCoreBlockRef={downloadCoreBlockRef}\n downloadBlockRef={activeDownloadBlockRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\n />\n </div>\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","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","canStartDownloadNodeJourney","canStartDownloadBlockJourney","nodeCardsRef","backButtonRef","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","challengeBlockRef","startChallengeArenaJourney","useChallengeArenaJourney","downloadBlockRef","downloadCoreBlockRef","startDownloadNodeJourney","useDownloadNodeJourney","downloadBlockSectionRef","startDownloadBlockJourney","useDownloadBlockJourney","hasDownloadBlock","useMemo","getHasDownloadBlock","hasNonDownloadBlockWithPdfNode","getHasNonDownloadBlockWithPdfNode","activeDownloadBlockRef","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,MAAMA,KAAsCC,EAAK,SAAwBC,GAAO;AACxE,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,kBAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,WAAAC;AAAA,IACA,eAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,+BAAAC;AAAA,IACA,6BAAAC;AAAA,IACA,8BAAAC;AAAA,IACA,cAAAC;AAAA,IACA,eAAAC;AAAA,EACE,IAAAzB,GAEE,EAAE,iBAAA0B,MAAoBC,MACtB;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,SAAAC;AAAA,MACEC,GAAqB,GAEnBC,IA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AA,WAEb,EACF,CAAA;AAAA,QAGDmB,KACC,gBAAAyB,EAACS,IAAA,EACC,UAAA,gBAAAT,EAAC,OAAI,EAAA,KAAKU,EAAc,UAAU,KAAI,SAAA,CAAS,EACjD,CAAA;AAAA,QAGDpC,KAEG,gBAAAwB,EAAAa,GAAA,EAAA,UAAA;AAAA,UAAA,gBAAAX;AAAA,YAACY;AAAA,YAAA;AAAA,cACC,OAAOtC,EAAe;AAAA,cACtB,UAAUA,EAAe;AAAA,cACzB,UAAUA,EAAe;AAAA,cACzB,eAAeA,KAAA,gBAAAA,EAAgB;AAAA,cAC/B,WAAAX;AAAA,YAAA;AAAA,UACF;AAAA,UACA,gBAAAqC,EAAC,OAAI,EAAA,KAAK/B,GACR,UAAA,gBAAA+B;AAAA,YAACa;AAAA,YAAA;AAAA,cACC,UAAUvC,EAAe;AAAA,cACzB,UAAA1B;AAAA,cACA,QAAQ0B,EAAe;AAAA,cACvB,mBAAAzB;AAAA,cACA,eAAAC;AAAA,cACA,wBAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,iBAAAC;AAAA,cACA,cAAAC;AAAA,cACA,YAAAC;AAAA,cACA,eAAAS;AAAA,cACA,mBAAAkB;AAAA,cACA,sBAAAI;AAAA,cACA,kBAAkBW;AAAA,cAClB,gBAAAxC;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,cAAAE;AAAA,YAAA;AAAA,UAAA,GAEJ;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDqD,KAAevE;"}
1
+ {"version":3,"file":"chapter-details.js","sources":["../../../../src/features/chapters-v2/chapter-details/chapter-details.tsx"],"sourcesContent":["import { memo, useCallback, useEffect, useMemo, type FC } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\nimport { useChallengeArenaJourney } from '../../journey/hooks/use-chapter-page-journey/use-challenge-arena-journey';\nimport { useDownloadBlockJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-block-journey';\nimport { useDownloadNodeJourney } from '../../journey/hooks/use-chapter-page-journey/use-download-node-journey';\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 { getHasDownloadBlock, getHasNonDownloadBlockWithPdfNode } from '../utils';\nimport BlockSections from './block-sections/block-sections';\nimport ChapterBanner from './chapter-banner/chapter-banner';\nimport * as Styled from './chapter-details-styled';\nimport type { IChapterDetails } from './chapter-details-types';\n\nconst ChapterDetails: FC<IChapterDetails> = memo(function ChapterDetails(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 onBlockReset,\n chapterPageRef,\n bannerRef,\n coreBlocksRef,\n canStartJourney,\n canStartChallengeArenaJourney,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n nodeCardsRef,\n backButtonRef,\n } = props;\n\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 const { blockSectionRef: challengeBlockRef, startJourney: startChallengeArenaJourney } =\n useChallengeArenaJourney();\n\n const {\n blockSectionRef: downloadBlockRef,\n downloadCoreBlockRef,\n startJourney: startDownloadNodeJourney,\n } = useDownloadNodeJourney();\n\n const { blockSectionRef: downloadBlockSectionRef, startJourney: startDownloadBlockJourney } =\n useDownloadBlockJourney();\n\n const hasDownloadBlock = useMemo(\n () => chapterDetails && getHasDownloadBlock(chapterDetails.blocks),\n [chapterDetails],\n );\n const hasNonDownloadBlockWithPdfNode = useMemo(\n () => chapterDetails && getHasNonDownloadBlockWithPdfNode(chapterDetails.blocks),\n [chapterDetails],\n );\n\n const activeDownloadBlockRef = useMemo(\n () =>\n canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode\n ? downloadBlockRef\n : canStartDownloadBlockJourney\n ? downloadBlockSectionRef\n : undefined,\n [\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\n hasNonDownloadBlockWithPdfNode,\n downloadBlockRef,\n downloadBlockSectionRef,\n ],\n );\n\n useEffect(() => {\n if (chapterDetails && !isJourneyActive) {\n if (canStartJourney && startChapterPageJourney) {\n startChapterPageJourney({\n chapterDetails: chapterDetails,\n userChapterId,\n studentId,\n userType,\n });\n }\n\n if (!canStartJourney && canStartChallengeArenaJourney) {\n startChallengeArenaJourney({\n chapterDetails,\n userType,\n });\n }\n\n if (!canStartJourney && canStartDownloadNodeJourney && hasNonDownloadBlockWithPdfNode) {\n startDownloadNodeJourney({\n chapterDetails,\n userType,\n canStartDownloadBlockJourney,\n });\n }\n\n if (!canStartJourney && canStartDownloadBlockJourney && hasDownloadBlock) {\n startDownloadBlockJourney({\n chapterDetails,\n userType,\n });\n }\n }\n }, [\n canStartChallengeArenaJourney,\n canStartJourney,\n chapterDetails,\n isJourneyActive,\n startChallengeArenaJourney,\n startChapterPageJourney,\n startDownloadBlockJourney,\n startDownloadNodeJourney,\n studentId,\n userChapterId,\n userType,\n hasNonDownloadBlockWithPdfNode,\n hasDownloadBlock,\n canStartDownloadNodeJourney,\n canStartDownloadBlockJourney,\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=\"ab1-bold\">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=\"100vh\" />;\n }\n\n return (\n <Styled.ContentWrapper\n ref={chapterPageRef}\n $widthX={50}\n $disablePointerEvents={isProcessing}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"max-content\"\n >\n {userType === 'TEACHER' && (\n <Styled.BackButtonContainer $height=\"100%\" className=\"goal-widget-chapter-item\">\n <Styled.BackButtonWrapper>\n <IconButton\n ref={backButtonRef}\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 challengeBlockRef={challengeBlockRef}\n downloadCoreBlockRef={downloadCoreBlockRef}\n downloadBlockRef={activeDownloadBlockRef}\n nodeCardsRef={nodeCardsRef}\n onNodeUnassign={onNodeUnassign}\n onNodeUnlock={onNodeUnlock}\n onNodeSkipUnSkip={onNodeSkipUnSkip}\n onBlockReset={onBlockReset}\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","onBlockReset","chapterPageRef","bannerRef","coreBlocksRef","canStartJourney","canStartChallengeArenaJourney","canStartDownloadNodeJourney","canStartDownloadBlockJourney","nodeCardsRef","backButtonRef","isJourneyActive","useJourney","getChapterDetails","chapterDetails","isProcessing","isProcessingFailed","isStale","useGetChapterDetails","fetchChapterDetails","useCallback","useEffect","challengeBlockRef","startChallengeArenaJourney","useChallengeArenaJourney","downloadBlockRef","downloadCoreBlockRef","startDownloadNodeJourney","useDownloadNodeJourney","downloadBlockSectionRef","startDownloadBlockJourney","useDownloadBlockJourney","hasDownloadBlock","useMemo","getHasDownloadBlock","hasNonDownloadBlockWithPdfNode","getHasNonDownloadBlockWithPdfNode","activeDownloadBlockRef","jsxs","FlexView","jsx","Text","Button","AppLoader","Styled.ContentWrapper","Styled.BackButtonContainer","Styled.BackButtonWrapper","IconButton","Back2Icon","Styled.LoaderWrapper","ILLUSTRATIONS","Fragment","ChapterBanner","BlockSections","ChapterDetails$1"],"mappings":";;;;;;;;;;;;;;;;;;AAoBA,MAAMA,KAAsCC,EAAK,SAAwBC,GAAO;AACxE,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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cAClB,cAAA5B;AAAA,cACA,gBAAAZ;AAAA,cACA,cAAAC;AAAA,cACA,kBAAAC;AAAA,cACA,cAAAE;AAAA,YAAA;AAAA,UACF;AAAA,QAAA,GACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC,GAEDqD,KAAevE;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as o, Fragment as b, jsxs as f } from "react/jsx-runtime";
2
2
  import { useRef as a, useCallback as s, useEffect as E, useMemo as k } from "react";
3
- import y from "../../ui/layout/flex-view.js";
4
- import { JOURNEY_ID_TEACHER as I } from "../../journey/journey-id/journey-id-teacher.js";
5
- import { IndicatorType as T } from "../../journey/use-journey/constants.js";
6
- import g from "../../ui/separator/separator.js";
7
- import i from "../../ui/text/text.js";
8
- import A from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
9
- import { useJourney as L } from "../../journey/use-journey/use-journey.js";
3
+ import y from "../../../ui/layout/flex-view.js";
4
+ import { JOURNEY_ID_TEACHER as I } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as T } from "../../use-journey/constants.js";
6
+ import g from "../../../ui/separator/separator.js";
7
+ import i from "../../../ui/text/text.js";
8
+ import A from "../use-home-page-journey/tooltip-item.js";
9
+ import { useJourney as L } from "../../use-journey/use-journey.js";
10
10
  const D = ({ onComplete: d }) => {
11
11
  const n = I.CHAPTER_DETAILS_INTRO_JOURNEY, e = a(null), t = a(null), O = a([]), { setJourney: m, clearJourney: r, nextCoachmark: c, isJourneyActive: u } = L(), h = s(() => {
12
12
  document.body.style.overflow = "unset", r(), d();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-chapter-details-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-chapter-details-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseChapterDetailsJourney {\n (params: { onComplete: () => void }): {\n nodeCardsRef: RefObject<HTMLDivElement>;\n backButtonRef: RefObject<HTMLButtonElement>;\n startJourney: () => void;\n };\n}\n\nconst useChapterDetailsJourney: IUseChapterDetailsJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.CHAPTER_DETAILS_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const nodeCardsRef = useRef<HTMLDivElement>(null) as RefObject<HTMLDivElement>;\n const backButtonRef = useRef<HTMLButtonElement>(null) as RefObject<HTMLButtonElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, clearJourney, nextCoachmark, isJourneyActive } = useJourney();\n\n // Helper to mark journey as completed for a class\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId);\n }, [journeyId, nextCoachmark]);\n\n const startJourney = useCallback(() => {\n // Check if elements are absent or journey was already completed for this class\n if (!nodeCardsRef?.current || !backButtonRef?.current || isJourneyActive) return;\n\n const chapterDetailsSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: nodeCardsRef,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: 145,\n tooltipYCoOrdinates: 125,\n arrowSize: 10,\n arrowXCoOrdinates: -100,\n position: 'bottom',\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Open a worksheet</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap to open any worksheet.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: backButtonRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 283,\n renderAs: 'primary',\n tooltipXCoOrdinates: 130,\n tooltipYCoOrdinates: 40,\n arrowSize: 10,\n arrowXCoOrdinates: -115,\n position: 'bottom',\n backgroundColor: 'ORANGE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Back to Goals</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap here to go back to learning home.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, chapterDetailsSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n handleNextCoachmark();\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [handleEndJourney, handleNextCoachmark, isJourneyActive, journeyId, setJourney]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n nodeCardsRef,\n backButtonRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useChapterDetailsJourney };\n"],"names":["useChapterDetailsJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","nodeCardsRef","useRef","backButtonRef","timerRefs","setJourney","clearJourney","nextCoachmark","isJourneyActive","useJourney","handleEndJourney","useCallback","handleNextCoachmark","startJourney","chapterDetailsSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","Text","Separator","delayBeforeStart","useEffect","useMemo"],"mappings":";;;;;;;;;AAoBA,MAAMA,IAAsD,CAAC,EAAE,YAAAC,QAAiB;AAC9E,QAAMC,IAAYC,EAAmB,+BAG/BC,IAAeC,EAAuB,IAAI,GAC1CC,IAAgBD,EAA0B,IAAI,GAC9CE,IAAYF,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAG,GAAY,cAAAC,GAAc,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,KAG/DC,IAAmBC,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAClBL,KACFR;EAAA,GACV,CAACQ,GAAcR,CAAU,CAAC,GAEvBc,IAAsBD,EAAY,MAAM;AAC5C,IAAAJ,EAAcR,CAAS;AAAA,EAAA,GACtB,CAACA,GAAWQ,CAAa,CAAC,GAEvBM,IAAeF,EAAY,MAAM;AAErC,QAAI,EAACV,KAAA,QAAAA,EAAc,YAAW,EAACE,KAAA,QAAAA,EAAe,YAAWK,EAAiB;AAE1E,UAAMM,IAAgD;AAAA,MACpD;AAAA,QACE,+BAA+Bb;AAAA,QAC/B,oBAAsB,gBAAAc,EAAAC,GAAA,EAAA;AAAA,QACtB,MAAMC,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,OAAO;AAAA,UACP,UAAU;AAAA,UACV,qBAAqB;AAAA,UACrB,qBAAqB;AAAA,UACrB,WAAW;AAAA,UACX,mBAAmB;AAAA,UACnB,UAAU;AAAA,UACV,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,aACE,gBAAAF;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,2BACGC,GACC,EAAA,UAAA;AAAA,gBAAC,gBAAAJ,EAAAK,GAAA,EAAK,WAAU,YAAW,UAAgB,oBAAA;AAAA,gBAC3C,gBAAAL,EAACM,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,gBACrB,gBA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,cAAAvB;AAAA,MACA,eAAAE;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as o, Fragment as y, jsxs as b } from "react/jsx-runtime";
2
2
  import { useRef as a, useCallback as s, useEffect as w, useMemo as L } from "react";
3
- import f from "../../ui/layout/flex-view.js";
4
- import { JOURNEY_ID_TEACHER as I } from "../../journey/journey-id/journey-id-teacher.js";
5
- import { IndicatorType as g } from "../../journey/use-journey/constants.js";
6
- import T from "../../ui/separator/separator.js";
7
- import l from "../../ui/text/text.js";
8
- import A from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
9
- import { useJourney as J } from "../../journey/use-journey/use-journey.js";
3
+ import f from "../../../ui/layout/flex-view.js";
4
+ import { JOURNEY_ID_TEACHER as I } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as g } from "../../use-journey/constants.js";
6
+ import T from "../../../ui/separator/separator.js";
7
+ import l from "../../../ui/text/text.js";
8
+ import A from "../use-home-page-journey/tooltip-item.js";
9
+ import { useJourney as J } from "../../use-journey/use-journey.js";
10
10
  const Y = ({ onComplete: d }) => {
11
11
  const e = I.LEARNING_PLAN_INTRO_JOURNEY, r = a(null), t = a(null), O = a([]), { isJourneyActive: c, setJourney: m, clearJourney: n, nextCoachmark: i } = J(), u = s(() => {
12
12
  i(e);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-learning-plan-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-learning-plan-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseLearningPlanJourney {\n ({ onComplete }: { onComplete: () => void }): {\n editButtonRef: RefObject<HTMLButtonElement>;\n firstChapterRef: RefObject<HTMLDivElement>;\n startJourney: () => void;\n };\n}\n\nconst useLearningPlanJourney: IUseLearningPlanJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.LEARNING_PLAN_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const editButtonRef = useRef<HTMLButtonElement>(null) as RefObject<HTMLButtonElement>;\n const firstChapterRef = useRef<HTMLDivElement>(null) as RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { isJourneyActive, setJourney, clearJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachmark = useCallback(() => {\n nextCoachmark(journeyId);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const startJourney = useCallback(() => {\n // Check if targeted is absent or journey was already completed or active for this class\n if (!editButtonRef?.current || !firstChapterRef?.current || isJourneyActive) {\n return;\n }\n\n const learningPlanSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: editButtonRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: -85,\n tooltipYCoOrdinates: 40,\n arrowSize: 10,\n arrowXCoOrdinates: 102,\n position: 'bottom',\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Edit a Goal</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">You can always edit this later.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleNextCoachmark}\n />\n ),\n } as IArrowTooltipProps,\n },\n {\n originalElementToHighlightRef: firstChapterRef,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 232,\n renderAs: 'primary',\n tooltipXCoOrdinates: 175,\n tooltipYCoOrdinates: 75,\n arrowSize: 10,\n arrowXCoOrdinates: 0,\n position: 'right',\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Open a Chapter</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap to open any chapter.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, learningPlanSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n nextCoachmark(journeyId);\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [\n handleEndJourney,\n handleNextCoachmark,\n isJourneyActive,\n journeyId,\n nextCoachmark,\n setJourney,\n ]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n editButtonRef,\n firstChapterRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useLearningPlanJourney };\n"],"names":["useLearningPlanJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","editButtonRef","useRef","firstChapterRef","timerRefs","isJourneyActive","setJourney","clearJourney","nextCoachmark","useJourney","handleNextCoachmark","useCallback","handleEndJourney","startJourney","learningPlanSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","Text","Separator","delayBeforeStart","useEffect","useMemo"],"mappings":";;;;;;;;;AAoBA,MAAMA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AAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as t, Fragment as h, jsxs as T } from "react/jsx-runtime";
2
2
  import { useRef as u, useCallback as d, useEffect as E, useMemo as b } from "react";
3
- import { JOURNEY_ID_TEACHER as g } from "../../journey/journey-id/journey-id-teacher.js";
4
- import A from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
5
- import { IndicatorType as C } from "../../journey/use-journey/constants.js";
6
- import J from "../../ui/layout/flex-view.js";
7
- import R from "../../ui/separator/separator.js";
8
- import p from "../../ui/text/text.js";
9
- import { useJourney as I } from "../../journey/use-journey/use-journey.js";
3
+ import { JOURNEY_ID_TEACHER as g } from "../../journey-id/journey-id-teacher.js";
4
+ import A from "../use-home-page-journey/tooltip-item.js";
5
+ import { IndicatorType as C } from "../../use-journey/constants.js";
6
+ import J from "../../../ui/layout/flex-view.js";
7
+ import R from "../../../ui/separator/separator.js";
8
+ import p from "../../../ui/text/text.js";
9
+ import { useJourney as I } from "../../use-journey/use-journey.js";
10
10
  const U = ({ onComplete: n }) => {
11
11
  const r = g.RESOURCE_ASSIGNMENT_INTRO_JOURNEY, e = u(null), f = u([]), { setJourney: i, nextCoachmark: s, clearJourney: o, isJourneyActive: m } = I(), a = d(() => {
12
12
  document.body.style.overflow = "unset", o(), n();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-resource-assignment-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-resource-assignment-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseResourceAssignmentJourney {\n (props: { onComplete: () => void }): {\n assignResourceButtonRef: RefObject<HTMLButtonElement>;\n startJourney: () => void;\n };\n}\n\nconst useResourceAssignmentJourney: IUseResourceAssignmentJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.RESOURCE_ASSIGNMENT_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const assignResourceButtonRef = useRef<HTMLButtonElement>(null) as RefObject<HTMLButtonElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, nextCoachmark, clearJourney, isJourneyActive } = useJourney();\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const startJourney = useCallback(() => {\n // Check if elements are absent or journey was already completed for this class\n if (!assignResourceButtonRef?.current || isJourneyActive) return;\n\n const resourceAssignmentSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef:\n assignResourceButtonRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: 85,\n tooltipYCoOrdinates: 50,\n arrowSize: 10,\n position: 'bottom',\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Assign Extra Practice</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap here to assign a new activity.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, resourceAssignmentSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n nextCoachmark(journeyId);\n }, 100);\n\n timerRefs.current.push(delayBeforeStart);\n }, [handleEndJourney, isJourneyActive, journeyId, nextCoachmark, setJourney]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n assignResourceButtonRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useResourceAssignmentJourney };\n"],"names":["useResourceAssignmentJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","assignResourceButtonRef","useRef","timerRefs","setJourney","nextCoachmark","clearJourney","isJourneyActive","useJourney","handleEndJourney","useCallback","startJourney","resourceAssignmentSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","Text","Separator","delayBeforeStart","useEffect","useMemo"],"mappings":";;;;;;;;;AAmBA,MAAMA,IAA8D,CAAC,EAAE,YAAAC,QAAiB;AACtF,QAAMC,IAAYC,EAAmB,mCAG/BC,IAA0BC,EAA0B,IAAI,GACxDC,IAAYD,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAE,GAAY,eAAAC,GAAe,cAAAC,GAAc,iBAAAC,EAAA,IAAoBC,KAE/DC,IAAmBC,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAClBJ,KACFR;EAAA,GACV,CAACQ,GAAcR,CAAU,CAAC,GAEvBa,IAAeD,EAAY,MAAM;AAEjC,QAAA,EAACT,KAAA,QAAAA,EAAyB,YAAWM,EAAiB;AAE1D,UAAMK,IAAoD;AAAA,MACxD;AAAA,QACE,+BACEX;AAAA,QACF,oBAAsB,gBAAAY,EAAAC,GAAA,EAAA;AAAA,QACtB,MAAMC,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,OAAO;AAAA,UACP,UAAU;AAAA,UACV,qBAAqB;AAAA,UACrB,qBAAqB;AAAA,UACrB,WAAW;AAAA,UACX,UAAU;AAAA,UACV,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,aACE,gBAAAF;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,2BACGC,GACC,EAAA,UAAA;AAAA,gBAAC,gBAAAJ,EAAAK,GAAA,EAAK,WAAU,YAAW,UAAqB,yBAAA;AAAA,gBAChD,gBAAAL,EAACM,GAAU,EAAA,QAAQ,EAAG,CAAA;AAAA,gBACrB,gBAAAN,EAAAK,GAAA,EAAK,WAAU,OAAM,UAAkC,sCAAA;AAAA,cAAA,GAC1D;AAAA,cAEF,aAAY;AAAA,cACZ,eAAeT;AAAA,YAAA;AAAA,UACjB;AAAA,QAEJ;AAAA,MACF;AAAA,IAAA;AAGS,IAAAL,EAAAL,GAAWa,GAAyB,QAAW,EAAK;AAEzD,UAAAQ,IAAmB,WAAW,MAAM;AACxC,mBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UAC/Bf,EAAcN,CAAS;AAAA,OACtB,GAAG;AAEI,IAAAI,EAAA,QAAQ,KAAKiB,CAAgB;AAAA,EAAA,GACtC,CAACX,GAAkBF,GAAiBR,GAAWM,GAAeD,CAAU,CAAC;AAE5E,SAAAiB,EAAU,MACD,MAAM;AACX,IAAIf,KACWA;EACf,GAED,CAACA,CAAY,CAAC,GAEJgB;AAAA,IACX,OAAO;AAAA,MACL,yBAAArB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as e, Fragment as h, jsxs as T } from "react/jsx-runtime";
2
2
  import { useRef as d, useCallback as c, useEffect as C, useMemo as b } from "react";
3
- import { JOURNEY_ID_TEACHER as g } from "../../journey/journey-id/journey-id-teacher.js";
4
- import E from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
5
- import { IndicatorType as A } from "../../journey/use-journey/constants.js";
6
- import J from "../../ui/layout/flex-view.js";
7
- import I from "../../ui/separator/separator.js";
8
- import p from "../../ui/text/text.js";
9
- import { useJourney as O } from "../../journey/use-journey/use-journey.js";
3
+ import { JOURNEY_ID_TEACHER as g } from "../../journey-id/journey-id-teacher.js";
4
+ import E from "../use-home-page-journey/tooltip-item.js";
5
+ import { IndicatorType as A } from "../../use-journey/constants.js";
6
+ import J from "../../../ui/layout/flex-view.js";
7
+ import I from "../../../ui/separator/separator.js";
8
+ import p from "../../../ui/text/text.js";
9
+ import { useJourney as O } from "../../use-journey/use-journey.js";
10
10
  const j = ({ onComplete: n }) => {
11
11
  const r = g.TEST_CREATION_INTRO_JOURNEY, o = d(null), f = d([]), { setJourney: i, nextCoachmark: s, clearJourney: t, isJourneyActive: a } = O(), l = c(() => {
12
12
  document.body.style.overflow = "unset", t(), n();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-test-creation-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-test-creation-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseTestCreationJourney {\n (props: { onComplete: () => void }): {\n createTestButtonRef: RefObject<HTMLButtonElement>;\n startJourney: () => void;\n };\n}\n\nconst useTestCreationJourney: IUseTestCreationJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.TEST_CREATION_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const createTestButtonRef = useRef<HTMLButtonElement>(null) as RefObject<HTMLButtonElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, nextCoachmark, clearJourney, isJourneyActive } = useJourney();\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const startJourney = useCallback(() => {\n // Check if elements are absent or journey was already completed for this class\n if (!createTestButtonRef?.current || isJourneyActive) return;\n\n const testCreationSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: createTestButtonRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: 85,\n tooltipYCoOrdinates: 50,\n arrowSize: 10,\n position: 'bottom',\n backgroundColor: 'BLUE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Assign a test</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap here to assign a test.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, testCreationSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n nextCoachmark(journeyId);\n }, 100);\n\n timerRefs.current.push(delayBeforeStart);\n }, [handleEndJourney, isJourneyActive, journeyId, nextCoachmark, setJourney]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n createTestButtonRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useTestCreationJourney };\n"],"names":["useTestCreationJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","createTestButtonRef","useRef","timerRefs","setJourney","nextCoachmark","clearJourney","isJourneyActive","useJourney","handleEndJourney","useCallback","startJourney","testCreationSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","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AAW,MAAM;AACxC,mBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UAC/Bf,EAAcN,CAAS;AAAA,OACtB,GAAG;AAEI,IAAAI,EAAA,QAAQ,KAAKiB,CAAgB;AAAA,EAAA,GACtC,CAACX,GAAkBF,GAAiBR,GAAWM,GAAeD,CAAU,CAAC;AAE5E,SAAAiB,EAAU,MACD,MAAM;AACX,IAAIf,KACWA;EACf,GAED,CAACA,CAAY,CAAC,GAEJgB;AAAA,IACX,OAAO;AAAA,MACL,qBAAArB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -1,12 +1,12 @@
1
1
  import { jsx as r, Fragment as y, jsxs as T } from "react/jsx-runtime";
2
2
  import { useRef as c, useCallback as d, useEffect as E, useMemo as b } from "react";
3
- import C from "../../ui/layout/flex-view.js";
4
- import { JOURNEY_ID_TEACHER as O } from "../../journey/journey-id/journey-id-teacher.js";
5
- import { IndicatorType as g } from "../../journey/use-journey/constants.js";
6
- import w from "../../ui/separator/separator.js";
7
- import p from "../../ui/text/text.js";
8
- import J from "../../journey/hooks/use-home-page-journey/tooltip-item.js";
9
- import { useJourney as I } from "../../journey/use-journey/use-journey.js";
3
+ import C from "../../../ui/layout/flex-view.js";
4
+ import { JOURNEY_ID_TEACHER as O } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as g } from "../../use-journey/constants.js";
6
+ import w from "../../../ui/separator/separator.js";
7
+ import p from "../../../ui/text/text.js";
8
+ import J from "../use-home-page-journey/tooltip-item.js";
9
+ import { useJourney as I } from "../../use-journey/use-journey.js";
10
10
  const P = ({ onComplete: n }) => {
11
11
  const t = O.WORKSHEET_PREVIEW_INTRO_JOURNEY, o = c(null), f = c([]), { isJourneyActive: i, setJourney: s, clearJourney: e, nextCoachmark: a } = I(), l = d(() => {
12
12
  document.body.style.overflow = "unset", e(), n();
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-worksheet-preview-journey.js","sources":["../../../../../src/features/journey/hooks/use-learning-plan-journey/use-worksheet-preview-journey.tsx"],"sourcesContent":["import { useCallback, useEffect, useMemo, useRef, type RefObject } from 'react';\n\nimport type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport type { TCoachmarkJourneyProps } from '../../use-journey/journey-context-types';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\nimport { useJourney } from '../../use-journey/use-journey';\n\ninterface IUseWorksheetPreviewJourney {\n ({ onComplete }: { onComplete: () => void }): {\n worksheetBackIconRef: RefObject<SVGSVGElement>;\n startJourney: () => void;\n };\n}\n\nconst useWorksheetPreviewJourney: IUseWorksheetPreviewJourney = ({ onComplete }) => {\n const journeyId = JOURNEY_ID_TEACHER.WORKSHEET_PREVIEW_INTRO_JOURNEY;\n\n // Refs for elements to highlight\n const worksheetBackIconRef = useRef<SVGSVGElement>(null) as RefObject<SVGSVGElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { isJourneyActive, setJourney, clearJourney, nextCoachmark } = useJourney();\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n clearJourney();\n onComplete();\n }, [clearJourney, onComplete]);\n\n const startJourney = useCallback(() => {\n // Check if elements are absent or journey was already active for this class\n if (!worksheetBackIconRef?.current || isJourneyActive) return;\n\n const worksheetPreviewSteps: TCoachmarkJourneyProps[] = [\n {\n originalElementToHighlightRef: worksheetBackIconRef as unknown as RefObject<HTMLDivElement>,\n elementToHighlight: <></>,\n type: IndicatorType.TOOLTIP,\n indicator: {\n width: 264,\n renderAs: 'primary',\n tooltipXCoOrdinates: 125,\n tooltipYCoOrdinates: 30,\n arrowSize: 10,\n arrowXCoOrdinates: -115,\n position: 'bottom',\n backgroundColor: 'YELLOW_4',\n borderColor: 'BLACK',\n arrowColor: 'WHITE',\n tooltipItem: (\n <TooltipItem\n element={\n <FlexView>\n <Text $renderAs=\"ub3-bold\">Back to Chapters</Text>\n <Separator height={4} />\n <Text $renderAs=\"ub3\">Tap here to go back to chapters.</Text>\n </FlexView>\n }\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n },\n ];\n\n setJourney(journeyId, worksheetPreviewSteps, undefined, false);\n\n const delayBeforeStart = setTimeout(() => {\n clearTimeout(delayBeforeStart);\n document.body.style.overflow = 'hidden';\n nextCoachmark(journeyId);\n }, 500);\n\n timerRefs.current.push(delayBeforeStart);\n }, [isJourneyActive, handleEndJourney, setJourney, journeyId, nextCoachmark]);\n\n useEffect(() => {\n return () => {\n if (clearJourney) {\n clearJourney();\n }\n };\n }, [clearJourney]);\n\n const data = useMemo(\n () => ({\n worksheetBackIconRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useWorksheetPreviewJourney };\n"],"names":["useWorksheetPreviewJourney","onComplete","journeyId","JOURNEY_ID_TEACHER","worksheetBackIconRef","useRef","timerRefs","isJourneyActive","setJourney","clearJourney","nextCoachmark","useJourney","handleEndJourney","useCallback","startJourney","worksheetPreviewSteps","jsx","Fragment","IndicatorType","TooltipItem","FlexView","Text","Separator","delayBeforeStart","useEffect","useMemo"],"mappings":";;;;;;;;;AAmBA,MAAMA,IAA0D,CAAC,EAAE,YAAAC,QAAiB;AAClF,QAAMC,IAAYC,EAAmB,iCAG/BC,IAAuBC,EAAsB,IAAI,GACjDC,IAAYD,EAAwC,CAAA,CAAE,GAEtD,EAAE,iBAAAE,GAAiB,YAAAC,GAAY,cAAAC,GAAc,eAAAC,EAAA,IAAkBC,KAE/DC,IAAmBC,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAClBJ,KACFR;EAAA,GACV,CAACQ,GAAcR,CAA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,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -595,7 +595,7 @@ const e = {
595
595
  block_statement: "",
596
596
  chapter_code: "USCC.G1.ADDSUB",
597
597
  code: "USCC.G1.ADDSUB.V3.E1",
598
- block_id: "d87b6d6c-faa3-11eb-bd5f-fa7908af3c0r-block-7",
598
+ block_id: "d87b6d6c-faa3-11eb-bd5f-fa7908af3c0e-block-7",
599
599
  name: "Puzzles - Easy",
600
600
  permissions: {
601
601
  can_skip: !0,