@cuemath/leap 3.2.9-link.0 → 3.2.9-pzd-0.1-testing

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 (185) hide show
  1. package/dist/assets/illustrations/illustrations.js +1 -6
  2. package/dist/assets/illustrations/illustrations.js.map +1 -1
  3. package/dist/assets/lottie/lottie.js +5 -9
  4. package/dist/assets/lottie/lottie.js.map +1 -1
  5. package/dist/features/analytics-events/platform-events-student.js +2 -1
  6. package/dist/features/analytics-events/platform-events-student.js.map +1 -1
  7. package/dist/features/analytics-events/platform-events-teacher.js +6 -4
  8. package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
  9. package/dist/features/analytics-events/whitelist-events.js +10 -8
  10. package/dist/features/analytics-events/whitelist-events.js.map +1 -1
  11. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +12 -17
  12. package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
  13. package/dist/features/auth/comps/resend-otp/resend-otp.js +47 -54
  14. package/dist/features/auth/comps/resend-otp/resend-otp.js.map +1 -1
  15. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js +17 -29
  16. package/dist/features/auth/comps/tabs/tab-tem/tab-item.js.map +1 -1
  17. package/dist/features/auth/comps/tabs/tabs-styled.js +10 -22
  18. package/dist/features/auth/comps/tabs/tabs-styled.js.map +1 -1
  19. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js +19 -19
  20. package/dist/features/circle-games/game-launcher/hooks/use-game-launcher-journey/use-game-launcher-journey.js.map +1 -1
  21. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js +2 -2
  22. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input-styled.js.map +1 -1
  23. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js +1 -1
  24. package/dist/features/circle-games/sign-up/comp/grade-input/grade-input.js.map +1 -1
  25. package/dist/features/circle-games/sign-up/constants.js +3 -1
  26. package/dist/features/circle-games/sign-up/constants.js.map +1 -1
  27. package/dist/features/communication/pub-sub/constants.js +7 -4
  28. package/dist/features/communication/pub-sub/constants.js.map +1 -1
  29. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +42 -42
  30. package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
  31. package/dist/features/homework/homework-card-view.js +85 -97
  32. package/dist/features/homework/homework-card-view.js.map +1 -1
  33. package/dist/features/homework/homework-card.js +44 -42
  34. package/dist/features/homework/homework-card.js.map +1 -1
  35. package/dist/features/homework/hw-card-list/hw-card-list-view.js +31 -29
  36. package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
  37. package/dist/features/homework/hw-card-list/hw-card-list.js +57 -50
  38. package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
  39. package/dist/features/homework/utils.js +33 -27
  40. package/dist/features/homework/utils.js.map +1 -1
  41. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +17 -11
  42. package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
  43. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +72 -0
  44. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +1 -0
  45. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +59 -0
  46. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +1 -0
  47. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +63 -0
  48. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +1 -0
  49. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +67 -0
  50. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +1 -0
  51. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +70 -0
  52. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +1 -0
  53. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +59 -0
  54. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +1 -0
  55. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +59 -0
  56. package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +1 -0
  57. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +70 -0
  58. package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +1 -0
  59. package/dist/features/journey/journey-id/journey-id-student.js +2 -2
  60. package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
  61. package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
  62. package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
  63. package/dist/features/puzzles/api/puzzle-dashboard.js +10 -0
  64. package/dist/features/puzzles/api/puzzle-dashboard.js.map +1 -0
  65. package/dist/features/puzzles/comps/puzzle-card-styled.js +24 -69
  66. package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
  67. package/dist/features/puzzles/comps/puzzle-card.js +72 -30
  68. package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
  69. package/dist/features/puzzles/constants/puzzle-container.js +8 -0
  70. package/dist/features/puzzles/constants/puzzle-container.js.map +1 -0
  71. package/dist/features/puzzles/puzzle-analytics-events.js +11 -0
  72. package/dist/features/puzzles/puzzle-analytics-events.js.map +1 -0
  73. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +55 -25
  74. package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
  75. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +55 -0
  76. package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +1 -0
  77. package/dist/features/puzzles/puzzle-container/puzzle-container.js +98 -108
  78. package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
  79. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +37 -0
  80. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +1 -0
  81. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +110 -0
  82. package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +1 -0
  83. package/dist/features/puzzles/utils/puzzle-pattern.js +28 -13
  84. package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
  85. package/dist/features/ui/error/error.js +65 -27
  86. package/dist/features/ui/error/error.js.map +1 -1
  87. package/dist/features/ui/image/image.js +1 -1
  88. package/dist/features/ui/image/image.js.map +1 -1
  89. package/dist/features/ui/inputs/base-input/base-input.js +11 -11
  90. package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
  91. package/dist/features/ui/inputs/text-input/text-input.js +18 -19
  92. package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
  93. package/dist/features/ui/modals/modal-styled.js +35 -28
  94. package/dist/features/ui/modals/modal-styled.js.map +1 -1
  95. package/dist/features/ui/modals/modal.js +40 -14
  96. package/dist/features/ui/modals/modal.js.map +1 -1
  97. package/dist/features/ui/streak-icon/streak-icon-styled.js +13 -13
  98. package/dist/features/ui/streak-icon/streak-icon-styled.js.map +1 -1
  99. package/dist/features/ui/streak-icon/streak-icon.js +17 -15
  100. package/dist/features/ui/streak-icon/streak-icon.js.map +1 -1
  101. package/dist/features/ui/theme/button.js +78 -78
  102. package/dist/features/ui/theme/button.js.map +1 -1
  103. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +28 -0
  104. package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +1 -0
  105. package/dist/features/worksheet/worksheet/worksheet-helpers.js +20 -19
  106. package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
  107. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +29 -25
  108. package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
  109. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +97 -47
  110. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
  111. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +204 -196
  112. package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
  113. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +242 -207
  114. package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
  115. package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
  116. package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
  117. package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
  118. package/dist/features/worksheet/worksheet/worksheet.js +307 -313
  119. package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
  120. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
  121. package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
  122. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +44 -35
  123. package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
  124. package/dist/index.d.ts +89 -97
  125. package/dist/index.js +517 -531
  126. package/dist/index.js.map +1 -1
  127. package/dist/static/puzzle-blue-lottie.7017e2e8.json +1 -0
  128. package/dist/static/puzzle-blue-lottie.bf64ebc5.json +12760 -0
  129. package/dist/static/puzzle-dashboard-banner.b7956519.svg +1 -0
  130. package/dist/static/puzzle-green-lottie.1da90698.json +1 -0
  131. package/dist/static/puzzle-orange-lottie.cfcf3724.json +1 -0
  132. package/dist/static/puzzle-purple-lottie.e70de110.json +9860 -0
  133. package/dist/static/puzzle-yellow-lottie.275b5cf4.json +1 -0
  134. package/package.json +3 -2
  135. package/dist/assets/line-icons/icons/after-noon.js +0 -34
  136. package/dist/assets/line-icons/icons/after-noon.js.map +0 -1
  137. package/dist/assets/line-icons/icons/apple-icon-white.js +0 -42
  138. package/dist/assets/line-icons/icons/apple-icon-white.js.map +0 -1
  139. package/dist/assets/line-icons/icons/evening.js +0 -35
  140. package/dist/assets/line-icons/icons/evening.js.map +0 -1
  141. package/dist/assets/line-icons/icons/morning.js +0 -35
  142. package/dist/assets/line-icons/icons/morning.js.map +0 -1
  143. package/dist/assets/line-icons/icons/star3.js +0 -32
  144. package/dist/assets/line-icons/icons/star3.js.map +0 -1
  145. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js +0 -12
  146. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar-styled.js.map +0 -1
  147. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js +0 -33
  148. package/dist/features/auth/comps/linear-progress-bar/linear-progress-bar.js.map +0 -1
  149. package/dist/features/auth/comps/otp-input/otp-input-styled.js +0 -22
  150. package/dist/features/auth/comps/otp-input/otp-input-styled.js.map +0 -1
  151. package/dist/features/auth/comps/otp-input/otp-input.js +0 -51
  152. package/dist/features/auth/comps/otp-input/otp-input.js.map +0 -1
  153. package/dist/features/auth/comps/pill-button/pill-button-styled.js +0 -63
  154. package/dist/features/auth/comps/pill-button/pill-button-styled.js.map +0 -1
  155. package/dist/features/auth/comps/pill-button/pill-button.js +0 -66
  156. package/dist/features/auth/comps/pill-button/pill-button.js.map +0 -1
  157. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js +0 -17
  158. package/dist/features/auth/comps/selectable-info-card/selectable-info-card-styled.js.map +0 -1
  159. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js +0 -60
  160. package/dist/features/auth/comps/selectable-info-card/selectable-info-card.js.map +0 -1
  161. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js +0 -19
  162. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-constants.js.map +0 -1
  163. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js +0 -22
  164. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide-styled.js.map +0 -1
  165. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js +0 -18
  166. package/dist/features/auth/signup-v2/onboarding-guide/onboarding-guide.js.map +0 -1
  167. package/dist/features/auth/signup-v2/signup-header/signup-header.js +0 -25
  168. package/dist/features/auth/signup-v2/signup-header/signup-header.js.map +0 -1
  169. package/dist/features/auth/signup-v2/signup-options/signup-options.js +0 -71
  170. package/dist/features/auth/signup-v2/signup-options/signup-options.js.map +0 -1
  171. package/dist/static/calendar-purple.1a840b41.svg +0 -1
  172. package/dist/static/flying-disk.c7f6ed39.json +0 -1
  173. package/dist/static/graduation-cap.3be3340a.json +0 -1
  174. package/dist/static/handshake.287e7dfb.svg +0 -1
  175. package/dist/static/light-bulb.c6db0b23.json +0 -1
  176. package/dist/static/money.332aacf1.svg +0 -1
  177. package/dist/static/muscle.9bcfb8a7.json +0 -1
  178. package/dist/static/parent-avatar.822c7b9b.svg +0 -1
  179. package/dist/static/pencil.23df9da0.json +0 -1
  180. package/dist/static/plus-sign.de6af957.json +0 -1
  181. package/dist/static/racing-car.2cbf864e.json +0 -1
  182. package/dist/static/rocket.0a3ccab0.json +0 -1
  183. package/dist/static/shovel.abeec04c.json +0 -1
  184. package/dist/static/stripe-blurple.6abf422f.svg +0 -1
  185. package/dist/static/trustpilot.bd3d79e1.svg +0 -1
