@cuemath/leap 3.5.69-as1 → 3.5.69-as3
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/features/analytics-events/platform-events-student.js +1 -1
- package/dist/features/analytics-events/platform-events-student.js.map +1 -1
- package/dist/features/chapters-v2/comps/node-card/node-card-types.js.map +1 -1
- package/dist/features/chapters-v2/constants/node-constants.js +5 -4
- package/dist/features/chapters-v2/constants/node-constants.js.map +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -1
- package/dist/features/cue-canvas/sidebar/sidebar.js +4 -4
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/toolbar.js +21 -17
- package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js +23 -13
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
- package/dist/features/homework/homework-card.js +168 -161
- package/dist/features/homework/homework-card.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +96 -95
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/utils.js +65 -41
- package/dist/features/homework/utils.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +10 -5
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js.map +1 -1
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js +2 -1
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js.map +1 -1
- package/dist/features/math-fit/math-fit-overview/math-fit-overview-helpers.js +35 -26
- package/dist/features/math-fit/math-fit-overview/math-fit-overview-helpers.js.map +1 -1
- package/dist/features/math-fit/math-fit-overview/math-fit-overview.js +70 -49
- package/dist/features/math-fit/math-fit-overview/math-fit-overview.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/comps/report-header/report-header.js +4 -4
- package/dist/features/math-fit/math-fit-report/comps/report-header/report-header.js.map +1 -1
- package/dist/features/math-fit/math-fit-report/math-fit-report.js +40 -31
- package/dist/features/math-fit/math-fit-report/math-fit-report.js.map +1 -1
- package/dist/features/math-fit/mathfit-events.js +7 -0
- package/dist/features/math-fit/mathfit-events.js.map +1 -0
- package/dist/features/milestone/create/api/milestone-config.js.map +1 -1
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js +40 -36
- package/dist/features/milestone/milestone-tests/test-list-v2/test-list-view.js.map +1 -1
- package/dist/features/parent-dashboard/hooks/use-student-profile-summary-data.js.map +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js +1 -1
- package/dist/features/parent-dashboard/modals/trial-report/trial-report.js.map +1 -1
- package/dist/features/sheet-v2/resource-list/resource-list.js +39 -35
- package/dist/features/sheet-v2/resource-list/resource-list.js.map +1 -1
- package/dist/features/trial-session/api/trial-home.js +10 -16
- package/dist/features/trial-session/api/trial-home.js.map +1 -1
- package/dist/features/trial-session/api/trial-session-report.js +16 -0
- package/dist/features/trial-session/api/trial-session-report.js.map +1 -0
- package/dist/features/trial-session/api/trial-topics.js +9 -0
- package/dist/features/trial-session/api/trial-topics.js.map +1 -0
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js +62 -50
- package/dist/features/trial-session/comps/background-grid/background-grid-utils.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js +5 -14
- package/dist/features/trial-session/comps/class-preference/class-preference-styled.js.map +1 -1
- package/dist/features/trial-session/comps/class-preference/class-preference.js +55 -53
- package/dist/features/trial-session/comps/class-preference/class-preference.js.map +1 -1
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js +3 -2
- package/dist/features/trial-session/comps/communication-slide/communication-slide-constants.js.map +1 -1
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js +27 -26
- package/dist/features/trial-session/comps/confirmation-modal/hooks/use-confirmation-modal.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js +19 -18
- package/dist/features/trial-session/comps/learning-session/learning-session-styled.js.map +1 -1
- package/dist/features/trial-session/comps/learning-session/learning-session.js +34 -43
- package/dist/features/trial-session/comps/learning-session/learning-session.js.map +1 -1
- package/dist/features/trial-session/comps/navigation-bar/index.js +56 -58
- package/dist/features/trial-session/comps/navigation-bar/index.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js +29 -6
- package/dist/features/trial-session/comps/offering-information/offering-information-constants.js.map +1 -1
- package/dist/features/trial-session/comps/offering-information/offering-information.js +74 -64
- package/dist/features/trial-session/comps/offering-information/offering-information.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js +10 -9
- package/dist/features/trial-session/comps/school-goals/school-goals-styled.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js +40 -39
- package/dist/features/trial-session/comps/school-goals/school-goals-view.js.map +1 -1
- package/dist/features/trial-session/comps/school-goals/school-goals.js +39 -37
- package/dist/features/trial-session/comps/school-goals/school-goals.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js +12 -20
- package/dist/features/trial-session/comps/session-insights/session-insights-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-insights/session-insights.js +64 -63
- package/dist/features/trial-session/comps/session-insights/session-insights.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js +13 -13
- package/dist/features/trial-session/comps/session-overview/session-overview-styled.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js +23 -4
- package/dist/features/trial-session/comps/session-overview/session-overview-utils.js.map +1 -1
- package/dist/features/trial-session/comps/session-overview/session-overview.js +20 -20
- package/dist/features/trial-session/comps/session-overview/session-overview.js.map +1 -1
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js +64 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-styled.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js +5 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-types.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js +135 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary-view.js.map +1 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js +53 -0
- package/dist/features/trial-session/comps/session-progress-summary/session-progress-summary.js.map +1 -0
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js +15 -16
- package/dist/features/trial-session/comps/session-report/report-404/report-404.js.map +1 -1
- package/dist/features/trial-session/comps/session-report/session-report.js +35 -33
- package/dist/features/trial-session/comps/session-report/session-report.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js +9 -16
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js +39 -37
- package/dist/features/trial-session/comps/student-enrichment/student-enrichment.js.map +1 -1
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js +10 -9
- package/dist/features/trial-session/comps/student-feedback/student-feedback-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info-constants.js +35 -0
- package/dist/features/trial-session/comps/student-info/student-info-constants.js.map +1 -0
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js +12 -0
- package/dist/features/trial-session/comps/student-info/student-info-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/student-info/student-info-styled.js +26 -11
- package/dist/features/trial-session/comps/student-info/student-info-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-info/student-info.js +121 -75
- package/dist/features/trial-session/comps/student-info/student-info.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js +3 -12
- package/dist/features/trial-session/comps/student-personalization/student-personalization-styled.js.map +1 -1
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js +34 -33
- package/dist/features/trial-session/comps/student-personalization/student-personalization.js.map +1 -1
- package/dist/features/trial-session/comps/student-profile/student-profile.js +45 -44
- package/dist/features/trial-session/comps/student-profile/student-profile.js.map +1 -1
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js +9 -8
- package/dist/features/trial-session/comps/teacher-intro/teacher-intro.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js +11 -19
- package/dist/features/trial-session/comps/test-prep/test-prep-styled.js.map +1 -1
- package/dist/features/trial-session/comps/test-prep/test-prep.js +31 -29
- package/dist/features/trial-session/comps/test-prep/test-prep.js.map +1 -1
- package/dist/features/trial-session/comps/topic-selection/topic-item.js +39 -0
- package/dist/features/trial-session/comps/topic-selection/topic-item.js.map +1 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection-helpers.js +10 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection-helpers.js.map +1 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js +42 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection-styled.js.map +1 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js +48 -0
- package/dist/features/trial-session/comps/topic-selection/topic-selection.js.map +1 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js +21 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard-styled.js.map +1 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js +99 -0
- package/dist/features/trial-session/comps/whiteboard/whiteboard.js.map +1 -0
- package/dist/features/trial-session/comps/worksheet/worksheet.js +35 -33
- package/dist/features/trial-session/comps/worksheet/worksheet.js.map +1 -1
- package/dist/features/trial-session/context/trial-session-context.js +6 -4
- package/dist/features/trial-session/context/trial-session-context.js.map +1 -1
- package/dist/features/trial-session/helper.js +107 -65
- package/dist/features/trial-session/helper.js.map +1 -1
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js +198 -165
- package/dist/features/trial-session/hooks/use-trial-session-navigation.js.map +1 -1
- package/dist/features/trial-session/right-panel/right-panel-styled.js +8 -8
- package/dist/features/trial-session/right-panel/right-panel-styled.js.map +1 -1
- package/dist/features/trial-session/right-panel/slide-components-map.js +42 -36
- package/dist/features/trial-session/right-panel/slide-components-map.js.map +1 -1
- package/dist/features/trial-session/trial-session-constants.js +29 -16
- package/dist/features/trial-session/trial-session-constants.js.map +1 -1
- package/dist/features/trial-session/trial-session-types.js.map +1 -1
- package/dist/features/trial-session/trial-session-view.js +87 -79
- package/dist/features/trial-session/trial-session-view.js.map +1 -1
- package/dist/features/trial-session/trial-session.js +68 -58
- package/dist/features/trial-session/trial-session.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js +21 -21
- package/dist/features/ui/inputs/checkbox-input/checkbox-input.js.map +1 -1
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js +12 -12
- package/dist/features/ui/inputs/checkbox-input-list/checkbox-input-list.js.map +1 -1
- package/dist/features/ui/theme/clrs.js +1 -0
- package/dist/features/ui/theme/clrs.js.map +1 -1
- package/dist/features/worksheet/worksheet/mocks/activity.js +6 -0
- package/dist/features/worksheet/worksheet/mocks/activity.js.map +1 -0
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js +5 -0
- package/dist/features/worksheet/worksheet/mocks/signed-requests.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js +57 -0
- package/dist/features/worksheet/worksheet/stories/use-canvas-sync-broker-story.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js +263 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-story-container.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js +177 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-student.js.map +1 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js +268 -0
- package/dist/features/worksheet/worksheet/stories/worksheet-teacher.js.map +1 -0
- package/dist/features/worksheet/worksheet/worksheet-helpers.js +38 -37
- package/dist/features/worksheet/worksheet/worksheet-helpers.js.map +1 -1
- package/dist/index.d.ts +17 -6
- package/dist/index.js +384 -380
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,69 +1,78 @@
|
|
|
1
1
|
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
3
|
-
import { IS_APP_RUNNING_IN_RN as
|
|
2
|
+
import { memo as T, useMemo as m, useEffect as I } from "react";
|
|
3
|
+
import { IS_APP_RUNNING_IN_RN as u } from "../../../constants/app-config.js";
|
|
4
4
|
import o from "../../ui/layout/flex-view.js";
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import { transformSectionsToReportData as
|
|
9
|
-
|
|
5
|
+
import c from "../../ui/text/text.js";
|
|
6
|
+
import R from "./comps/report-header/report-header.js";
|
|
7
|
+
import A from "./comps/score-section/score-section.js";
|
|
8
|
+
import { transformSectionsToReportData as C, LEGEND_ITEMS as E, getQuestionStatusBgColor as b } from "./math-fit-report-helpers.js";
|
|
9
|
+
import { useUIContext as S } from "../../ui/context/context.js";
|
|
10
|
+
import { MATHFIT_ANALYTICS_EVENTS as X } from "../mathfit-events.js";
|
|
11
|
+
const v = T(function({
|
|
10
12
|
data: e,
|
|
11
|
-
onReview:
|
|
12
|
-
studentName:
|
|
13
|
-
userType:
|
|
14
|
-
onBack:
|
|
13
|
+
onReview: h,
|
|
14
|
+
studentName: f,
|
|
15
|
+
userType: s,
|
|
16
|
+
onBack: _,
|
|
15
17
|
compactView: i = !1,
|
|
16
|
-
showBorder:
|
|
18
|
+
showBorder: p = !1,
|
|
17
19
|
showEncouragement: g = !0
|
|
18
20
|
}) {
|
|
19
|
-
const
|
|
21
|
+
const d = p ? "WHITE_5" : void 0, l = m(() => C(e.sections), [e.sections]), { onEvent: $ } = S(), a = m(() => {
|
|
20
22
|
if (e.previous_score && e.score)
|
|
21
23
|
return e.score - e.previous_score;
|
|
22
24
|
}, [e.score, e.previous_score]);
|
|
23
|
-
return
|
|
25
|
+
return I(() => {
|
|
26
|
+
$(X.MATHFIT_REPORT_VIEWED, {
|
|
27
|
+
userType: u ? "PARENT" : s,
|
|
28
|
+
student_id: e.user_id,
|
|
29
|
+
mathfit_id: e.id,
|
|
30
|
+
test_score: e.score
|
|
31
|
+
});
|
|
32
|
+
}, [e, $, s]), /* @__PURE__ */ n(o, { $flex: 1, $background: "BLACK_T_04", $borderColor: d, children: [
|
|
24
33
|
/* @__PURE__ */ r(
|
|
25
|
-
|
|
34
|
+
R,
|
|
26
35
|
{
|
|
27
36
|
score: e.score ?? 0,
|
|
28
37
|
maxScore: 10,
|
|
29
|
-
scoreChange:
|
|
38
|
+
scoreChange: a,
|
|
30
39
|
createdOnTs: e.created_on_ts,
|
|
31
|
-
studentName:
|
|
32
|
-
userType:
|
|
33
|
-
onBack:
|
|
40
|
+
studentName: f,
|
|
41
|
+
userType: s,
|
|
42
|
+
onBack: _,
|
|
34
43
|
compactView: i,
|
|
35
44
|
showGreeting: !i
|
|
36
45
|
}
|
|
37
46
|
),
|
|
38
|
-
l.map((t,
|
|
47
|
+
l.map((t, x) => /* @__PURE__ */ n(o, { $background: "WHITE", children: [
|
|
39
48
|
/* @__PURE__ */ r(o, { $gapX: 1.5, $gutterX: 1.25, children: /* @__PURE__ */ r(
|
|
40
|
-
|
|
49
|
+
A,
|
|
41
50
|
{
|
|
42
|
-
onReviewSection:
|
|
51
|
+
onReviewSection: h,
|
|
43
52
|
section: t,
|
|
44
53
|
sheet: t.sheet,
|
|
45
54
|
compactView: i,
|
|
46
|
-
showReviewButton: !i && !
|
|
55
|
+
showReviewButton: !i && !u
|
|
47
56
|
}
|
|
48
57
|
) }),
|
|
49
|
-
|
|
58
|
+
x !== l.length - 1 && /* @__PURE__ */ r(o, { $height: 1, $background: "BLACK_T_08" })
|
|
50
59
|
] }, t.title)),
|
|
51
60
|
/* @__PURE__ */ n(o, { $gutterX: 1, $flexColumnGapX: 1, $gapX: 1, $flexRowGapX: 2, $alignItems: "center", children: [
|
|
52
|
-
/* @__PURE__ */ r(o, { $flexDirection: "row", $flexColumnGapX: 1, $alignItems: "center", children:
|
|
61
|
+
/* @__PURE__ */ r(o, { $flexDirection: "row", $flexColumnGapX: 1, $alignItems: "center", children: E.map((t) => /* @__PURE__ */ n(
|
|
53
62
|
o,
|
|
54
63
|
{
|
|
55
64
|
$flexDirection: "row",
|
|
56
65
|
$flexColumnGapX: 0.25,
|
|
57
66
|
$alignItems: "center",
|
|
58
67
|
children: [
|
|
59
|
-
/* @__PURE__ */ r(
|
|
68
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3", $color: "BLACK_T_60", children: t.label }),
|
|
60
69
|
/* @__PURE__ */ r(
|
|
61
70
|
o,
|
|
62
71
|
{
|
|
63
72
|
$width: 10,
|
|
64
73
|
$height: 10,
|
|
65
74
|
$borderRadiusX: 1,
|
|
66
|
-
$background:
|
|
75
|
+
$background: b(t.state)
|
|
67
76
|
}
|
|
68
77
|
)
|
|
69
78
|
]
|
|
@@ -71,13 +80,13 @@ const A = _(function({
|
|
|
71
80
|
t.label
|
|
72
81
|
)) }),
|
|
73
82
|
g && /* @__PURE__ */ n(o, { $flexRowGapX: 0.25, $marginBottomX: 0.5, $alignItems: "center", children: [
|
|
74
|
-
/* @__PURE__ */ r(
|
|
75
|
-
/* @__PURE__ */ r(
|
|
83
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3-bold", $color: "BLACK_1", $align: "center", children: "Keep Up the Great Work! 🚀" }),
|
|
84
|
+
/* @__PURE__ */ r(c, { $renderAs: "ub3", $color: "BLACK_1", $align: "center", children: "You're getting stronger at MathFit each day. See you next month!" })
|
|
76
85
|
] })
|
|
77
86
|
] })
|
|
78
87
|
] });
|
|
79
|
-
}),
|
|
88
|
+
}), P = v;
|
|
80
89
|
export {
|
|
81
|
-
|
|
90
|
+
P as default
|
|
82
91
|
};
|
|
83
92
|
//# sourceMappingURL=math-fit-report.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"math-fit-report.js","sources":["../../../../src/features/math-fit/math-fit-report/math-fit-report.tsx"],"sourcesContent":["import { memo, useMemo, type FC } from 'react';\n\nimport { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport ReportHeader from './comps/report-header/report-header';\nimport ScoreSection from './comps/score-section/score-section';\nimport {\n getQuestionStatusBgColor,\n LEGEND_ITEMS,\n transformSectionsToReportData,\n} from './math-fit-report-helpers';\nimport type { IMathFitReportProps } from './math-fit-report-types';\n\nconst MathFitReport: FC<IMathFitReportProps> = memo(function MathFitReport({\n data,\n onReview,\n studentName,\n userType,\n onBack,\n compactView = false,\n showBorder = false,\n showEncouragement = true,\n}) {\n const borderColor = showBorder ? 'WHITE_5' : undefined;\n const sectionData = useMemo(() => transformSectionsToReportData(data.sections), [data.sections]);\n\n const scoreChange = useMemo(() => {\n if (data.previous_score && data.score) {\n return data.score - data.previous_score;\n }\n\n return undefined;\n }, [data.score, data.previous_score]);\n\n return (\n <FlexView $flex={1} $background=\"BLACK_T_04\" $borderColor={borderColor}>\n <ReportHeader\n score={data.score ?? 0}\n maxScore={10}\n scoreChange={scoreChange}\n createdOnTs={data.created_on_ts}\n studentName={studentName}\n userType={userType}\n onBack={onBack}\n compactView={compactView}\n showGreeting={!compactView}\n />\n\n {sectionData.map((section, index) => (\n <FlexView key={section.title} $background=\"WHITE\">\n <FlexView $gapX={1.5} $gutterX={1.25}>\n <ScoreSection\n onReviewSection={onReview}\n section={section}\n sheet={section.sheet}\n compactView={compactView}\n showReviewButton={!compactView && !IS_APP_RUNNING_IN_RN}\n />\n </FlexView>\n {index !== sectionData.length - 1 && <FlexView $height={1} $background=\"BLACK_T_08\" />}\n </FlexView>\n ))}\n\n <FlexView $gutterX={1} $flexColumnGapX={1} $gapX={1} $flexRowGapX={2} $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {LEGEND_ITEMS.map(item => (\n <FlexView\n key={item.label}\n $flexDirection=\"row\"\n $flexColumnGapX={0.25}\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {item.label}\n </Text>\n <FlexView\n $width={10}\n $height={10}\n $borderRadiusX={1}\n $background={getQuestionStatusBgColor(item.state)}\n />\n </FlexView>\n ))}\n </FlexView>\n {showEncouragement && (\n <FlexView $flexRowGapX={0.25} $marginBottomX={0.5} $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\" $align=\"center\">\n Keep Up the Great Work! 🚀\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\" $align=\"center\">\n You're getting stronger at MathFit each day. See you next month!\n </Text>\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default MathFitReport;\n"],"names":["MathFitReport","memo","data","onReview","studentName","userType","onBack","compactView","showBorder","showEncouragement","borderColor","sectionData","useMemo","transformSectionsToReportData","scoreChange","FlexView","jsx","ReportHeader","section","index","jsxs","ScoreSection","
|
|
1
|
+
{"version":3,"file":"math-fit-report.js","sources":["../../../../src/features/math-fit/math-fit-report/math-fit-report.tsx"],"sourcesContent":["import { memo, useEffect, useMemo, type FC } from 'react';\n\nimport { IS_APP_RUNNING_IN_RN } from '../../../constants/app-config';\nimport FlexView from '../../ui/layout/flex-view';\nimport Text from '../../ui/text/text';\nimport ReportHeader from './comps/report-header/report-header';\nimport ScoreSection from './comps/score-section/score-section';\nimport {\n getQuestionStatusBgColor,\n LEGEND_ITEMS,\n transformSectionsToReportData,\n} from './math-fit-report-helpers';\nimport type { IMathFitReportProps } from './math-fit-report-types';\nimport { useUIContext } from '../../ui/context/context';\nimport { MATHFIT_ANALYTICS_EVENTS } from '../mathfit-events';\n\nconst MathFitReport: FC<IMathFitReportProps> = memo(function MathFitReport({\n data,\n onReview,\n studentName,\n userType,\n onBack,\n compactView = false,\n showBorder = false,\n showEncouragement = true,\n}) {\n const borderColor = showBorder ? 'WHITE_5' : undefined;\n const sectionData = useMemo(() => transformSectionsToReportData(data.sections), [data.sections]);\n const { onEvent: trackEvent } = useUIContext();\n\n const scoreChange = useMemo(() => {\n if (data.previous_score && data.score) {\n return data.score - data.previous_score;\n }\n\n return undefined;\n }, [data.score, data.previous_score]);\n\n useEffect(() => {\n trackEvent(MATHFIT_ANALYTICS_EVENTS.MATHFIT_REPORT_VIEWED, {\n userType: IS_APP_RUNNING_IN_RN ? 'PARENT' : userType,\n student_id: data.user_id,\n mathfit_id: data.id,\n test_score: data.score,\n });\n }, [data, trackEvent, userType]);\n\n return (\n <FlexView $flex={1} $background=\"BLACK_T_04\" $borderColor={borderColor}>\n <ReportHeader\n score={data.score ?? 0}\n maxScore={10}\n scoreChange={scoreChange}\n createdOnTs={data.created_on_ts}\n studentName={studentName}\n userType={userType}\n onBack={onBack}\n compactView={compactView}\n showGreeting={!compactView}\n />\n\n {sectionData.map((section, index) => (\n <FlexView key={section.title} $background=\"WHITE\">\n <FlexView $gapX={1.5} $gutterX={1.25}>\n <ScoreSection\n onReviewSection={onReview}\n section={section}\n sheet={section.sheet}\n compactView={compactView}\n showReviewButton={!compactView && !IS_APP_RUNNING_IN_RN}\n />\n </FlexView>\n {index !== sectionData.length - 1 && <FlexView $height={1} $background=\"BLACK_T_08\" />}\n </FlexView>\n ))}\n\n <FlexView $gutterX={1} $flexColumnGapX={1} $gapX={1} $flexRowGapX={2} $alignItems=\"center\">\n <FlexView $flexDirection=\"row\" $flexColumnGapX={1} $alignItems=\"center\">\n {LEGEND_ITEMS.map(item => (\n <FlexView\n key={item.label}\n $flexDirection=\"row\"\n $flexColumnGapX={0.25}\n $alignItems=\"center\"\n >\n <Text $renderAs=\"ub3\" $color=\"BLACK_T_60\">\n {item.label}\n </Text>\n <FlexView\n $width={10}\n $height={10}\n $borderRadiusX={1}\n $background={getQuestionStatusBgColor(item.state)}\n />\n </FlexView>\n ))}\n </FlexView>\n {showEncouragement && (\n <FlexView $flexRowGapX={0.25} $marginBottomX={0.5} $alignItems=\"center\">\n <Text $renderAs=\"ub3-bold\" $color=\"BLACK_1\" $align=\"center\">\n Keep Up the Great Work! 🚀\n </Text>\n <Text $renderAs=\"ub3\" $color=\"BLACK_1\" $align=\"center\">\n You're getting stronger at MathFit each day. See you next month!\n </Text>\n </FlexView>\n )}\n </FlexView>\n </FlexView>\n );\n});\n\nexport default MathFitReport;\n"],"names":["MathFitReport","memo","data","onReview","studentName","userType","onBack","compactView","showBorder","showEncouragement","borderColor","sectionData","useMemo","transformSectionsToReportData","trackEvent","useUIContext","scoreChange","useEffect","MATHFIT_ANALYTICS_EVENTS","IS_APP_RUNNING_IN_RN","FlexView","jsx","ReportHeader","section","index","jsxs","ScoreSection","LEGEND_ITEMS","item","Text","getQuestionStatusBgColor","MathFitReport$1"],"mappings":";;;;;;;;;;AAgBA,MAAMA,IAAyCC,EAAK,SAAuB;AAAA,EACzE,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,YAAAC,IAAa;AAAA,EACb,mBAAAC,IAAoB;AACtB,GAAG;AACK,QAAAC,IAAcF,IAAa,YAAY,QACvCG,IAAcC,EAAQ,MAAMC,EAA8BX,EAAK,QAAQ,GAAG,CAACA,EAAK,QAAQ,CAAC,GACzF,EAAE,SAASY,EAAW,IAAIC,EAAa,GAEvCC,IAAcJ,EAAQ,MAAM;AAC5B,QAAAV,EAAK,kBAAkBA,EAAK;AACvB,aAAAA,EAAK,QAAQA,EAAK;AAAA,KAI1B,CAACA,EAAK,OAAOA,EAAK,cAAc,CAAC;AAEpC,SAAAe,EAAU,MAAM;AACd,IAAAH,EAAWI,EAAyB,uBAAuB;AAAA,MACzD,UAAUC,IAAuB,WAAWd;AAAA,MAC5C,YAAYH,EAAK;AAAA,MACjB,YAAYA,EAAK;AAAA,MACjB,YAAYA,EAAK;AAAA,IAAA,CAClB;AAAA,EACA,GAAA,CAACA,GAAMY,GAAYT,CAAQ,CAAC,qBAG5Be,GAAS,EAAA,OAAO,GAAG,aAAY,cAAa,cAAcV,GACzD,UAAA;AAAA,IAAA,gBAAAW;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOpB,EAAK,SAAS;AAAA,QACrB,UAAU;AAAA,QACV,aAAAc;AAAA,QACA,aAAad,EAAK;AAAA,QAClB,aAAAE;AAAA,QACA,UAAAC;AAAA,QACA,QAAAC;AAAA,QACA,aAAAC;AAAA,QACA,cAAc,CAACA;AAAA,MAAA;AAAA,IACjB;AAAA,IAECI,EAAY,IAAI,CAACY,GAASC,MACxB,gBAAAC,EAAAL,GAAA,EAA6B,aAAY,SACxC,UAAA;AAAA,MAAA,gBAAAC,EAACD,GAAS,EAAA,OAAO,KAAK,UAAU,MAC9B,UAAA,gBAAAC;AAAA,QAACK;AAAA,QAAA;AAAA,UACC,iBAAiBvB;AAAA,UACjB,SAAAoB;AAAA,UACA,OAAOA,EAAQ;AAAA,UACf,aAAAhB;AAAA,UACA,kBAAkB,CAACA,KAAe,CAACY;AAAA,QAAA;AAAA,MAAA,GAEvC;AAAA,MACCK,MAAUb,EAAY,SAAS,uBAAMS,GAAS,EAAA,SAAS,GAAG,aAAY,aAAa,CAAA;AAAA,IAAA,KAVvEG,EAAQ,KAWvB,CACD;AAAA,IAED,gBAAAE,EAACL,GAAS,EAAA,UAAU,GAAG,iBAAiB,GAAG,OAAO,GAAG,cAAc,GAAG,aAAY,UAChF,UAAA;AAAA,MAAC,gBAAAC,EAAAD,GAAA,EAAS,gBAAe,OAAM,iBAAiB,GAAG,aAAY,UAC5D,UAAaO,EAAA,IAAI,CAChBC,MAAA,gBAAAH;AAAA,QAACL;AAAA,QAAA;AAAA,UAEC,gBAAe;AAAA,UACf,iBAAiB;AAAA,UACjB,aAAY;AAAA,UAEZ,UAAA;AAAA,YAAA,gBAAAC,EAACQ,KAAK,WAAU,OAAM,QAAO,cAC1B,YAAK,OACR;AAAA,YACA,gBAAAR;AAAA,cAACD;AAAA,cAAA;AAAA,gBACC,QAAQ;AAAA,gBACR,SAAS;AAAA,gBACT,gBAAgB;AAAA,gBAChB,aAAaU,EAAyBF,EAAK,KAAK;AAAA,cAAA;AAAA,YAClD;AAAA,UAAA;AAAA,QAAA;AAAA,QAbKA,EAAK;AAAA,MAeb,CAAA,GACH;AAAA,MACCnB,uBACEW,GAAS,EAAA,cAAc,MAAM,gBAAgB,KAAK,aAAY,UAC7D,UAAA;AAAA,QAAA,gBAAAC,EAACQ,KAAK,WAAU,YAAW,QAAO,WAAU,QAAO,UAAS,UAE5D,6BAAA,CAAA;AAAA,QACA,gBAAAR,EAACQ,KAAK,WAAU,OAAM,QAAO,WAAU,QAAO,UAAS,UAEvD,mEAAA,CAAA;AAAA,MAAA,GACF;AAAA,IAAA,GAEJ;AAAA,EACF,EAAA,CAAA;AAEJ,CAAC,GAEDE,IAAe/B;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PLUGINS as e } from "../../node_modules/@cuemath/analytics-v2/dist/constants.js";
|
|
2
|
+
var _ = /* @__PURE__ */ ((t) => (t.MATHFIT_SECTION_STARTED = "mathfit_section_started", t.MATHFIT_SECTION_RESUMED = "mathfit_section_resumed", t.MATHFIT_LANDING_PAGE_VIEWED = "mathfit_landing_page_viewed", t.MATHFIT_REPORT_VIEWED = "mathfit_report_viewed", t))(_ || {});
|
|
3
|
+
e.MIXPANEL, e.MIXPANEL, e.MIXPANEL, e.MIXPANEL;
|
|
4
|
+
export {
|
|
5
|
+
_ as MATHFIT_ANALYTICS_EVENTS
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=mathfit-events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mathfit-events.js","sources":["../../../src/features/math-fit/mathfit-events.ts"],"sourcesContent":["import { PLUGINS } from '@cuemath/analytics-v2/dist/constants';\n\nexport enum MATHFIT_ANALYTICS_EVENTS {\n MATHFIT_SECTION_STARTED = 'mathfit_section_started',\n MATHFIT_SECTION_RESUMED = 'mathfit_section_resumed',\n MATHFIT_LANDING_PAGE_VIEWED = 'mathfit_landing_page_viewed',\n MATHFIT_REPORT_VIEWED = 'mathfit_report_viewed',\n}\n\nexport const MATHFIT_ANALYTICS_WHITELIST_EVENTS = {\n [MATHFIT_ANALYTICS_EVENTS.MATHFIT_SECTION_STARTED]: [PLUGINS.MIXPANEL],\n [MATHFIT_ANALYTICS_EVENTS.MATHFIT_SECTION_RESUMED]: [PLUGINS.MIXPANEL],\n [MATHFIT_ANALYTICS_EVENTS.MATHFIT_LANDING_PAGE_VIEWED]: [PLUGINS.MIXPANEL],\n [MATHFIT_ANALYTICS_EVENTS.MATHFIT_REPORT_VIEWED]: [PLUGINS.MIXPANEL],\n};\n"],"names":["MATHFIT_ANALYTICS_EVENTS","PLUGINS"],"mappings":";AAEY,IAAAA,sBAAAA,OACVA,EAAA,0BAA0B,2BAC1BA,EAAA,0BAA0B,2BAC1BA,EAAA,8BAA8B,+BAC9BA,EAAA,wBAAwB,yBAJdA,IAAAA,KAAA,CAAA,CAAA;AAQ2CC,EAAQ,UACRA,EAAQ,UACJA,EAAQ,UACdA,EAAQ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"milestone-config.js","sources":["../../../../../src/features/milestone/create/api/milestone-config.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\nimport { stringify } from '../../../../helpers/query-string';\nimport type { IMilestoneConfig } from '../milestone-create-types';\n\nconst { useGet: useGetMileStoneConfig } = createGetAPI<\n IMilestoneConfig,\n { demo_type?:
|
|
1
|
+
{"version":3,"file":"milestone-config.js","sources":["../../../../../src/features/milestone/create/api/milestone-config.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V3 } from '../../../../constants/api';\nimport { stringify } from '../../../../helpers/query-string';\nimport type { IMilestoneConfig } from '../milestone-create-types';\nimport { type DemoType } from '../../../trial-session/trial-session-constants';\n\nconst { useGet: useGetMileStoneConfig } = createGetAPI<\n IMilestoneConfig,\n { demo_type?: DemoType } | undefined\n>({\n getURL: (_, query) => `${BASE_URL_V3}/milestone/config/${query ? `?${stringify(query)}` : ''}`,\n});\n\nexport { useGetMileStoneConfig };\n"],"names":["useGetMileStoneConfig","createGetAPI","_","query","BASE_URL_V3","stringify"],"mappings":";;;AAOA,MAAM,EAAE,QAAQA,EAAsB,IAAIC,EAGxC;AAAA,EACA,QAAQ,CAACC,GAAGC,MAAU,GAAGC,CAAW,qBAAqBD,IAAQ,IAAIE,EAAUF,CAAK,CAAC,KAAK,EAAE;AAC9F,CAAC;"}
|
|
@@ -1,66 +1,70 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { memo as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import { MILESTONE_WIDGET_MIN_HEIGHT as
|
|
8
|
-
import { TESTS_CREATION_ANALYTICS_EVENTS as
|
|
9
|
-
import { TestSheetItemWrapper as
|
|
10
|
-
const
|
|
1
|
+
import { jsxs as A, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { memo as w } from "react";
|
|
3
|
+
import x from "../../../../assets/line-icons/icons/plus2.js";
|
|
4
|
+
import N from "../../../homework/homework-card.js";
|
|
5
|
+
import O from "../../../ui/buttons/icon-button/icon-button.js";
|
|
6
|
+
import b from "../../../ui/layout/flex-view.js";
|
|
7
|
+
import { MILESTONE_WIDGET_MIN_HEIGHT as H } from "../../constants.js";
|
|
8
|
+
import { TESTS_CREATION_ANALYTICS_EVENTS as L } from "../tests-creation/tests-creation-analytics-events.js";
|
|
9
|
+
import { TestSheetItemWrapper as R, IconContainer as g, IconButtonCover as j } from "./test-list-view-styled.js";
|
|
10
|
+
const q = w(function({
|
|
11
11
|
milestoneId: i,
|
|
12
12
|
studentId: s,
|
|
13
|
-
tests:
|
|
14
|
-
userType:
|
|
15
|
-
onCreateNewTest:
|
|
13
|
+
tests: d,
|
|
14
|
+
userType: n,
|
|
15
|
+
onCreateNewTest: m,
|
|
16
16
|
isMilestoneActive: a,
|
|
17
17
|
canUpdatedPlan: c,
|
|
18
18
|
...l
|
|
19
19
|
}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
21
|
-
|
|
20
|
+
return /* @__PURE__ */ A(
|
|
21
|
+
b,
|
|
22
22
|
{
|
|
23
|
-
$height:
|
|
23
|
+
$height: H,
|
|
24
24
|
$position: "relative",
|
|
25
25
|
$justifyContent: "space-between",
|
|
26
26
|
children: [
|
|
27
|
-
/* @__PURE__ */ e(
|
|
28
|
-
const { entity_id: T, entity_type:
|
|
27
|
+
/* @__PURE__ */ e(R, { children: d.map((p, r) => {
|
|
28
|
+
const { entity_id: T, entity_type: u, state: _, score: f, subtext: I, sheets: t } = p, o = t == null ? void 0 : t[0], E = t == null ? void 0 : t.reduce(
|
|
29
|
+
(y, $) => y + ($.total_questions || 0),
|
|
30
|
+
0
|
|
31
|
+
);
|
|
29
32
|
if (!o) return null;
|
|
30
|
-
const { node_id:
|
|
33
|
+
const { node_id: h, worksheet_id: C, title: S } = o;
|
|
31
34
|
return /* @__PURE__ */ e(
|
|
32
|
-
|
|
35
|
+
N,
|
|
33
36
|
{
|
|
34
|
-
userType:
|
|
35
|
-
header:
|
|
36
|
-
subHeader:
|
|
37
|
+
userType: n,
|
|
38
|
+
header: S,
|
|
39
|
+
subHeader: I,
|
|
37
40
|
nodeData: o,
|
|
38
41
|
renderAs: "milestone",
|
|
39
42
|
studentId: s,
|
|
40
|
-
shouldOpenOnRight: (
|
|
43
|
+
shouldOpenOnRight: (r + 1) % 3 === 0,
|
|
41
44
|
entityId: T,
|
|
42
|
-
entityType:
|
|
43
|
-
state:
|
|
44
|
-
score:
|
|
45
|
+
entityType: u,
|
|
46
|
+
state: _,
|
|
47
|
+
score: f,
|
|
48
|
+
totalQuestions: E,
|
|
45
49
|
...l
|
|
46
50
|
},
|
|
47
|
-
`${
|
|
51
|
+
`${C}_${h}_${r}`
|
|
48
52
|
);
|
|
49
53
|
}) }),
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
n === "TEACHER" && c && /* @__PURE__ */ e(
|
|
55
|
+
g,
|
|
52
56
|
{
|
|
53
57
|
$flexDirection: "row",
|
|
54
58
|
$justifyContent: "flex-end",
|
|
55
59
|
$gapX: 1,
|
|
56
60
|
$gutterX: 1,
|
|
57
|
-
children: /* @__PURE__ */ e(
|
|
58
|
-
|
|
61
|
+
children: /* @__PURE__ */ e(j, { children: /* @__PURE__ */ e(
|
|
62
|
+
O,
|
|
59
63
|
{
|
|
60
|
-
Icon:
|
|
64
|
+
Icon: x,
|
|
61
65
|
renderAs: "secondary",
|
|
62
|
-
analyticsLabel:
|
|
63
|
-
onClick:
|
|
66
|
+
analyticsLabel: L.CUSTOM_TEST_CREATION_STARTED,
|
|
67
|
+
onClick: m,
|
|
64
68
|
disabled: !a,
|
|
65
69
|
analyticsProps: {
|
|
66
70
|
milestone_id: i
|
|
@@ -74,6 +78,6 @@ const V = y(function({
|
|
|
74
78
|
);
|
|
75
79
|
});
|
|
76
80
|
export {
|
|
77
|
-
|
|
81
|
+
q as default
|
|
78
82
|
};
|
|
79
83
|
//# sourceMappingURL=test-list-view.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import { type FC, memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport HomeworkCard from '../../../homework/homework-card';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport * as Styled from './test-list-view-styled';\nimport type { ITestSheetsList } from './types';\n\nconst TestSheetsList: FC<ITestSheetsList> = memo(function TestSheetsList({\n milestoneId,\n studentId,\n tests,\n userType,\n onCreateNewTest,\n isMilestoneActive,\n canUpdatedPlan,\n ...sheetCallbacks\n}) {\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $position=\"relative\"\n $justifyContent=\"space-between\"\n >\n <Styled.TestSheetItemWrapper>\n {tests.map((test, idx) => {\n const { entity_id, entity_type, state, score, subtext, sheets } = test;\n const sheet = sheets?.[0];\n\n if (!sheet) return null;\n\n const { node_id: nodeId, worksheet_id: worksheetId, title } = sheet;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n header={title}\n subHeader={subtext}\n nodeData={sheet}\n renderAs=\"milestone\"\n studentId={studentId}\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n entityId={entity_id}\n entityType={entity_type}\n state={state}\n score={score}\n {...sheetCallbacks}\n />\n );\n })}\n </Styled.TestSheetItemWrapper>\n\n {userType === 'TEACHER' && canUpdatedPlan && (\n <Styled.IconContainer\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.IconButtonCover>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n onClick={onCreateNewTest}\n disabled={!isMilestoneActive}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </Styled.IconButtonCover>\n </Styled.IconContainer>\n )}\n </FlexView>\n );\n});\n\nexport default TestSheetsList;\n"],"names":["TestSheetsList","memo","milestoneId","studentId","tests","userType","onCreateNewTest","isMilestoneActive","canUpdatedPlan","sheetCallbacks","jsxs","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","jsx","Styled.TestSheetItemWrapper","test","idx","entity_id","entity_type","state","score","subtext","sheets","sheet","nodeId","worksheetId","title","HomeworkCard","Styled.IconContainer","Styled.IconButtonCover","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;AAWM,MAAAA,IAAsCC,EAAK,SAAwB;AAAA,EACvE,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,GAAG;AAEC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAASC;AAAA,MACT,WAAU;AAAA,MACV,iBAAgB;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAA,EACE,YAAM,IAAI,CAACC,GAAMC,MAAQ;AACxB,gBAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,OAAAC,GAAO,OAAAC,GAAO,SAAAC,GAAS,QAAAC,EAAW,IAAAP,GAC5DQ,IAAQD,KAAA,gBAAAA,EAAS;
|
|
1
|
+
{"version":3,"file":"test-list-view.js","sources":["../../../../../src/features/milestone/milestone-tests/test-list-v2/test-list-view.tsx"],"sourcesContent":["import { type FC, memo } from 'react';\n\nimport Plus2Icon from '../../../../assets/line-icons/icons/plus2';\nimport HomeworkCard from '../../../homework/homework-card';\nimport IconButton from '../../../ui/buttons/icon-button/icon-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport { MILESTONE_WIDGET_MIN_HEIGHT } from '../../constants';\nimport { TESTS_CREATION_ANALYTICS_EVENTS } from '../tests-creation/tests-creation-analytics-events';\nimport * as Styled from './test-list-view-styled';\nimport type { ITestSheetsList } from './types';\n\nconst TestSheetsList: FC<ITestSheetsList> = memo(function TestSheetsList({\n milestoneId,\n studentId,\n tests,\n userType,\n onCreateNewTest,\n isMilestoneActive,\n canUpdatedPlan,\n ...sheetCallbacks\n}) {\n return (\n <FlexView\n $height={MILESTONE_WIDGET_MIN_HEIGHT}\n $position=\"relative\"\n $justifyContent=\"space-between\"\n >\n <Styled.TestSheetItemWrapper>\n {tests.map((test, idx) => {\n const { entity_id, entity_type, state, score, subtext, sheets } = test;\n const sheet = sheets?.[0];\n const totalQuestions = sheets?.reduce(\n (acc, curr) => acc + (curr.total_questions || 0),\n 0,\n );\n\n if (!sheet) return null;\n\n const { node_id: nodeId, worksheet_id: worksheetId, title } = sheet;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n userType={userType}\n header={title}\n subHeader={subtext}\n nodeData={sheet}\n renderAs=\"milestone\"\n studentId={studentId}\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n entityId={entity_id}\n entityType={entity_type}\n state={state}\n score={score}\n totalQuestions={totalQuestions}\n {...sheetCallbacks}\n />\n );\n })}\n </Styled.TestSheetItemWrapper>\n\n {userType === 'TEACHER' && canUpdatedPlan && (\n <Styled.IconContainer\n $flexDirection=\"row\"\n $justifyContent=\"flex-end\"\n $gapX={1}\n $gutterX={1}\n >\n <Styled.IconButtonCover>\n <IconButton\n Icon={Plus2Icon}\n renderAs=\"secondary\"\n analyticsLabel={TESTS_CREATION_ANALYTICS_EVENTS.CUSTOM_TEST_CREATION_STARTED}\n onClick={onCreateNewTest}\n disabled={!isMilestoneActive}\n analyticsProps={{\n milestone_id: milestoneId,\n }}\n />\n </Styled.IconButtonCover>\n </Styled.IconContainer>\n )}\n </FlexView>\n );\n});\n\nexport default TestSheetsList;\n"],"names":["TestSheetsList","memo","milestoneId","studentId","tests","userType","onCreateNewTest","isMilestoneActive","canUpdatedPlan","sheetCallbacks","jsxs","FlexView","MILESTONE_WIDGET_MIN_HEIGHT","jsx","Styled.TestSheetItemWrapper","test","idx","entity_id","entity_type","state","score","subtext","sheets","sheet","totalQuestions","acc","curr","nodeId","worksheetId","title","HomeworkCard","Styled.IconContainer","Styled.IconButtonCover","IconButton","Plus2Icon","TESTS_CREATION_ANALYTICS_EVENTS"],"mappings":";;;;;;;;;AAWM,MAAAA,IAAsCC,EAAK,SAAwB;AAAA,EACvE,aAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,GAAG;AAEC,SAAA,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,SAASC;AAAA,MACT,WAAU;AAAA,MACV,iBAAgB;AAAA,MAEhB,UAAA;AAAA,QAAA,gBAAAC,EAACC,GAAA,EACE,YAAM,IAAI,CAACC,GAAMC,MAAQ;AACxB,gBAAM,EAAE,WAAAC,GAAW,aAAAC,GAAa,OAAAC,GAAO,OAAAC,GAAO,SAAAC,GAAS,QAAAC,EAAW,IAAAP,GAC5DQ,IAAQD,KAAA,gBAAAA,EAAS,IACjBE,IAAiBF,KAAA,gBAAAA,EAAQ;AAAA,YAC7B,CAACG,GAAKC,MAASD,KAAOC,EAAK,mBAAmB;AAAA,YAC9C;AAAA;AAGE,cAAA,CAACH,EAAc,QAAA;AAEnB,gBAAM,EAAE,SAASI,GAAQ,cAAcC,GAAa,OAAAC,EAAU,IAAAN;AAG5D,iBAAA,gBAAAV;AAAA,YAACiB;AAAA,YAAA;AAAA,cAEC,UAAAzB;AAAA,cACA,QAAQwB;AAAA,cACR,WAAWR;AAAA,cACX,UAAUE;AAAA,cACV,UAAS;AAAA,cACT,WAAApB;AAAA,cACA,oBAAoBa,IAAM,KAAK,MAAM;AAAA,cACrC,UAAUC;AAAA,cACV,YAAYC;AAAA,cACZ,OAAAC;AAAA,cACA,OAAAC;AAAA,cACA,gBAAAI;AAAA,cACC,GAAGf;AAAA,YAAA;AAAA,YAbC,GAAGmB,CAAW,IAAID,CAAM,IAAIX,CAAG;AAAA,UAAA;AAAA,QAgBzC,CAAA,GACH;AAAA,QAECX,MAAa,aAAaG,KACzB,gBAAAK;AAAA,UAACkB;AAAAA,UAAA;AAAA,YACC,gBAAe;AAAA,YACf,iBAAgB;AAAA,YAChB,OAAO;AAAA,YACP,UAAU;AAAA,YAEV,UAAA,gBAAAlB,EAACmB,GAAA,EACC,UAAA,gBAAAnB;AAAA,cAACoB;AAAA,cAAA;AAAA,gBACC,MAAMC;AAAA,gBACN,UAAS;AAAA,gBACT,gBAAgBC,EAAgC;AAAA,gBAChD,SAAS7B;AAAA,gBACT,UAAU,CAACC;AAAA,gBACX,gBAAgB;AAAA,kBACd,cAAcL;AAAA,gBAChB;AAAA,cAAA;AAAA,YAAA,GAEJ;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAIR,CAAC;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use-student-profile-summary-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-student-profile-summary-data.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from 'react';\n\nimport { useGetMileStoneConfig } from '../../milestone/create/api/milestone-config';\nimport { useStudentProfileSummaryGet } from '../api/get-student-profile-summary';\nimport { getLearningProfileSummary } from '../modals/student-profile-summary/student-profile-summary-helpers';\n\nconst DEFAULT_DEMO_TYPE = { demo_type: 'TRIAL_V3'
|
|
1
|
+
{"version":3,"file":"use-student-profile-summary-data.js","sources":["../../../../src/features/parent-dashboard/hooks/use-student-profile-summary-data.ts"],"sourcesContent":["import { useCallback, useEffect, useMemo } from 'react';\n\nimport { useGetMileStoneConfig } from '../../milestone/create/api/milestone-config';\nimport { useStudentProfileSummaryGet } from '../api/get-student-profile-summary';\nimport { getLearningProfileSummary } from '../modals/student-profile-summary/student-profile-summary-helpers';\nimport { type DemoType } from '../../trial-session/trial-session-constants';\n\nconst DEFAULT_DEMO_TYPE = { demo_type: 'TRIAL_V3' as DemoType };\n\nconst useStudentProfileSummaryData = (studentId: string) => {\n const { get: getStudentProfileSummary, data: summaryData } =\n useStudentProfileSummaryGet(studentId);\n\n const { get: getMilestoneConfig, data: milestoneConfigData } = useGetMileStoneConfig(\n studentId,\n DEFAULT_DEMO_TYPE,\n );\n\n const fetchSummaryData = useCallback(() => {\n getStudentProfileSummary(studentId);\n getMilestoneConfig(studentId, DEFAULT_DEMO_TYPE);\n }, [getStudentProfileSummary, studentId, getMilestoneConfig]);\n\n useEffect(() => {\n fetchSummaryData();\n }, [fetchSummaryData]);\n\n const summaryInfo = useMemo(() => {\n return getLearningProfileSummary(milestoneConfigData, summaryData);\n }, [milestoneConfigData, summaryData]);\n\n const result = useMemo(\n () => ({ summaryInfo, fetchSummaryData }),\n [summaryInfo, fetchSummaryData],\n );\n\n return result;\n};\n\nexport default useStudentProfileSummaryData;\n"],"names":["DEFAULT_DEMO_TYPE","useStudentProfileSummaryData","studentId","getStudentProfileSummary","summaryData","useStudentProfileSummaryGet","getMilestoneConfig","milestoneConfigData","useGetMileStoneConfig","fetchSummaryData","useCallback","useEffect","summaryInfo","useMemo","getLearningProfileSummary"],"mappings":";;;;AAOA,MAAMA,IAAoB,EAAE,WAAW,cAEjCC,IAA+B,CAACC,MAAsB;AAC1D,QAAM,EAAE,KAAKC,GAA0B,MAAMC,MAC3CC,EAA4BH,CAAS,GAEjC,EAAE,KAAKI,GAAoB,MAAMC,EAAwB,IAAAC;AAAA,IAC7DN;AAAA,IACAF;AAAA,EAAA,GAGIS,IAAmBC,EAAY,MAAM;AACzC,IAAAP,EAAyBD,CAAS,GAClCI,EAAmBJ,GAAWF,CAAiB;AAAA,EAC9C,GAAA,CAACG,GAA0BD,GAAWI,CAAkB,CAAC;AAE5D,EAAAK,EAAU,MAAM;AACG,IAAAF;EAAA,GAChB,CAACA,CAAgB,CAAC;AAEf,QAAAG,IAAcC,EAAQ,MACnBC,EAA0BP,GAAqBH,CAAW,GAChE,CAACG,GAAqBH,CAAW,CAAC;AAO9B,SALQS;AAAA,IACb,OAAO,EAAE,aAAAD,GAAa,kBAAAH;IACtB,CAACG,GAAaH,CAAgB;AAAA,EAAA;AAIlC;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import { memo as p, useCallback as f, useEffect as d } from "react";
|
|
3
|
-
import { useGetSessionReports as u } from "../../../trial-session/api/trial-
|
|
3
|
+
import { useGetSessionReports as u } from "../../../trial-session/api/trial-session-report.js";
|
|
4
4
|
import l from "../../../trial-session/comps/session-report/report-information/report-information.js";
|
|
5
5
|
import c from "../../../ui/error/error.js";
|
|
6
6
|
import h from "../../../ui/loader/app-loader/app-loader.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trial-report.js","sources":["../../../../../src/features/parent-dashboard/modals/trial-report/trial-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect } from 'react';\n\nimport { useGetSessionReports } from '../../../trial-session/api/trial-
|
|
1
|
+
{"version":3,"file":"trial-report.js","sources":["../../../../../src/features/parent-dashboard/modals/trial-report/trial-report.tsx"],"sourcesContent":["import { memo, useCallback, useEffect } from 'react';\n\nimport { useGetSessionReports } from '../../../trial-session/api/trial-session-report';\nimport ReportInformation from '../../../trial-session/comps/session-report/report-information/report-information';\nimport Error from '../../../ui/error/error';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport useModalParams from '../../../ui/modals/use-modal-params';\nimport * as Styled from './trial-report-styled';\n\nconst StudentTrialReport = () => {\n const { studentName, attemptId, studentLevel } = useModalParams<{\n studentName: string;\n attemptId: string;\n studentLevel: string;\n }>();\n\n const {\n get: getSessionReports,\n isProcessingFailed,\n data: sessionReports,\n isProcessing,\n } = useGetSessionReports();\n\n const fetchData = useCallback(() => {\n if (attemptId && studentName) {\n getSessionReports(attemptId, {\n student_level: studentLevel,\n student_name: studentName,\n });\n }\n }, [attemptId, getSessionReports, studentLevel, studentName]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n if (isProcessingFailed) {\n return <Error height=\"50vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessing || !sessionReports) {\n return <AppLoader height={200} width={200} />;\n }\n\n return (\n <Styled.Container $borderColor=\"BLACK_1\">\n <ReportInformation sessionReports={sessionReports} studentName={studentName} />\n </Styled.Container>\n );\n};\n\nexport default memo(StudentTrialReport);\n"],"names":["StudentTrialReport","studentName","attemptId","studentLevel","useModalParams","getSessionReports","isProcessingFailed","sessionReports","isProcessing","useGetSessionReports","fetchData","useCallback","useEffect","jsx","Error","AppLoader","Styled.Container","ReportInformation","trialReport","memo"],"mappings":";;;;;;;;AASA,MAAMA,IAAqB,MAAM;AAC/B,QAAM,EAAE,aAAAC,GAAa,WAAAC,GAAW,cAAAC,MAAiBC,EAI9C,GAEG;AAAA,IACJ,KAAKC;AAAA,IACL,oBAAAC;AAAA,IACA,MAAMC;AAAA,IACN,cAAAC;AAAA,MACEC,EAAqB,GAEnBC,IAAYC,EAAY,MAAM;AAClC,IAAIT,KAAaD,KACfI,EAAkBH,GAAW;AAAA,MAC3B,eAAeC;AAAA,MACf,cAAcF;AAAA,IAAA,CACf;AAAA,KAEF,CAACC,GAAWG,GAAmBF,GAAcF,CAAW,CAAC;AAM5D,SAJAW,EAAU,MAAM;AACJ,IAAAF;EAAA,GACT,CAACA,CAAS,CAAC,GAEVJ,IACM,gBAAAO,EAAAC,GAAA,EAAM,QAAO,QAAO,YAAYJ,EAAW,CAAA,IAGjDF,KAAgB,CAACD,IACX,gBAAAM,EAAAE,GAAA,EAAU,QAAQ,KAAK,OAAO,IAAK,CAAA,IAI3C,gBAAAF,EAACG,GAAA,EAAiB,cAAa,WAC7B,UAAC,gBAAAH,EAAAI,GAAA,EAAkB,gBAAAV,GAAgC,aAAAN,EAA0B,CAAA,EAC/E,CAAA;AAEJ,GAEeiB,IAAAC,EAAKnB,CAAkB;"}
|
|
@@ -1,47 +1,51 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { h as
|
|
3
|
-
import { memo as
|
|
4
|
-
import
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { h as g } from "../../../node_modules/humanize-plus/dist/humanize.js";
|
|
3
|
+
import { memo as h } from "react";
|
|
4
|
+
import Q from "styled-components";
|
|
5
5
|
import w from "../../homework/homework-card.js";
|
|
6
6
|
import y from "../../ui/layout/flex-view.js";
|
|
7
|
-
const R =
|
|
7
|
+
const R = Q.div`
|
|
8
8
|
display: grid;
|
|
9
9
|
grid-template-columns: repeat(3, 200px);
|
|
10
10
|
grid-gap: 32px;
|
|
11
11
|
justify-content: center;
|
|
12
12
|
padding: 32px 0;
|
|
13
13
|
`, T = ({
|
|
14
|
-
sheets:
|
|
14
|
+
sheets: e,
|
|
15
15
|
studentId: n,
|
|
16
|
-
userType:
|
|
17
|
-
...
|
|
18
|
-
}) =>
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
16
|
+
userType: a,
|
|
17
|
+
...m
|
|
18
|
+
}) => {
|
|
19
|
+
const d = e == null ? void 0 : e.reduce((t, o) => t + (o.total_questions || 0), 0);
|
|
20
|
+
return /* @__PURE__ */ i(y, { children: /* @__PURE__ */ i(R, { children: e.map((t, o) => {
|
|
21
|
+
const {
|
|
22
|
+
title: c,
|
|
23
|
+
node_id: l,
|
|
24
|
+
worksheet_id: p,
|
|
25
|
+
is_timed: u,
|
|
26
|
+
sheet_time: f,
|
|
27
|
+
total_questions: r,
|
|
28
|
+
state: _
|
|
29
|
+
} = t, $ = Math.ceil((f || 0) / 60), s = r ? `${r} ${g.pluralize(r, "Question")}` : "", x = u ? `${s} • ${$} Mins` : s;
|
|
30
|
+
return /* @__PURE__ */ i(
|
|
31
|
+
w,
|
|
32
|
+
{
|
|
33
|
+
header: c,
|
|
34
|
+
subHeader: x,
|
|
35
|
+
userType: a,
|
|
36
|
+
studentId: n,
|
|
37
|
+
nodeData: t,
|
|
38
|
+
renderAs: "milestone",
|
|
39
|
+
shouldOpenOnRight: (o + 1) % 3 === 0,
|
|
40
|
+
state: _,
|
|
41
|
+
score: t.accuracy,
|
|
42
|
+
totalQuestions: d,
|
|
43
|
+
...m
|
|
44
|
+
},
|
|
45
|
+
`${p}_${l}_${o}`
|
|
46
|
+
);
|
|
47
|
+
}) }) });
|
|
48
|
+
}, H = h(T);
|
|
45
49
|
export {
|
|
46
50
|
H as default
|
|
47
51
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import { pluralize } from 'humanize-plus';\nimport { memo, type FC } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\nimport type { IResourcesListProps } from './types';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({\n sheets,\n studentId,\n userType,\n ...sheetCallBacks\n}) => (\n <FlexView>\n
|
|
1
|
+
{"version":3,"file":"resource-list.js","sources":["../../../../src/features/sheet-v2/resource-list/resource-list.tsx"],"sourcesContent":["import { pluralize } from 'humanize-plus';\nimport { memo, type FC } from 'react';\nimport styled from 'styled-components';\n\nimport HomeworkCard from '../../homework/homework-card';\nimport FlexView from '../../ui/layout/flex-view';\nimport type { IResourcesListProps } from './types';\n\nconst ResourceItemListWrapper = styled.div`\n display: grid;\n grid-template-columns: repeat(3, 200px);\n grid-gap: 32px;\n justify-content: center;\n padding: 32px 0;\n`;\n\nconst ResourcesList: FC<IResourcesListProps> = ({\n sheets,\n studentId,\n userType,\n ...sheetCallBacks\n}) => {\n const totalQuestionss = sheets?.reduce((acc, curr) => acc + (curr.total_questions || 0), 0);\n\n return (\n <FlexView>\n <ResourceItemListWrapper>\n {sheets.map((sheet, idx) => {\n const {\n title,\n node_id: nodeId,\n worksheet_id: worksheetId,\n is_timed: isTimed,\n sheet_time: sheetTime,\n total_questions: totalQuestions,\n state,\n } = sheet;\n const totalSheetTime = Math.ceil((sheetTime || 0) / 60);\n const totalQuestionsText = totalQuestions\n ? `${totalQuestions} ${pluralize(totalQuestions, 'Question')}`\n : '';\n const subHeader = isTimed\n ? `${totalQuestionsText} • ${totalSheetTime} Mins`\n : totalQuestionsText;\n\n return (\n <HomeworkCard\n key={`${worksheetId}_${nodeId}_${idx}`}\n header={title}\n subHeader={subHeader}\n userType={userType}\n studentId={studentId}\n nodeData={sheet}\n renderAs=\"milestone\"\n shouldOpenOnRight={(idx + 1) % 3 === 0}\n state={state}\n score={sheet.accuracy}\n totalQuestions={totalQuestionss}\n {...sheetCallBacks}\n />\n );\n })}\n </ResourceItemListWrapper>\n </FlexView>\n );\n};\n\nexport default memo(ResourcesList);\n"],"names":["ResourceItemListWrapper","styled","ResourcesList","sheets","studentId","userType","sheetCallBacks","totalQuestionss","acc","curr","jsx","FlexView","sheet","idx","title","nodeId","worksheetId","isTimed","sheetTime","totalQuestions","state","totalSheetTime","totalQuestionsText","pluralize","subHeader","HomeworkCard","ResourcesList$1","memo"],"mappings":";;;;;;AAQA,MAAMA,IAA0BC,EAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GAQjCC,IAAyC,CAAC;AAAA,EAC9C,QAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACE,QAAAC,IAAkBJ,KAAA,gBAAAA,EAAQ,OAAO,CAACK,GAAKC,MAASD,KAAOC,EAAK,mBAAmB,IAAI;AAGvF,SAAA,gBAAAC,EAACC,KACC,UAAC,gBAAAD,EAAAV,GAAA,EACE,YAAO,IAAI,CAACY,GAAOC,MAAQ;AACpB,UAAA;AAAA,MACJ,OAAAC;AAAA,MACA,SAASC;AAAA,MACT,cAAcC;AAAA,MACd,UAAUC;AAAA,MACV,YAAYC;AAAA,MACZ,iBAAiBC;AAAA,MACjB,OAAAC;AAAA,IACE,IAAAR,GACES,IAAiB,KAAK,MAAMH,KAAa,KAAK,EAAE,GAChDI,IAAqBH,IACvB,GAAGA,CAAc,IAAII,EAAU,UAAAJ,GAAgB,UAAU,CAAC,KAC1D,IACEK,IAAYP,IACd,GAAGK,CAAkB,MAAMD,CAAc,UACzCC;AAGF,WAAA,gBAAAZ;AAAA,MAACe;AAAA,MAAA;AAAA,QAEC,QAAQX;AAAA,QACR,WAAAU;AAAA,QACA,UAAAnB;AAAA,QACA,WAAAD;AAAA,QACA,UAAUQ;AAAA,QACV,UAAS;AAAA,QACT,oBAAoBC,IAAM,KAAK,MAAM;AAAA,QACrC,OAAAO;AAAA,QACA,OAAOR,EAAM;AAAA,QACb,gBAAgBL;AAAA,QACf,GAAGD;AAAA,MAAA;AAAA,MAXC,GAAGU,CAAW,IAAID,CAAM,IAAIF,CAAG;AAAA,IAAA;AAAA,EAYtC,CAEH,GACH,EACF,CAAA;AAEJ,GAEea,IAAAC,EAAKzB,CAAa;"}
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
import { createGetAPI as
|
|
2
|
-
import { BASE_URL_V1 as
|
|
3
|
-
import { stringify as
|
|
4
|
-
const { useGet:
|
|
5
|
-
getURL: (
|
|
6
|
-
}), { usePatch:
|
|
7
|
-
getURL: () => `${
|
|
8
|
-
}), { useGet: g } = s({
|
|
9
|
-
getURL: (t) => `${i}/user-attempts/${t}/trial-diagnostic/report`
|
|
10
|
-
}), { useGet: $ } = s({
|
|
11
|
-
getURL: (t, e) => `${i}/user-attempts/${t}/trial-diagnostic/report/v2/?${o(e)}`
|
|
1
|
+
import { createGetAPI as r, createPatchAPI as a } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL_V1 as e } from "../../../constants/api.js";
|
|
3
|
+
import { stringify as i } from "../../../helpers/query-string.js";
|
|
4
|
+
const { useGet: s, invalidate: h } = r({
|
|
5
|
+
getURL: (o, t) => `${e}/trial/home/v2/?${i(t)}`
|
|
6
|
+
}), { usePatch: n } = a({
|
|
7
|
+
getURL: () => `${e}/trial/home/v2/`
|
|
12
8
|
});
|
|
13
9
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
u as useGetTrialHome,
|
|
18
|
-
p as usePatchTrialHome
|
|
10
|
+
h as invalidateTrialHome,
|
|
11
|
+
s as useGetTrialHome,
|
|
12
|
+
n as usePatchTrialHome
|
|
19
13
|
};
|
|
20
14
|
//# sourceMappingURL=trial-home.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"trial-home.js","sources":["../../../../src/features/trial-session/api/trial-home.ts"],"sourcesContent":["import { createGetAPI, createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1
|
|
1
|
+
{"version":3,"file":"trial-home.js","sources":["../../../../src/features/trial-session/api/trial-home.ts"],"sourcesContent":["import { createGetAPI, createPatchAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport { stringify } from '../../../helpers/query-string';\nimport type { ITrialHomeData } from '../trial-session-types';\n\ninterface IGetTrailHomeQuery {\n teacher_id: string;\n student_id: string;\n viewer: string;\n}\n\nconst { useGet: useGetTrialHome, invalidate: invalidateTrialHome } = createGetAPI<\n ITrialHomeData,\n IGetTrailHomeQuery\n>({\n getURL: (_, query) => `${BASE_URL_V1}/trial/home/v2/?${stringify(query)}`,\n});\n\nconst { usePatch: usePatchTrialHome } = createPatchAPI({\n getURL: () => `${BASE_URL_V1}/trial/home/v2/`,\n});\n\nexport { useGetTrialHome, usePatchTrialHome, invalidateTrialHome };\n"],"names":["useGetTrialHome","invalidateTrialHome","createGetAPI","_","query","BASE_URL_V1","stringify","usePatchTrialHome","createPatchAPI"],"mappings":";;;AAYA,MAAM,EAAE,QAAQA,GAAiB,YAAYC,EAAA,IAAwBC,EAGnE;AAAA,EACA,QAAQ,CAACC,GAAGC,MAAU,GAAGC,CAAW,mBAAmBC,EAAUF,CAAK,CAAC;AACzE,CAAC,GAEK,EAAE,UAAUG,EAAkB,IAAIC,EAAe;AAAA,EACrD,QAAQ,MAAM,GAAGH,CAAW;AAC9B,CAAC;"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { createGetAPI as s } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL_V2 as r } from "../../../constants/api.js";
|
|
3
|
+
import { stringify as o } from "../../../helpers/query-string.js";
|
|
4
|
+
const { useGet: a } = s({
|
|
5
|
+
getURL: (t) => `${r}/user-attempts/${t}/trial-diagnostic/report`
|
|
6
|
+
}), { useGet: g } = s({
|
|
7
|
+
getURL: (t, e) => `${r}/user-attempts/${t}/trial-diagnostic/report/v2/?${o(e)}`
|
|
8
|
+
}), { useGet: m } = s({
|
|
9
|
+
getURL: (t, e) => `${r}/user-attempts/${t}/trial-diagnostic/report/v3/?${o(e)}`
|
|
10
|
+
});
|
|
11
|
+
export {
|
|
12
|
+
a as useGetSessionInsights,
|
|
13
|
+
m as useGetSessionProgressReports,
|
|
14
|
+
g as useGetSessionReports
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=trial-session-report.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trial-session-report.js","sources":["../../../../src/features/trial-session/api/trial-session-report.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V2 } from '../../../constants/api';\nimport { type TSessionInsightsData } from '../comps/session-insights/session-insights-types';\nimport { type TSessionReportData } from '../comps/session-report/session-report-types';\nimport { stringify } from '../../../helpers/query-string';\nimport { type ISessionProgressSummary } from '../comps/session-progress-summary/session-progress-summary-types';\n\ninterface ISessionInsightsQuery {\n student_level: string;\n student_name: string;\n}\n\nconst { useGet: useGetSessionInsights } = createGetAPI<TSessionInsightsData>({\n getURL: userAttemptId => `${BASE_URL_V2}/user-attempts/${userAttemptId}/trial-diagnostic/report`,\n});\n\nconst { useGet: useGetSessionReports } = createGetAPI<TSessionReportData, ISessionInsightsQuery>({\n getURL: (userAttemptId, query) =>\n `${BASE_URL_V2}/user-attempts/${userAttemptId}/trial-diagnostic/report/v2/?${stringify(query)}`,\n});\n\nconst { useGet: useGetSessionProgressReports } = createGetAPI<\n ISessionProgressSummary,\n { student_name: string }\n>({\n getURL: (userAttemptId, query) =>\n `${BASE_URL_V2}/user-attempts/${userAttemptId}/trial-diagnostic/report/v3/?${stringify(query)}`,\n});\n\nexport { useGetSessionReports, useGetSessionInsights, useGetSessionProgressReports };\n"],"names":["useGetSessionInsights","createGetAPI","userAttemptId","BASE_URL_V2","useGetSessionReports","query","stringify","useGetSessionProgressReports"],"mappings":";;;AAaA,MAAM,EAAE,QAAQA,EAAsB,IAAIC,EAAmC;AAAA,EAC3E,QAAQ,CAAAC,MAAiB,GAAGC,CAAW,kBAAkBD,CAAa;AACxE,CAAC,GAEK,EAAE,QAAQE,EAAqB,IAAIH,EAAwD;AAAA,EAC/F,QAAQ,CAACC,GAAeG,MACtB,GAAGF,CAAW,kBAAkBD,CAAa,gCAAgCI,EAAUD,CAAK,CAAC;AACjG,CAAC,GAEK,EAAE,QAAQE,EAA6B,IAAIN,EAG/C;AAAA,EACA,QAAQ,CAACC,GAAeG,MACtB,GAAGF,CAAW,kBAAkBD,CAAa,gCAAgCI,EAAUD,CAAK,CAAC;AACjG,CAAC;"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { createGetAPI as t } from "@cuemath/rest-api";
|
|
2
|
+
import { BASE_URL_V1 as e } from "../../../constants/api.js";
|
|
3
|
+
const { useGet: i } = t({
|
|
4
|
+
getURL: () => `${e}/configs/trial_v3_topics`
|
|
5
|
+
});
|
|
6
|
+
export {
|
|
7
|
+
i as useGetTrialTopics
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=trial-topics.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trial-topics.js","sources":["../../../../src/features/trial-session/api/trial-topics.ts"],"sourcesContent":["import { createGetAPI } from '@cuemath/rest-api';\n\nimport { BASE_URL_V1 } from '../../../constants/api';\nimport { type ITrialTopicsData } from '../comps/topic-selection/topic-selection-types';\n\nconst { useGet: useGetTrialTopics } = createGetAPI<ITrialTopicsData>({\n getURL: () => `${BASE_URL_V1}/configs/trial_v3_topics`,\n});\n\nexport { useGetTrialTopics };\n"],"names":["useGetTrialTopics","createGetAPI","BASE_URL_V1"],"mappings":";;AAKA,MAAM,EAAE,QAAQA,EAAkB,IAAIC,EAA+B;AAAA,EACnE,QAAQ,MAAM,GAAGC,CAAW;AAC9B,CAAC;"}
|