@cuemath/leap 3.1.6-j1 → 3.1.6
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 +2 -1
- package/dist/assets/illustrations/illustrations.js.map +1 -1
- package/dist/assets/lib/lib.js +1 -1
- package/dist/assets/lib/lib.js.map +1 -1
- package/dist/assets/line-icons/icons/check.js +3 -3
- package/dist/assets/line-icons/icons/check.js.map +1 -1
- package/dist/assets/line-icons/icons/puzzle-icon.js +51 -0
- package/dist/assets/line-icons/icons/puzzle-icon.js.map +1 -0
- package/dist/assets/line-icons/icons/share.js +48 -0
- package/dist/assets/line-icons/icons/share.js.map +1 -0
- package/dist/assets/line-icons/icons/tile.js +54 -0
- package/dist/assets/line-icons/icons/tile.js.map +1 -0
- package/dist/features/auth/account-selector/account-selector.js +33 -57
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +12 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +9 -8
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js.map +1 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js +1 -1
- package/dist/features/auth/comps/auth-static-panel/auth-static-panel.js.map +1 -1
- package/dist/features/auth/forgot-password/forgot-password-styled.js +3 -15
- package/dist/features/auth/forgot-password/forgot-password-styled.js.map +1 -1
- package/dist/features/auth/forgot-password/otp-form/otp-form.js +29 -29
- package/dist/features/auth/forgot-password/otp-form/otp-form.js.map +1 -1
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js +18 -14
- package/dist/features/auth/forgot-password/reset-password-form/reset-password-form.js.map +1 -1
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js +24 -23
- package/dist/features/auth/forgot-password/user-identifier-form/user-identifier-form.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js +2 -4
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form-styled.js.map +1 -1
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js +75 -85
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +21 -27
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js.map +1 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +34 -43
- package/dist/features/auth/login/social-login-methods/social-login-methods.js.map +1 -1
- package/dist/features/auth/login/username-password-form/username-password-form.js +21 -22
- package/dist/features/auth/login/username-password-form/username-password-form.js.map +1 -1
- package/dist/features/auth/user-list/user-item/user-item.js +32 -33
- package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/user-list/user-list.js +51 -60
- package/dist/features/auth/user-list/user-list.js.map +1 -1
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js +74 -74
- package/dist/features/circle-games/hooks/use-circle-sounds/use-circle-sounds.js.map +1 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js +73 -0
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +1 -0
- package/dist/features/cue-canvas/constants/constants.js +33 -3
- package/dist/features/cue-canvas/constants/constants.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-context.js +8 -5
- package/dist/features/cue-canvas/cue-canvas-context.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-core.js +137 -114
- package/dist/features/cue-canvas/cue-canvas-core.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-helpers.js +48 -38
- package/dist/features/cue-canvas/cue-canvas-helpers.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-provider.js +21 -21
- package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas.js +70 -62
- package/dist/features/cue-canvas/cue-canvas.js.map +1 -1
- package/dist/features/cue-canvas/cue-cavas-styled.js +48 -47
- package/dist/features/cue-canvas/cue-cavas-styled.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +47 -44
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-config-updater.js +13 -0
- package/dist/features/cue-canvas/hooks/use-config-updater.js.map +1 -0
- package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js +18 -14
- package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-height-extender.js +12 -10
- package/dist/features/cue-canvas/hooks/use-height-extender.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-upload-helper.js +23 -0
- package/dist/features/cue-canvas/hooks/use-upload-helper.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/helper.js +20 -0
- package/dist/features/cue-canvas/sidebar/homework/helper.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js +33 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js +68 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-styled.js +25 -0
- package/dist/features/cue-canvas/sidebar/homework/homework-styled.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/homework/homework.js +39 -0
- package/dist/features/cue-canvas/sidebar/homework/homework.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js +13 -0
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js +60 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js +44 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js +107 -0
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js +42 -0
- package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js +84 -0
- package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js +36 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js +133 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js +96 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js +29 -0
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/puzzles/utils.js +120 -0
- package/dist/features/cue-canvas/sidebar/puzzles/utils.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/sidebar-styled.js +32 -0
- package/dist/features/cue-canvas/sidebar/sidebar-styled.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/sidebar.js +29 -0
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +1 -0
- package/dist/features/cue-canvas/sidebar/tiles/tile.js +16 -0
- package/dist/features/cue-canvas/sidebar/tiles/tile.js.map +1 -0
- package/dist/features/cue-canvas/toolbar/color-palette.js +42 -33
- package/dist/features/cue-canvas/toolbar/color-palette.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/color-picker-menu.js +28 -25
- package/dist/features/cue-canvas/toolbar/color-picker-menu.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/grid-menu.js +13 -13
- package/dist/features/cue-canvas/toolbar/grid-menu.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/pen-tool-menu.js +24 -35
- package/dist/features/cue-canvas/toolbar/pen-tool-menu.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/tool.js +22 -20
- package/dist/features/cue-canvas/toolbar/tool.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/toolbar.js +17 -18
- package/dist/features/cue-canvas/toolbar/toolbar.js.map +1 -1
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js +13 -11
- package/dist/features/cue-canvas/toolbar/whiteboard-toolbar.js.map +1 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js +1 -1
- package/dist/features/homework/hw-card-list/api/get-homeworks.js.map +1 -1
- package/dist/features/homework/hw-card-list/hw-card-list-utils.js +8 -0
- package/dist/features/homework/hw-card-list/hw-card-list-utils.js.map +1 -0
- package/dist/features/homework/hw-card-list/hw-card-list-view.js +144 -112
- package/dist/features/homework/hw-card-list/hw-card-list-view.js.map +1 -1
- package/dist/features/homework/styles.js +5 -4
- package/dist/features/homework/styles.js.map +1 -1
- package/dist/features/hooks/use-debounce.js +16 -0
- package/dist/features/hooks/use-debounce.js.map +1 -0
- package/dist/features/journey/hooks/use-home-page-journey/home-page-homeworks-mock.js +199 -262
- 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 +15 -15
- package/dist/features/journey/hooks/use-home-page-journey/use-home-page-journey.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +38 -36
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js.map +1 -1
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js +24 -22
- package/dist/features/milestone/create/comps/add-custom-chapter/hooks/use-catalog-helpers.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js +23 -22
- package/dist/features/milestone/create/comps/chapters-selection-step/chapter-selection-step-v2/chapter-category/chapter-category-container.js.map +1 -1
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js +49 -47
- package/dist/features/milestone/create/comps/chapters-selection-step/utils.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js +94 -87
- package/dist/features/milestone/create/comps/class-details-step/class-details-step.js.map +1 -1
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js +13 -12
- package/dist/features/milestone/create/comps/class-details-step/class-details-utils.js.map +1 -1
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js +23 -21
- package/dist/features/milestone/create/comps/test-type-step/test-type-step.js.map +1 -1
- package/dist/features/milestone/create/milestone-create-helpers.js +165 -162
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js +48 -47
- package/dist/features/milestone/edit/comps/edit-milestone-modal/index.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js +18 -0
- package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js.map +1 -0
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +100 -121
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js +15 -14
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js +52 -51
- package/dist/features/milestone/milestone-list-container/milestone-list-container.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/india-pricing/index.js +96 -0
- package/dist/features/trial-session/comps/pricing/india-pricing/index.js.map +1 -0
- package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js +59 -0
- package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js.map +1 -0
- package/dist/features/trial-session/comps/pricing/pricing.js +36 -35
- package/dist/features/trial-session/comps/pricing/pricing.js.map +1 -1
- package/dist/features/ui/buttons/button/button-styled.js +29 -29
- package/dist/features/ui/buttons/button/button-styled.js.map +1 -1
- package/dist/features/ui/stepper/stepper.js +7 -7
- package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js +22 -19
- package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js.map +1 -1
- package/dist/features/worksheet/worksheet/worksheet-container.js +26 -26
- package/dist/features/worksheet/worksheet/worksheet-container.js.map +1 -1
- package/dist/index.d.ts +104 -35
- package/dist/index.js +323 -321
- package/dist/index.js.map +1 -1
- package/dist/static/ellipse-clip.dfb25608.svg +1 -0
- package/dist/static/lib/{polypad-4.5.4.js → polypad-4.5.4.v1.js} +8 -1
- package/package.json +1 -1
- package/dist/features/auth/account-selector/account-selector-styled.js +0 -9
- package/dist/features/auth/account-selector/account-selector-styled.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js +0 -21
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js.map +0 -1
- package/dist/features/auth/login/login-styled.js +0 -13
- package/dist/features/auth/login/login-styled.js.map +0 -1
- package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js +0 -9
- package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +0 -1
- package/dist/features/hooks/use-viewport.js +0 -21
- package/dist/features/hooks/use-viewport.js.map +0 -1
- package/dist/features/utils/media.js +0 -16
- package/dist/features/utils/media.js.map +0 -1
- package/dist/static/cuemath-app-qr-code.7205ee79.svg +0 -1
@@ -1,157 +1,136 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import
|
4
|
-
import
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
const [a, N] = ie(!1), {
|
1
|
+
import { jsxs as r, Fragment as K, jsx as o } from "react/jsx-runtime";
|
2
|
+
import Q, { memo as Y, useCallback as p } from "react";
|
3
|
+
import Z from "../../../hooks/use-lazy-ref.js";
|
4
|
+
import h from "../../../ui/buttons/text-button/text-button.js";
|
5
|
+
import d from "../../../ui/layout/flex-view.js";
|
6
|
+
import ee from "../../../ui/separator/separator.js";
|
7
|
+
import te from "../../../ui/text/text.js";
|
8
|
+
import oe from "./milestone-widget/milestone-widget.js";
|
9
|
+
import ne from "./no-active-milestone/no-active-milestone.js";
|
10
|
+
import ie from "../../../../node_modules/uuid/dist/esm-browser/v4.js";
|
11
|
+
const ue = Y(
|
12
|
+
({ milestones: e, studentId: u, milestoneType: s, ...A }) => {
|
13
|
+
const {
|
15
14
|
canCreatePlan: m,
|
16
|
-
isClassOngoing:
|
17
|
-
isFiltersAdded:
|
18
|
-
isStudentPresent:
|
19
|
-
onAddChapter:
|
20
|
-
onAddOutcome:
|
21
|
-
onChapterClick:
|
22
|
-
onCreatePlan:
|
23
|
-
onDelete:
|
15
|
+
isClassOngoing: g,
|
16
|
+
isFiltersAdded: C,
|
17
|
+
isStudentPresent: M,
|
18
|
+
onAddChapter: T,
|
19
|
+
onAddOutcome: n,
|
20
|
+
onChapterClick: N,
|
21
|
+
onCreatePlan: i,
|
22
|
+
onDelete: v,
|
24
23
|
onDraftPublish: R,
|
25
|
-
onEdit:
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
onTestStart: O,
|
24
|
+
onEdit: w,
|
25
|
+
onCreateMilestoneTest: x,
|
26
|
+
onNodeAttempt: b,
|
27
|
+
onNodeView: D,
|
28
|
+
onNodeReview: $,
|
29
|
+
onNodeReattempt: P,
|
30
|
+
onNodeReset: F,
|
31
|
+
onNodeUnassign: I,
|
32
|
+
onAssignResources: k,
|
33
|
+
onTestPreview: E,
|
34
|
+
onTestReview: S,
|
35
|
+
onTestStart: V,
|
38
36
|
activeMilestoneId: _,
|
39
|
-
activeTabId:
|
37
|
+
activeTabId: j,
|
40
38
|
onWidgetTabSelection: z,
|
41
|
-
studentName:
|
42
|
-
teacherName:
|
43
|
-
parentName:
|
44
|
-
userType:
|
45
|
-
courseStream:
|
46
|
-
onNodeAssignAsHomework:
|
47
|
-
} =
|
48
|
-
|
49
|
-
}, [
|
50
|
-
|
51
|
-
},
|
52
|
-
i == null || i();
|
53
|
-
}, [i]);
|
39
|
+
studentName: c,
|
40
|
+
teacherName: B,
|
41
|
+
parentName: G,
|
42
|
+
userType: a,
|
43
|
+
courseStream: y,
|
44
|
+
onNodeAssignAsHomework: H
|
45
|
+
} = A, l = s === "ACTIVE", L = s === "DRAFT", f = Z(ie), O = p(() => {
|
46
|
+
i == null || i(f);
|
47
|
+
}, [i, f]), W = p(() => {
|
48
|
+
n == null || n();
|
49
|
+
}, [n]);
|
54
50
|
if (!e) return null;
|
55
|
-
const
|
56
|
-
(
|
57
|
-
),
|
58
|
-
(
|
51
|
+
const X = e.some(
|
52
|
+
(t) => t.milestone_state === "ACTIVE"
|
53
|
+
), U = e.some(
|
54
|
+
(t) => t.milestone_state === "DRAFT"
|
59
55
|
);
|
60
|
-
return /* @__PURE__ */
|
61
|
-
l && !
|
62
|
-
|
56
|
+
return /* @__PURE__ */ r(K, { children: [
|
57
|
+
l && !X && /* @__PURE__ */ o(d, { $marginBottom: 40, children: /* @__PURE__ */ o(
|
58
|
+
ne,
|
63
59
|
{
|
64
60
|
canCreatePlan: m,
|
65
|
-
isDraftMilestonePresent:
|
66
|
-
isFiltersAdded:
|
67
|
-
onCreatePlan:
|
68
|
-
studentName:
|
69
|
-
userType:
|
61
|
+
isDraftMilestonePresent: U,
|
62
|
+
isFiltersAdded: C,
|
63
|
+
onCreatePlan: i,
|
64
|
+
studentName: c,
|
65
|
+
userType: a
|
70
66
|
}
|
71
67
|
) }),
|
72
|
-
l && /* @__PURE__ */
|
73
|
-
/* @__PURE__ */
|
68
|
+
l && /* @__PURE__ */ r(d, { $flexDirection: "row", $justifyContent: "space-between", $marginBottom: 16, children: [
|
69
|
+
/* @__PURE__ */ r(te, { $renderAs: "ac4", children: [
|
74
70
|
"Goals (",
|
75
71
|
e.length,
|
76
72
|
")"
|
77
73
|
] }),
|
78
|
-
|
79
|
-
/* @__PURE__ */
|
80
|
-
|
74
|
+
a === "TEACHER" && /* @__PURE__ */ r(d, { $flexDirection: "row", $flexGapX: 1, children: [
|
75
|
+
/* @__PURE__ */ o(
|
76
|
+
h,
|
81
77
|
{
|
82
78
|
label: "Create Goal",
|
83
79
|
size: "small",
|
84
|
-
onClick:
|
80
|
+
onClick: O,
|
85
81
|
disabled: !m
|
86
82
|
}
|
87
83
|
),
|
88
|
-
/* @__PURE__ */
|
84
|
+
/* @__PURE__ */ o(h, { label: "Add Milestone", size: "small", onClick: W })
|
89
85
|
] })
|
90
86
|
] }),
|
91
|
-
|
92
|
-
|
93
|
-
{
|
94
|
-
|
95
|
-
|
96
|
-
$justifyContent: "space-between",
|
97
|
-
$marginBottomX: 1,
|
98
|
-
children: [
|
99
|
-
/* @__PURE__ */ t(C, { $renderAs: "ac4", children: [
|
100
|
-
"PAST LEARNING PLANS & OUTCOMES (",
|
101
|
-
e.length,
|
102
|
-
")"
|
103
|
-
] }),
|
104
|
-
/* @__PURE__ */ n(le, { onClick: J, $expanded: a })
|
105
|
-
]
|
106
|
-
}
|
107
|
-
),
|
108
|
-
(A || l || a) && e.map((o, Z) => {
|
109
|
-
const { id: ee } = o;
|
110
|
-
return /* @__PURE__ */ t(ne.Fragment, { children: [
|
111
|
-
/* @__PURE__ */ n(
|
112
|
-
ae,
|
87
|
+
e.map((t, q) => {
|
88
|
+
const { id: J } = t;
|
89
|
+
return /* @__PURE__ */ r(Q.Fragment, { children: [
|
90
|
+
/* @__PURE__ */ o(
|
91
|
+
oe,
|
113
92
|
{
|
114
|
-
milestone:
|
115
|
-
studentId:
|
116
|
-
studentName:
|
117
|
-
parentName:
|
118
|
-
teacherName:
|
119
|
-
userType:
|
120
|
-
onAddOutcome:
|
121
|
-
onChapterClick:
|
122
|
-
isMilestoneActive: l ||
|
93
|
+
milestone: t,
|
94
|
+
studentId: u,
|
95
|
+
studentName: c,
|
96
|
+
parentName: G,
|
97
|
+
teacherName: B,
|
98
|
+
userType: a,
|
99
|
+
onAddOutcome: n,
|
100
|
+
onChapterClick: N,
|
101
|
+
isMilestoneActive: l || L,
|
123
102
|
milestoneType: s,
|
124
|
-
onEdit:
|
125
|
-
onCreateMilestoneTest:
|
126
|
-
onAddChapter:
|
127
|
-
onDelete:
|
103
|
+
onEdit: w,
|
104
|
+
onCreateMilestoneTest: x,
|
105
|
+
onAddChapter: T,
|
106
|
+
onDelete: v,
|
128
107
|
onDraftPublish: R,
|
129
|
-
isClassOngoing:
|
130
|
-
isStudentPresent:
|
131
|
-
onAssignResources:
|
132
|
-
onNodeAttempt:
|
133
|
-
onNodeView:
|
134
|
-
onNodeReview:
|
135
|
-
onNodeReattempt:
|
136
|
-
onNodeReset:
|
137
|
-
onNodeUnassign:
|
138
|
-
onNodeAssignAsHomework:
|
139
|
-
onTestPreview:
|
140
|
-
onTestReview:
|
141
|
-
onTestStart:
|
142
|
-
courseStream:
|
108
|
+
isClassOngoing: g,
|
109
|
+
isStudentPresent: M,
|
110
|
+
onAssignResources: k,
|
111
|
+
onNodeAttempt: b,
|
112
|
+
onNodeView: D,
|
113
|
+
onNodeReview: $,
|
114
|
+
onNodeReattempt: P,
|
115
|
+
onNodeReset: F,
|
116
|
+
onNodeUnassign: I,
|
117
|
+
onNodeAssignAsHomework: H,
|
118
|
+
onTestPreview: E,
|
119
|
+
onTestReview: S,
|
120
|
+
onTestStart: V,
|
121
|
+
courseStream: y,
|
143
122
|
activeMilestoneId: _,
|
144
|
-
activeTabId:
|
123
|
+
activeTabId: j,
|
145
124
|
onWidgetTabSelection: z
|
146
125
|
}
|
147
126
|
),
|
148
|
-
|
149
|
-
] }, `milestone=${
|
127
|
+
q !== e.length - 1 && /* @__PURE__ */ o(ee, { heightX: 2 })
|
128
|
+
] }, `milestone=${J}`);
|
150
129
|
})
|
151
130
|
] });
|
152
131
|
}
|
153
132
|
);
|
154
133
|
export {
|
155
|
-
|
134
|
+
ue as default
|
156
135
|
};
|
157
136
|
//# sourceMappingURL=milestone-list.js.map
|
package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"milestone-list.js","sources":["../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-list.tsx"],"sourcesContent":["import type { IMilestoneListProps } from './milestone-list-types';\n\nimport React, { memo, useCallback, useState } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport useLazyRef from '../../../hooks/use-lazy-ref';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport MilestoneWidget from './milestone-widget/milestone-widget';\nimport { StyledDownIcon } from './milestone-widget/milestone-widget-styled';\nimport NoActiveMilestone from './no-active-milestone/no-active-milestone';\n\nconst MilestoneList: React.FC<IMilestoneListProps> = memo(\n ({ milestones, studentId, milestoneType, ...restMilestoneListProps }) => {\n const [expandInactiveMilestones, setExpandInactiveMilestones] = useState(false);\n const {\n canCreatePlan,\n isClassOngoing,\n isFiltersAdded,\n isStudentPresent,\n onAddChapter,\n onAddOutcome,\n onChapterClick,\n onCreatePlan,\n onDelete,\n onDraftPublish,\n onEdit,\n onExpandPastMilestones,\n onCreateMilestoneTest,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReattempt,\n onNodeReset,\n onNodeUnassign,\n onAssignResources,\n onTestPreview,\n onTestReview,\n onTestStart,\n activeMilestoneId,\n activeTabId,\n onWidgetTabSelection,\n studentName,\n teacherName,\n parentName,\n userType,\n courseStream,\n onNodeAssignAsHomework,\n } = restMilestoneListProps;\n\n const isMilestoneActive = milestoneType === 'ACTIVE';\n const isDraftMilestone = milestoneType === 'DRAFT';\n const temporaryMilestoneId = useLazyRef(uuidv4);\n\n const handleCreatePlan = useCallback(() => {\n onCreatePlan?.(temporaryMilestoneId);\n }, [onCreatePlan, temporaryMilestoneId]);\n\n const toggleExpand = () => {\n if (!expandInactiveMilestones && onExpandPastMilestones) {\n onExpandPastMilestones();\n }\n setExpandInactiveMilestones(!expandInactiveMilestones);\n };\n\n const handleOnAddOutcome = useCallback(() => {\n onAddOutcome?.();\n }, [onAddOutcome]);\n\n if (!milestones) return null;\n\n const activeMilestonePresent = milestones.some(\n milestone => milestone.milestone_state === 'ACTIVE',\n );\n const draftMilestonePresent = milestones.some(\n milestone => milestone.milestone_state === 'DRAFT',\n );\n\n return (\n <>\n {isMilestoneActive && !activeMilestonePresent && (\n <FlexView $marginBottom={40}>\n <NoActiveMilestone\n canCreatePlan={canCreatePlan}\n isDraftMilestonePresent={draftMilestonePresent}\n isFiltersAdded={isFiltersAdded}\n onCreatePlan={onCreatePlan}\n studentName={studentName}\n userType={userType}\n />\n </FlexView>\n )}\n\n {isMilestoneActive && (\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $marginBottom={16}>\n <Text $renderAs=\"ac4\">Goals ({milestones.length})</Text>\n\n {userType === 'TEACHER' && (\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n <TextButton\n label=\"Create Goal\"\n size=\"small\"\n onClick={handleCreatePlan}\n disabled={!canCreatePlan}\n />\n <TextButton label=\"Add Milestone\" size=\"small\" onClick={handleOnAddOutcome} />\n </FlexView>\n )}\n </FlexView>\n )}\n\n {milestoneType === 'INACTIVE' && Boolean(milestones.length) && (\n <FlexView\n $flexDirection=\"row\"\n $alignItems=\"center\"\n $justifyContent=\"space-between\"\n $marginBottomX={1}\n >\n <Text $renderAs=\"ac4\">PAST LEARNING PLANS & OUTCOMES ({milestones.length})</Text>\n <StyledDownIcon onClick={toggleExpand} $expanded={expandInactiveMilestones} />\n </FlexView>\n )}\n\n {(isDraftMilestone || isMilestoneActive || expandInactiveMilestones) &&\n milestones.map((milestone, idx) => {\n const { id: milestoneId } = milestone;\n\n return (\n <React.Fragment key={`milestone=${milestoneId}`}>\n <MilestoneWidget\n milestone={milestone}\n studentId={studentId}\n studentName={studentName}\n parentName={parentName}\n teacherName={teacherName}\n userType={userType}\n onAddOutcome={onAddOutcome}\n onChapterClick={onChapterClick}\n isMilestoneActive={isMilestoneActive || isDraftMilestone}\n milestoneType={milestoneType}\n onEdit={onEdit}\n onCreateMilestoneTest={onCreateMilestoneTest}\n onAddChapter={onAddChapter}\n onDelete={onDelete}\n onDraftPublish={onDraftPublish}\n isClassOngoing={isClassOngoing}\n isStudentPresent={isStudentPresent}\n onAssignResources={onAssignResources}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onTestPreview={onTestPreview}\n onTestReview={onTestReview}\n onTestStart={onTestStart}\n courseStream={courseStream}\n activeMilestoneId={activeMilestoneId}\n activeTabId={activeTabId}\n onWidgetTabSelection={onWidgetTabSelection}\n />\n {idx !== milestones.length - 1 && <Separator heightX={2} />}\n </React.Fragment>\n );\n })}\n </>\n );\n },\n);\n\nexport default MilestoneList;\n"],"names":["MilestoneList","memo","milestones","studentId","milestoneType","restMilestoneListProps","expandInactiveMilestones","setExpandInactiveMilestones","useState","canCreatePlan","isClassOngoing","isFiltersAdded","isStudentPresent","onAddChapter","onAddOutcome","onChapterClick","onCreatePlan","onDelete","onDraftPublish","onEdit","onExpandPastMilestones","onCreateMilestoneTest","onNodeAttempt","onNodeView","onNodeReview","onNodeReattempt","onNodeReset","onNodeUnassign","onAssignResources","onTestPreview","onTestReview","onTestStart","activeMilestoneId","activeTabId","onWidgetTabSelection","studentName","teacherName","parentName","userType","courseStream","onNodeAssignAsHomework","isMilestoneActive","isDraftMilestone","temporaryMilestoneId","useLazyRef","uuidv4","handleCreatePlan","useCallback","toggleExpand","handleOnAddOutcome","activeMilestonePresent","milestone","draftMilestonePresent","jsxs","Fragment","jsx","FlexView","NoActiveMilestone","Text","TextButton","StyledDownIcon","idx","milestoneId","React","MilestoneWidget","Separator"],"mappings":";;;;;;;;;;;AAcA,MAAMA,KAA+CC;AAAA,EACnD,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,eAAAC,GAAe,GAAGC,QAA6B;AACvE,UAAM,CAACC,GAA0BC,CAA2B,IAAIC,GAAS,EAAK,GACxE;AAAA,MACJ,eAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,QAAAC;AAAA,MACA,wBAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,cAAAC;AAAA,MACA,aAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,sBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,aAAAC;AAAA,MACA,YAAAC;AAAA,MACA,UAAAC;AAAA,MACA,cAAAC;AAAA,MACA,wBAAAC;AAAA,IACE,IAAAnC,GAEEoC,IAAoBrC,MAAkB,UACtCsC,IAAmBtC,MAAkB,SACrCuC,IAAuBC,GAAWC,EAAM,GAExCC,IAAmBC,EAAY,MAAM;AACzC,MAAA/B,KAAA,QAAAA,EAAe2B;AAAA,IAAoB,GAClC,CAAC3B,GAAc2B,CAAoB,CAAC,GAEjCK,IAAe,MAAM;AACrB,MAAA,CAAC1C,KAA4Bc,KACRA,KAEzBb,EAA4B,CAACD,CA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S,GAAG;AAAA,QAnCtC,EAAA,GAAA,aAAaH,EAAW,EAoC7C;AAAA,MAAA,CAEH;AAAA,IACL,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
1
|
+
{"version":3,"file":"milestone-list.js","sources":["../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-list.tsx"],"sourcesContent":["import type { IMilestoneListProps } from './milestone-list-types';\n\nimport React, { memo, useCallback } from 'react';\nimport { v4 as uuidv4 } from 'uuid';\n\nimport useLazyRef from '../../../hooks/use-lazy-ref';\nimport TextButton from '../../../ui/buttons/text-button/text-button';\nimport FlexView from '../../../ui/layout/flex-view';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport MilestoneWidget from './milestone-widget/milestone-widget';\nimport NoActiveMilestone from './no-active-milestone/no-active-milestone';\n\nconst MilestoneList: React.FC<IMilestoneListProps> = memo(\n ({ milestones, studentId, milestoneType, ...restMilestoneListProps }) => {\n const {\n canCreatePlan,\n isClassOngoing,\n isFiltersAdded,\n isStudentPresent,\n onAddChapter,\n onAddOutcome,\n onChapterClick,\n onCreatePlan,\n onDelete,\n onDraftPublish,\n onEdit,\n onCreateMilestoneTest,\n onNodeAttempt,\n onNodeView,\n onNodeReview,\n onNodeReattempt,\n onNodeReset,\n onNodeUnassign,\n onAssignResources,\n onTestPreview,\n onTestReview,\n onTestStart,\n activeMilestoneId,\n activeTabId,\n onWidgetTabSelection,\n studentName,\n teacherName,\n parentName,\n userType,\n courseStream,\n onNodeAssignAsHomework,\n } = restMilestoneListProps;\n\n const isMilestoneActive = milestoneType === 'ACTIVE';\n const isDraftMilestone = milestoneType === 'DRAFT';\n const temporaryMilestoneId = useLazyRef(uuidv4);\n\n const handleCreatePlan = useCallback(() => {\n onCreatePlan?.(temporaryMilestoneId);\n }, [onCreatePlan, temporaryMilestoneId]);\n\n const handleOnAddOutcome = useCallback(() => {\n onAddOutcome?.();\n }, [onAddOutcome]);\n\n if (!milestones) return null;\n\n const activeMilestonePresent = milestones.some(\n milestone => milestone.milestone_state === 'ACTIVE',\n );\n const draftMilestonePresent = milestones.some(\n milestone => milestone.milestone_state === 'DRAFT',\n );\n\n return (\n <>\n {isMilestoneActive && !activeMilestonePresent && (\n <FlexView $marginBottom={40}>\n <NoActiveMilestone\n canCreatePlan={canCreatePlan}\n isDraftMilestonePresent={draftMilestonePresent}\n isFiltersAdded={isFiltersAdded}\n onCreatePlan={onCreatePlan}\n studentName={studentName}\n userType={userType}\n />\n </FlexView>\n )}\n\n {isMilestoneActive && (\n <FlexView $flexDirection=\"row\" $justifyContent=\"space-between\" $marginBottom={16}>\n <Text $renderAs=\"ac4\">Goals ({milestones.length})</Text>\n\n {userType === 'TEACHER' && (\n <FlexView $flexDirection=\"row\" $flexGapX={1}>\n <TextButton\n label=\"Create Goal\"\n size=\"small\"\n onClick={handleCreatePlan}\n disabled={!canCreatePlan}\n />\n <TextButton label=\"Add Milestone\" size=\"small\" onClick={handleOnAddOutcome} />\n </FlexView>\n )}\n </FlexView>\n )}\n\n {milestones.map((milestone, idx) => {\n const { id: milestoneId } = milestone;\n\n return (\n <React.Fragment key={`milestone=${milestoneId}`}>\n <MilestoneWidget\n milestone={milestone}\n studentId={studentId}\n studentName={studentName}\n parentName={parentName}\n teacherName={teacherName}\n userType={userType}\n onAddOutcome={onAddOutcome}\n onChapterClick={onChapterClick}\n isMilestoneActive={isMilestoneActive || isDraftMilestone}\n milestoneType={milestoneType}\n onEdit={onEdit}\n onCreateMilestoneTest={onCreateMilestoneTest}\n onAddChapter={onAddChapter}\n onDelete={onDelete}\n onDraftPublish={onDraftPublish}\n isClassOngoing={isClassOngoing}\n isStudentPresent={isStudentPresent}\n onAssignResources={onAssignResources}\n onNodeAttempt={onNodeAttempt}\n onNodeView={onNodeView}\n onNodeReview={onNodeReview}\n onNodeReattempt={onNodeReattempt}\n onNodeReset={onNodeReset}\n onNodeUnassign={onNodeUnassign}\n onNodeAssignAsHomework={onNodeAssignAsHomework}\n onTestPreview={onTestPreview}\n onTestReview={onTestReview}\n onTestStart={onTestStart}\n courseStream={courseStream}\n activeMilestoneId={activeMilestoneId}\n activeTabId={activeTabId}\n onWidgetTabSelection={onWidgetTabSelection}\n />\n {idx !== milestones.length - 1 && <Separator heightX={2} />}\n </React.Fragment>\n );\n })}\n </>\n );\n },\n);\n\nexport default MilestoneList;\n"],"names":["MilestoneList","memo","milestones","studentId","milestoneType","restMilestoneListProps","canCreatePlan","isClassOngoing","isFiltersAdded","isStudentPresent","onAddChapter","onAddOutcome","onChapterClick","onCreatePlan","onDelete","onDraftPublish","onEdit","onCreateMilestoneTest","onNodeAttempt","onNodeView","onNodeReview","onNodeReattempt","onNodeReset","onNodeUnassign","onAssignResources","onTestPreview","onTestReview","onTestStart","activeMilestoneId","activeTabId","onWidgetTabSelection","studentName","teacherName","parentName","userType","courseStream","onNodeAssignAsHomework","isMilestoneActive","isDraftMilestone","temporaryMilestoneId","useLazyRef","uuidv4","handleCreatePlan","useCallback","handleOnAddOutcome","activeMilestonePresent","milestone","draftMilestonePresent","jsxs","Fragment","jsx","FlexView","NoActiveMilestone","Text","TextButton","idx","milestoneId","React","MilestoneWidget","Separator"],"mappings":";;;;;;;;;;AAaA,MAAMA,KAA+CC;AAAA,EACnD,CAAC,EAAE,YAAAC,GAAY,WAAAC,GAAW,eAAAC,GAAe,GAAGC,QAA6B;AACjE,UAAA;AAAA,MACJ,eAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,kBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,cAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,cAAAC;AAAA,MACA,UAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,QAAAC;AAAA,MACA,uBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,YAAAC;AAAA,MACA,cAAAC;AAAA,MACA,iBAAAC;AAAA,MACA,aAAAC;AAAA,MACA,gBAAAC;AAAA,MACA,mBAAAC;AAAA,MACA,eAAAC;AAAA,MAC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,CAAW,EAoC7C;AAAA,MAAA,CAEH;AAAA,IACH,EAAA,CAAA;AAAA,EAEJ;AACF;"}
|
@@ -13,7 +13,8 @@ const f = x`
|
|
13
13
|
`, v = r(i)`
|
14
14
|
position: relative;
|
15
15
|
animation: ${f} 0.3s ease-in-out;
|
16
|
-
|
16
|
+
`;
|
17
|
+
r(g)(({ theme: o, $expanded: t }) => {
|
17
18
|
const {
|
18
19
|
layout: { gutter: e },
|
19
20
|
colors: { BLACK_1: n }
|
@@ -27,7 +28,8 @@ const f = x`
|
|
27
28
|
transform: rotate(${t === !0 ? 180 : 0}deg);
|
28
29
|
transition: transform 0.3s ease;
|
29
30
|
`;
|
30
|
-
})
|
31
|
+
});
|
32
|
+
const k = r.div(({ $expanded: o, theme: t }) => {
|
31
33
|
const { colors: e } = t;
|
32
34
|
return `
|
33
35
|
display:grid;
|
@@ -37,7 +39,7 @@ const f = x`
|
|
37
39
|
border: 1px solid ${e.GREY_2};
|
38
40
|
border-top:none;
|
39
41
|
`;
|
40
|
-
}),
|
42
|
+
}), C = r.div`
|
41
43
|
min-height: 0px;
|
42
44
|
width: 100%;
|
43
45
|
`;
|
@@ -81,7 +83,7 @@ r.div(({ theme: o, $rotate: t }) => {
|
|
81
83
|
}
|
82
84
|
`;
|
83
85
|
});
|
84
|
-
const
|
86
|
+
const I = r(i)`
|
85
87
|
border-bottom: 0px;
|
86
88
|
position: relative;
|
87
89
|
padding: 32px 32px 24px;
|
@@ -90,7 +92,7 @@ const _ = r(i)`
|
|
90
92
|
r(s)`
|
91
93
|
white-space: pre-wrap;
|
92
94
|
`;
|
93
|
-
const
|
95
|
+
const _ = r(s)`
|
94
96
|
display: -webkit-box;
|
95
97
|
-webkit-box-orient: vertical;
|
96
98
|
-webkit-line-clamp: 2;
|
@@ -109,7 +111,7 @@ r(i)(({
|
|
109
111
|
top: ${t.layout.gutter * 1.75 / 2}px;
|
110
112
|
${o === "right" ? "right: 0px;" : "left: 0px;"}
|
111
113
|
`);
|
112
|
-
const
|
114
|
+
const A = r.div(({ theme: o }) => {
|
113
115
|
const { layout: t } = o;
|
114
116
|
return `
|
115
117
|
position: absolute;
|
@@ -127,7 +129,7 @@ const D = r.div(({ theme: o }) => {
|
|
127
129
|
position: absolute;
|
128
130
|
inset: 50%;
|
129
131
|
transform: translate(-50%, -50%) rotate(-90deg);
|
130
|
-
`),
|
132
|
+
`), W = r.circle(
|
131
133
|
({ theme: o, $progressCircle: t, $progress: e, $progressBackground: n }) => {
|
132
134
|
const { colors: p, layout: l } = o, { GREY_2: c } = p, { gutter: a } = l, d = a * 12.5, u = t ? d - e : e;
|
133
135
|
return `
|
@@ -146,13 +148,12 @@ r(s)(({ theme: o, $backgroundColor: t }) => `
|
|
146
148
|
`);
|
147
149
|
export {
|
148
150
|
G as ChapterProgressSVG,
|
149
|
-
|
150
|
-
|
151
|
-
|
151
|
+
W as ChapterProgressSVGCircle,
|
152
|
+
C as Content,
|
153
|
+
k as ContentWrapper,
|
152
154
|
v as MainContainer,
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
_ as Wrapper
|
155
|
+
_ as MilestoneTitle,
|
156
|
+
A as StyledCheckIconWrapper,
|
157
|
+
I as Wrapper
|
157
158
|
};
|
158
159
|
//# sourceMappingURL=milestone-widget-styled.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"milestone-widget-styled.js","sources":["../../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\n\nimport styled, { keyframes } from 'styled-components';\n\nimport ChevronDownIcon from '../../../../../assets/line-icons/icons/chevron-down';\nimport InfoIcon from '../../../../../assets/line-icons/icons/info';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\ninterface IContentWrapperProps {\n $expanded: boolean;\n}\n\ninterface IStyledDownIconProps {\n $expanded: boolean;\n}\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst MainContainer = styled(FlexView)`\n position: relative;\n animation: ${fadeIn} 0.3s ease-in-out;\n`;\n\nconst StyledDownIcon = styled(ChevronDownIcon)<IStyledDownIconProps>(({ theme, $expanded }) => {\n const {\n layout: { gutter },\n colors: { BLACK_1 },\n } = theme;\n\n return `\n cursor: pointer;\n width: ${gutter * 1.5}px;\n height: ${gutter * 1.5}px;\n outline: 1px solid ${BLACK_1};\n border-radius: 50%;\n transform: rotate(${$expanded === true ? 180 : 0}deg);\n transition: transform 0.3s ease;\n `;\n});\n\nconst ContentWrapper = styled.div<IContentWrapperProps>(({ $expanded, theme }) => {\n const { colors } = theme;\n\n return `\n display:grid;\n grid-template-rows:${$expanded ? 1 : 0}fr;\n overflow:hidden;\n transition:grid-template-rows 200ms;\n border: 1px solid ${colors.GREY_2};\n border-top:none;\n `;\n});\n\nconst Content = styled.div`\n min-height: 0px;\n width: 100%;\n`;\n\nconst HelpWrapper = styled.div(({ theme }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n padding: ${gutter * 2}px;\n `;\n});\n\nconst StyledInfoIcon = styled(InfoIcon)(\n () => `\n position: relative;\n cursor: pointer;\n `,\n);\n\nconst LessonsInfoWrapper = styled.div(({ theme }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n padding:${gutter}px;\n display: grid;\n gap:0px;\n grid-template-rows: 1fr ${gutter * 1.75}px 1fr ${gutter * 1.75}px 1fr;\n grid-template-columns: ${gutter * 4}px ${gutter * 5}px ${gutter * 6.375}px ${gutter * 10.25}px;\n width:${gutter * 28}px;\n align-items:center;\n `;\n});\n\nconst UpArrowWrapper = styled.div<{ $rotate: boolean }>(({ theme, $rotate }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n grid-column: span 4;\n padding-left: ${gutter * 1.5}px;\n & img {\n transform: rotate(${$rotate ? 180 : 0}deg);\n }\n `;\n});\n\nconst Wrapper = styled(FlexView)`\n border-bottom: 0px;\n position: relative;\n padding: 32px 32px 24px;\n cursor: pointer;\n`;\n\nconst SpacedText = styled(Text)`\n white-space: pre-wrap;\n`;\n\nconst MilestoneTitle = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nconst MilestoneWidgetStatusWrapper = styled(FlexView)`\n position: relative;\n z-index: 1;\n`;\n\ninterface IMilestoneWidgetStatusTag {\n $placement: string;\n}\n\nconst MilestoneWidgetStatusTag = styled(FlexView)<IMilestoneWidgetStatusTag>(({\n $placement,\n theme,\n}) => {\n return `\n position: absolute;\n top: ${(theme.layout.gutter * 1.75) / 2}px;\n ${$placement === 'right' ? 'right: 0px;' : 'left: 0px;'}\n `;\n});\n\nconst StyledCheckIconWrapper = styled.div(({ theme }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 2;\n\n width: ${layout.gutter * 1.25}px;\n height: ${layout.gutter * 1.25}px;\n border-radius: 50%;\n background: ${theme.colors.WHITE_1};\n outline: 1px solid ${theme.colors.BLACK_1};\n `;\n});\n\nconst ChapterProgressSVG = styled.svg(() => {\n return `\n position: absolute;\n inset: 50%;\n transform: translate(-50%, -50%) rotate(-90deg);\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n $progressBackground?: TColorNames;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress, $progressBackground }) => {\n const { colors, layout } = theme;\n const { GREY_2 } = colors;\n const { gutter } = layout;\n\n const strokeDashArray = gutter * 12.5;\n const strokeDashOffset = $progressCircle ? strokeDashArray - $progress : $progress;\n\n return `\n stroke-dasharray: ${strokeDashArray};\n stroke-dashoffset: ${strokeDashOffset};\n stroke: ${$progressCircle ? colors[$progressBackground || 'BLACK'] : GREY_2};\n\n stroke-width: ${gutter * 0.125}px;\n fill: none;\n `;\n },\n);\n\ninterface IWidgetStateTag {\n $backgroundColor: TColorNames;\n}\n\nconst WidgetStateTag = styled(Text)<IWidgetStateTag>(({ theme, $backgroundColor }) => {\n return `\n padding: 4px;\n background: ${theme.colors[$backgroundColor]};\n `;\n});\n\nexport {\n Content,\n ContentWrapper,\n HelpWrapper,\n LessonsInfoWrapper,\n MainContainer,\n SpacedText,\n StyledDownIcon,\n StyledInfoIcon,\n UpArrowWrapper,\n Wrapper,\n MilestoneTitle,\n MilestoneWidgetStatusWrapper,\n MilestoneWidgetStatusTag,\n StyledCheckIconWrapper,\n ChapterProgressSVG,\n ChapterProgressSVGCircle,\n WidgetStateTag,\n};\n"],"names":["fadeIn","keyframes","MainContainer","styled","FlexView","
|
1
|
+
{"version":3,"file":"milestone-widget-styled.js","sources":["../../../../../../src/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.tsx"],"sourcesContent":["import type { TColorNames } from '../../../../ui/types';\n\nimport styled, { keyframes } from 'styled-components';\n\nimport ChevronDownIcon from '../../../../../assets/line-icons/icons/chevron-down';\nimport InfoIcon from '../../../../../assets/line-icons/icons/info';\nimport FlexView from '../../../../ui/layout/flex-view';\nimport Text from '../../../../ui/text/text';\n\ninterface IContentWrapperProps {\n $expanded: boolean;\n}\n\ninterface IStyledDownIconProps {\n $expanded: boolean;\n}\n\nconst fadeIn = keyframes`\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n`;\n\nconst MainContainer = styled(FlexView)`\n position: relative;\n animation: ${fadeIn} 0.3s ease-in-out;\n`;\n\nconst StyledDownIcon = styled(ChevronDownIcon)<IStyledDownIconProps>(({ theme, $expanded }) => {\n const {\n layout: { gutter },\n colors: { BLACK_1 },\n } = theme;\n\n return `\n cursor: pointer;\n width: ${gutter * 1.5}px;\n height: ${gutter * 1.5}px;\n outline: 1px solid ${BLACK_1};\n border-radius: 50%;\n transform: rotate(${$expanded === true ? 180 : 0}deg);\n transition: transform 0.3s ease;\n `;\n});\n\nconst ContentWrapper = styled.div<IContentWrapperProps>(({ $expanded, theme }) => {\n const { colors } = theme;\n\n return `\n display:grid;\n grid-template-rows:${$expanded ? 1 : 0}fr;\n overflow:hidden;\n transition:grid-template-rows 200ms;\n border: 1px solid ${colors.GREY_2};\n border-top:none;\n `;\n});\n\nconst Content = styled.div`\n min-height: 0px;\n width: 100%;\n`;\n\nconst HelpWrapper = styled.div(({ theme }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n padding: ${gutter * 2}px;\n `;\n});\n\nconst StyledInfoIcon = styled(InfoIcon)(\n () => `\n position: relative;\n cursor: pointer;\n `,\n);\n\nconst LessonsInfoWrapper = styled.div(({ theme }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n padding:${gutter}px;\n display: grid;\n gap:0px;\n grid-template-rows: 1fr ${gutter * 1.75}px 1fr ${gutter * 1.75}px 1fr;\n grid-template-columns: ${gutter * 4}px ${gutter * 5}px ${gutter * 6.375}px ${gutter * 10.25}px;\n width:${gutter * 28}px;\n align-items:center;\n `;\n});\n\nconst UpArrowWrapper = styled.div<{ $rotate: boolean }>(({ theme, $rotate }) => {\n const {\n layout: { gutter },\n } = theme;\n\n return `\n grid-column: span 4;\n padding-left: ${gutter * 1.5}px;\n & img {\n transform: rotate(${$rotate ? 180 : 0}deg);\n }\n `;\n});\n\nconst Wrapper = styled(FlexView)`\n border-bottom: 0px;\n position: relative;\n padding: 32px 32px 24px;\n cursor: pointer;\n`;\n\nconst SpacedText = styled(Text)`\n white-space: pre-wrap;\n`;\n\nconst MilestoneTitle = styled(Text)`\n display: -webkit-box;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 2;\n text-overflow: ellipsis;\n overflow: hidden;\n`;\n\nconst MilestoneWidgetStatusWrapper = styled(FlexView)`\n position: relative;\n z-index: 1;\n`;\n\ninterface IMilestoneWidgetStatusTag {\n $placement: string;\n}\n\nconst MilestoneWidgetStatusTag = styled(FlexView)<IMilestoneWidgetStatusTag>(({\n $placement,\n theme,\n}) => {\n return `\n position: absolute;\n top: ${(theme.layout.gutter * 1.75) / 2}px;\n ${$placement === 'right' ? 'right: 0px;' : 'left: 0px;'}\n `;\n});\n\nconst StyledCheckIconWrapper = styled.div(({ theme }) => {\n const { layout } = theme;\n\n return `\n position: absolute;\n top: 0px;\n right: 0px;\n z-index: 2;\n\n width: ${layout.gutter * 1.25}px;\n height: ${layout.gutter * 1.25}px;\n border-radius: 50%;\n background: ${theme.colors.WHITE_1};\n outline: 1px solid ${theme.colors.BLACK_1};\n `;\n});\n\nconst ChapterProgressSVG = styled.svg(() => {\n return `\n position: absolute;\n inset: 50%;\n transform: translate(-50%, -50%) rotate(-90deg);\n `;\n});\n\ninterface IChapterProgressSVGCircleProps {\n $progressCircle?: boolean;\n $progress: number;\n $progressBackground?: TColorNames;\n}\n\nconst ChapterProgressSVGCircle = styled.circle<IChapterProgressSVGCircleProps>(\n ({ theme, $progressCircle, $progress, $progressBackground }) => {\n const { colors, layout } = theme;\n const { GREY_2 } = colors;\n const { gutter } = layout;\n\n const strokeDashArray = gutter * 12.5;\n const strokeDashOffset = $progressCircle ? strokeDashArray - $progress : $progress;\n\n return `\n stroke-dasharray: ${strokeDashArray};\n stroke-dashoffset: ${strokeDashOffset};\n stroke: ${$progressCircle ? colors[$progressBackground || 'BLACK'] : GREY_2};\n\n stroke-width: ${gutter * 0.125}px;\n fill: none;\n `;\n },\n);\n\ninterface IWidgetStateTag {\n $backgroundColor: TColorNames;\n}\n\nconst WidgetStateTag = styled(Text)<IWidgetStateTag>(({ theme, $backgroundColor }) => {\n return `\n padding: 4px;\n background: ${theme.colors[$backgroundColor]};\n `;\n});\n\nexport {\n Content,\n ContentWrapper,\n HelpWrapper,\n LessonsInfoWrapper,\n MainContainer,\n SpacedText,\n StyledDownIcon,\n StyledInfoIcon,\n UpArrowWrapper,\n Wrapper,\n MilestoneTitle,\n MilestoneWidgetStatusWrapper,\n MilestoneWidgetStatusTag,\n StyledCheckIconWrapper,\n ChapterProgressSVG,\n ChapterProgressSVGCircle,\n WidgetStateTag,\n};\n"],"names":["fadeIn","keyframes","MainContainer","styled","FlexView","ChevronDownIcon","theme","$expanded","gutter","BLACK_1","ContentWrapper","colors","Content","InfoIcon","$rotate","Wrapper","Text","MilestoneTitle","$placement","StyledCheckIconWrapper","layout","ChapterProgressSVG","ChapterProgressSVGCircle","$progressCircle","$progress","$progressBackground","GREY_2","strokeDashArray","strokeDashOffset","$backgroundColor"],"mappings":";;;;;AAiBA,MAAMA,IAASC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASTC,IAAgBC,EAAOC,CAAQ;AAAA;AAAA,eAEtBJ,CAAM;AAAA;AAGEG,EAAOE,CAAe,EAAwB,CAAC,EAAE,OAAAC,GAAO,WAAAC,QAAgB;AACvF,QAAA;AAAA,IACJ,QAAQ,EAAE,QAAAC,EAAO;AAAA,IACjB,QAAQ,EAAE,SAAAC,EAAQ;AAAA,EAChB,IAAAH;AAEG,SAAA;AAAA;AAAA,aAEIE,IAAS,GAAG;AAAA,cACXA,IAAS,GAAG;AAAA,yBACDC,CAAO;AAAA;AAAA,wBAERF,MAAc,KAAO,MAAM,CAAC;AAAA;AAAA;AAGpD,CAAC;AAED,MAAMG,IAAiBP,EAAO,IAA0B,CAAC,EAAE,WAAAI,GAAW,OAAAD,QAAY;AAC1E,QAAA,EAAE,QAAAK,EAAW,IAAAL;AAEZ,SAAA;AAAA;AAAA,yBAEgBC,IAAY,IAAI,CAAC;AAAA;AAAA;AAAA,wBAGlBI,EAAO,MAAM;AAAA;AAAA;AAGrC,CAAC,GAEKC,IAAUT,EAAO;AAAA;AAAA;AAAA;AAKHA,EAAO,IAAI,CAAC,EAAE,OAAAG,QAAY;AACtC,QAAA;AAAA,IACJ,QAAQ,EAAE,QAAAE,EAAO;AAAA,EACf,IAAAF;AAEG,SAAA;AAAA,eACME,IAAS,CAAC;AAAA;AAEzB,CAAC;AAEsBL,EAAOU,CAAQ;AAAA,EACpC,MAAM;AAAA;AAAA;AA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yBACbA,EAAM,OAAO,OAAO;AAAA;AAE7C,CAAC,GAEKe,IAAqBlB,EAAO,IAAI,MAC7B;AAAA;AAAA;AAAA;AAAA,GAKR,GAQKmB,IAA2BnB,EAAO;AAAA,EACtC,CAAC,EAAE,OAAAG,GAAO,iBAAAiB,GAAiB,WAAAC,GAAW,qBAAAC,QAA0B;AACxD,UAAA,EAAE,QAAAd,GAAQ,QAAAS,EAAW,IAAAd,GACrB,EAAE,QAAAoB,EAAW,IAAAf,GACb,EAAE,QAAAH,EAAW,IAAAY,GAEbO,IAAkBnB,IAAS,MAC3BoB,IAAmBL,IAAkBI,IAAkBH,IAAYA;AAElE,WAAA;AAAA,0BACeG,CAAe;AAAA,2BACdC,CAAgB;AAAA,gBAC3BL,IAAkBZ,EAAOc,KAAuB,OAAO,IAAIC,CAAM;AAAA;AAAA,sBAE3DlB,IAAS,KAAK;AAAA;AAAA;AAAA,EAGlC;AACF;AAMuBL,EAAOa,CAAI,EAAmB,CAAC,EAAE,OAAAV,GAAO,kBAAAuB,QACtD;AAAA;AAAA,kBAESvB,EAAM,OAAOuB,CAAgB,CAAC;AAAA,GAE/C;"}
|
@@ -1,27 +1,28 @@
|
|
1
|
-
import { jsx as a, jsxs as
|
1
|
+
import { jsx as a, jsxs as O, Fragment as ae } from "react/jsx-runtime";
|
2
2
|
import { h as le } from "../../../node_modules/humanize-plus/dist/humanize.js";
|
3
3
|
import { memo as Se, useMemo as me, useState as u, useCallback as Te, useEffect as p } from "react";
|
4
4
|
import { ILLUSTRATIONS as ce } from "../../../assets/illustrations/illustrations.js";
|
5
5
|
import { EVENTS as e } from "../../communication/pub-sub/constants.js";
|
6
|
-
import { useInClassActionListener as
|
6
|
+
import { useInClassActionListener as de } from "../../communication/pub-sub/hooks.js";
|
7
7
|
import { invalidateHomeworks as f } from "../../homework/hw-card-list/api/get-homeworks.js";
|
8
|
-
import
|
8
|
+
import _e from "../../ui/separator/separator.js";
|
9
9
|
import { invalidateMilestoneResources as Ae } from "./api/get-milestone-resources.js";
|
10
10
|
import { useGetAllMilestonesdata as Ne, invalidateMilestonesData as De } from "./api/get-milestones.js";
|
11
|
-
import {
|
12
|
-
import Re from "./
|
13
|
-
import Ie from "./
|
14
|
-
import Le from "./milestone-list/milestone-
|
15
|
-
import
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
11
|
+
import { invalidatePastMilestoneCount as Me } from "./api/get-past-milestone-count.js";
|
12
|
+
import { invalidateTestHelpData as Re } from "./api/get-tests-list.js";
|
13
|
+
import Ie from "./filter-milestones.js";
|
14
|
+
import Le from "./milestone-list/milestone-list.js";
|
15
|
+
import Ce from "./milestone-list/milestone-loader/milestone-loader.js";
|
16
|
+
import { ContentWrapper as Oe, LoaderWrapper as ue } from "./styled.js";
|
17
|
+
const pe = (m) => {
|
18
|
+
De(m), Me(m.student_id);
|
19
|
+
}, fe = Se(
|
20
|
+
({ studentName: m, studentId: l, studentClassroomId: h, ...v }) => {
|
20
21
|
const {
|
21
22
|
milestoneType: s,
|
22
23
|
isStudentPresent: N,
|
23
24
|
isClassOngoing: P,
|
24
|
-
userType:
|
25
|
+
userType: _,
|
25
26
|
canCreatePlan: U,
|
26
27
|
teacherName: G,
|
27
28
|
parentName: g,
|
@@ -39,9 +40,9 @@ const ue = (_) => {
|
|
39
40
|
onDelete: j,
|
40
41
|
onAssignResources: X,
|
41
42
|
onNodeAttempt: $,
|
42
|
-
onNodeView:
|
43
|
-
onNodeReview:
|
44
|
-
onNodeReattempt:
|
43
|
+
onNodeView: z,
|
44
|
+
onNodeReview: B,
|
45
|
+
onNodeReattempt: q,
|
45
46
|
onNodeReset: J,
|
46
47
|
onNodeUnassign: Q,
|
47
48
|
onTestPreview: Y,
|
@@ -51,31 +52,31 @@ const ue = (_) => {
|
|
51
52
|
onNodeAssignAsHomework: oe
|
52
53
|
} = v, n = me(
|
53
54
|
() => ({
|
54
|
-
milestone_state_group: s === "ACTIVE" ?
|
55
|
+
milestone_state_group: s === "ACTIVE" ? _ === "TEACHER" ? "LIVE" : "STUDENT_LIVE" : s,
|
55
56
|
course_stream: A,
|
56
57
|
student_id: l
|
57
58
|
}),
|
58
|
-
[s, A, l,
|
59
|
+
[s, A, l, _]
|
59
60
|
), {
|
60
61
|
data: o,
|
61
|
-
getAll:
|
62
|
+
getAll: T,
|
62
63
|
isStale: D,
|
63
64
|
isProcessing: S
|
64
65
|
} = Ne(n), [M, R] = u(), [I, L] = u(!1), se = Te(
|
65
|
-
(
|
66
|
-
const { searchText: E, selectedBoard: i, selectedGrade: r } =
|
66
|
+
(c) => {
|
67
|
+
const { searchText: E, selectedBoard: i, selectedGrade: r } = c || {};
|
67
68
|
(E || i || r) && L(!0);
|
68
|
-
const
|
69
|
+
const d = o == null ? void 0 : o.filter((t) => {
|
69
70
|
const { milestone_name: Ee, board: ie, grade: re } = t || {};
|
70
71
|
return (E ? Ee.toLowerCase().includes(E.toLowerCase()) : !0) && (i ? ie === i : !0) && (r ? re === r : !0);
|
71
72
|
});
|
72
|
-
R(
|
73
|
+
R(d);
|
73
74
|
},
|
74
75
|
[o]
|
75
76
|
), ne = () => {
|
76
77
|
L(!1), R(void 0);
|
77
78
|
};
|
78
|
-
if (
|
79
|
+
if (de(
|
79
80
|
{
|
80
81
|
studentClassroomId: h,
|
81
82
|
actions: [
|
@@ -101,37 +102,37 @@ const ue = (_) => {
|
|
101
102
|
[e.MILESTONE_TEST_ASSIGNED],
|
102
103
|
[e.SHEET_MARKED_AS_REVIEWED]
|
103
104
|
],
|
104
|
-
callback: (
|
105
|
-
var r,
|
106
|
-
const E = (r =
|
105
|
+
callback: (c) => {
|
106
|
+
var r, d;
|
107
|
+
const E = (r = c.find(
|
107
108
|
(t) => t.eventName === e.MILESTONE_RESOURCE_ASSIGNED || t.eventName === e.MILESTONE_RESOURCE_UNASSIGNED || t.eventName === e.MILESTONE_RESOURCE_RESET || t.eventName === e.SHEET_MARKED_AS_REVIEWED
|
108
|
-
)) == null ? void 0 : r.eventPayload, i = (
|
109
|
+
)) == null ? void 0 : r.eventPayload, i = (d = c.find(
|
109
110
|
(t) => t.eventName === e.MILESTONE_TEST_ASSIGNED || t.eventName === e.MILESTONE_RESOURCE_RESET
|
110
|
-
)) == null ? void 0 :
|
111
|
+
)) == null ? void 0 : d.eventPayload;
|
111
112
|
if (E) {
|
112
113
|
const { milestoneId: t } = E || {};
|
113
114
|
f(l), Ae(t);
|
114
115
|
}
|
115
116
|
if (i) {
|
116
117
|
const { milestoneId: t } = i;
|
117
|
-
f(l),
|
118
|
+
f(l), Re(t);
|
118
119
|
}
|
119
|
-
|
120
|
+
pe(n);
|
120
121
|
}
|
121
122
|
},
|
122
123
|
(s === "ACTIVE" || s === "INACTIVE") && N
|
123
124
|
), p(() => {
|
124
|
-
|
125
|
-
}, [
|
126
|
-
!S && D &&
|
127
|
-
}, [
|
128
|
-
return /* @__PURE__ */ a(
|
129
|
-
const
|
130
|
-
return /* @__PURE__ */
|
131
|
-
S && /* @__PURE__ */ a(
|
132
|
-
|
125
|
+
T(n);
|
126
|
+
}, [T, n]), p(() => {
|
127
|
+
!S && D && T(n);
|
128
|
+
}, [T, n, D, S]), S && !o)
|
129
|
+
return /* @__PURE__ */ a(Ce, { numMilestones: 2 });
|
130
|
+
const C = s === "ACTIVE" && o && o.length > 6;
|
131
|
+
return /* @__PURE__ */ O(Oe, { $disablePointerEvents: S, children: [
|
132
|
+
S && /* @__PURE__ */ a(ue, { children: /* @__PURE__ */ a("img", { src: ce.LOADER_1, alt: "loading" }) }),
|
133
|
+
C && /* @__PURE__ */ O(ae, { children: [
|
133
134
|
/* @__PURE__ */ a(
|
134
|
-
|
135
|
+
Ie,
|
135
136
|
{
|
136
137
|
filteredMilestones: M,
|
137
138
|
milestones: o,
|
@@ -139,12 +140,12 @@ const ue = (_) => {
|
|
139
140
|
handleClearFilter: ne
|
140
141
|
}
|
141
142
|
),
|
142
|
-
/* @__PURE__ */ a(
|
143
|
+
/* @__PURE__ */ a(_e, { heightX: 1.5 })
|
143
144
|
] }),
|
144
145
|
/* @__PURE__ */ a(
|
145
|
-
|
146
|
+
Le,
|
146
147
|
{
|
147
|
-
showFilters: !!
|
148
|
+
showFilters: !!C,
|
148
149
|
canCreatePlan: U,
|
149
150
|
isClassOngoing: P,
|
150
151
|
isFiltersAdded: I,
|
@@ -165,9 +166,9 @@ const ue = (_) => {
|
|
165
166
|
onTestReview: Z,
|
166
167
|
onTestStart: ee,
|
167
168
|
onNodeAttempt: $,
|
168
|
-
onNodeView:
|
169
|
-
onNodeReview:
|
170
|
-
onNodeReattempt:
|
169
|
+
onNodeView: z,
|
170
|
+
onNodeReview: B,
|
171
|
+
onNodeReattempt: q,
|
171
172
|
onNodeReset: J,
|
172
173
|
onNodeUnassign: Q,
|
173
174
|
onNodeAssignAsHomework: oe,
|
@@ -175,17 +176,17 @@ const ue = (_) => {
|
|
175
176
|
activeTabId: w,
|
176
177
|
onWidgetTabSelection: te,
|
177
178
|
studentId: l,
|
178
|
-
studentName: le.titleCase(
|
179
|
+
studentName: le.titleCase(m),
|
179
180
|
teacherName: G,
|
180
181
|
parentName: g,
|
181
|
-
userType:
|
182
|
+
userType: _,
|
182
183
|
courseStream: A
|
183
184
|
}
|
184
185
|
)
|
185
186
|
] });
|
186
187
|
}
|
187
|
-
),
|
188
|
+
), ze = fe;
|
188
189
|
export {
|
189
|
-
|
190
|
+
ze as default
|
190
191
|
};
|
191
192
|
//# sourceMappingURL=milestone-list-container.js.map
|