@cuemath/leap 3.2.3-pdb-0.2 → 3.2.3-pdb-0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,30 +1,37 @@
1
1
  import o from "styled-components";
2
- import { ILLUSTRATIONS as r } from "../../../assets/illustrations/illustrations.js";
2
+ import { ILLUSTRATIONS as t } from "../../../assets/illustrations/illustrations.js";
3
+ import e from "../../../assets/line-icons/icons/puzzle2.js";
3
4
  import p from "../../ui/layout/flex-view.js";
4
- const a = o(p)``, i = o(p)`
5
- background-image: url(${r.PUZZLE_DASHBOARD_BANNER});
5
+ const s = o(p)``, l = o(p)`
6
+ background-image: url(${t.PUZZLE_DASHBOARD_BANNER});
6
7
  background-size: cover;
7
- `, c = o(p)`
8
+ `, d = o(p)`
8
9
  position: absolute;
9
10
  top: 16px;
10
11
  left: 16px;
11
- `, s = o(p)`
12
+ `, m = o(p)`
12
13
  position: sticky;
13
14
  top: 16px;
14
15
  z-index: 5;
15
- `, d = o.div`
16
+ `, u = o.div`
16
17
  display: grid;
17
18
  width: 100%;
18
19
  grid-template-columns: repeat(5, 1fr);
19
20
  column-gap: 24px;
20
21
  row-gap: 40px;
21
22
  padding: 0 37px;
