@cuemath/leap 3.2.19-beta-0.1 → 3.2.19-link.0
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.
- package/dist/assets/illustrations/illustrations.js +6 -6
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/line-icons/icons/star3.js +32 -0
- package/dist/assets/line-icons/icons/star3.js.map +1 -0
- package/dist/assets/lottie/lottie.js +0 -5
- package/dist/assets/lottie/lottie.js.map +1 -1
- package/dist/features/analytics-events/platform-events-student.js +1 -2
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/analytics-events/platform-events-teacher.js +4 -6
- package/dist/features/analytics-events/platform-events-teacher.js.map +1 -1
- package/dist/features/analytics-events/whitelist-events.js +8 -10
- package/dist/features/analytics-events/whitelist-events.js.map +1 -1
- package/dist/features/chapters-v2/utils/node-card-utils.js +2 -2
- package/dist/features/chapters-v2/utils/node-card-utils.js.map +1 -1
- package/dist/features/communication/pub-sub/constants.js +4 -7
- package/dist/features/communication/pub-sub/constants.js.map +1 -1
- package/dist/features/homework/homework-card-view.js +97 -85
- package/dist/features/homework/homework-card-view.js.map +1 -1
- package/dist/features/homework/homework-card.js +42 -44
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +29 -31
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list.js +48 -54
- package/dist/features/homework/hw-card-list/hw-card-list.js.map +1 -1
- package/dist/features/homework/utils.js +27 -33
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js +11 -17
- package/dist/features/journey/hooks/use-home-page-journey/tooltip-item.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js +1 -1
- package/dist/features/journey/journey-id/journey-id-student.js.map +1 -1
- package/dist/features/journey/journey-id/journey-id-teacher.js +2 -2
- package/dist/features/journey/journey-id/journey-id-teacher.js.map +1 -1
- package/dist/features/puzzles/app/puzzle-app-styled.js +6 -10
- package/dist/features/puzzles/app/puzzle-app-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card-styled.js +69 -24
- package/dist/features/puzzles/comps/puzzle-card-styled.js.map +1 -1
- package/dist/features/puzzles/comps/puzzle-card.js +30 -79
- package/dist/features/puzzles/comps/puzzle-card.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js +25 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-styled.js.map +1 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container.js +107 -100
- package/dist/features/puzzles/puzzle-container/puzzle-container.js.map +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js +1 -1
- package/dist/features/puzzles/puzzle-feedback-celebration/puzzle-feedback-celebration.js.map +1 -1
- package/dist/features/puzzles/utils/puzzle-pattern.js +13 -28
- package/dist/features/puzzles/utils/puzzle-pattern.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js +7 -50
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro-styled.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +15 -69
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js +49 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile-styled.js.map +1 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js +64 -0
- package/dist/features/trial-session/comps/teacher-intro/teacher-profile/teacher-profile.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js +28 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items-styled.js.map +1 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js +83 -0
- package/dist/features/ui/accordion/accordion-items/accordion-items.js.map +1 -0
- package/dist/features/ui/accordion/accordion.js +62 -0
- package/dist/features/ui/accordion/accordion.js.map +1 -0
- package/dist/features/ui/inputs/base-input/base-input.js +11 -11
- package/dist/features/ui/inputs/base-input/base-input.js.map +1 -1
- package/dist/features/ui/inputs/text-input/text-input.js +19 -18
- package/dist/features/ui/inputs/text-input/text-input.js.map +1 -1
- package/dist/features/ui/modals/modal-styled.js +42 -8
- package/dist/features/ui/modals/modal-styled.js.map +1 -1
- package/dist/features/ui/modals/modal.js +37 -27
- package/dist/features/ui/modals/modal.js.map +1 -1
- package/dist/features/ui/text/text.js +31 -29
- package/dist/features/ui/text/text.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +2 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +19 -20
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js +12 -16
- package/dist/features/worksheet/worksheet/worksheet-question/learnosity-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js +47 -101
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js +146 -149
- package/dist/features/worksheet/worksheet/worksheet-question/worksheet-question.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js +207 -242
- package/dist/features/worksheet/worksheet/worksheet-questions-controller/worksheet-questions-controller.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-styled.js +37 -37
- package/dist/features/worksheet/worksheet/worksheet-styled.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-types.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet.js +313 -307
- package/dist/features/worksheet/worksheet/worksheet.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js +1 -1
- package/dist/features/worksheet/worksheet-preview/hooks/use-worksheet-layout.js.map +1 -1
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js +35 -44
- package/dist/features/worksheet/worksheet-preview/worksheet-preview.js.map +1 -1
- package/dist/index.d.ts +71 -89
- package/dist/index.js +626 -626
- package/dist/static/puzzle-pattern-blue.f4bea1ee.svg +1 -0
- package/dist/static/puzzle-pattern-green.c9f84bbc.svg +1 -0
- package/dist/static/puzzle-pattern-orange.3da09665.svg +1 -0
- package/dist/static/puzzle-pattern-purple.5fb5a319.svg +1 -0
- package/dist/static/puzzle-pattern-yellow.aadbf457.svg +1 -0
- package/dist/static/stripe-blurple.6abf422f.svg +1 -0
- package/package.json +2 -3
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js +0 -72
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-assigned.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-attempt-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js +0 -63
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-dashboard-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js +0 -67
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-intro-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-progress-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-review-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js +0 -59
- package/dist/features/journey/hooks/use-puzzles-journey/use-puzzle-unassign-journey.js.map +0 -1
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js +0 -70
- package/dist/features/journey/hooks/use-puzzles-journey/use-teacher-puzzle-assigned-journey.js.map +0 -1
- package/dist/features/puzzles/api/puzzle-dashboard.js +0 -10
- package/dist/features/puzzles/api/puzzle-dashboard.js.map +0 -1
- package/dist/features/puzzles/constants/puzzle-container.js +0 -8
- package/dist/features/puzzles/constants/puzzle-container.js.map +0 -1
- package/dist/features/puzzles/puzzle-analytics-events.js +0 -11
- package/dist/features/puzzles/puzzle-analytics-events.js.map +0 -1
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js +0 -55
- package/dist/features/puzzles/puzzle-container/puzzle-container-view.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js +0 -37
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard-styled.js.map +0 -1
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js +0 -110
- package/dist/features/puzzles/puzzle-dashboard/puzzle-dashboard.js.map +0 -1
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js +0 -28
- package/dist/features/worksheet/worksheet/hooks/use-worksheet-journey.js.map +0 -1
- package/dist/static/puzzle-blue-lottie.7017e2e8.json +0 -1
- package/dist/static/puzzle-blue-lottie.bf64ebc5.json +0 -12760
- package/dist/static/puzzle-dashboard-banner.b7956519.svg +0 -1
- package/dist/static/puzzle-green-lottie.1da90698.json +0 -1
- package/dist/static/puzzle-orange-lottie.cfcf3724.json +0 -1
- package/dist/static/puzzle-pattern-blue.abff0164.svg +0 -1
- package/dist/static/puzzle-pattern-green.b8ba1840.svg +0 -1
- package/dist/static/puzzle-pattern-orange.3f5a17ff.svg +0 -1
- package/dist/static/puzzle-pattern-purple.14b09759.svg +0 -1
- package/dist/static/puzzle-pattern-yellow.50917fab.svg +0 -1
- package/dist/static/puzzle-purple-lottie.e70de110.json +0 -9860
- package/dist/static/puzzle-yellow-lottie.275b5cf4.json +0 -1
@@ -1,13 +1,13 @@
|
|
1
1
|
import { jsxs as l, jsx as r } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
2
|
+
import { memo as O, useState as y, useRef as Q, useMemo as S, useCallback as d, useEffect as B } from "react";
|
3
|
+
import V from "../../../assets/line-icons/icons/chevron-left.js";
|
4
|
+
import F from "../../../assets/line-icons/icons/chevron-right.js";
|
5
5
|
import u from "../../ui/layout/flex-view.js";
|
6
6
|
import g from "../../ui/text/text.js";
|
7
7
|
import E from "../homework-card.js";
|
8
|
-
import { ContentWrapper as
|
9
|
-
import { getWaitForReviewSheetsCount as
|
10
|
-
const
|
8
|
+
import { ContentWrapper as q, ScrollButton as W, ScrollContainer as Y, QueueWrapper as z, QueueText as J } from "./hw-card-list-styled.js";
|
9
|
+
import { getWaitForReviewSheetsCount as P } from "./hw-card-list-utils.js";
|
10
|
+
const Z = ({
|
11
11
|
userType: C,
|
12
12
|
studentId: _,
|
13
13
|
isHwProcessing: K,
|
@@ -18,24 +18,23 @@ const U = ({
|
|
18
18
|
onNodeView: x,
|
19
19
|
onTestReview: H,
|
20
20
|
onNodeReview: L,
|
21
|
-
onNodeUnassign: A
|
22
|
-
puzzleHWCardRef: T
|
21
|
+
onNodeUnassign: A
|
23
22
|
}) => {
|
24
|
-
const [
|
23
|
+
const [T, a] = y(!1), [j, I] = y(!1), t = Q(null), { assigned_homeworks: h = [], queued_homeworks: f = [] } = s || {}, R = S(
|
25
24
|
() => h.length + f.length,
|
26
25
|
[h, f]
|
27
|
-
),
|
26
|
+
), D = S(() => P(s), [s]), o = d(() => {
|
28
27
|
if (t.current) {
|
29
28
|
const { scrollLeft: e, scrollWidth: i, clientWidth: c } = t.current;
|
30
29
|
e > 1 && a(!0), e < i - c - 1 && I(!0);
|
31
30
|
}
|
32
|
-
}, []),
|
31
|
+
}, []), G = d(() => {
|
33
32
|
t.current && o();
|
34
|
-
}, [o]),
|
33
|
+
}, [o]), M = d(() => {
|
35
34
|
a(!1), I(!1);
|
36
|
-
}, []),
|
35
|
+
}, []), N = d(() => {
|
37
36
|
t.current && (t.current.scrollBy({ left: -200, behavior: "smooth" }), o());
|
38
|
-
}, [o]),
|
37
|
+
}, [o]), X = d(() => {
|
39
38
|
t.current && (t.current.scrollBy({ left: 200, behavior: "smooth" }), o());
|
40
39
|
}, [o]);
|
41
40
|
return B(() => {
|
@@ -52,10 +51,10 @@ const U = ({
|
|
52
51
|
}, [o]), R === 0 ? /* @__PURE__ */ l(u, { $flexRowGapX: 1, children: [
|
53
52
|
/* @__PURE__ */ r(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: "Homework (0)" }),
|
54
53
|
/* @__PURE__ */ r(g, { $renderAs: "ab2", $color: "BLACK_T_60", children: "No Homework assigned yet" })
|
55
|
-
] }) : /* @__PURE__ */ l(
|
54
|
+
] }) : /* @__PURE__ */ l(q, { $flexRowGapX: 1, $disablePointerEvents: K, children: [
|
56
55
|
/* @__PURE__ */ l(g, { $renderAs: "ac4-black", $color: "BLACK_T_60", children: [
|
57
56
|
"Homework (",
|
58
|
-
|
57
|
+
D,
|
59
58
|
"/",
|
60
59
|
R,
|
61
60
|
")"
|
@@ -64,8 +63,8 @@ const U = ({
|
|
64
63
|
u,
|
65
64
|
{
|
66
65
|
$position: "relative",
|
67
|
-
onMouseEnter:
|
68
|
-
onMouseLeave:
|
66
|
+
onMouseEnter: G,
|
67
|
+
onMouseLeave: M,
|
69
68
|
children: [
|
70
69
|
/* @__PURE__ */ r(
|
71
70
|
W,
|
@@ -75,14 +74,14 @@ const U = ({
|
|
75
74
|
$justifyContent: "center",
|
76
75
|
$alignItems: "center",
|
77
76
|
$height: "100%",
|
78
|
-
onClick:
|
79
|
-
$visible:
|
77
|
+
onClick: N,
|
78
|
+
$visible: T,
|
80
79
|
left: "0px",
|
81
80
|
right: "auto",
|
82
|
-
children: /* @__PURE__ */ r(
|
81
|
+
children: /* @__PURE__ */ r(V, { width: 24, height: 24 })
|
83
82
|
}
|
84
83
|
),
|
85
|
-
/* @__PURE__ */ r(
|
84
|
+
/* @__PURE__ */ r(Y, { ref: t, children: /* @__PURE__ */ l(u, { $flexDirection: "row", $flexGapX: 1, children: [
|
86
85
|
h.map((e, i) => {
|
87
86
|
const {
|
88
87
|
node_id: c,
|
@@ -109,8 +108,7 @@ const U = ({
|
|
109
108
|
shouldOpenOnRight: !0,
|
110
109
|
onNodeView: n ? b : x,
|
111
110
|
onNodeReview: n ? H : L,
|
112
|
-
onNodeUnassign: A
|
113
|
-
puzzleHWCardRef: T
|
111
|
+
onNodeUnassign: A
|
114
112
|
}
|
115
113
|
)
|
116
114
|
},
|
@@ -132,13 +130,13 @@ const U = ({
|
|
132
130
|
$flexGapX: 1,
|
133
131
|
children: [
|
134
132
|
i === 0 && /* @__PURE__ */ r(
|
135
|
-
|
133
|
+
z,
|
136
134
|
{
|
137
135
|
$background: "BLACK_4",
|
138
136
|
$justifyContent: "center",
|
139
137
|
$gutter: 4,
|
140
138
|
$gap: 8,
|
141
|
-
children: /* @__PURE__ */ r(
|
139
|
+
children: /* @__PURE__ */ r(J, { $renderAs: "ac3", $color: "WHITE", children: "In Queue" })
|
142
140
|
}
|
143
141
|
),
|
144
142
|
/* @__PURE__ */ r(
|
@@ -173,19 +171,19 @@ const U = ({
|
|
173
171
|
$background: "BLACK_T_60",
|
174
172
|
$justifyContent: "center",
|
175
173
|
$alignItems: "center",
|
176
|
-
onClick:
|
177
|
-
$visible:
|
174
|
+
onClick: X,
|
175
|
+
$visible: j,
|
178
176
|
left: "auto",
|
179
177
|
right: "0px",
|
180
|
-
children: /* @__PURE__ */ r(
|
178
|
+
children: /* @__PURE__ */ r(F, { width: 24, height: 24 })
|
181
179
|
}
|
182
180
|
)
|
183
181
|
]
|
184
182
|
}
|
185
183
|
)
|
186
184
|
] });
|
187
|
-
},
|
185
|
+
}, ce = O(Z);
|
188
186
|
export {
|
189
|
-
|
187
|
+
ce as default
|
190
188
|
};
|
191
189
|
//# sourceMappingURL=hw-card-list-view.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hw-card-list-view.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list-view.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { TUserTypes } from '../../ui/types';\nimport type { IHomeworkDetails } from './api/get-homeworks';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport ChevronLeftIcon from '../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport HomeworkCard from '../homework-card';\nimport * as Styled from './hw-card-list-styled';\nimport { getWaitForReviewSheetsCount } from './hw-card-list-utils';\n\ninterface IHwCardListView extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n isHwProcessing: boolean;\n hwDetails?: IHomeworkDetails;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n puzzleHWCardRef?: React.RefObject<HTMLDivElement>;\n}\n\nconst HwCardListView: FC<IHwCardListView> = ({\n userType,\n studentId,\n isHwProcessing,\n hwDetails,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n puzzleHWCardRef,\n}) => {\n const [isLeftHovered, setIsLeftHovered] = useState(false);\n const [isRightHovered, setIsRightHovered] = useState(false);\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const { assigned_homeworks: assignedHomeworks = [], queued_homeworks: queuedHomeworks = [] } =\n hwDetails || {};\n\n const totalHWSheetsCount = useMemo(\n () => assignedHomeworks.length + queuedHomeworks.length,\n [assignedHomeworks, queuedHomeworks],\n );\n const waitForReviewSheets = useMemo(() => getWaitForReviewSheetsCount(hwDetails), [hwDetails]);\n\n const updatedCanScroll = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n\n if (scrollLeft < scrollWidth - clientWidth - 1) {\n setIsRightHovered(true);\n }\n }\n }, []);\n const handleHoverEnter = useCallback(() => {\n if (!scrollRef.current) return;\n\n updatedCanScroll();\n }, [updatedCanScroll]);\n\n const handleHoverLeave = useCallback(() => {\n setIsLeftHovered(false);\n setIsRightHovered(false);\n }, []);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n useEffect(() => {\n if (hwDetails && scrollRef.current) {\n const { scrollLeft } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n }\n }, [hwDetails]);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n scrollElement.addEventListener('scroll', updatedCanScroll);\n\n return () => {\n scrollElement.removeEventListener('scroll', updatedCanScroll);\n };\n }\n }, [updatedCanScroll]);\n\n if (totalHWSheetsCount === 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework (0)\n </Text>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_60\">\n No Homework assigned yet\n </Text>\n </FlexView>\n );\n }\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1} $disablePointerEvents={isHwProcessing}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({waitForReviewSheets}/{totalHWSheetsCount})\n </Text>\n <FlexView\n $position=\"relative\"\n onMouseEnter={handleHoverEnter}\n onMouseLeave={handleHoverLeave}\n >\n <Styled.ScrollButton\n $position=\"absolute\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={isLeftHovered}\n left=\"0px\"\n right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n {assignedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n <HomeworkCard\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n puzzleHWCardRef={puzzleHWCardRef}\n />\n </FlexView>\n );\n })}\n\n {queuedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n {idx === 0 && (\n <Styled.QueueWrapper\n $background=\"BLACK_4\"\n $justifyContent=\"center\"\n $gutter={4}\n $gap={8}\n >\n <Styled.QueueText $renderAs=\"ac3\" $color=\"WHITE\">\n In Queue\n </Styled.QueueText>\n </Styled.QueueWrapper>\n )}\n <HomeworkCard\n isInQueue\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n <Styled.ScrollButton\n $position=\"absolute\"\n $width=\"60px\"\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={isRightHovered}\n left=\"auto\"\n right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(HwCardListView);\n"],"names":["HwCardListView","userType","studentId","isHwProcessing","hwDetails","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","puzzleHWCardRef","isLeftHovered","setIsLeftHovered","useState","isRightHovered","setIsRightHovered","scrollRef","useRef","assignedHomeworks","queuedHomeworks","totalHWSheetsCount","useMemo","waitForReviewSheets","getWaitForReviewSheetsCount","updatedCanScroll","useCallback","scrollLeft","scrollWidth","clientWidth","handleHoverEnter","handleHoverLeave","handleScrollLeft","handleScrollRight","useEffect","scrollElement","jsxs","FlexView","jsx","Text","Styled.ContentWrapper","Styled.ScrollButton","ChevronLeftIcon","Styled.ScrollContainer","sheet","idx","nodeId","worksheetId","nodeType","title","subtext","isDynamicSheet","HomeworkCard","Styled.QueueWrapper","Styled.QueueText","ChevronRightIcon","HwCardListView$1","memo"],"mappings":";;;;;;;;;AA6BA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA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../../../../src/features/homework/hw-card-list/hw-card-list-view.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { TUserTypes } from '../../ui/types';\nimport type { IHomeworkDetails } from './api/get-homeworks';\nimport type { FC } from 'react';\n\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport ChevronLeftIcon from '../../../assets/line-icons/icons/chevron-left';\nimport ChevronRightIcon from '../../../assets/line-icons/icons/chevron-right';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport HomeworkCard from '../homework-card';\nimport * as Styled from './hw-card-list-styled';\nimport { getWaitForReviewSheetsCount } from './hw-card-list-utils';\n\ninterface IHwCardListView extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n isHwProcessing: boolean;\n hwDetails?: IHomeworkDetails;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n}\n\nconst HwCardListView: FC<IHwCardListView> = ({\n userType,\n studentId,\n isHwProcessing,\n hwDetails,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n}) => {\n const [isLeftHovered, setIsLeftHovered] = useState(false);\n const [isRightHovered, setIsRightHovered] = useState(false);\n const scrollRef = useRef<HTMLDivElement>(null);\n\n const { assigned_homeworks: assignedHomeworks = [], queued_homeworks: queuedHomeworks = [] } =\n hwDetails || {};\n\n const totalHWSheetsCount = useMemo(\n () => assignedHomeworks.length + queuedHomeworks.length,\n [assignedHomeworks, queuedHomeworks],\n );\n const waitForReviewSheets = useMemo(() => getWaitForReviewSheetsCount(hwDetails), [hwDetails]);\n\n const updatedCanScroll = useCallback(() => {\n if (scrollRef.current) {\n const { scrollLeft, scrollWidth, clientWidth } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n\n if (scrollLeft < scrollWidth - clientWidth - 1) {\n setIsRightHovered(true);\n }\n }\n }, []);\n const handleHoverEnter = useCallback(() => {\n if (!scrollRef.current) return;\n\n updatedCanScroll();\n }, [updatedCanScroll]);\n\n const handleHoverLeave = useCallback(() => {\n setIsLeftHovered(false);\n setIsRightHovered(false);\n }, []);\n\n const handleScrollLeft = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: -200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n const handleScrollRight = useCallback(() => {\n if (scrollRef.current) {\n scrollRef.current.scrollBy({ left: 200, behavior: 'smooth' });\n updatedCanScroll();\n }\n }, [updatedCanScroll]);\n\n useEffect(() => {\n if (hwDetails && scrollRef.current) {\n const { scrollLeft } = scrollRef.current;\n\n if (scrollLeft > 1) {\n setIsLeftHovered(true);\n }\n }\n }, [hwDetails]);\n\n useEffect(() => {\n const scrollElement = scrollRef.current;\n\n if (scrollElement) {\n scrollElement.addEventListener('scroll', updatedCanScroll);\n\n return () => {\n scrollElement.removeEventListener('scroll', updatedCanScroll);\n };\n }\n }, [updatedCanScroll]);\n\n if (totalHWSheetsCount === 0) {\n return (\n <FlexView $flexRowGapX={1}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework (0)\n </Text>\n <Text $renderAs=\"ab2\" $color=\"BLACK_T_60\">\n No Homework assigned yet\n </Text>\n </FlexView>\n );\n }\n\n return (\n <Styled.ContentWrapper $flexRowGapX={1} $disablePointerEvents={isHwProcessing}>\n <Text $renderAs=\"ac4-black\" $color=\"BLACK_T_60\">\n Homework ({waitForReviewSheets}/{totalHWSheetsCount})\n </Text>\n <FlexView\n $position=\"relative\"\n onMouseEnter={handleHoverEnter}\n onMouseLeave={handleHoverLeave}\n >\n <Styled.ScrollButton\n $position=\"absolute\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n $height=\"100%\"\n onClick={handleScrollLeft}\n $visible={isLeftHovered}\n left=\"0px\"\n right=\"auto\"\n >\n <ChevronLeftIcon width={24} height={24} />\n </Styled.ScrollButton>\n\n <Styled.ScrollContainer ref={scrollRef}>\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n {assignedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n <HomeworkCard\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n\n {queuedHomeworks.map((sheet, idx) => {\n const {\n node_id: nodeId,\n worksheet_id: worksheetId,\n node_type: nodeType,\n title,\n subtext,\n } = sheet;\n const isDynamicSheet = nodeType === 'DYNAMIC';\n\n return (\n <FlexView\n key={`${worksheetId}_${nodeId}_${idx}`}\n $flexDirection=\"row\"\n $flexGapX={1}\n >\n {idx === 0 && (\n <Styled.QueueWrapper\n $background=\"BLACK_4\"\n $justifyContent=\"center\"\n $gutter={4}\n $gap={8}\n >\n <Styled.QueueText $renderAs=\"ac3\" $color=\"WHITE\">\n In Queue\n </Styled.QueueText>\n </Styled.QueueWrapper>\n )}\n <HomeworkCard\n isInQueue\n userType={userType}\n header={title}\n subHeader={subtext || ''}\n nodeData={sheet}\n renderAs=\"homework\"\n studentId={studentId}\n onNodeAttempt={isDynamicSheet ? onTestStart : onNodeAttempt}\n shouldOpenOnRight={true}\n onNodeView={isDynamicSheet ? onTestPreview : onNodeView}\n onNodeReview={isDynamicSheet ? onTestReview : onNodeReview}\n onNodeUnassign={onNodeUnassign}\n />\n </FlexView>\n );\n })}\n </FlexView>\n </Styled.ScrollContainer>\n <Styled.ScrollButton\n $position=\"absolute\"\n $width=\"60px\"\n $height=\"100%\"\n $background=\"BLACK_T_60\"\n $justifyContent=\"center\"\n $alignItems=\"center\"\n onClick={handleScrollRight}\n $visible={isRightHovered}\n left=\"auto\"\n right=\"0px\"\n >\n <ChevronRightIcon width={24} height={24} />\n </Styled.ScrollButton>\n </FlexView>\n </Styled.ContentWrapper>\n );\n};\n\nexport default memo(HwCardListView);\n"],"names":["HwCardListView","userType","studentId","isHwProcessing","hwDetails","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","isLeftHovered","setIsLeftHovered","useState","isRightHovered","setIsRightHovered","scrollRef","useRef","assignedHomeworks","queuedHomeworks","totalHWSheetsCount","useMemo","waitForReviewSheets","getWaitForReviewSheetsCount","updatedCanScroll","useCallback","scrollLeft","scrollWidth","clientWidth","handleHoverEnter","handleHoverLeave","handleScrollLeft","handleScrollRight","useEffect","scrollElement","jsxs","FlexView","jsx","Text","Styled.ContentWrapper","Styled.ScrollButton","ChevronLeftIcon","Styled.ScrollContainer","sheet","idx","nodeId","worksheetId","nodeType","title","subtext","isDynamicSheet","HomeworkCard","Styled.QueueWrapper","Styled.QueueText","ChevronRightIcon","HwCardListView$1","memo"],"mappings":";;;;;;;;;AA4BA,MAAMA,IAAsC,CAAC;AAAA,EAC3C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AACF,MAAM;AACJ,QAAM,CAACC,GAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC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,
|
1
|
+
import { jsx as h } from "react/jsx-runtime";
|
2
|
+
import { memo as b, useEffect as e, useCallback as j } from "react";
|
3
|
+
import { useJourney as A } from "../../journey/use-journey/use-journey.js";
|
4
|
+
import { useGetHomeworks as D } from "./api/get-homeworks.js";
|
5
|
+
import E from "./hw-card-list-view.js";
|
6
|
+
const F = ({
|
7
|
+
userType: r,
|
8
|
+
studentId: i,
|
9
|
+
stream: o,
|
10
|
+
onTestStart: k,
|
11
|
+
onNodeAttempt: p,
|
12
|
+
onTestPreview: C,
|
13
|
+
onNodeView: H,
|
14
|
+
onTestReview: a,
|
15
|
+
onNodeReview: g,
|
18
16
|
onNodeUnassign: v,
|
19
|
-
homeworkRef:
|
20
|
-
startHomePageJourney:
|
21
|
-
canStartJourney:
|
22
|
-
canStartPuzzleAssignedJourney: p
|
17
|
+
homeworkRef: L,
|
18
|
+
startHomePageJourney: c,
|
19
|
+
canStartJourney: m
|
23
20
|
}) => {
|
24
21
|
const {
|
25
|
-
get:
|
26
|
-
data:
|
27
|
-
isProcessingFailed:
|
28
|
-
isProcessing:
|
22
|
+
get: l,
|
23
|
+
data: x,
|
24
|
+
isProcessingFailed: P,
|
25
|
+
isProcessing: f,
|
29
26
|
isProcessed: w,
|
30
|
-
isStale:
|
31
|
-
} =
|
27
|
+
isStale: t
|
28
|
+
} = D(i), { isJourneyActive: n } = A();
|
32
29
|
e(() => {
|
33
|
-
w &&
|
30
|
+
w && c && !n && m && c({ studentId: i, stream: o, userType: r });
|
34
31
|
}, [
|
32
|
+
m,
|
35
33
|
n,
|
36
|
-
r,
|
37
34
|
w,
|
38
|
-
|
39
|
-
i,
|
35
|
+
c,
|
40
36
|
o,
|
41
|
-
|
37
|
+
i,
|
38
|
+
r
|
42
39
|
]);
|
43
|
-
const s =
|
44
|
-
|
45
|
-
}, [
|
40
|
+
const s = j(() => {
|
41
|
+
l(i, void 0, { stream: o });
|
42
|
+
}, [l, o, i]);
|
46
43
|
return e(() => {
|
47
|
-
!
|
48
|
-
}, [s,
|
44
|
+
!f && t && s();
|
45
|
+
}, [s, f, t]), e(() => {
|
49
46
|
s();
|
50
|
-
}, [s]),
|
51
|
-
|
52
|
-
}, [p, a, r, l]), L ? null : /* @__PURE__ */ C("div", { ref: D, children: /* @__PURE__ */ C(
|
53
|
-
J,
|
47
|
+
}, [s]), P ? null : /* @__PURE__ */ h("div", { ref: L, children: /* @__PURE__ */ h(
|
48
|
+
E,
|
54
49
|
{
|
55
|
-
isHwProcessing:
|
56
|
-
hwDetails:
|
57
|
-
onTestStart:
|
58
|
-
onNodeAttempt:
|
59
|
-
onTestPreview:
|
60
|
-
onNodeView:
|
61
|
-
onTestReview:
|
62
|
-
onNodeReview:
|
50
|
+
isHwProcessing: f,
|
51
|
+
hwDetails: x,
|
52
|
+
onTestStart: k,
|
53
|
+
onNodeAttempt: p,
|
54
|
+
onTestPreview: C,
|
55
|
+
onNodeView: H,
|
56
|
+
onTestReview: a,
|
57
|
+
onNodeReview: g,
|
63
58
|
onNodeUnassign: v,
|
64
|
-
userType:
|
65
|
-
studentId:
|
66
|
-
puzzleHWCardRef: x
|
59
|
+
userType: r,
|
60
|
+
studentId: i
|
67
61
|
}
|
68
62
|
) });
|
69
|
-
},
|
63
|
+
}, u = b(F);
|
70
64
|
export {
|
71
|
-
|
65
|
+
u as default
|
72
66
|
};
|
73
67
|
//# sourceMappingURL=hw-card-list.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect
|
1
|
+
{"version":3,"file":"hw-card-list.js","sources":["../../../../src/features/homework/hw-card-list/hw-card-list.tsx"],"sourcesContent":["import type {\n INodeCardCallbacks,\n INodeDataProps,\n} from '../../chapters-v2/comps/node-card/node-card-types';\nimport type { IHomepageStartJourneyProps } from '../../journey/hooks/use-home-page-journey/homepage-journey-types';\nimport type { TUserTypes } from '../../ui/types';\n\nimport React, { memo, useCallback, useEffect } from 'react';\n\nimport { useJourney } from '../../journey/use-journey/use-journey';\nimport { useGetHomeworks } from './api/get-homeworks';\nimport HwCardListView from './hw-card-list-view';\n\ninterface HWCardListProps extends INodeCardCallbacks {\n userType: TUserTypes;\n studentId: string;\n stream: string;\n onTestPreview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n onTestStart?: (sheetData: INodeDataProps, homeworkId?: string) => void;\n onTestReview?: (sheetData: INodeDataProps, milestoneId?: string) => void;\n homeworkRef?: React.RefObject<HTMLDivElement>;\n startHomePageJourney?: ({ studentId, stream, userType }: IHomepageStartJourneyProps) => void;\n canStartJourney?: boolean;\n}\n\nconst HWCardList: React.FC<HWCardListProps> = ({\n userType,\n studentId,\n stream,\n onTestStart,\n onNodeAttempt,\n onTestPreview,\n onNodeView,\n onTestReview,\n onNodeReview,\n onNodeUnassign,\n homeworkRef,\n startHomePageJourney,\n canStartJourney,\n}) => {\n const {\n get: getHomeworks,\n data: hwDetails,\n isProcessingFailed,\n isProcessing,\n isProcessed,\n isStale,\n } = useGetHomeworks(studentId);\n const { isJourneyActive } = useJourney();\n\n useEffect(() => {\n if (isProcessed && startHomePageJourney && !isJourneyActive && canStartJourney) {\n startHomePageJourney({ studentId, stream, userType });\n }\n }, [\n canStartJourney,\n isJourneyActive,\n isProcessed,\n startHomePageJourney,\n stream,\n studentId,\n userType,\n ]);\n\n const fetchHomeworks = useCallback(() => {\n getHomeworks(studentId, undefined, { stream });\n }, [getHomeworks, stream, studentId]);\n\n useEffect(() => {\n if (!isProcessing && isStale) {\n fetchHomeworks();\n }\n }, [fetchHomeworks, isProcessing, isStale]);\n\n useEffect(() => {\n fetchHomeworks();\n }, [fetchHomeworks]);\n\n if (isProcessingFailed) {\n return null;\n }\n\n return (\n <div ref={homeworkRef}>\n <HwCardListView\n isHwProcessing={isProcessing}\n hwDetails={hwDetails}\n onTestStart={onTestStart}\n onNodeAttempt={onNodeAttempt}\n onTestPreview={onTestPreview}\n onNodeView={onNodeView}\n onTestReview={onTestReview}\n onNodeReview={onNodeReview}\n onNodeUnassign={onNodeUnassign}\n userType={userType}\n studentId={studentId}\n />\n </div>\n );\n};\n\nexport default memo(HWCardList);\n"],"names":["HWCardList","userType","studentId","stream","onTestStart","onNodeAttempt","onTestPreview","onNodeView","onTestReview","onNodeReview","onNodeUnassign","homeworkRef","startHomePageJourney","canStartJourney","getHomeworks","hwDetails","isProcessingFailed","isProcessing","isProcessed","isStale","useGetHomeworks","isJourneyActive","useJourney","useEffect","fetchHomeworks","useCallback","jsx","HwCardListView","hwCardList","memo"],"mappings":";;;;;AAyBA,MAAMA,IAAwC,CAAC;AAAA,EAC7C,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,eAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,iBAAAC;AACF,MAAM;AACE,QAAA;AAAA,IACJ,KAAKC;AAAA,IACL,MAAMC;AAAA,IACN,oBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,aAAAC;AAAA,IACA,SAAAC;AAAA,EAAA,IACEC,EAAgBlB,CAAS,GACvB,EAAE,iBAAAmB,MAAoBC;AAE5B,EAAAC,EAAU,MAAM;AACd,IAAIL,KAAeN,KAAwB,CAACS,KAAmBR,KAC7DD,EAAqB,EAAE,WAAAV,GAAW,QAAAC,GAAQ,UAAAF,EAAU,CAAA;AAAA,EACtD,GACC;AAAA,IACDY;AAAA,IACAQ;AAAA,IACAH;AAAA,IACAN;AAAA,IACAT;AAAA,IACAD;AAAA,IACAD;AAAA,EAAA,CACD;AAEK,QAAAuB,IAAiBC,EAAY,MAAM;AACvC,IAAAX,EAAaZ,GAAW,QAAW,EAAE,QAAAC,EAAQ,CAAA;AAAA,EAC5C,GAAA,CAACW,GAAcX,GAAQD,CAAS,CAAC;AAYpC,SAVAqB,EAAU,MAAM;AACV,IAAA,CAACN,KAAgBE,KACJK;EAEhB,GAAA,CAACA,GAAgBP,GAAcE,CAAO,CAAC,GAE1CI,EAAU,MAAM;AACC,IAAAC;EAAA,GACd,CAACA,CAAc,CAAC,GAEfR,IACK,OAIP,gBAAAU,EAAC,OAAI,EAAA,KAAKf,GACR,UAAA,gBAAAe;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,gBAAgBV;AAAA,MAChB,WAAAF;AAAA,MACA,aAAAX;AAAA,MACA,eAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,UAAAT;AAAA,MACA,WAAAC;AAAA,IAAA;AAAA,EAEJ,EAAA,CAAA;AAEJ,GAEe0B,IAAAC,EAAK7B,CAAU;"}
|
@@ -1,54 +1,48 @@
|
|
1
1
|
import { TESTS_CREATION_ANALYTICS_EVENTS as l } from "../milestone/milestone-tests/tests-creation/tests-creation-analytics-events.js";
|
2
|
-
import { NODE_TYPE as
|
2
|
+
import { NODE_TYPE as E } from "../sheets/constants/sheet.js";
|
3
3
|
import { HOMEWORK_ANALYTICS_EVENTS as c } from "./homework-analytics-events.js";
|
4
4
|
const y = ({
|
5
|
-
canResume:
|
6
|
-
canStart:
|
7
|
-
homeworkId:
|
8
|
-
isHomeWork:
|
9
|
-
isStudent:
|
10
|
-
milestoneId:
|
11
|
-
nodeType:
|
12
|
-
studentId:
|
13
|
-
userNodeId:
|
5
|
+
canResume: a,
|
6
|
+
canStart: i,
|
7
|
+
homeworkId: e,
|
8
|
+
isHomeWork: _,
|
9
|
+
isStudent: o,
|
10
|
+
milestoneId: n,
|
11
|
+
nodeType: t,
|
12
|
+
studentId: r,
|
13
|
+
userNodeId: s
|
14
14
|
}) => {
|
15
|
-
if (
|
16
|
-
if (
|
17
|
-
return
|
15
|
+
if (o) {
|
16
|
+
if (_)
|
17
|
+
return i || a ? {
|
18
18
|
analyticsLabel: c.HOMEWORK_ATTEMPTED,
|
19
|
-
analyticsProps: { student_id:
|
19
|
+
analyticsProps: { student_id: r, node_type: t, homework_id: e }
|
20
20
|
} : {
|
21
21
|
analyticsLabel: "homework-student-menu",
|
22
|
-
analyticsProps: { student_id:
|
22
|
+
analyticsProps: { student_id: r, node_type: t, homework_id: e }
|
23
23
|
};
|
24
|
-
if (
|
24
|
+
if (i || a)
|
25
25
|
return {
|
26
|
-
analyticsLabel:
|
26
|
+
analyticsLabel: t === E.DYNAMIC ? l.CUSTOM_TEST_ATTEMPTED : "node-attempted",
|
27
27
|
analyticsProps: {
|
28
|
-
student_id:
|
29
|
-
node_type:
|
30
|
-
user_node_id:
|
31
|
-
milestone_id:
|
32
|
-
can_start:
|
33
|
-
can_resume:
|
28
|
+
student_id: r,
|
29
|
+
node_type: t,
|
30
|
+
user_node_id: s,
|
31
|
+
milestone_id: n,
|
32
|
+
can_start: i,
|
33
|
+
can_resume: a
|
34
34
|
}
|
35
35
|
};
|
36
36
|
}
|
37
|
-
return
|
37
|
+
return _ ? {
|
38
38
|
analyticsLabel: "homework-card-teacher",
|
39
|
-
analyticsProps: { student_id:
|
39
|
+
analyticsProps: { student_id: r, node_type: t }
|
40
40
|
} : {
|
41
41
|
analyticsLabel: "goals-card-teacher",
|
42
|
-
analyticsProps: { student_id:
|
42
|
+
analyticsProps: { student_id: r, node_type: t }
|
43
43
|
};
|
44
|
-
}, T = (t) => {
|
45
|
-
if (!t)
|
46
|
-
return;
|
47
|
-
const { assigned_homeworks: e } = t;
|
48
|
-
return e.find((i) => i.node_type === n.PUZZLE_CARD);
|
49
44
|
};
|
50
45
|
export {
|
51
|
-
y as getCardAnalyticProps
|
52
|
-
T as getPuzzleCardData
|
46
|
+
y as getCardAnalyticProps
|
53
47
|
};
|
54
48
|
//# sourceMappingURL=utils.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../../src/features/homework/utils.ts"],"sourcesContent":["import type { TNodeTypes } from '../chapters-v2/comps/node-card/node-card-types';\n\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../milestone/milestone-tests/tests-creation/tests-creation-analytics-events';\nimport { NODE_TYPE } from '../sheets/constants/sheet';\nimport { HOMEWORK_ANALYTICS_EVENTS } from './homework-analytics-events';\n\ninterface IGetCardAnalyticProps {\n canResume: boolean;\n canStart: boolean;\n homeworkId?: string;\n isHomeWork: boolean;\n isStudent: boolean;\n milestoneId?: string;\n nodeType: TNodeTypes;\n studentId: string;\n userNodeId: string | null;\n}\n\nconst getCardAnalyticProps = ({\n canResume,\n canStart,\n homeworkId,\n isHomeWork,\n isStudent,\n milestoneId,\n nodeType,\n studentId,\n userNodeId,\n}: IGetCardAnalyticProps) => {\n if (isStudent) {\n if (isHomeWork) {\n if (canStart || canResume) {\n return {\n analyticsLabel: HOMEWORK_ANALYTICS_EVENTS.HOMEWORK_ATTEMPTED,\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n return {\n analyticsLabel: 'homework-student-menu',\n analyticsProps: { student_id: studentId, node_type: nodeType, homework_id: homeworkId },\n };\n }\n\n if (canStart || canResume) {\n return {\n analyticsLabel:\n nodeType === NODE_TYPE.DYNAMIC\n ? TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_ATTEMPTED\n : 'node-attempted',\n analyticsProps: {\n student_id: studentId,\n node_type: nodeType,\n user_node_id: userNodeId,\n milestone_id: milestoneId,\n can_start: canStart,\n can_resume: canResume,\n },\n };\n }\n }\n\n if (isHomeWork) {\n return {\n analyticsLabel: 'homework-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n }\n\n return {\n analyticsLabel: 'goals-card-teacher',\n analyticsProps: { student_id: studentId, node_type: nodeType },\n };\n};\n\nexport { getCardAnalyticProps };\n"],"names":["getCardAnalyticProps","canResume","canStart","homeworkId","isHomeWork","isStudent","milestoneId","nodeType","studentId","userNodeId","HOMEWORK_ANALYTICS_EVENTS","NODE_TYPE","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;AAkBA,MAAMA,IAAuB,CAAC;AAAA,EAC5B,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AACF,MAA6B;AAC3B,MAAIJ,GAAW;AACb,QAAID;AACF,aAAIF,KAAYD,IACP;AAAA,QACL,gBAAgBS,EAA0B;AAAA,QAC1C,gBAAgB,EAAE,YAAYF,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA,IAInF;AAAA,QACL,gBAAgB;AAAA,QAChB,gBAAgB,EAAE,YAAYK,GAAW,WAAWD,GAAU,aAAaJ,EAAW;AAAA,MAAA;AAI1F,QAAID,KAAYD;AACP,aAAA;AAAA,QACL,gBACEM,MAAaI,EAAU,UACnBC,EAAgC,wBAChC;AAAA,QACN,gBAAgB;AAAA,UACd,YAAYJ;AAAA,UACZ,WAAWD;AAAA,UACX,cAAcE;AAAA,UACd,cAAcH;AAAA,UACd,WAAWJ;AAAA,UACX,YAAYD;AAAA,QACd;AAAA,MAAA;AAAA,EAGN;AAEA,SAAIG,IACK;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYI,GAAW,WAAWD,EAAS;AAAA,EAAA,IAI1D;AAAA,IACL,gBAAgB;AAAA,IAChB,gBAAgB,EAAE,YAAYC,GAAW,WAAWD,EAAS;AAAA,EAAA;AAEjE;"}
|
@@ -1,28 +1,22 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import { memo as
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
const
|
7
|
-
|
8
|
-
element: r,
|
9
|
-
buttonLabel: t,
|
10
|
-
onButtonClick: m,
|
11
|
-
ctaWidth: i
|
12
|
-
}) => /* @__PURE__ */ l(p, { $flexRowGapX: 0.75, children: [
|
13
|
-
r ? /* @__PURE__ */ o(s, { children: r }) : /* @__PURE__ */ o(a, { $renderAs: "ab2-bold", children: e }),
|
1
|
+
import { jsxs as i, jsx as o, Fragment as l } from "react/jsx-runtime";
|
2
|
+
import { memo as s } from "react";
|
3
|
+
import n from "../../../ui/buttons/button/button.js";
|
4
|
+
import d from "../../../ui/layout/flex-view.js";
|
5
|
+
import p from "../../../ui/text/text.js";
|
6
|
+
const a = ({ text: e, element: r, buttonLabel: t, onButtonClick: m }) => /* @__PURE__ */ i(d, { $flexRowGapX: 0.75, children: [
|
7
|
+
r ? /* @__PURE__ */ o(l, { children: r }) : /* @__PURE__ */ o(p, { $renderAs: "ab2-bold", children: e }),
|
14
8
|
/* @__PURE__ */ o(
|
15
|
-
|
9
|
+
n,
|
16
10
|
{
|
17
11
|
label: t,
|
18
12
|
size: "xsmall",
|
19
|
-
|
13
|
+
widthX: 6,
|
20
14
|
renderAs: "secondary",
|
21
15
|
onClick: m
|
22
16
|
}
|
23
17
|
)
|
24
|
-
] }),
|
18
|
+
] }), w = s(a);
|
25
19
|
export {
|
26
|
-
|
20
|
+
w as default
|
27
21
|
};
|
28
22
|
//# sourceMappingURL=tooltip-item.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tooltip-item.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/tooltip-item.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface ITooltipItemProps {\n text?: string;\n element?: JSX.Element;\n buttonLabel: string;\n onButtonClick: () => void;\n
|
1
|
+
{"version":3,"file":"tooltip-item.js","sources":["../../../../../src/features/journey/hooks/use-home-page-journey/tooltip-item.tsx"],"sourcesContent":["import type { JSX } from 'react';\n\nimport { memo } from 'react';\n\nimport Button from '../../../ui/buttons/button/button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Text from '../../../ui/text/text';\n\ninterface ITooltipItemProps {\n text?: string;\n element?: JSX.Element;\n buttonLabel: string;\n onButtonClick: () => void;\n}\n\nconst TooltipItem = ({ text, element, buttonLabel, onButtonClick }: ITooltipItemProps) => (\n <FlexView $flexRowGapX={0.75}>\n {element ? <>{element}</> : <Text $renderAs=\"ab2-bold\">{text}</Text>}\n <Button\n label={buttonLabel}\n size=\"xsmall\"\n widthX={6}\n renderAs=\"secondary\"\n onClick={onButtonClick}\n />\n </FlexView>\n);\n\nexport default memo(TooltipItem);\n"],"names":["TooltipItem","text","element","buttonLabel","onButtonClick","jsxs","FlexView","Text","jsx","Button","TooltipItem$1","memo"],"mappings":";;;;;AAeA,MAAMA,IAAc,CAAC,EAAE,MAAAC,GAAM,SAAAC,GAAS,aAAAC,GAAa,eAAAC,QACjD,gBAAAC,EAACC,GAAS,EAAA,cAAc,MACrB,UAAA;AAAA,EAAAJ,2BAAa,UAAQA,EAAA,CAAA,sBAAOK,GAAK,EAAA,WAAU,YAAY,UAAKN,EAAA,CAAA;AAAA,EAC7D,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAON;AAAA,MACP,MAAK;AAAA,MACL,QAAQ;AAAA,MACR,UAAS;AAAA,MACT,SAASC;AAAA,IAAA;AAAA,EACX;AAAA,EACF,CAAA,GAGaM,IAAAC,EAAKX,CAAW;"}
|
@@ -1,4 +1,4 @@
|
|
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.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", 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.HOMEPAGE_JOURNEY = "HOMEPAGE_JOURNEY", E.CHAPTER_PAGE_JOURNEY = "CHAPTER_PAGE_JOURNEY", E.CHALLENGE_ARENA_JOURNEY = "CHALLENGE_ARENA_JOURNEY", E))(R || {});
|
2
2
|
export {
|
3
3
|
R as JOURNEY_ID_STUDENT
|
4
4
|
};
|
@@ -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 HOMEPAGE_JOURNEY = 'HOMEPAGE_JOURNEY',\n CHAPTER_PAGE_JOURNEY = 'CHAPTER_PAGE_JOURNEY',\n
|
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 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,mBAAmB,oBACnBA,EAAA,uBAAuB,wBACvBA,EAAA,0BAA0B,2BAbhBA,IAAAA,KAAA,CAAA,CAAA;"}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
var
|
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 || {});
|
2
2
|
export {
|
3
|
-
|
3
|
+
A 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
|
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;"}
|
@@ -3,14 +3,14 @@ import n from "../../../assets/line-icons/icons/hint-fill.js";
|
|
3
3
|
import l from "../../ui/layout/flex-view.js";
|
4
4
|
import r from "../../ui/text/text.js";
|
5
5
|
import { getPuzzleCardPattern as p } from "../utils/puzzle-pattern.js";
|
6
|
-
const
|
6
|
+
const d = o(l)(({ theme: t, $visible: i }) => {
|
7
7
|
const { gutter: e } = t.layout;
|
8
8
|
return i ? `
|
9
9
|
overflow: scroll;
|
10
10
|
padding-top: ${e * 1.5}px;
|
11
11
|
padding-bottom: ${e * 2}px;
|
12
12
|
` : "";
|
13
|
-
}),
|
13
|
+
}), g = o(l)`
|
14
14
|
position: relative;
|
15
15
|
margin: 0 auto;
|
16
16
|
box-shadow: inset 0px 0px 0px 4px ${({ theme: t, $imageHue: i }) => t.colors[`${i}_4`]};
|
@@ -27,7 +27,7 @@ const f = o(l)(({ theme: t, $visible: i }) => {
|
|
27
27
|
bottom: 0;
|
28
28
|
background-image: ${({ $imageHue: t }) => `url(${p(t)})`};
|
29
29
|
background-size: cover;
|
30
|
-
opacity: 0.
|
30
|
+
opacity: 0.2;
|
31
31
|
}
|
32
32
|
`, x = o(n)`
|
33
33
|
color: ${({ theme: t }) => t.colors.BLACK_1};
|
@@ -44,7 +44,7 @@ const f = o(l)(({ theme: t, $visible: i }) => {
|
|
44
44
|
color: ${({ theme: t }) => t.colors.BLACK};
|
45
45
|
font-size: 14px;
|
46
46
|
line-height: 1.2;
|
47
|
-
font-family: 'Athletics
|
47
|
+
font-family: 'Athletics';
|
48
48
|
|
49
49
|
font-weight: 400;
|
50
50
|
font-style: normal;
|
@@ -70,14 +70,10 @@ const f = o(l)(({ theme: t, $visible: i }) => {
|
|
70
70
|
li {
|
71
71
|
margin: 4px 0;
|
72
72
|
}
|
73
|
-
|
74
|
-
strong {
|
75
|
-
font-weight: 700;
|
76
|
-
}
|
77
73
|
`;
|
78
74
|
export {
|
79
|
-
|
80
|
-
|
75
|
+
d as PuzzleAppWrapper,
|
76
|
+
g as PuzzleContainer,
|
81
77
|
h as PuzzleQuestionWrapper,
|
82
78
|
u as StyledFeedbackText,
|
83
79
|
x as StyledHintFillIcon
|