@@ -0,0 +1,59 @@
1
+ import { jsx as t } from "react/jsx-runtime";
2
+ import { useRef as c, useCallback as r, useMemo as f } from "react";
3
+ import y from "../../../ui/buttons/button/button.js";
4
+ import { JOURNEY_ID_TEACHER as h } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as C } from "../../use-journey/constants.js";
6
+ import { useJourney as E } from "../../use-journey/use-journey.js";
7
+ import T from "../use-home-page-journey/tooltip-item.js";
8
+ const k = () => {
9
+ const o = h.PUZZLE_REVIEW_JOURNEY, e = c(null), d = c([]), { setJourney: n, endJourney: i, nextCoachmark: s } = E(), l = r(() => {
10
+ s(o, !1, 0, !1);
11
+ }, [o, s]), a = r(() => {
12
+ document.body.style.overflow = "unset", i(o);
13
+ }, [i, o]), u = r(() => {
14
+ if (!(e != null && e.current))
15
+ return;
16
+ const p = [
17
+ {
18
+ originalElementToHighlightRef: e,
19
+ elementToHighlight: /* @__PURE__ */ t("div", { children: /* @__PURE__ */ t(y, { widthX: 6, renderAs: "primary", size: "small", label: "Review" }) }),
20
+ type: C.TOOLTIP,
21
+ indicator: {
22
+ renderAs: "primary",
23
+ tooltipXCoOrdinates: -100,
24
+ arrowSize: 12,
25
+ arrowXCoOrdinates: 100,
26
+ position: "top",
27
+ backgroundColor: "ORANGE_4",
28
+ borderColor: "BLACK",
29
+ arrowColor: "BLACK",
30
+ tooltipItem: /* @__PURE__ */ t(
31
+ T,
32
+ {
33
+ text: "Click here to review the student's solution.",
34
+ buttonLabel: "Got it",
35
+ onButtonClick: a
36
+ }
37
+ )
38
+ },
39
+ isActive: !1
40
+ }
41
+ ];
42
+ n(o, p);
43
+ const m = setTimeout(() => {
44
+ clearTimeout(m), document.body.style.overflow = "hidden", l();
45
+ }, 500);
46
+ d.current.push(m);
47
+ }, [a, l, o, n]);
48
+ return f(
49
+ () => ({
50
+ puzzleReviewCtaRef: e,
51
+ startJourney: u
52
+ }),
53
+ [u]
54
+ );
55
+ };
56
+ export {
57
+ k as usePuzzleReviewJourney
58
+ };
59
+ //# sourceMappingURL=use-puzzle-review-journey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-puzzle-review-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-puzzle-review-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 Button from '../../../ui/buttons/button/button';\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 usePuzzleReviewJourney = () => {\n const journeyId = JOURNEY_ID_TEACHER.PUZZLE_REVIEW_JOURNEY;\n\n const puzzleReviewCtaRef = 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 (!puzzleReviewCtaRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleReviewCtaRef,\n elementToHighlight: (\n <div>\n <Button widthX={6} renderAs=\"primary\" size=\"small\" label=\"Review\" />\n </div>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: -100,\n arrowSize: 12,\n arrowXCoOrdinates: 100,\n position: 'top',\n backgroundColor: 'ORANGE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text={`Click here to review the student's solution.`}\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 puzzleReviewCtaRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { usePuzzleReviewJourney };\n"],"names":["usePuzzleReviewJourney","journeyId","JOURNEY_ID_TEACHER","puzzleReviewCtaRef","useRef","timerRefs","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","startJourney","puzzleAttemptSteps","jsx","Button","IndicatorType","TooltipItem","delayBeforeStart","useMemo"],"mappings":";;;;;;;AAWA,MAAMA,IAAyB,MAAM;AACnC,QAAMC,IAAYC,EAAmB,uBAE/BC,IAAqBC,EAAuB,IAAI,GAChDC,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,EAAoB;AACvB;AAGF,UAAMW,IAAwC;AAAA,MAC5C;AAAA,QACE,+BAA+BX;AAAA,QAC/B,oBACE,gBAAAY,EAAC,OACC,EAAA,UAAA,gBAAAA,EAACC,GAAO,EAAA,QAAQ,GAAG,UAAS,WAAU,MAAK,SAAQ,OAAM,SAAS,CAAA,GACpE;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,gBAAAF;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,MAAM;AAAA,cACN,aAAY;AAAA,cACZ,eAAeN;AAAA,YAAA;AAAA,UACjB;AAAA,QAEJ;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IAAA;AAGF,IAAAN,EAAWL,GAAWa,CAAkB;AAElC,UAAAK,IAAmB,WAAW,MAAM;AACxC,mBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UACXT;OACnB,GAAG;AAEI,IAAAL,EAAA,QAAQ,KAAKc,CAAgB;AAAA,KACtC,CAACP,GAAkBF,GAAqBT,GAAWK,CAAU,CAAC;AAU1D,SARMc;AAAA,IACX,OAAO;AAAA,MACL,oBAAAjB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -0,0 +1,59 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import { useRef as c, useCallback as r, useMemo as f } from "react";
3
+ import y from "../../../ui/buttons/button/button.js";
4
+ import { JOURNEY_ID_TEACHER as h } from "../../journey-id/journey-id-teacher.js";
5
+ import { IndicatorType as C } from "../../use-journey/constants.js";
6
+ import { useJourney as T } from "../../use-journey/use-journey.js";
7
+ import b from "../use-home-page-journey/tooltip-item.js";
8
+ const L = () => {
9
+ const o = h.PUZZLE_UNASSIGN_JOURNEY, t = c(null), d = c([]), { setJourney: n, endJourney: i, nextCoachmark: s } = T(), a = r(() => {
10
+ s(o, !1, 0, !1);
11
+ }, [o, s]), l = r(() => {
12
+ document.body.style.overflow = "unset", i(o);
13
+ }, [i, o]), u = r(() => {
14
+ if (!(t != null && t.current))
15
+ return;
16
+ const p = [
17
+ {
18
+ originalElementToHighlightRef: t,
19
+ elementToHighlight: /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(y, { widthX: 6, renderAs: "primary", size: "small", label: "Unassign" }) }),
20
+ type: C.TOOLTIP,
21
+ indicator: {
22
+ renderAs: "primary",
23
+ tooltipXCoOrdinates: -100,
24
+ arrowSize: 12,
25
+ arrowXCoOrdinates: 100,
26
+ position: "top",
27
+ backgroundColor: "PURPLE_4",
28
+ borderColor: "BLACK",
29
+ arrowColor: "BLACK",
30
+ tooltipItem: /* @__PURE__ */ e(
31
+ b,
32
+ {
33
+ text: "You can click here to unassign the puzzle.",
34
+ buttonLabel: "Got it",
35
+ onButtonClick: l
36
+ }
37
+ )
38
+ },
39
+ isActive: !1
40
+ }
41
+ ];
42
+ n(o, p);
43
+ const m = setTimeout(() => {
44
+ clearTimeout(m), document.body.style.overflow = "hidden", a();
45
+ }, 500);
46
+ d.current.push(m);
47
+ }, [l, a, o, n]);
48
+ return f(
49
+ () => ({
50
+ puzzleUnassignRef: t,
51
+ startJourney: u
52
+ }),
53
+ [u]
54
+ );
55
+ };
56
+ export {
57
+ L as usePuzzleUnassignJourney
58
+ };
59
+ //# sourceMappingURL=use-puzzle-unassign-journey.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-puzzle-unassign-journey.js","sources":["../../../../../src/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-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 Button from '../../../ui/buttons/button/button';\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 usePuzzleUnassignJourney = () => {\n const journeyId = JOURNEY_ID_TEACHER.PUZZLE_UNASSIGN_JOURNEY;\n\n const puzzleUnassignRef = 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 (!puzzleUnassignRef?.current) {\n return;\n }\n\n const puzzleAttemptSteps: ICoachmarkProps[] = [\n {\n originalElementToHighlightRef: puzzleUnassignRef,\n elementToHighlight: (\n <div>\n <Button widthX={6} renderAs=\"primary\" size=\"small\" label=\"Unassign\" />\n </div>\n ),\n type: IndicatorType.TOOLTIP,\n indicator: {\n renderAs: 'primary',\n tooltipXCoOrdinates: -100,\n arrowSize: 12,\n arrowXCoOrdinates: 100,\n position: 'top',\n backgroundColor: 'PURPLE_4',\n borderColor: 'BLACK',\n arrowColor: 'BLACK',\n tooltipItem: (\n <TooltipItem\n text=\"You can click here to unassign the puzzle.\"\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 puzzleUnassignRef,\n startJourney,\n }),\n [startJourney],\n );\n\n return data;\n};\n\nexport { usePuzzleUnassignJourney };\n"],"names":["usePuzzleUnassignJourney","journeyId","JOURNEY_ID_TEACHER","puzzleUnassignRef","useRef","timerRefs","setJourney","endJourney","nextCoachmark","useJourney","handleNextCoachMark","useCallback","handleEndJourney","startJourney","puzzleAttemptSteps","jsx","Button","IndicatorType","TooltipItem","delayBeforeStart","useMemo"],"mappings":";;;;;;;AAWA,MAAMA,IAA2B,MAAM;AACrC,QAAMC,IAAYC,EAAmB,yBAE/BC,IAAoBC,EAAuB,IAAI,GAC/CC,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,EAAmB;AACtB;AAGF,UAAMW,IAAwC;AAAA,MAC5C;AAAA,QACE,+BAA+BX;AAAA,QAC/B,oBACE,gBAAAY,EAAC,OACC,EAAA,UAAA,gBAAAA,EAACC,GAAO,EAAA,QAAQ,GAAG,UAAS,WAAU,MAAK,SAAQ,OAAM,WAAW,CAAA,GACtE;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,gBAAAF;AAAA,YAACG;AAAA,YAAA;AAAA,cACC,MAAK;AAAA,cACL,aAAY;AAAA,cACZ,eAAeN;AAAA,YAAA;AAAA,UACjB;AAAA,QAEJ;AAAA,QACA,UAAU;AAAA,MACZ;AAAA,IAAA;AAGF,IAAAN,EAAWL,GAAWa,CAAkB;AAElC,UAAAK,IAAmB,WAAW,MAAM;AACxC,mBAAaA,CAAgB,GACpB,SAAA,KAAK,MAAM,WAAW,UACXT;OACnB,GAAG;AAEI,IAAAL,EAAA,QAAQ,KAAKc,CAAgB;AAAA,KACtC,CAACP,GAAkBF,GAAqBT,GAAWK,CAAU,CAAC;AAU1D,SARMc;AAAA,IACX,OAAO;AAAA,MACL,mBAAAjB;AAAA,MACA,cAAAU;AAAA,IAAA;AAAA,IAEF,CAACA,CAAY;AAAA,EAAA;AAIjB;"}
@@ -0,0 +1,70 @@
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
@@ -0,0 +1 @@
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,5 +1,5 @@
1
- var E = /* @__PURE__ */ ((R) => (R.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", R.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", R.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", R.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", R.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", R.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", R.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", R.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", R.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", R.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", R.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", R.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", R))(E || {});
1
+ var R = /* @__PURE__ */ ((E) => (E.CIRCLE_ACTIVITIES_INTRO_JOURNEY = "CIRCLE_ACTIVITIES_INTRO_JOURNEY", E.CIRCLE_LEADERBOARD_INTRO_JOURNEY = "CIRCLE_LEADERBOARD_INTRO_JOURNEY", E.CIRCLE_POINTS_REWARD_JOURNEY = "CIRCLE_POINTS_REWARD_JOURNEY", E.CIRCLE_STREAK_UPDATE_JOURNEY = "CIRCLE_STREAK_UPDATE_JOURNEY", E.CIRCLE_TUTORIAL_JOURNEY = "CIRCLE_TUTORIAL_JOURNEY", E.CIRCLE_TABLES_INTRO_JOURNEY = "CIRCLE_TABLES_INTRO_JOURNEY", E.CIRCLE_TABLES_INFINTE_JOURNEY = "CIRCLE_TABLES_INFINITE_JOURNEY", E.CIRCLE_LESSONS_K_1_INTRO_JOURNEY = "CIRCLE_LESSONS_K_1_INTRO_JOURNEY", E.CIRCLE_STREAK_REDUCTION_JOURNEY = "CIRCLE_STREAK_REDUCTION_JOURNEY", E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.PUZZLE_ATTEMPT_JOURNEY = "PUZZLE_ATTEMPT_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.PUZZLE_ASSIGNED_JOURNEY = "PUZZLE_ASSIGNED_JOURNEY", E.PUZZLE_DASHBOARD_JOURNEY = "PUZZLE_DASHBOARD_JOURNEY", E))(R || {});
2
2
  export {
3
- E as JOURNEY_ID_STUDENT
3
+ R as JOURNEY_ID_STUDENT
4
4
  };
5
5
  //# sourceMappingURL=journey-id-student.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCAGnCA,EAAA,kCAAkC,mCAClCA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAdhBA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"journey-id-student.js","sources":["../../../../src/features/journey/journey-id/journey-id-student.ts"],"sourcesContent":["export enum JOURNEY_ID_STUDENT {\n CIRCLE_ACTIVITIES_INTRO_JOURNEY = 'CIRCLE_ACTIVITIES_INTRO_JOURNEY',\n CIRCLE_LEADERBOARD_INTRO_JOURNEY = 'CIRCLE_LEADERBOARD_INTRO_JOURNEY',\n CIRCLE_POINTS_REWARD_JOURNEY = 'CIRCLE_POINTS_REWARD_JOURNEY',\n CIRCLE_STREAK_UPDATE_JOURNEY = 'CIRCLE_STREAK_UPDATE_JOURNEY',\n CIRCLE_TUTORIAL_JOURNEY = 'CIRCLE_TUTORIAL_JOURNEY',\n CIRCLE_TABLES_INTRO_JOURNEY = 'CIRCLE_TABLES_INTRO_JOURNEY',\n CIRCLE_TABLES_INFINTE_JOURNEY = 'CIRCLE_TABLES_INFINITE_JOURNEY',\n CIRCLE_LESSONS_K_1_INTRO_JOURNEY = 'CIRCLE_LESSONS_K_1_INTRO_JOURNEY',\n\n // TODO: Deprecate bottom journeys, they are not actually journeys\n CIRCLE_STREAK_REDUCTION_JOURNEY = 'CIRCLE_STREAK_REDUCTION_JOURNEY',\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n PUZZLE_ATTEMPT_JOURNEY = 'PUZZLE_ATTEMPT_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n PUZZLE_ASSIGNED_JOURNEY = 'PUZZLE_ASSIGNED_JOURNEY',\n PUZZLE_DASHBOARD_JOURNEY = 'PUZZLE_DASHBOARD_JOURNEY',\n}\n"],"names":["JOURNEY_ID_STUDENT"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,kCAAkC,mCAClCA,EAAA,mCAAmC,oCACnCA,EAAA,+BAA+B,gCAC/BA,EAAA,+BAA+B,gCAC/BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,gCAAgC,kCAChCA,EAAA,mCAAmC,oCAGnCA,EAAA,kCAAkC,mCAClCA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,yBAAyB,0BACzBA,EAAA,0BAA0B,2BAC1BA,EAAA,0BAA0B,2BAC1BA,EAAA,2BAA2B,4BAjBjBA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -1,5 +1,5 @@
1
- var A = /* @__PURE__ */ ((E) => (E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E))(A || {});
1
+ var N = /* @__PURE__ */ ((E) => (E.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E.PUZZLE_ASSIGN_JOURNEY = "PUZZLE_ASSIGN_JOURNEY", E.PUZZLE_INTRO_JOURNEY = "PUZZLE_INTRO_JOURNEY", E.PUZZLE_REVIEW_JOURNEY = "PUZZLE_REVIEW_JOURNEY", E.PUZZLE_PROGRESS_JOURNEY = "PUZZLE_PROGRESS_JOURNEY", E.PUZZLE_UNASSIGN_JOURNEY = "PUZZLE_UNASSIGN_JOURNEY", E))(N || {});
2
2
  export {
3
- A as JOURNEY_ID_TEACHER
3
+ N as JOURNEY_ID_TEACHER
4
4
  };
5
5
  //# sourceMappingURL=journey-id-teacher.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"journey-id-teacher.js","sources":["../../../../src/features/journey/journey-id/journey-id-teacher.ts"],"sourcesContent":["export enum JOURNEY_ID_TEACHER {\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n}\n"],"names":["JOURNEY_ID_TEACHER"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAHhBA,IAAAA,KAAA,CAAA,CAAA;"}
1
+ {"version":3,"file":"journey-id-teacher.js","sources":["../../../../src/features/journey/journey-id/journey-id-teacher.ts"],"sourcesContent":["export enum JOURNEY_ID_TEACHER {\n HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n CHALLENGE_ARENA_JOURNEY = 'CHALLENGE_ARENA_JOURNEY',\n PUZZLE_ASSIGN_JOURNEY = 'PUZZLE_ASSIGN_JOURNEY',\n PUZZLE_INTRO_JOURNEY = 'PUZZLE_INTRO_JOURNEY',\n PUZZLE_REVIEW_JOURNEY = 'PUZZLE_REVIEW_JOURNEY',\n PUZZLE_PROGRESS_JOURNEY = 'PUZZLE_PROGRESS_JOURNEY',\n PUZZLE_UNASSIGN_JOURNEY = 'PUZZLE_UNASSIGN_JOURNEY',\n}\n"],"names":["JOURNEY_ID_TEACHER"],"mappings":"AAAY,IAAAA,sBAAAA,OACVA,EAAA,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAC1BA,EAAA,wBAAwB,yBACxBA,EAAA,uBAAuB,wBACvBA,EAAA,wBAAwB,yBACxBA,EAAA,0BAA0B,2BAC1BA,EAAA,0BAA0B,2BARhBA,IAAAA,KAAA,CAAA,CAAA;"}
@@ -0,0 +1,10 @@
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
@@ -0,0 +1 @@
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,79 +1,34 @@
1
- import e, { keyframes as a, css as r } from "styled-components";
2
- import n from "../../ui/layout/flex-view.js";
3
- import { getPuzzleCardPattern as l } from "../utils/puzzle-pattern.js";
4
- const m = a`
5
- from { transform: translateY(-100%); }
6
- to { transform: translateY(0); }
7
- `, o = a`
8
- from { transform: rotateY(0deg); }
9
- to { transform: rotateY(360deg); }
10
- `, c = a`
11
- from { transform: translateY(0); opacity: 1; }
12
- to { transform: translateY(-100%); opacity: 0; }
13
- `, d = e(n)`
1
+ import e from "styled-components";
2
+ import r from "../../ui/layout/flex-view.js";
3
+ import i from "../../ui/text/text.js";
4
+ import { getPuzzleCardPattern as p } from "../utils/puzzle-pattern.js";
5
+ const n = e(r)`
14
6
  position: relative;
7
+ cursor: pointer;
15
8
 
16
- box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: i }) => t.colors[`${i}_4`]};
9
+ box-shadow: inset 0px 0px 0px 4px ${({ theme: o, $imageHue: t }) => o.colors[`${t}_4`]};
17
10
 