23
+ `, x = o(e)`
24
+ path {
25
+ stroke: ${({ theme: r }) => r.colors.BLACK_T_60};
26
+ opacity: 0.38;
27
+ }
22
28
  `;
23
29
  export {
24
- c as BackIconContainer,
25
- s as BackIconWrapper,
26
- i as BannerWrapper,
27
- d as ContentWrapper,
28
- a as PuzzleDashboardWrapper
30
+ d as BackIconContainer,
31
+ m as BackIconWrapper,
32
+ l as BannerWrapper,
33
+ u as ContentWrapper,
34
+ s as PuzzleDashboardWrapper,
35
+ x as StyledPuzzleIcon
29
36
  };
30
37
  //# sourceMappingURL=puzzle-dashboard-styled.js.map
@@ -1 +1 @@
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 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\nexport {\n PuzzleDashboardWrapper,\n BannerWrapper,\n BackIconContainer,\n BackIconWrapper,\n ContentWrapper,\n};\n"],"names":["PuzzleDashboardWrapper","styled","FlexView","BannerWrapper","ILLUSTRATIONS","BackIconContainer","BackIconWrapper","ContentWrapper"],"mappings":";;;AAKM,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;"}
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,84 +1,107 @@
1
1
  import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { useCallback as P, useEffect as b } from "react";
3
- import x from "../../../assets/line-icons/icons/back2.js";
4
- import C from "../../ui/buttons/button/button.js";
5
- import w from "../../ui/buttons/icon-button/icon-button.js";
6
- import I from "../../ui/layout/flex-view.js";
2
+ import { useCallback as C, useEffect as w } from "react";
3
+ import P 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 n from "../../ui/layout/flex-view.js";
7
7
  import A from "../../ui/loader/app-loader/app-loader.js";
8
- import l from "../../ui/text/text.js";
9
- import { useGetPuzzles as k } from "../api/puzzle-dashboard.js";
10
- import v from "../comps/puzzle-card.js";
11
- import { PuzzleDashboardWrapper as B, BannerWrapper as X, BackIconContainer as _, BackIconWrapper as j, ContentWrapper as y } from "./puzzle-dashboard-styled.js";
12
- const S = ({ studentId: i, onBackCLick: o, onCardClick: s }) => {
8
+ import i from "../../ui/text/text.js";
9
+ import { useGetPuzzles as I } from "../api/puzzle-dashboard.js";
10
+ import _ from "../comps/puzzle-card.js";
11
+ import { PuzzleDashboardWrapper as X, BannerWrapper as j, BackIconContainer as B, BackIconWrapper as k, StyledPuzzleIcon as T, ContentWrapper as v } from "./puzzle-dashboard-styled.js";
12
+ const S = ({ studentId: a, onBackCLick: s, onCardClick: h }) => {
13
13
  const {
14
- get: a,
14
+ get: c,
15
15
  data: r,
16
- isProcessing: c,
16
+ isProcessing: d,
17
17
  isProcessingFailed: m
18
- } = k(), h = (r == null ? void 0 : r.length) || 0, n = P(() => {
19
- a(i, void 0, {
18
+ } = I(), o = (r == null ? void 0 : r.length) || 0, l = C(() => {
19
+ c(a, void 0, {
20
20
  courseStream: "MATH"
21
21
  });
22
- }, [a, i]);
23
- return b(() => {
24
- n();
25
- }, [n]), c ? /* @__PURE__ */ e(A, { height: "100vh" }) : m ? /* @__PURE__ */ t(I, { $flexGapX: 1.5, $height: "100vh", $justifyContent: "center", $alignItems: "center", children: [
26
- /* @__PURE__ */ e(l, { $renderAs: "h6", children: "Oops! Something went wrong. Please try again later." }),
22
+ }, [c, a]);
23
+ return w(() => {
24
+ l();
25
+ }, [l]), d ? /* @__PURE__ */ e(A, { height: "100vh" }) : m ? /* @__PURE__ */ t(n, { $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
27
  /* @__PURE__ */ e(
28
- C,
28
+ x,
29
29
  {
30
30
  widthX: 14,
31
31
  size: "small",
32
32
  shape: "square",
33
33
  renderAs: "primary",
34
34
  label: "Try again",
35
- onClick: n
35
+ onClick: l
36
36
  }
37
37
  )
38
- ] }) : /* @__PURE__ */ t(B, { $alignItems: "center", $flexGapX: 2.5, $position: "relative", children: [
39
- /* @__PURE__ */ t(X, { $widthX: 50, $heightX: 10.5, $justifyContent: "center", children: [
40
- /* @__PURE__ */ t(l, { $renderAs: "ah3-bold", $alignSelf: "center", children: [
41
- h,
42
- " Puzzles Solved"
43
- ] }),
44
- o && /* @__PURE__ */ e(_, { $height: "100%", children: /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(
45
- w,
46
- {
47
- Icon: x,
48
- size: "xsmall",
49
- renderAs: "secondary",
50
- analyticsLabel: "puzzle_back",
51
- onClick: o
52
- }
53
- ) }) })
54
- ] }),
55
- /* @__PURE__ */ e(y, { children: r == null ? void 0 : r.map((d) => {
56
- const {
57
- id: p,
58
- image_hue: u,
59
- image_url: f,
60
- title: g,
61
- user_node_id: z,
62
- rewards: $
63
- } = d;
64
- return /* @__PURE__ */ e(
65
- v,
66
- {
67
- imageHue: u,
68
- imageUrl: f,
69
- title: g,
70
- width: 126,
71
- height: 152,
72
- onCardClick: s,
73
- userNodeId: z,
74
- rewards: $
75
- },
76
- p
77
- );
78
- }) })
79
- ] });
80
- }, V = S;
38
+ ] }) : /* @__PURE__ */ t(
39
+ X,
40
+ {
41
+ $alignItems: "center",
42
+ $flexGapX: o === 0 ? 10 : 2.5,
43
+ $position: "relative",
44
+ children: [
45
+ /* @__PURE__ */ t(j, { $widthX: 50, $heightX: 10.5, $justifyContent: "center", children: [
46
+ /* @__PURE__ */ t(i, { $renderAs: "ah3-bold", $alignSelf: "center", children: [
47
+ o,
48
+ " Puzzles Solved"
49
+ ] }),
50
+ s && /* @__PURE__ */ e(B, { $height: "100%", children: /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
51
+ y,
52
+ {
53
+ Icon: P,
54
+ size: "xsmall",
55
+ renderAs: "secondary",
56
+ analyticsLabel: "puzzle_back",
57
+ onClick: s
58
+ }
59
+ ) }) })
60
+ ] }),
61
+ o === 0 ? /* @__PURE__ */ t(n, { $flexGapX: 1, $justifyContent: "center", children: [
62
+ /* @__PURE__ */ e(
63
+ n,
64
+ {
65
+ $flexDirection: "row",
66
+ $alignItems: "center",
67
+ $justifyContent: "center",
68
+ $width: "100%",
69
+ children: /* @__PURE__ */ e(n, { $widthX: 3.5, $heightX: 3.5, $background: "WHITE_4", children: /* @__PURE__ */ e(T, { width: 56, height: 56 }) })
70
+ }
71
+ ),
72
+ /* @__PURE__ */ t(n, { $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(v, { 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
+ } = u;
85
+ return /* @__PURE__ */ e(
86
+ _,
87
+ {
88
+ imageHue: $,
89
+ imageUrl: g,
90
+ title: f,
91
+ width: 126,
92
+ height: 152,
93
+ onCardClick: h,
94
+ userNodeId: z,
95
+ rewards: b
96
+ },
97
+ p
98
+ );
99
+ }) })
100
+ ]
101
+ }
102
+ );
103
+ }, O = S;
81
104
  export {
82
- V as default
105
+ O as default
83
106
  };
84
107
  //# sourceMappingURL=puzzle-dashboard.js.map
@@ -1 +1 @@
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 $alignItems=\"center\" $flexGapX={2.5} $position=\"relative\">\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 <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 } = 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 />\n );\n })}\n </Styled.ContentWrapper>\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.ContentWrapper","item","id","imageHue","imageUrl","title","userNodeId","rewards","PuzzleCard","PuzzleDashboard$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAA6C,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,aAAAC,QAAkB;AACxF,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAAc,GAEZC,KAAcJ,KAAA,gBAAAA,EAAmB,WAAU,GAE3CK,IAAeC,EAAY,MAAM;AACrC,IAAAP,EAAWH,GAAW,QAAW;AAAA,MAC/B,cAAc;AAAA,IAAA,CACf;AAAA,EAAA,GACA,CAACG,GAAYH,CAAS,CAAC;AAM1B,SAJA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AAGF,aAAA,gBAAAb;AAAA,QAACoB;AAAA,QAAA;AAAA,UAEC,UAAAL;AAAA,UACA,UAAAC;AAAA,UACA,OAAAC;AAAA,UACA,OAAO;AAAA,UACP,QAAQ;AAAA,UACR,aAAA3B;AAAA,UACA,YAAA4B;AAAA,UACA,SAAAC;AAAA,QAAA;AAAA,QARKL;AAAA,MAAA;AAAA,IAWV,IACH;AAAA,EACF,EAAA,CAAA;AAEJ,GAEAO,IAAelC;"}
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 } = 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 />\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","PuzzleCard","PuzzleDashboard$1"],"mappings":";;;;;;;;;;;AAcA,MAAMA,IAA6C,CAAC,EAAE,WAAAC,GAAW,aAAAC,GAAa,aAAAC,QAAkB;AACxF,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,cAAAC;AAAA,IACA,oBAAAC;AAAA,MACEC,EAAc,GAEZC,KAAcJ,KAAA,gBAAAA,EAAmB,WAAU,GAE3CK,IAAeC,EAAY,MAAM;AACrC,IAAAP,EAAWH,GAAW,QAAW;AAAA,MAC/B,cAAc;AAAA,IAAA,CACf;AAAA,EAAA,GACA,CAACG,GAAYH,CAAS,CAAC;AAM1B,SAJAW,EAAU,MAAM;AACD,IAAAF;EAAA,GACZ,CAACA,CAAY,CAAC,GAEbJ,IACK,gBAAAO,EAACC,GAAU,EAAA,QAAO,QAAQ,CAAA,IAG/BP,IAEA,gBAAAQ,EAACC,KAAS,WAAW,KAAK,SAAQ,SAAQ,iBAAgB,UAAS,aAAY,UAC7E,UAAA;AAAA,IAAC,gBAAAH,EAAAI,GAAA,EAAK,WAAU,MAAK,UAAmD,uDAAA;AAAA,IACxE,gBAAAJ;AAAA,MAACK;AAAA,MAAA;AAAA,QACC,QAAQ;AAAA,QACR,MAAK;AAAA,QACL,OAAM;AAAA,QACN,UAAS;AAAA,QACT,OAAM;AAAA,QACN,SAASR;AAAA,MAAA;AAAA,IACX;AAAA,EACF,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AAa,GAAA,EACE,UAAArB,KAAA,gBAAAA,EAAmB,IAAI,CAAQsB,MAAA;AACxB,gBAAA;AAAA,YACJ,IAAAC;AAAA,YACA,WAAWC;AAAA,YACX,WAAWC;AAAA,YACX,OAAAC;AAAA,YACA,cAAcC;AAAA,YACd,SAAAC;AAAA,UACE,IAAAN;AAGF,iBAAA,gBAAAd;AAAA,YAACqB;AAAA,YAAA;AAAA,cAEC,UAAAL;AAAA,cACA,UAAAC;AAAA,cACA,OAAAC;AAAA,cACA,OAAO;AAAA,cACP,QAAQ;AAAA,cACR,aAAA5B;AAAA,cACA,YAAA6B;AAAA,cACA,SAAAC;AAAA,YAAA;AAAA,YARKL;AAAA,UAAA;AAAA,QAWV,IACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,GAEAO,IAAenC;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cuemath/leap",
3
- "version": "3.2.3-pdb-0.2",
3
+ "version": "3.2.3-pdb-0.3",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"