@cuemath/leap 3.2.9-pzd-0.4 → 3.2.10-hg1

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 (148) hide show
  1. package/dist/assets/illustrations/illustrations.js +0 -1
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +0 -5
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +1 -2
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +4 -6
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +8 -10
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/auth/account-selector/account-selector.js +23 -22
  12. package/dist/features/auth/account-selector/account-selector.js.map +1 -1
  13. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +14 -13
  14. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  15. package/dist/features/auth/comps/user-list/user-item/user-item.js +30 -31
  16. package/dist/features/auth/comps/user-list/user-item/user-item.js.map +1 -1
  17. package/dist/features/auth/comps/user-list/user-list.js +35 -34
  18. package/dist/features/auth/comps/user-list/user-list.js.map +1 -1
  19. package/dist/features/auth/forgot-password/forgot-password-styled.js +14 -15
  20. package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
  21. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +6 -7
  22. package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
  23. package/dist/features/auth/login/login-styled.js +8 -9
  24. package/dist/features/auth/login/login-styled.js.map +1 -1
  25. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +118 -95
  26. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  27. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js +29 -28
  28. package/dist/features/circle-games/game-launcher/hooks/use-table-infinite-launcher-journey/use-table-infinite-launcher-journey.js.map +1 -1
  29. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js +43 -42
  30. package/dist/features/circle-games/game-launcher/hooks/use-table-launcher-journey/use-table-launcher-journey.js.map +1 -1
  31. package/dist/features/circle-games/games/tutorial/tutorial.js +43 -35
  32. package/dist/features/circle-games/games/tutorial/tutorial.js.map +1 -1
  33. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js +26 -24
  34. package/dist/features/circle-games/sign-up/comp/username-input/username-input.js.map +1 -1
  35. package/dist/features/communication/pub-sub/constants.js +4 -7
  36. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  37. package/dist/features/homework/homework-card-view.js +97 -85
  38. package/dist/features/homework/homework-card-view.js.map +1 -1
  39. package/dist/features/homework/homework-card.js +42 -44
  40. package/dist/features/homework/homework-card.js.map +1 -1
  41. package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
  42. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  43. package/dist/features/homework/hw-card-list/hw-card-list.js +50 -57
  44. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  45. package/dist/features/homework/utils.js +27 -33
  46. package/dist/features/homework/utils.js.map +1 -1
  47. package/dist/features/journey/comps/coachmark/coachmark.js +18 -17
  48. package/dist/features/journey/comps/coachmark/coachmark.js.map +1 -1
  49. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
  50. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  51. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  52. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  53. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  54. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  55. package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
  56. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  57. package/dist/features/puzzles/comps/puzzle-card.js +30 -72
  58. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  59. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
  60. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  61. package/dist/features/puzzles/puzzle-container/puzzle-container.js +108 -93
  62. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  63. package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
  64. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  65. package/dist/features/ui/sticker-grid/sticker-grid-styles.js +86 -0
  66. package/dist/features/ui/sticker-grid/sticker-grid-styles.js.map +1 -0
  67. package/dist/features/ui/sticker-grid/sticker-grid.js +24 -0
  68. package/dist/features/ui/sticker-grid/sticker-grid.js.map +1 -0
  69. package/dist/features/ui/sticker-grid/sticker.js +57 -0
  70. package/dist/features/ui/sticker-grid/sticker.js.map +1 -0
  71. package/dist/features/ui/stickers/constants.js +6 -0
  72. package/dist/features/ui/stickers/constants.js.map +1 -0
  73. package/dist/features/ui/stickers/stickers-effects.js +64 -0
  74. package/dist/features/ui/stickers/stickers-effects.js.map +1 -0
  75. package/dist/features/ui/stickers/stickers-styled.js +29 -0
  76. package/dist/features/ui/stickers/stickers-styled.js.map +1 -0
  77. package/dist/features/ui/stickers/stickers-utils.js +91 -0
  78. package/dist/features/ui/stickers/stickers-utils.js.map +1 -0
  79. package/dist/features/ui/stickers/stickers.js +40 -0
  80. package/dist/features/ui/stickers/stickers.js.map +1 -0
  81. package/dist/features/ui/text/text.js +40 -36
  82. package/dist/features/ui/text/text.js.map +1 -1
  83. package/dist/features/ui/theme/constants.js +4 -2
  84. package/dist/features/ui/theme/constants.js.map +1 -1
  85. package/dist/features/ui/theme/get-device.js +3 -3
  86. package/dist/features/ui/theme/get-device.js.map +1 -1
  87. package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
  88. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  89. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +25 -29
  90. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  91. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -97
  92. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  93. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
  94. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  95. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
  96. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  97. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
  98. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  99. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  100. package/dist/features/worksheet/worksheet/worksheet.js +313 -307
  101. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  102. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  103. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  104. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
  105. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  106. package/dist/index.d.ts +45 -99
  107. package/dist/index.js +397 -403
  108. package/dist/index.js.map +1 -1
  109. package/package.json +1 -1
  110. package/dist/features/hooks/use-viewport/use-viewport.js +0 -22
  111. package/dist/features/hooks/use-viewport/use-viewport.js.map +0 -1
  112. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
  113. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
  114. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
  115. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
  116. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
  117. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
  118. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
  119. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
  120. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
  121. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
  122. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
  123. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
  124. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
  125. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
  126. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
  127. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
  128. package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
  129. package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
  130. package/dist/features/puzzles/constants/puzzle-container.js +0 -8
  131. package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
  132. package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
  133. package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
  134. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
  135. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
  136. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
  137. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
  138. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
  139. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
  140. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
  141. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
  142. package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
  143. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
  144. package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
  145. package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
  146. package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
  147. package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
  148. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,70 +0,0 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { useRef as u, useCallback as r, useMemo as p } from "react";