18
- background-image: ${({ $imageHue: t }) => `url(${l(t)})`};
11
+ background-image: ${({ $imageHue: o }) => `url(${p(o)})`};
19
12
  background-size: cover;
20
13
 
21
- ${({ $animationPhase: t }) => t && r`
22
- transform-style: preserve-3d;
23
- opacity: 0;
24
- visibility: hidden;
25
- transform: translateY(-100%);
26
- `}
27
-
28
- ${({ $animationPhase: t, theme: i, $imageHue: s }) => {
29
- switch (t) {
30
- case "movingIn":
31
- return r`
32
- visibility: visible;
33
- opacity: 1;
34
- animation: ${m} 0.5s ease-out forwards;
35
- `;
36
- case "revealing":
37
- return r`
38
- visibility: visible;
39
- opacity: 1;
40
- transform: translateY(0); /* Position after moveIn */
41
- animation: ${o} 1s ease-in-out forwards;
42
- `;
43
- case "visible":
44
- return r`
45
- visibility: visible;
46
- opacity: 1;
47
- transform: translateY(0) rotateY(360deg);
48
- background-color: ${i.colors[`${s}_2`]};
49
- transition: background-color 0.2s ease-in;
50
- `;
51
- case "assigning":
52
- return r`
53
- visibility: visible;
54
- opacity: 1;
55
- transform: translateY(0); /* Reset rotation for this animation */
56
- animation: ${o} 1s ease-in-out forwards;
57
- `;
58
- case "assigned":
59
- return r`
60
- visibility: visible;
61
- opacity: 1;
62
- transform: translateY(0) rotateY(360deg);
63
- `;
64
- case "movingOut":
65
- return r`
66
- visibility: visible;
67
- opacity: 1;
68
- transform: translateY(0); /* Start from final position */
69
- animation: ${c} 0.5s ease-in forwards;
70
- `;
71
- default:
72
- return "";
14
+ &:hover {
15
+ outline: 1px solid ${({ theme: o }) => o.colors.BLACK_1};
73
16
  }
74
- }}
17
+ `, x = e(i)`
18
+ display: -webkit-box;
19
+ -webkit-line-clamp: 3;
20
+ -webkit-box-orient: vertical;
21
+ overflow: hidden;
22
+ text-overflow: ellipsis;
23
+ white-space: break-spaces;
24
+ `, b = e(r)`
25
+ position: absolute;
26
+ top: -10px;
27
+ right: -10px;
75
28
  `;
76
29
  export {
77
- d as PuzzleWrapper
30
+ n as PuzzleWrapper,
31
+ b as StickerWrapper,
32
+ x as Title
78
33
  };
79
34
  //# sourceMappingURL=puzzle-card-styled.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-card-styled.js","sources":["../../../../src/features/puzzles/comps/puzzle-card-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled, { css, keyframes } from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\n// --- Keyframes for each animation step ---\nconst moveInAnim = keyframes`\n from { transform: translateY(-100%); }\n to { transform: translateY(0); }\n`;\n\nconst rotateYAnim = keyframes`\n from { transform: rotateY(0deg); }\n to { transform: rotateY(360deg); }\n`;\n\nconst moveOutAnim = keyframes`\n from { transform: translateY(0); opacity: 1; }\n to { transform: translateY(-100%); opacity: 0; }\n`;\n\nconst PuzzleWrapper = styled(FlexView)<{ $animationPhase?: string; $imageHue: THueNames }>`\n position: relative;\n\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n\n ${({ $animationPhase }) =>\n $animationPhase &&\n css`\n transform-style: preserve-3d;\n opacity: 0;\n visibility: hidden;\n transform: translateY(-100%);\n `}\n\n ${({ $animationPhase, theme, $imageHue }) => {\n switch ($animationPhase) {\n case 'movingIn':\n return css`\n visibility: visible;\n opacity: 1;\n animation: ${moveInAnim} 0.5s ease-out forwards;\n `;\n case 'revealing':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0); /* Position after moveIn */\n animation: ${rotateYAnim} 1s ease-in-out forwards;\n `;\n case 'visible':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0) rotateY(360deg);\n background-color: ${theme.colors[`${$imageHue}_2`]};\n transition: background-color 0.2s ease-in;\n `;\n case 'assigning':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0); /* Reset rotation for this animation */\n animation: ${rotateYAnim} 1s ease-in-out forwards;\n `;\n case 'assigned':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0) rotateY(360deg);\n `;\n case 'movingOut':\n return css`\n visibility: visible;\n opacity: 1;\n transform: translateY(0); /* Start from final position */\n animation: ${moveOutAnim} 0.5s ease-in forwards;\n `;\n default:\n return '';\n }\n }}\n`;\n\nexport { PuzzleWrapper };\n"],"names":["moveInAnim","keyframes","rotateYAnim","moveOutAnim","PuzzleWrapper","styled","FlexView","theme","$imageHue","getPuzzleCardPattern","$animationPhase","css"],"mappings":";;;AAQA,MAAMA,IAAaC;AAAA;AAAA;AAAA,GAKbC,IAAcD;AAAA;AAAA;AAAA,GAKdE,IAAcF;AAAA;AAAA;AAAA,GAKdG,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA,sCAGC,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgBD,EAAM,OAAO,GAAGC,CAAS,IAAI,CAAC;AAAA;AAAA,sBAExE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA,IAG9E,CAAC,EAAE,iBAAAE,QACHA,KACAC;AAAA;AAAA;AAAA;AAAA;AAAA,KAKC;AAAA;AAAA,IAED,CAAC,EAAE,iBAAAD,GAAiB,OAAAH,GAAO,WAAAC,QAAgB;AAC3C,UAAQE,GAAiB;AAAA,IACvB,KAAK;AACI,aAAAC;AAAA;AAAA;AAAA,uBAGQX,CAAU;AAAA;AAAA,IAE3B,KAAK;AACI,aAAAW;AAAA;AAAA;AAAA;AAAA,uBAIQT,CAAW;AAAA;AAAA,IAE5B,KAAK;AACI,aAAAS;AAAA;AAAA;AAAA;AAAA,8BAIeJ,EAAM,OAAO,GAAGC,CAAS,IAAI,CAAC;AAAA;AAAA;AAAA,IAGtD,KAAK;AACI,aAAAG;AAAA;AAAA;AAAA;AAAA,uBAIQT,CAAW;AAAA;AAAA,IAE5B,KAAK;AACI,aAAAS;AAAA;AAAA;AAAA;AAAA;AAAA,IAKT,KAAK;AACI,aAAAA;AAAA;AAAA;AAAA;AAAA,uBAIQR,CAAW;AAAA;AAAA,IAE5B;AACS,aAAA;AAAA,EACX;AACF,CAAC;AAAA;"}
1
+ {"version":3,"file":"puzzle-card-styled.js","sources":["../../../../src/features/puzzles/comps/puzzle-card-styled.tsx"],"sourcesContent":["import type { THueNames } from '../../ui/types';\n\nimport styled from 'styled-components';\n\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport { getPuzzleCardPattern } from '../utils/puzzle-pattern';\n\nconst PuzzleWrapper = styled(FlexView)<{ $animationPhase?: string; $imageHue: THueNames }>`\n position: relative;\n cursor: pointer;\n\n box-shadow: inset 0px 0px 0px 4px ${({ theme, $imageHue }) => theme.colors[`${$imageHue}_4`]};\n\n background-image: ${({ $imageHue }) => `url(${getPuzzleCardPattern($imageHue)})`};\n background-size: cover;\n\n &:hover {\n outline: 1px solid ${({ theme }) => theme.colors.BLACK_1};\n }\n`;\n\nconst Title = styled(Text)`\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: break-spaces;\n`;\n\nconst StickerWrapper = styled(FlexView)`\n position: absolute;\n top: -10px;\n right: -10px;\n`;\n\nexport { PuzzleWrapper, Title, StickerWrapper };\n"],"names":["PuzzleWrapper","styled","FlexView","theme","$imageHue","getPuzzleCardPattern","Title","Text","StickerWrapper"],"mappings":";;;;AAQM,MAAAA,IAAgBC,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA,sCAIC,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgBD,EAAM,OAAO,GAAGC,CAAS,IAAI,CAAC;AAAA;AAAA,sBAExE,CAAC,EAAE,WAAAA,EAAU,MAAM,OAAOC,EAAqBD,CAAS,CAAC,GAAG;AAAA;AAAA;AAAA;AAAA,yBAIzD,CAAC,EAAE,OAAAD,EAAA,MAAYA,EAAM,OAAO,OAAO;AAAA;AAAA,GAItDG,IAAQL,EAAOM,CAAI;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASnBC,IAAiBP,EAAOC,CAAQ;AAAA;AAAA;AAAA;AAAA;"}
@@ -1,35 +1,77 @@
1
- import { jsx as h } from "react/jsx-runtime";
2
- import { memo as p } from "react";
3
- import { PuzzleWrapper as s } from "./puzzle-card-styled.js";
4
- const c = p(
1
+ import { jsx as t, jsxs as a } from "react/jsx-runtime";
2
+ import { memo as u, useMemo as z, useCallback as L } from "react";
3
+ import P from "../../ui/buttons/clickable/clickable.js";
4
+ import _ from "../../ui/image/image.js";
5
+ import d from "../../ui/layout/flex-view.js";
6
+ import E from "../../ui/lottie-animation/lottie-animation.js";
7
+ import { PUZZLE_ANALYTICS_EVENTS as S } from "../puzzle-analytics-events.js";
8
+ import { getPuzzleStickerLottie as b } from "../utils/puzzle-feedback-celebration.js";
9
+ import { PuzzleWrapper as y, Title as Z, StickerWrapper as k } from "./puzzle-card-styled.js";
10
+ const x = {
11
+ autoplay: !1,
12
+ loop: !1,
13
+ renderer: "canvas"
14
+ }, X = u(
5
15
  ({
6
- children: e,
7
- imageHue: t,
8
- onAnimationEnd: r,
9
- animationPhase: o,
10
- width: i,
11
- widthX: m,
12
- height: n,
13
- heightX: $,
14
- backgroundColor: a
15
- }) => /* @__PURE__ */ h(
16
- s,
17
- {
18
- $animationPhase: o,
19
- onAnimationEnd: r,
20
- $width: i,
21
- $height: n,
22
- $widthX: m,
23
- $heightX: $,
24
- $alignItems: "center",
25
- $justifyContent: "center",
26
- $imageHue: t,
27
- $background: a ?? `${t}_6`,
28
- children: e
29
- }
30
- )
16
+ imageHue: o,
17
+ imageUrl: s,
18
+ title: p,
19
+ height: h = "100%",
20
+ width: f = "100%",
21
+ onCardClick: e,
22
+ userNodeId: i,
23
+ rewards: r,
24
+ studentId: n,
25
+ nodeId: l
26
+ }) => {
27
+ const { sticker: c } = (r == null ? void 0 : r[0]) || {}, $ = z(
28
+ () => ({
29
+ node_id: l,
30
+ student_id: n,
31
+ node_type: "PUZZLE_CARD"
32
+ }),
33
+ [l, n]
34
+ ), m = c ? b(c) : void 0, g = L(() => {
35
+ i && (e == null || e(i));
36
+ }, [e, i]);
37
+ return /* @__PURE__ */ t(
38
+ P,
39
+ {
40
+ label: "",
41
+ analyticsLabel: S.PUZZLE_VIEWED,
42
+ analyticsProps: $,
43
+ onClick: g,
44
+ children: /* @__PURE__ */ a(
45
+ y,
46
+ {
47
+ $width: f,
48
+ $height: h,
49
+ $justifyContent: "center",
50
+ $alignItems: "center",
51
+ $imageHue: o,
52
+ $background: `${o}_2`,
53
+ children: [
54
+ /* @__PURE__ */ a(d, { $justifyContent: "center", $alignItems: "center", $flexGap: 12, children: [
55
+ /* @__PURE__ */ t(_, { src: s ?? "", width: 68, height: 68, withLoader: !1, alt: "Puzzle" }),
56
+ /* @__PURE__ */ t(Z, { $renderAs: "ab3", $align: "center", $width: "80%", children: p })
57
+ ] }),
58
+ m && /* @__PURE__ */ t(k, { $widthX: 2.5, $heightX: 2.5, children: /* @__PURE__ */ t(
59
+ E,
60
+ {
61
+ width: 40,
62
+ height: 40,
63
+ src: m,
64
+ settings: x
65
+ }
66
+ ) })
67
+ ]
68
+ }
69
+ )
70
+ }
71
+ );
72
+ }
31
73
  );
32
74
  export {
33
- c as default
75
+ X as default
34
76
  };
35
77
  //# sourceMappingURL=puzzle-card.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"puzzle-card.js","sources":["../../../../src/features/puzzles/comps/puzzle-card.tsx"],"sourcesContent":["import type { IPuzzleCardProps } from './puzzle-card-types';\nimport type { FC } from 'react';\n\nimport { memo } from 'react';\n\nimport * as Styled from './puzzle-card-styled';\n\nconst PuzzleCard: FC<IPuzzleCardProps> = memo(\n ({\n children,\n imageHue,\n onAnimationEnd,\n animationPhase,\n width,\n widthX,\n height,\n heightX,\n backgroundColor,\n }) => {\n return (\n <Styled.PuzzleWrapper\n $animationPhase={animationPhase}\n onAnimationEnd={onAnimationEnd}\n $width={width}\n $height={height}\n $widthX={widthX}\n $heightX={heightX}\n $alignItems=\"center\"\n $justifyContent=\"center\"\n $imageHue={imageHue}\n $background={backgroundColor ?? `${imageHue}_6`}\n >\n {children}\n </Styled.PuzzleWrapper>\n );\n },\n);\n\nexport default PuzzleCard;\n"],"names":["PuzzleCard","memo","children","imageHue","onAnimationEnd","animationPhase","width","widthX","height","heightX","backgroundColor","jsx","Styled.PuzzleWrapper"],"mappings":";;;AAOA,MAAMA,IAAmCC;AAAA,EACvC,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,iBAAAC;AAAA,EAAA,MAGE,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACC,iBAAiBP;AAAA,MACjB,gBAAAD;AAAA,MACA,QAAQE;AAAA,MACR,SAASE;AAAA,MACT,SAASD;AAAA,MACT,UAAUE;AAAA,MACV,aAAY;AAAA,MACZ,iBAAgB;AAAA,MAChB,WAAWN;AAAA,MACX,aAAaO,KAAmB,GAAGP,CAAQ;AAAA,MAE1C,UAAAD;AAAA,IAAA;AAAA,EAAA;AAIT;"}
1
+ {"version":3,"file":"puzzle-card.js","sources":["../../../../src/features/puzzles/comps/puzzle-card.tsx"],"sourcesContent":["import type { IPuzzleCardProps } from './puzzle-card-types';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useMemo } from 'react';\n\nimport Clickable from '../../ui/buttons/clickable/clickable';\nimport Image from '../../ui/image/image';\nimport FlexView from '../../ui/layout/flex-view';\nimport LottieAnimation from '../../ui/lottie-animation/lottie-animation';\nimport { PUZZLE_ANALYTICS_EVENTS } from '../puzzle-analytics-events';\nimport { getPuzzleStickerLottie } from '../utils/puzzle-feedback-celebration';\nimport * as Styled from './puzzle-card-styled';\n\nconst puzzleStickerLottieSettings = {\n autoplay: false,\n loop: false,\n renderer: 'canvas',\n};\n\nconst PuzzleCard: FC<IPuzzleCardProps> = memo(\n ({\n imageHue,\n imageUrl,\n title,\n height = '100%',\n width = '100%',\n onCardClick,\n userNodeId,\n rewards,\n studentId,\n nodeId,\n }) => {\n const { sticker } = rewards?.[0] || {};\n\n const analyticsProps = useMemo(\n () => ({\n node_id: nodeId,\n student_id: studentId,\n node_type: 'PUZZLE_CARD',\n }),\n [nodeId, studentId],\n );\n\n const puzzleStickerLottie = sticker ? getPuzzleStickerLottie(sticker) : undefined;\n\n const handleCardClick = useCallback(() => {\n if (userNodeId) {\n onCardClick?.(userNodeId);\n }\n }, [onCardClick, userNodeId]);\n\n return (\n <Clickable\n label=\"\"\n analyticsLabel={PUZZLE_ANALYTICS_EVENTS.PUZZLE_VIEWED}\n analyticsProps={analyticsProps}\n onClick={handleCardClick}\n >\n <Styled.PuzzleWrapper\n $width={width}\n $height={height}\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $imageHue={imageHue}\n $background={`${imageHue}_2`}\n >\n <FlexView $justifyContent=\"center\" $alignItems=\"center\" $flexGap={12}>\n <Image src={imageUrl ?? ''} width={68} height={68} withLoader={false} alt=\"Puzzle\" />\n\n <Styled.Title $renderAs=\"ab3\" $align=\"center\" $width=\"80%\">\n {title}\n </Styled.Title>\n </FlexView>\n\n {puzzleStickerLottie && (\n <Styled.StickerWrapper $widthX={2.5} $heightX={2.5}>\n <LottieAnimation\n width={40}\n height={40}\n src={puzzleStickerLottie}\n settings={puzzleStickerLottieSettings}\n />\n </Styled.StickerWrapper>\n )}\n </Styled.PuzzleWrapper>\n </Clickable>\n );\n },\n);\n\nexport default PuzzleCard;\n"],"names":["puzzleStickerLottieSettings","PuzzleCard","memo","imageHue","imageUrl","title","height","width","onCardClick","userNodeId","rewards","studentId","nodeId","sticker","analyticsProps","useMemo","puzzleStickerLottie","getPuzzleStickerLottie","handleCardClick","useCallback","jsx","Clickable","PUZZLE_ANALYTICS_EVENTS","jsxs","Styled.PuzzleWrapper","FlexView","Image","Styled.Title","Styled.StickerWrapper","LottieAnimation"],"mappings":";;;;;;;;;AAaA,MAAMA,IAA8B;AAAA,EAClC,UAAU;AAAA,EACV,MAAM;AAAA,EACN,UAAU;AACZ,GAEMC,IAAmCC;AAAA,EACvC,CAAC;AAAA,IACC,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC,IAAS;AAAA,IACT,OAAAC,IAAQ;AAAA,IACR,aAAAC;AAAA,IACA,YAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,QAAAC;AAAA,EAAA,MACI;AACJ,UAAM,EAAE,SAAAC,EAAQ,KAAIH,KAAA,gBAAAA,EAAU,OAAM,CAAA,GAE9BI,IAAiBC;AAAA,MACrB,OAAO;AAAA,QACL,SAASH;AAAA,QACT,YAAYD;AAAA,QACZ,WAAW;AAAA,MAAA;AAAA,MAEb,CAACC,GAAQD,CAAS;AAAA,IAAA,GAGdK,IAAsBH,IAAUI,EAAuBJ,CAAO,IAAI,QAElEK,IAAkBC,EAAY,MAAM;AACxC,MAAIV,MACFD,KAAA,QAAAA,EAAcC;AAAA,IAChB,GACC,CAACD,GAAaC,CAAU,CAAC;AAG1B,WAAA,gBAAAW;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,gBAAgBC,EAAwB;AAAA,QACxC,gBAAAR;AAAA,QACA,SAASI;AAAA,QAET,UAAA,gBAAAK;AAAA,UAACC;AAAAA,UAAA;AAAA,YACC,QAAQjB;AAAA,YACR,SAASD;AAAA,YACT,iBAAgB;AAAA,YAChB,aAAY;AAAA,YACZ,WAAWH;AAAA,YACX,aAAa,GAAGA,CAAQ;AAAA,YAExB,UAAA;AAAA,cAAA,gBAAAoB,EAACE,KAAS,iBAAgB,UAAS,aAAY,UAAS,UAAU,IAChE,UAAA;AAAA,gBAAC,gBAAAL,EAAAM,GAAA,EAAM,KAAKtB,KAAY,IAAI,OAAO,IAAI,QAAQ,IAAI,YAAY,IAAO,KAAI,SAAS,CAAA;AAAA,gBAEnF,gBAAAgB,EAACO,GAAA,EAAa,WAAU,OAAM,QAAO,UAAS,QAAO,OAClD,UACHtB,EAAA,CAAA;AAAA,cAAA,GACF;AAAA,cAECW,uBACEY,GAAA,EAAsB,SAAS,KAAK,UAAU,KAC7C,UAAA,gBAAAR;AAAA,gBAACS;AAAA,gBAAA;AAAA,kBACC,OAAO;AAAA,kBACP,QAAQ;AAAA,kBACR,KAAKb;AAAA,kBACL,UAAUhB;AAAA,gBAAA;AAAA,cAAA,GAEd;AAAA,YAAA;AAAA,UAAA;AAAA,QAEJ;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;"}
@@ -0,0 +1,8 @@
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
@@ -0,0 +1 @@
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;"}
@@ -0,0 +1,11 @@
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
@@ -0,0 +1 @@
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;"}