3
- import h from "../../../ui/layout/flex-view.js";
4
- import y from "../../../ui/text/text.js";
5
- import { JOURNEY_ID_TEACHER as C } from "../../journey-id/journey-id-teacher.js";
6
- import { IndicatorType as T } from "../../use-journey/constants.js";
7
- import { useJourney as g } from "../../use-journey/use-journey.js";
8
- import E from "../use-home-page-journey/tooltip-item.js";
9
- const $ = () => {
10
- const e = C.PUZZLE_ASSIGN_JOURNEY, o = u(null), d = u([]), { setJourney: n, endJourney: i, nextCoachmark: s } = g(), l = r(() => {
11
- s(e, !1, 0, !1);
12
- }, [e, s]), a = r(() => {
13
- document.body.style.overflow = "unset", i(e);
14
- }, [i, e]), c = r(() => {
15
- if (!(o != null && o.current))
16
- return;
17
- const f = [
18
- {
19
- originalElementToHighlightRef: o,
20
- elementToHighlight: /* @__PURE__ */ t(
21
- h,
22
- {
23
- $widthX: 2.75,
24
- $flexDirection: "row",
25
- $background: "WHITE",
26
- $justifyContent: "center",
27
- $alignItems: "center",
28
- children: /* @__PURE__ */ t(y, { $renderAs: "ub2", children: "Home" })
29
- }
30
- ),
31
- type: T.TOOLTIP,
32
- indicator: {
33
- renderAs: "primary",
34
- tooltipXCoOrdinates: 100,
35
- arrowSize: 12,
36
- arrowXCoOrdinates: -100,
37
- position: "bottom",
38
- backgroundColor: "GREEN_4",
39
- borderColor: "BLACK",
40
- arrowColor: "BLACK",
41
- tooltipItem: /* @__PURE__ */ t(
42
- E,
43
- {
44
- text: "Puzzle assigned as homework. Discuss it in the next class.",
45
- buttonLabel: "Got it",
46
- onButtonClick: a
47
- }
48
- )
49
- },
50
- isActive: !1
51
- }
52
- ];
53
- n(e, f);
54
- const m = setTimeout(() => {
55
- clearTimeout(m), document.body.style.overflow = "hidden", l();
56
- }, 500);
57
- d.current.push(m);
58
- }, [a, l, e, n]);
59
- return p(
60
- () => ({
61
- puzzleHomeTabRef: o,
62
- startJourney: c
63
- }),
64
- [c]
65
- );
66
- };
67
- export {
68
- $ as useTeacherPuzzleAssignedJourney
69
- };
70
- //# sourceMappingURL=use-teacher-puzzle-assigned-journey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-teacher-puzzle-assigned-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.tsx"],"sourcesContent":["import type { IArrowTooltipProps } from '../../../ui/arrow-tooltip/arrow-tooltip-types';\nimport type { ICoachmarkProps } from '../../use-journey/journey-context-types';\n\nimport { useCallback, useMemo, useRef } from 'react';\n\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\nimport { JOURNEY_ID_TEACHER } from '../../journey-id/journey-id-teacher';\nimport { IndicatorType } from '../../use-journey/constants';\nimport { useJourney } from '../../use-journey/use-journey';\nimport TooltipItem from '../use-home-page-journey/tooltip-item';\n\nconst useTeacherPuzzleAssignedJourney = () => {\n const journeyId = JOURNEY_ID_TEACHER.PUZZLE_ASSIGN_JOURNEY;\n\n const puzzleHomeTabRef = useRef<HTMLDivElement>(null) as React.RefObject<HTMLDivElement>;\n const timerRefs = useRef<ReturnType<typeof setTimeout>[]>([]);\n\n const { setJourney, endJourney, nextCoachmark } = useJourney();\n\n const handleNextCoachMark = useCallback(() => {\n nextCoachmark(journeyId, false, 0, false);\n }, [journeyId, nextCoachmark]);\n\n const handleEndJourney = useCallback(() => {\n document.body.style.overflow = 'unset';\n endJourney(journeyId);\n }, [endJourney, journeyId]);\n\n const startJourney = useCallback(() => {\n if (!puzzleHomeTabRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleHomeTabRef,\n elementToHighlight: (\n <FlexView\n $widthX={2.75}\n $flexDirection=\"row\"\n $background=\"WHITE\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub2\">Home</Text>\n </FlexView>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: 100,\n arrowSize: 12,\n arrowXCoOrdinates: -100,\n position: 'bottom',\n backgroundColor: 'GREEN_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text=\"Puzzle assigned as homework. Discuss it in the next class.\"\n buttonLabel=\"Got it\"\n onButtonClick={handleEndJourney}\n />\n ),\n } as IArrowTooltipProps,\n isActive: false,\n },\n ];\n\n setJourney(journeyId, puzzleAttemptSteps);\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, journeyId, setJourney]);\n\n const data = useMemo(\n () => ({\n puzzleHomeTabRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { useTeacherPuzzleAssignedJourney };\n"],"names":["useTeacherPuzzleAssignedJourney","journeyId","JOURNEY_ID_TEACHER","puzzleHomeTabRef","useRef","timerRefs","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","startJourney","puzzleAttemptSteps","jsx","FlexView","Text","IndicatorType","TooltipItem","delayBeforeStart","useMemo"],"mappings":";;;;;;;;AAYA,MAAMA,IAAkC,MAAM;AAC5C,QAAMC,IAAYC,EAAmB,uBAE/BC,IAAmBC,EAAuB,IAAI,GAC9CC,IAAYD,EAAwC,CAAA,CAAE,GAEtD,EAAE,YAAAE,GAAY,YAAAC,GAAY,eAAAC,MAAkBC,EAAW,GAEvDC,IAAsBC,EAAY,MAAM;AAC9B,IAAAH,EAAAP,GAAW,IAAO,GAAG,EAAK;AAAA,EAAA,GACvC,CAACA,GAAWO,CAAa,CAAC,GAEvBI,IAAmBD,EAAY,MAAM;AAChC,aAAA,KAAK,MAAM,WAAW,SAC/BJ,EAAWN,CAAS;AAAA,EAAA,GACnB,CAACM,GAAYN,CAAS,CAAC,GAEpBY,IAAeF,EAAY,MAAM;AACjC,QAAA,EAACR,KAAA,QAAAA,EAAkB;AACrB;AAGF,UAAMW,IAAwC;AAAA,MAC5C;AAAA,QACE,+BAA+BX;AAAA,QAC/B,oBACE,gBAAAY;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAAS;AAAA,YACT,gBAAe;AAAA,YACf,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,aAAY;AAAA,YAEZ,UAAC,gBAAAD,EAAAE,GAAA,EAAK,WAAU,OAAM,UAAI,QAAA;AAAA,UAAA;AAAA,QAC5B;AAAA,QAEF,MAAMC,EAAc;AAAA,QACpB,WAAW;AAAA,UACT,UAAU;AAAA,UACV,qBAAqB;AAAA,UACrB,WAAW;AAAA,UACX,mBAAmB;AAAA,UACnB,UAAU;AAAA,UACV,iBAAiB;AAAA,UACjB,aAAa;AAAA,UACb,YAAY;AAAA,UACZ,aACE,gBAAAH;AAAA,YAACI;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,aAAY;AAAA,cACZ,eAAeP;AAAA,YAAA;AAAA,UACjB;AAAA,QAEJ;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IAAA;AAGF,IAAAN,EAAWL,GAAWa,CAAkB;AAElC,UAAAM,IAAmB,WAAW,MAAM;AACxC,mBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UACXV;OACnB,GAAG;AAEI,IAAAL,EAAA,QAAQ,KAAKe,CAAgB;AAAA,KACtC,CAACR,GAAkBF,GAAqBT,GAAWK,CAAU,CAAC;AAU1D,SARMe;AAAA,IACX,OAAO;AAAA,MACL,kBAAAlB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -1,10 +0,0 @@
1
- import { createGetAPI as s } from "@cuemath/rest-api";
2
- import { BASE_URL_V3 as r } from "../../../constants/api.js";
3
- const { useGet: a, invalidate: z } = s({
4
- getURL: (e, o, { courseStream: t }) => `${r}/users/${e}/course-streams/${t}/puzzles-history/`
5
- });
6
- export {
7
- z as invalidateGetPuzzles,
8
- a as useGetPuzzles
9
- };
10
- //# sourceMappingURL=puzzle-dashboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"puzzle-dashboard.js","sources":["../../../../src/features/puzzles/api/puzzle-dashboard.ts"],"sourcesContent":["import type { TCourseStream } from '../../milestone/create/milestone-create-types';\nimport type { IPuzzleCardAssignData } from '../puzzle-container/puzzle-container-types';\n\nimport { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../constants/api';\n\nconst { useGet: useGetPuzzles, invalidate: invalidateGetPuzzles } = createGetAPI<\n IPuzzleCardAssignData[],\n void,\n { courseStream: TCourseStream }\n>({\n getURL: (studentId, _, { courseStream }) =>\n `${BASE_URL_V3}/users/${studentId}/course-streams/${courseStream}/puzzles-history/`,\n});\n\nexport { useGetPuzzles, invalidateGetPuzzles };\n"],"names":["useGetPuzzles","invalidateGetPuzzles","createGetAPI","studentId","_","courseStream","BASE_URL_V3"],"mappings":";;AAOA,MAAM,EAAE,QAAQA,GAAe,YAAYC,EAAA,IAAyBC,EAIlE;AAAA,EACA,QAAQ,CAACC,GAAWC,GAAG,EAAE,cAAAC,EAAA,MACvB,GAAGC,CAAW,UAAUH,CAAS,mBAAmBE,CAAY;AACpE,CAAC;"}
@@ -1,8 +0,0 @@
1
- const A = {
2
- REVEAL: [0, 50],
3
- REVEAL_ASSIGNED: [58, 160]
4
- };
5
- export {
6
- A as PUZZLE_ASSIGN_ANIMATION
7
- };
8
- //# sourceMappingURL=puzzle-container.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"puzzle-container.js","sources":["../../../../src/features/puzzles/constants/puzzle-container.ts"],"sourcesContent":["import type { AnimationSegment } from 'lottie-web';\n\nexport const PUZZLE_ASSIGN_ANIMATION = {\n REVEAL: [0, 50] as AnimationSegment,\n REVEAL_ASSIGNED: [58, 160] as AnimationSegment,\n};\n"],"names":["PUZZLE_ASSIGN_ANIMATION"],"mappings":"AAEO,MAAMA,IAA0B;AAAA,EACrC,QAAQ,CAAC,GAAG,EAAE;AAAA,EACd,iBAAiB,CAAC,IAAI,GAAG;AAC3B;"}
@@ -1,11 +0,0 @@
1
- import { PLUGINS as z } from "../../node_modules/@cuemath/analytics-v2/dist/constants.js";
2
- var E = /* @__PURE__ */ ((e) => (e.PUZZLE_ASSIGNED = "puzzle_assigned", e.PUZZLE_VIEWED = "puzzle_viewed", e))(E || {});
3
- const _ = {
4
- puzzle_viewed: [z.MIXPANEL],
5
- puzzle_assigned: [z.MIXPANEL]
6
- };
7
- export {
8
- E as PUZZLE_ANALYTICS_EVENTS,
9
- _ as PUZZLE_ANALYTICS_WHITELIST_EVENTS
10
- };
11
- //# sourceMappingURL=puzzle-analytics-events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"puzzle-analytics-events.js","sources":["../../../src/features/puzzles/puzzle-analytics-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum PUZZLE_ANALYTICS_EVENTS {\n PUZZLE_ASSIGNED = 'puzzle_assigned',\n PUZZLE_VIEWED = 'puzzle_viewed',\n}\n\nexport const PUZZLE_ANALYTICS_WHITELIST_EVENTS = {\n [PUZZLE_ANALYTICS_EVENTS.PUZZLE_VIEWED]: [PLUGINS.MIXPANEL],\n [PUZZLE_ANALYTICS_EVENTS.PUZZLE_ASSIGNED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["PUZZLE_ANALYTICS_EVENTS","PUZZLE_ANALYTICS_WHITELIST_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,kBAAkB,mBAClBA,EAAA,gBAAgB,iBAFNA,IAAAA,KAAA,CAAA,CAAA;AAKL,MAAMC,IAAoC;AAAA,EAC9C,eAAwC,CAACC,EAAQ,QAAQ;AAAA,EACzD,iBAA0C,CAACA,EAAQ,QAAQ;AAC9D;"}
@@ -1,55 +0,0 @@
1
- import { jsxs as i, Fragment as $, jsx as e } from "react/jsx-runtime";
2
- import { memo as d } from "react";
3
- import m from "../../ui/buttons/clickable/clickable.js";
4
- import u from "../../ui/image/image.js";
5
- import t from "../../ui/text/text.js";
6
- import { PuzzleContent as g, AssignedTag as h, PuzzleButton as p } from "./puzzle-container-styled.js";
7
- const k = d(
8
- ({ handleOnPuzzleClick: l, imageUrl: o, title: c, handleAssign: a, assigned: r, assigning: n, analyticsProps: s }) => /* @__PURE__ */ i($, { children: [
9
- /* @__PURE__ */ i(
10
- g,
11
- {
12
- $justifyContent: "center",
13
- $alignItems: "center",
14
- onClick: l,
15
- title: "Click to preview",
16
- $flexGapX: 1.5,
17
- $assigned: r,
18
- $gutterX: 1,
19
- children: [
20
- /* @__PURE__ */ e(u, { width: 136, height: 136, src: o, withLoader: !1, alt: "Puzzle" }),
21
- /* @__PURE__ */ e(t, { $renderAs: "h4", $align: "center", children: c }),
22
- r && /* @__PURE__ */ e(h, { $gap: 4, $gutter: 8, $background: "BLACK_1", children: /* @__PURE__ */ e(t, { $renderAs: "ac4", $color: "WHITE_1", children: "Assigned" }) })
23
- ]
24
- }
25
- ),
26
- /* @__PURE__ */ e(
27
- m,
28
- {
29
- onClick: a,
30
- label: "",
31
- analyticsLabel: "puzzle_assigned",
32
- disabled: r || n,
33
- analyticsProps: s,
34
- children: /* @__PURE__ */ e(
35
- p,
36
- {
37
- $background: "BLACK_1",
38
- $widthX: 15.75,
39
- $alignItems: "center",
40
- $justifyContent: "center",
41
- $gapX: 0.75,
42
- $gutterX: 1,
43
- $assigned: r,
44
- $assigning: n,
45
- children: /* @__PURE__ */ e(t, { $renderAs: "ub1-bold", $color: r ? "BLACK_T_38" : "WHITE_1", children: r ? "Discuss in next class" : "Assign" })
46
- }
47
- )
48
- }
49
- )
50
- ] })
51
- );
52
- export {
53
- k as default
54
- };
55
- //# sourceMappingURL=puzzle-container-view.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"puzzle-container-view.js","sources":["../../../../src/features/puzzles/puzzle-container/puzzle-container-view.tsx"],"sourcesContent":["import type { IPuzzleContainerViewProps } from './puzzle-container-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport Image from '../../ui/image/image';\nimport Text from '../../ui/text/text';\nimport * as Styled from './puzzle-container-styled';\n\nconst PuzzleContainerView: FC<IPuzzleContainerViewProps> = memo(\n ({ handleOnPuzzleClick, imageUrl, title, handleAssign, assigned, assigning, analyticsProps }) => {\n return (\n <>\n <Styled.PuzzleContent\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleOnPuzzleClick}\n title=\"Click to preview\"\n $flexGapX={1.5}\n $assigned={assigned}\n $gutterX={1}\n >\n <Image width={136} height={136} src={imageUrl} withLoader={false} alt=\"Puzzle\" />\n <Text $renderAs=\"h4\" $align=\"center\">\n {title}\n </Text>\n\n {assigned && (\n <Styled.AssignedTag $gap={4} $gutter={8} $background=\"BLACK_1\">\n <Text $renderAs=\"ac4\" $color=\"WHITE_1\">\n Assigned\n </Text>\n </Styled.AssignedTag>\n )}\n </Styled.PuzzleContent>\n\n <Clickable\n onClick={handleAssign}\n label=\"\"\n analyticsLabel=\"puzzle_assigned\"\n disabled={assigned || assigning}\n analyticsProps={analyticsProps}\n >\n <Styled.PuzzleButton\n $background=\"BLACK_1\"\n $widthX={15.75}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $gapX={0.75}\n $gutterX={1}\n $assigned={assigned}\n $assigning={assigning}\n >\n <Text $renderAs=\"ub1-bold\" $color={assigned ? 'BLACK_T_38' : 'WHITE_1'}>\n {assigned ? 'Discuss in next class' : 'Assign'}\n </Text>\n </Styled.PuzzleButton>\n </Clickable>\n </>\n );\n },\n);\n\nexport default PuzzleContainerView;\n"],"names":["PuzzleContainerView","memo","handleOnPuzzleClick","imageUrl","title","handleAssign","assigned","assigning","analyticsProps","jsxs","Fragment","Styled.PuzzleContent","jsx","Image","Text","Styled.AssignedTag","Clickable","Styled.PuzzleButton"],"mappings":";;;;;;AAUA,MAAMA,IAAqDC;AAAA,EACzD,CAAC,EAAE,qBAAAC,GAAqB,UAAAC,GAAU,OAAAC,GAAO,cAAAC,GAAc,UAAAC,GAAU,WAAAC,GAAW,gBAAAC,QAGtE,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAA,gBAAAD;AAAA,MAACE;AAAAA,MAAA;AAAA,QACC,iBAAgB;AAAA,QAChB,aAAY;AAAA,QACZ,SAAST;AAAA,QACT,OAAM;AAAA,QACN,WAAW;AAAA,QACX,WAAWI;AAAA,QACX,UAAU;AAAA,QAEV,UAAA;AAAA,UAAC,gBAAAM,EAAAC,GAAA,EAAM,OAAO,KAAK,QAAQ,KAAK,KAAKV,GAAU,YAAY,IAAO,KAAI,SAAS,CAAA;AAAA,4BAC9EW,GAAK,EAAA,WAAU,MAAK,QAAO,UACzB,UACHV,GAAA;AAAA,UAECE,KACE,gBAAAM,EAAAG,GAAA,EAAmB,MAAM,GAAG,SAAS,GAAG,aAAY,WACnD,4BAACD,GAAK,EAAA,WAAU,OAAM,QAAO,WAAU,qBAEvC,CAAA,GACF;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,IAEA,gBAAAF;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,SAASX;AAAA,QACT,OAAM;AAAA,QACN,gBAAe;AAAA,QACf,UAAUC,KAAYC;AAAA,QACtB,gBAAAC;AAAA,QAEA,UAAA,gBAAAI;AAAA,UAACK;AAAAA,UAAA;AAAA,YACC,aAAY;AAAA,YACZ,SAAS;AAAA,YACT,aAAY;AAAA,YACZ,iBAAgB;AAAA,YAChB,OAAO;AAAA,YACP,UAAU;AAAA,YACV,WAAWX;AAAA,YACX,YAAYC;AAAA,YAEZ,UAAA,gBAAAK,EAACE,GAAK,EAAA,WAAU,YAAW,QAAQR,IAAW,eAAe,WAC1D,UAAWA,IAAA,0BAA0B,SACxC,CAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EACF,EAAA,CAAA;AAGN;"}
@@ -1,37 +0,0 @@
1
- import o from "styled-components";
2
- import { ILLUSTRATIONS as t } from "../../../assets/illustrations/illustrations.js";
3
- import e from "../../../assets/line-icons/icons/puzzle2.js";
4
- import p from "../../ui/layout/flex-view.js";
5
- const s = o(p)``, l = o(p)`
6
- background-image: url(${t.PUZZLE_DASHBOARD_BANNER});
7
- background-size: cover;
8
- `, d = o(p)`
9
- position: absolute;
10
- top: 16px;
11
- left: 16px;
12
- `, m = o(p)`
13
- position: sticky;
14
- top: 16px;
15
- z-index: 5;
16
- `, u = o.div`
17
- display: grid;
18
- width: 100%;
19
- grid-template-columns: repeat(5, 1fr);
20
- column-gap: 24px;
21
- row-gap: 40px;
22
- padding: 0 37px;
23
- `, x = o(e)`
24
- path {
25
- stroke: ${({ theme: r }) => r.colors.BLACK_T_60};
26
- opacity: 0.38;
27
- }
28
- `;
29
- export {
30
- d as BackIconContainer,
31
- m as BackIconWrapper,
32
- l as BannerWrapper,
33
- u as ContentWrapper,
34
- s as PuzzleDashboardWrapper,
35
- x as StyledPuzzleIcon
36
- };
37
- //# sourceMappingURL=puzzle-dashboard-styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"puzzle-dashboard-styled.js","sources":["../../../../src/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { ILLUSTRATIONS } from '../../../assets/illustrations/illustrations';\nimport PuzzleIcon2 from '../../../assets/line-icons/icons/puzzle2';\nimport FlexView from '../../ui/layout/flex-view';\n\nconst PuzzleDashboardWrapper = styled(FlexView)``;\n\nconst BannerWrapper = styled(FlexView)`\n background-image: url(${ILLUSTRATIONS.PUZZLE_DASHBOARD_BANNER});\n background-size: cover;\n`;\n\nconst BackIconContainer = styled(FlexView)`\n position: absolute;\n top: 16px;\n left: 16px;\n`;\n\nconst BackIconWrapper = styled(FlexView)`\n position: sticky;\n top: 16px;\n z-index: 5;\n`;\n\nconst ContentWrapper = styled.div`\n display: grid;\n width: 100%;\n grid-template-columns: repeat(5, 1fr);\n column-gap: 24px;\n row-gap: 40px;\n padding: 0 37px;\n`;\n\nconst StyledPuzzleIcon = styled(PuzzleIcon2)`\n path {\n stroke: ${({ theme }) => theme.colors.BLACK_T_60};\n opacity: 0.38;\n }\n`;\n\nexport {\n PuzzleDashboardWrapper,\n BannerWrapper,\n BackIconContainer,\n BackIconWrapper,\n ContentWrapper,\n StyledPuzzleIcon,\n};\n"],"names":["PuzzleDashboardWrapper","styled","FlexView","BannerWrapper","ILLUSTRATIONS","BackIconContainer","BackIconWrapper","ContentWrapper","StyledPuzzleIcon","PuzzleIcon2","theme"],"mappings":";;;;AAMM,MAAAA,IAAyBC,EAAOC,CAAQ,KAExCC,IAAgBF,EAAOC,CAAQ;AAAA,0BACXE,EAAc,uBAAuB;AAAA;AAAA,GAIzDC,IAAoBJ,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMnCI,IAAkBL,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,GAMjCK,IAAiBN,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASxBO,IAAmBP,EAAOQ,CAAW;AAAA;AAAA,cAE7B,CAAC,EAAE,OAAAC,EAAA,MAAYA,EAAM,OAAO,UAAU;AAAA;AAAA;AAAA;"}
@@ -1,110 +0,0 @@
1
- import { jsx as e, jsxs as n } from "react/jsx-runtime";
2
- import { useCallback as w, useEffect as P } from "react";
3
- import _ from "../../../assets/line-icons/icons/back2.js";
4
- import x from "../../ui/buttons/button/button.js";
5
- import y from "../../ui/buttons/icon-button/icon-button.js";
6
- import t from "../../ui/layout/flex-view.js";
7
- import A from "../../ui/loader/app-loader/app-loader.js";
8
- import i from "../../ui/text/text.js";
9
- import { useGetPuzzles as I } from "../api/puzzle-dashboard.js";
10
- import X from "../comps/puzzle-card.js";
11
- import { PuzzleDashboardWrapper as j, BannerWrapper as B, BackIconContainer as k, BackIconWrapper as T, StyledPuzzleIcon as v, ContentWrapper as S } from "./puzzle-dashboard-styled.js";
12
- const W = ({ studentId: o, onBackCLick: s, onCardClick: d }) => {
13
- const {
14
- get: c,
15
- data: r,
16
- isProcessing: h,
17
- isProcessingFailed: m
18
- } = I(), l = (r == null ? void 0 : r.length) || 0, a = w(() => {
19
- c(o, void 0, {
20
- courseStream: "MATH"
21
- });
22
- }, [c, o]);
23
- return P(() => {
24
- a();
25
- }, [a]), h ? /* @__PURE__ */ e(A, { height: "100vh" }) : m ? /* @__PURE__ */ n(t, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
26
- /* @__PURE__ */ e(i, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
27
- /* @__PURE__ */ e(
28
- x,
29
- {
30
- widthX: 14,
31
- size: "small",
32
- shape: "square",
33
- renderAs: "primary",
34
- label: "Try again",
35
- onClick: a
36
- }
37
- )
38
- ] }) : /* @__PURE__ */ n(
39
- j,
40
- {
41
- $alignItems: "center",
42
- $flexGapX: l === 0 ? 10 : 2.5,
43
- $position: "relative",
44
- children: [
45
- /* @__PURE__ */ n(B, { $widthX: 50, $heightX: 10.5, $justifyContent: "center", children: [
46
- /* @__PURE__ */ n(i, { $renderAs: "ah3-bold", $alignSelf: "center", children: [
47
- l,
48
- " Puzzles Solved"
49
- ] }),
50
- s && /* @__PURE__ */ e(k, { $height: "100%", children: /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(
51
- y,
52
- {
53
- Icon: _,
54
- size: "xsmall",
55
- renderAs: "secondary",
56
- analyticsLabel: "puzzle_back",
57
- onClick: s
58
- }
59
- ) }) })
60
- ] }),
61
- l === 0 ? /* @__PURE__ */ n(t, { $flexGapX: 1, $justifyContent: "center", children: [
62
- /* @__PURE__ */ e(
63
- t,
64
- {
65
- $flexDirection: "row",
66
- $alignItems: "center",
67
- $justifyContent: "center",
68
- $width: "100%",
69
- children: /* @__PURE__ */ e(t, { $widthX: 3.5, $heightX: 3.5, $background: "WHITE_4", children: /* @__PURE__ */ e(v, { width: 56, height: 56 }) })
70
- }
71
- ),
72
- /* @__PURE__ */ n(t, { $justifyContent: "center", children: [
73
- /* @__PURE__ */ e(i, { $renderAs: "ab2-bold", $color: "BLACK_T_60", $align: "center", children: "No puzzle assigned yet!" }),
74
- /* @__PURE__ */ e(i, { $renderAs: "ab2-bold", $color: "BLACK_T_60", children: "Hang tight — your tutor will share one soon! 🎉🧩" })
75
- ] })
76
- ] }) : /* @__PURE__ */ e(S, { children: r == null ? void 0 : r.map((u) => {
77
- const {
78
- id: p,
79
- image_hue: $,
80
- image_url: g,
81
- title: f,
82
- user_node_id: z,
83
- rewards: b,
84
- node_id: C
85
- } = u;
86
- return /* @__PURE__ */ e(
87
- X,
88
- {
89
- imageHue: $,
90
- imageUrl: g,
91
- title: f,
92
- width: 126,
93
- height: 152,
94
- onCardClick: d,
95
- userNodeId: z,
96
- rewards: b,
97
- nodeId: C,
98
- studentId: o
99
- },
100
- p
101
- );
102
- }) })
103
- ]
104
- }
105
- );
106
- }, U = W;
107
- export {
108
- U as default
109
- };
110
- //# sourceMappingURL=puzzle-dashboard.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"puzzle-dashboard.js","sources":["../../../../src/features/puzzles/puzzle-dashboard/puzzle-dashboard.tsx"],"sourcesContent":["import type { IPuzzleDashboardProps } from './puzzle-dashboard-types';\n\nimport { useCallback, useEffect, type FC } from 'react';\n\nimport Back2Icon from '../../../assets/line-icons/icons/back2';\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 { useGetPuzzles } from '../api/puzzle-dashboard';\nimport PuzzleCard from '../comps/puzzle-card';\nimport * as Styled from './puzzle-dashboard-styled';\n\nconst PuzzleDashboard: FC<IPuzzleDashboardProps> = ({ studentId, onBackCLick, onCardClick }) => {\n const {\n get: getPuzzles,\n data: puzzleHistoryData,\n isProcessing,\n isProcessingFailed,\n } = useGetPuzzles();\n\n const puzzleCount = puzzleHistoryData?.length || 0;\n\n const fetchPuzzles = useCallback(() => {\n getPuzzles(studentId, undefined, {\n courseStream: 'MATH',\n });\n }, [getPuzzles, studentId]);\n\n useEffect(() => {\n fetchPuzzles();\n }, [fetchPuzzles]);\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\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={fetchPuzzles}\n />\n </FlexView>\n );\n }\n\n return (\n <Styled.PuzzleDashboardWrapper\n $alignItems=\"center\"\n $flexGapX={puzzleCount === 0 ? 10 : 2.5}\n $position=\"relative\"\n >\n <Styled.BannerWrapper $widthX={50} $heightX={10.5} $justifyContent=\"center\">\n <Text $renderAs=\"ah3-bold\" $alignSelf=\"center\">\n {puzzleCount} Puzzles Solved\n </Text>\n\n {onBackCLick && (\n <Styled.BackIconContainer $height=\"100%\">\n <Styled.BackIconWrapper>\n <IconButton\n Icon={Back2Icon}\n size=\"xsmall\"\n renderAs=\"secondary\"\n analyticsLabel=\"puzzle_back\"\n onClick={onBackCLick}\n />\n </Styled.BackIconWrapper>\n </Styled.BackIconContainer>\n )}\n </Styled.BannerWrapper>\n\n {puzzleCount === 0 ? (\n <FlexView $flexGapX={1} $justifyContent=\"center\">\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $width=\"100%\"\n >\n <FlexView $widthX={3.5} $heightX={3.5} $background=\"WHITE_4\">\n <Styled.StyledPuzzleIcon width={56} height={56} />\n </FlexView>\n </FlexView>\n\n <FlexView $justifyContent=\"center\">\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_60\" $align=\"center\">\n No puzzle assigned yet!\n </Text>\n <Text $renderAs=\"ab2-bold\" $color=\"BLACK_T_60\">\n Hang tight — your tutor will share one soon! 🎉🧩\n </Text>\n </FlexView>\n </FlexView>\n ) : (\n <Styled.ContentWrapper>\n {puzzleHistoryData?.map(item => {\n const {\n id,\n image_hue: imageHue,\n image_url: imageUrl,\n title,\n user_node_id: userNodeId,\n rewards,\n node_id: nodeId,\n } = item;\n\n return (\n <PuzzleCard\n key={id}\n imageHue={imageHue}\n imageUrl={imageUrl}\n title={title}\n width={126}\n height={152}\n onCardClick={onCardClick}\n userNodeId={userNodeId}\n rewards={rewards}\n nodeId={nodeId}\n studentId={studentId}\n />\n );\n })}\n </Styled.ContentWrapper>\n )}\n </Styled.PuzzleDashboardWrapper>\n );\n};\n\nexport default PuzzleDashboard;\n"],"names":["PuzzleDashboard","studentId","onBackCLick","onCardClick","getPuzzles","puzzleHistoryData","isProcessing","isProcessingFailed","useGetPuzzles","puzzleCount","fetchPuzzles","useCallback","useEffect","jsx","AppLoader","jsxs","FlexView","Text","Button","Styled.PuzzleDashboardWrapper","Styled.BannerWrapper","Styled.BackIconContainer","Styled.BackIconWrapper","IconButton","Back2Icon","Styled.StyledPuzzleIcon","Styled.ContentWrapper","item","id","imageHue","imageUrl","title","userNodeId","rewards","nodeId","PuzzleCard","PuzzleDashboard$1"],"mappings":"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"}
@@ -1,28 +0,0 @@
1
- import { useMemo as p, useEffect as m } from "react";
2
- import { usePuzzleAttemptJourney as c } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js";
3
- import { usePuzzleReviewJourney as f } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js";
4
- import { usePuzzleUnassignJourney as l } from "../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js";
5
- import { useJourney as P } from "../../../journey/use-journey/use-journey.js";
6
- const C = ({ behavior: a }) => {
7
- const { maximumAttempts: e, canStartJourney: t } = a, { isJourneyActive: r, clearJourney: o } = P(), { puzzleAttemptCtaRef: i, startJourney: u } = c(), { puzzleReviewCtaRef: y, startJourney: n } = f(), { puzzleUnassignRef: J, startJourney: s } = l(), z = p(() => e === -2, [e]);
8
- return m(() => {
9
- z && t && !r && (u(), n(), s());
10
- }, [
11
- t,
12
- r,
13
- z,
14
- u,
15
- n,
16
- s
17
- ]), m(() => () => {
18
- o();
19
- }, [o]), {
20
- puzzleAttemptCtaRef: i,
21
- puzzleReviewCtaRef: y,
22
- puzzleUnassignRef: J
23
- };
24
- };
25
- export {
26
- C as useWorksheetJourney
27
- };
28
- //# sourceMappingURL=use-worksheet-journey.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"use-worksheet-journey.js","sources":["../../../../../src/features/worksheet/worksheet/hooks/use-worksheet-journey.ts"],"sourcesContent":["import type { IWorksheetBehavior } from '../worksheet-types';\n\nimport { useEffect, useMemo } from 'react';\n\nimport { usePuzzleAttemptJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey';\nimport { usePuzzleReviewJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-review-journey';\nimport { usePuzzleUnassignJourney } from '../../../journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey';\nimport { useJourney } from '../../../journey/use-journey/use-journey';\n\ninterface IUseWorksheetJourney {\n behavior: IWorksheetBehavior;\n}\n\nconst useWorksheetJourney = ({ behavior }: IUseWorksheetJourney) => {\n const { maximumAttempts, canStartJourney } = behavior;\n\n const { isJourneyActive, clearJourney } = useJourney();\n\n const { puzzleAttemptCtaRef, startJourney: startPuzzleAttemptJourney } =\n usePuzzleAttemptJourney();\n\n const { puzzleReviewCtaRef, startJourney: startPuzzleReviewJourney } = usePuzzleReviewJourney();\n const { puzzleUnassignRef, startJourney: startPuzzleUnassignJourney } =\n usePuzzleUnassignJourney();\n\n const isPuzzleCard = useMemo(() => maximumAttempts === -2, [maximumAttempts]);\n\n useEffect(() => {\n if (isPuzzleCard && canStartJourney && !isJourneyActive) {\n //* This will be triggered by STUDENT during resume sheet.\n startPuzzleAttemptJourney();\n //* This will be triggered by TEACHER during review sheet\n startPuzzleReviewJourney();\n //* This will be trigger by TEACHER during preview sheet.\n startPuzzleUnassignJourney();\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isPuzzleCard,\n startPuzzleAttemptJourney,\n startPuzzleReviewJourney,\n startPuzzleUnassignJourney,\n ]);\n\n useEffect(() => {\n return () => {\n clearJourney();\n };\n }, [clearJourney]);\n\n return {\n puzzleAttemptCtaRef,\n puzzleReviewCtaRef,\n puzzleUnassignRef,\n };\n};\n\nexport { useWorksheetJourney };\n"],"names":["useWorksheetJourney","behavior","maximumAttempts","canStartJourney","isJourneyActive","clearJourney","useJourney","puzzleAttemptCtaRef","startPuzzleAttemptJourney","usePuzzleAttemptJourney","puzzleReviewCtaRef","startPuzzleReviewJourney","usePuzzleReviewJourney","puzzleUnassignRef","startPuzzleUnassignJourney","usePuzzleUnassignJourney","isPuzzleCard","useMemo","useEffect"],"mappings":";;;;;AAaA,MAAMA,IAAsB,CAAC,EAAE,UAAAC,QAAqC;AAC5D,QAAA,EAAE,iBAAAC,GAAiB,iBAAAC,EAAoB,IAAAF,GAEvC,EAAE,iBAAAG,GAAiB,cAAAC,EAAa,IAAIC,EAAW,GAE/C,EAAE,qBAAAC,GAAqB,cAAcC,MACzCC,EAAwB,GAEpB,EAAE,oBAAAC,GAAoB,cAAcC,MAA6BC,EAAuB,GACxF,EAAE,mBAAAC,GAAmB,cAAcC,MACvCC,EAAyB,GAErBC,IAAeC,EAAQ,MAAMf,MAAoB,IAAI,CAACA,CAAe,CAAC;AAE5E,SAAAgB,EAAU,MAAM;AACV,IAAAF,KAAgBb,KAAmB,CAACC,MAEZI,KAEDG,KAEEG;EAC7B,GACC;AAAA,IACDX;AAAA,IACAC;AAAA,IACAY;AAAA,IACAR;AAAA,IACAG;AAAA,IACAG;AAAA,EAAA,CACD,GAEDI,EAAU,MACD,MAAM;AACE,IAAAb;EAAA,GAEd,CAACA,CAAY,CAAC,GAEV;AAAA,IACL,qBAAAE;AAAA,IACA,oBAAAG;AAAA,IACA,mBAAAG;AAAA,EAAA;AAEJ;"}