@cuemath/leap 3.1.2-beta-0.4 → 3.1.2-j1
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 +1 -2
- package/dist/assets/illustrations/illustrations.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/features/auth/account-selector/account-selector-styled.js +9 -0
- package/dist/features/auth/account-selector/account-selector-styled.js.map +1 -0
- package/dist/features/auth/account-selector/account-selector.js +56 -36
- package/dist/features/auth/account-selector/account-selector.js.map +1 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js +21 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styled.js.map +1 -0
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout.js +8 -9
- 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 +15 -3
- 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 +14 -18
- 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 +23 -24
- 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 +4 -2
- 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 +85 -75
- package/dist/features/auth/login/identifier-otp-form/identifier-otp-form.js.map +1 -1
- package/dist/features/auth/login/login-styled.js +13 -0
- package/dist/features/auth/login/login-styled.js.map +1 -0
- package/dist/features/auth/login/social-account-not-found/social-account-not-found.js +24 -22
- 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-styled.js +9 -0
- package/dist/features/auth/login/social-login-methods/social-login-methods-styled.js.map +1 -0
- package/dist/features/auth/login/social-login-methods/social-login-methods.js +43 -34
- 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 +22 -21
- 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 +25 -24
- package/dist/features/auth/user-list/user-item/user-item.js.map +1 -1
- package/dist/features/auth/user-list/user-list.js +60 -51
- package/dist/features/auth/user-list/user-list.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-context.js +5 -8
- package/dist/features/cue-canvas/cue-canvas-context.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-core.js +75 -80
- package/dist/features/cue-canvas/cue-canvas-core.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-helpers.js +25 -31
- package/dist/features/cue-canvas/cue-canvas-helpers.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas-provider.js +12 -14
- package/dist/features/cue-canvas/cue-canvas-provider.js.map +1 -1
- package/dist/features/cue-canvas/cue-canvas.js +65 -79
- package/dist/features/cue-canvas/cue-canvas.js.map +1 -1
- package/dist/features/cue-canvas/cue-cavas-styled.js +42 -45
- package/dist/features/cue-canvas/cue-cavas-styled.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js +54 -61
- package/dist/features/cue-canvas/hooks/use-canvas-sync-broker.js.map +1 -1
- package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.js +14 -18
- package/dist/features/cue-canvas/hooks/use-cue-canvas-actions.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/tool.js +20 -22
- package/dist/features/cue-canvas/toolbar/tool.js.map +1 -1
- package/dist/features/homework/styles.js +4 -5
- package/dist/features/homework/styles.js.map +1 -1
- package/dist/features/hooks/use-device-type.js +25 -0
- package/dist/features/hooks/use-device-type.js.map +1 -0
- package/dist/features/milestone/create/comps/add-custom-chapter/course-catalog.js +36 -38
- 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 +22 -24
- 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 +22 -23
- 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 +47 -49
- 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 +87 -94
- 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 +12 -13
- 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 +21 -23
- 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 +162 -165
- package/dist/features/milestone/create/milestone-create-helpers.js.map +1 -1
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-list.js +124 -103
- 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 +14 -15
- package/dist/features/milestone/milestone-list-container/milestone-list/milestone-widget/milestone-widget-styled.js.map +1 -1
- package/dist/features/trial-session/comps/pricing/pricing.js +35 -36
- 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/utils/media.js +16 -0
- package/dist/features/utils/media.js.map +1 -0
- package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js +19 -22
- package/dist/features/worksheet/worksheet/hooks/use-s3-helper.js.map +1 -1
- package/dist/index.d.ts +22 -78
- package/dist/index.js +265 -268
- package/dist/index.js.map +1 -1
- package/dist/static/cuemath-app-qr-code.7205ee79.svg +1 -0
- package/package.json +1 -1
- package/dist/assets/line-icons/icons/puzzle-icon.js +0 -51
- package/dist/assets/line-icons/icons/puzzle-icon.js.map +0 -1
- package/dist/assets/line-icons/icons/share.js +0 -48
- package/dist/assets/line-icons/icons/share.js.map +0 -1
- package/dist/assets/line-icons/icons/tile.js +0 -54
- package/dist/assets/line-icons/icons/tile.js.map +0 -1
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js +0 -12
- package/dist/features/auth/comps/auth-page-layout/auth-page-layout-styles.js.map +0 -1
- package/dist/features/cue-canvas/bottombar/homework-controls.js +0 -73
- package/dist/features/cue-canvas/bottombar/homework-controls.js.map +0 -1
- package/dist/features/cue-canvas/hooks/use-upload-helper.js +0 -23
- package/dist/features/cue-canvas/hooks/use-upload-helper.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/homework/helper.js +0 -20
- package/dist/features/cue-canvas/sidebar/homework/helper.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js +0 -33
- package/dist/features/cue-canvas/sidebar/homework/homework-menu.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js +0 -68
- package/dist/features/cue-canvas/sidebar/homework/homework-request.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/homework/homework-styled.js +0 -25
- package/dist/features/cue-canvas/sidebar/homework/homework-styled.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/homework/homework.js +0 -39
- package/dist/features/cue-canvas/sidebar/homework/homework.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js +0 -13
- package/dist/features/cue-canvas/sidebar/puzzles/api/get-puzzles.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js +0 -60
- package/dist/features/cue-canvas/sidebar/puzzles/filter-selection-menu.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js +0 -44
- package/dist/features/cue-canvas/sidebar/puzzles/filters-section.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js +0 -107
- package/dist/features/cue-canvas/sidebar/puzzles/filters.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js +0 -42
- package/dist/features/cue-canvas/sidebar/puzzles/hooks/use-fetch-cue-canvas-activity.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js +0 -84
- package/dist/features/cue-canvas/sidebar/puzzles/launch-puzzle.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js +0 -36
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu-header.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js +0 -133
- package/dist/features/cue-canvas/sidebar/puzzles/puzzle-menu.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js +0 -96
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles-styled.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js +0 -29
- package/dist/features/cue-canvas/sidebar/puzzles/puzzles.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/puzzles/utils.js +0 -120
- package/dist/features/cue-canvas/sidebar/puzzles/utils.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/sidebar-styled.js +0 -32
- package/dist/features/cue-canvas/sidebar/sidebar-styled.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/sidebar.js +0 -29
- package/dist/features/cue-canvas/sidebar/sidebar.js.map +0 -1
- package/dist/features/cue-canvas/sidebar/tiles/tile.js +0 -16
- package/dist/features/cue-canvas/sidebar/tiles/tile.js.map +0 -1
- package/dist/features/hooks/use-debounce.js +0 -16
- package/dist/features/hooks/use-debounce.js.map +0 -1
- package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js +0 -18
- package/dist/features/milestone/milestone-list-container/api/get-past-milestone-count.js.map +0 -1
- package/dist/features/trial-session/comps/pricing/india-pricing/index.js +0 -96
- package/dist/features/trial-session/comps/pricing/india-pricing/index.js.map +0 -1
- package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js +0 -59
- package/dist/features/trial-session/comps/pricing/india-pricing/india-pricing-styled.js.map +0 -1
- package/dist/static/ellipse-clip.dfb25608.svg +0 -1
@@ -1,136 +1,157 @@
|
|
1
|
-
import { jsxs as
|
2
|
-
import
|
3
|
-
import
|
1
|
+
import { jsxs as t, Fragment as te, jsx as n } from "react/jsx-runtime";
|
2
|
+
import ne, { memo as oe, useState as ie, useCallback as h } from "react";
|
3
|
+
import re from "../../../hooks/use-lazy-ref.js";
|
4
4
|
import u from "../../../ui/buttons/text-button/text-button.js";
|
5
|
-
import
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import
|
9
|
-
import
|
10
|
-
import
|
11
|
-
|
12
|
-
|
13
|
-
|
5
|
+
import c from "../../../ui/layout/flex-view.js";
|
6
|
+
import se from "../../../ui/separator/separator.js";
|
7
|
+
import C from "../../../ui/text/text.js";
|
8
|
+
import ae from "./milestone-widget/milestone-widget.js";
|
9
|
+
import { StyledDownIcon as le } from "./milestone-widget/milestone-widget-styled.js";
|
10
|
+
import ce from "./no-active-milestone/no-active-milestone.js";
|
11
|
+
import de from "../../../../node_modules/uuid/dist/esm-browser/v4.js";
|
12
|
+
const Te = oe(
|
13
|
+
({ milestones: e, studentId: M, milestoneType: s, ...x }) => {
|
14
|
+
const [a, N] = ie(!1), {
|
14
15
|
canCreatePlan: m,
|
15
|
-
isClassOngoing:
|
16
|
-
isFiltersAdded:
|
17
|
-
isStudentPresent:
|
18
|
-
onAddChapter:
|
19
|
-
onAddOutcome:
|
20
|
-
onChapterClick:
|
21
|
-
onCreatePlan:
|
22
|
-
onDelete:
|
23
|
-
onDraftPublish:
|
24
|
-
onEdit:
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
16
|
+
isClassOngoing: T,
|
17
|
+
isFiltersAdded: $,
|
18
|
+
isStudentPresent: I,
|
19
|
+
onAddChapter: v,
|
20
|
+
onAddOutcome: i,
|
21
|
+
onChapterClick: w,
|
22
|
+
onCreatePlan: r,
|
23
|
+
onDelete: E,
|
24
|
+
onDraftPublish: R,
|
25
|
+
onEdit: D,
|
26
|
+
onExpandPastMilestones: f,
|
27
|
+
onCreateMilestoneTest: P,
|
28
|
+
onNodeAttempt: S,
|
29
|
+
onNodeView: b,
|
30
|
+
onNodeReview: k,
|
29
31
|
onNodeReattempt: F,
|
30
|
-
onNodeReset:
|
31
|
-
onNodeUnassign:
|
32
|
-
onAssignResources:
|
33
|
-
onTestPreview:
|
34
|
-
onTestReview:
|
35
|
-
onTestStart:
|
36
|
-
activeMilestoneId:
|
37
|
-
activeTabId:
|
38
|
-
onWidgetTabSelection:
|
39
|
-
studentName:
|
40
|
-
teacherName:
|
41
|
-
parentName:
|
42
|
-
userType:
|
43
|
-
courseStream:
|
44
|
-
onNodeAssignAsHomework:
|
45
|
-
} =
|
46
|
-
|
47
|
-
}, [
|
48
|
-
|
49
|
-
},
|
32
|
+
onNodeReset: B,
|
33
|
+
onNodeUnassign: V,
|
34
|
+
onAssignResources: j,
|
35
|
+
onTestPreview: G,
|
36
|
+
onTestReview: L,
|
37
|
+
onTestStart: O,
|
38
|
+
activeMilestoneId: _,
|
39
|
+
activeTabId: y,
|
40
|
+
onWidgetTabSelection: z,
|
41
|
+
studentName: p,
|
42
|
+
teacherName: X,
|
43
|
+
parentName: H,
|
44
|
+
userType: d,
|
45
|
+
courseStream: U,
|
46
|
+
onNodeAssignAsHomework: W
|
47
|
+
} = x, l = s === "ACTIVE", A = s === "DRAFT", g = re(de), q = h(() => {
|
48
|
+
r == null || r(g);
|
49
|
+
}, [r, g]), J = () => {
|
50
|
+
!a && f && f(), N(!a);
|
51
|
+
}, K = h(() => {
|
52
|
+
i == null || i();
|
53
|
+
}, [i]);
|
50
54
|
if (!e) return null;
|
51
|
-
const
|
52
|
-
(
|
53
|
-
),
|
54
|
-
(
|
55
|
+
const Q = e.some(
|
56
|
+
(o) => o.milestone_state === "ACTIVE"
|
57
|
+
), Y = e.some(
|
58
|
+
(o) => o.milestone_state === "DRAFT"
|
55
59
|
);
|
56
|
-
return /* @__PURE__ */
|
57
|
-
|
58
|
-
|
60
|
+
return /* @__PURE__ */ t(te, { children: [
|
61
|
+
l && !Q && /* @__PURE__ */ n(c, { $marginBottom: 40, children: /* @__PURE__ */ n(
|
62
|
+
ce,
|
59
63
|
{
|
60
64
|
canCreatePlan: m,
|
61
|
-
isDraftMilestonePresent:
|
62
|
-
isFiltersAdded:
|
63
|
-
onCreatePlan:
|
64
|
-
studentName:
|
65
|
-
userType:
|
65
|
+
isDraftMilestonePresent: Y,
|
66
|
+
isFiltersAdded: $,
|
67
|
+
onCreatePlan: r,
|
68
|
+
studentName: p,
|
69
|
+
userType: d
|
66
70
|
}
|
67
71
|
) }),
|
68
|
-
|
69
|
-
/* @__PURE__ */
|
72
|
+
l && /* @__PURE__ */ t(c, { $flexDirection: "row", $justifyContent: "space-between", $marginBottom: 16, children: [
|
73
|
+
/* @__PURE__ */ t(C, { $renderAs: "ac4", children: [
|
70
74
|
"Goals (",
|
71
75
|
e.length,
|
72
76
|
")"
|
73
77
|
] }),
|
74
|
-
|
75
|
-
/* @__PURE__ */
|
78
|
+
d === "TEACHER" && /* @__PURE__ */ t(c, { $flexDirection: "row", $flexGapX: 1, children: [
|
79
|
+
/* @__PURE__ */ n(
|
76
80
|
u,
|
77
81
|
{
|
78
82
|
label: "Create Goal",
|
79
83
|
size: "small",
|
80
|
-
onClick:
|
84
|
+
onClick: q,
|
81
85
|
disabled: !m
|
82
86
|
}
|
83
87
|
),
|
84
|
-
/* @__PURE__ */
|
88
|
+
/* @__PURE__ */ n(u, { label: "Add Milestone", size: "small", onClick: K })
|
85
89
|
] })
|
86
90
|
] }),
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
91
|
+
s === "INACTIVE" && !!e.length && /* @__PURE__ */ t(
|
92
|
+
c,
|
93
|
+
{
|
94
|
+
$flexDirection: "row",
|
95
|
+
$alignItems: "center",
|
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,
|
92
113
|
{
|
93
|
-
milestone:
|
94
|
-
studentId:
|
95
|
-
studentName:
|
96
|
-
parentName:
|
97
|
-
teacherName:
|
98
|
-
userType:
|
99
|
-
onAddOutcome:
|
100
|
-
onChapterClick:
|
101
|
-
isMilestoneActive:
|
102
|
-
milestoneType:
|
103
|
-
onEdit:
|
104
|
-
onCreateMilestoneTest:
|
105
|
-
onAddChapter:
|
106
|
-
onDelete:
|
107
|
-
onDraftPublish:
|
108
|
-
isClassOngoing:
|
109
|
-
isStudentPresent:
|
110
|
-
onAssignResources:
|
111
|
-
onNodeAttempt:
|
112
|
-
onNodeView:
|
113
|
-
onNodeReview:
|
114
|
+
milestone: o,
|
115
|
+
studentId: M,
|
116
|
+
studentName: p,
|
117
|
+
parentName: H,
|
118
|
+
teacherName: X,
|
119
|
+
userType: d,
|
120
|
+
onAddOutcome: i,
|
121
|
+
onChapterClick: w,
|
122
|
+
isMilestoneActive: l || A,
|
123
|
+
milestoneType: s,
|
124
|
+
onEdit: D,
|
125
|
+
onCreateMilestoneTest: P,
|
126
|
+
onAddChapter: v,
|
127
|
+
onDelete: E,
|
128
|
+
onDraftPublish: R,
|
129
|
+
isClassOngoing: T,
|
130
|
+
isStudentPresent: I,
|
131
|
+
onAssignResources: j,
|
132
|
+
onNodeAttempt: S,
|
133
|
+
onNodeView: b,
|
134
|
+
onNodeReview: k,
|
114
135
|
onNodeReattempt: F,
|
115
|
-
onNodeReset:
|
116
|
-
onNodeUnassign:
|
117
|
-
onNodeAssignAsHomework:
|
118
|
-
onTestPreview:
|
119
|
-
onTestReview:
|
120
|
-
onTestStart:
|
121
|
-
courseStream:
|
122
|
-
activeMilestoneId:
|
123
|
-
activeTabId:
|
124
|
-
onWidgetTabSelection:
|
136
|
+
onNodeReset: B,
|
137
|
+
onNodeUnassign: V,
|
138
|
+
onNodeAssignAsHomework: W,
|
139
|
+
onTestPreview: G,
|
140
|
+
onTestReview: L,
|
141
|
+
onTestStart: O,
|
142
|
+
courseStream: U,
|
143
|
+
activeMilestoneId: _,
|
144
|
+
activeTabId: y,
|
145
|
+
onWidgetTabSelection: z
|
125
146
|
}
|
126
147
|
),
|
127
|
-
|
128
|
-
] }, `milestone=${
|
148
|
+
Z !== e.length - 1 && /* @__PURE__ */ n(se, { heightX: 2 })
|
149
|
+
] }, `milestone=${ee}`);
|
129
150
|
})
|
130
151
|
] });
|
131
152
|
}
|
132
153
|
);
|
133
154
|
export {
|
134
|
-
|
155
|
+
Te as default
|
135
156
|
};
|
136
157
|
//# 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 } 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 {(isDraftMilestone || isMilestoneActive) &&\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,MACA,cAAAC;AAAA,MACA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AW,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, 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"],"m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)`
|
14
14
|
position: relative;
|
15
15
|
animation: ${f} 0.3s ease-in-out;
|
16
|
-
|
17
|
-
r(g)(({ theme: o, $expanded: t }) => {
|
16
|
+
`, k = r(g)(({ theme: o, $expanded: t }) => {
|
18
17
|
const {
|
19
18
|
layout: { gutter: e },
|
20
19
|
colors: { BLACK_1: n }
|
@@ -28,8 +27,7 @@ r(g)(({ theme: o, $expanded: t }) => {
|
|
28
27
|
transform: rotate(${t === !0 ? 180 : 0}deg);
|
29
28
|
transition: transform 0.3s ease;
|
30
29
|
`;
|
31
|
-
})
|
32
|
-
const k = r.div(({ $expanded: o, theme: t }) => {
|
30
|
+
}), C = r.div(({ $expanded: o, theme: t }) => {
|
33
31
|
const { colors: e } = t;
|
34
32
|
return `
|
35
33
|
display:grid;
|
@@ -39,7 +37,7 @@ const k = r.div(({ $expanded: o, theme: t }) => {
|
|
39
37
|
border: 1px solid ${e.GREY_2};
|
40
38
|
border-top:none;
|
41
39
|
`;
|
42
|
-
}),
|
40
|
+
}), I = r.div`
|
43
41
|
min-height: 0px;
|
44
42
|
width: 100%;
|
45
43
|
`;
|
@@ -83,7 +81,7 @@ r.div(({ theme: o, $rotate: t }) => {
|
|
83
81
|
}
|
84
82
|
`;
|
85
83
|
});
|
86
|
-
const
|
84
|
+
const _ = r(i)`
|
87
85
|
border-bottom: 0px;
|
88
86
|
position: relative;
|
89
87
|
padding: 32px 32px 24px;
|
@@ -92,7 +90,7 @@ const I = r(i)`
|
|
92
90
|
r(s)`
|
93
91
|
white-space: pre-wrap;
|
94
92
|
`;
|
95
|
-
const
|
93
|
+
const A = r(s)`
|
96
94
|
display: -webkit-box;
|
97
95
|
-webkit-box-orient: vertical;
|
98
96
|
-webkit-line-clamp: 2;
|
@@ -111,7 +109,7 @@ r(i)(({
|
|
111
109
|
top: ${t.layout.gutter * 1.75 / 2}px;
|
112
110
|
${o === "right" ? "right: 0px;" : "left: 0px;"}
|
113
111
|
`);
|
114
|
-
const
|
112
|
+
const D = r.div(({ theme: o }) => {
|
115
113
|
const { layout: t } = o;
|
116
114
|
return `
|
117
115
|
position: absolute;
|
@@ -129,7 +127,7 @@ const A = r.div(({ theme: o }) => {
|
|
129
127
|
position: absolute;
|
130
128
|
inset: 50%;
|
131
129
|
transform: translate(-50%, -50%) rotate(-90deg);
|
132
|
-
`),
|
130
|
+
`), S = r.circle(
|
133
131
|
({ theme: o, $progressCircle: t, $progress: e, $progressBackground: n }) => {
|
134
132
|
const { colors: p, layout: l } = o, { GREY_2: c } = p, { gutter: a } = l, d = a * 12.5, u = t ? d - e : e;
|
135
133
|
return `
|
@@ -148,12 +146,13 @@ r(s)(({ theme: o, $backgroundColor: t }) => `
|
|
148
146
|
`);
|
149
147
|
export {
|
150
148
|
G as ChapterProgressSVG,
|
151
|
-
|
152
|
-
|
153
|
-
|
149
|
+
S as ChapterProgressSVGCircle,
|
150
|
+
I as Content,
|
151
|
+
C as ContentWrapper,
|
154
152
|
v as MainContainer,
|
155
|
-
|
156
|
-
|
157
|
-
|
153
|
+
A as MilestoneTitle,
|
154
|
+
D as StyledCheckIconWrapper,
|
155
|
+
k as StyledDownIcon,
|
156
|
+
_ as Wrapper
|
158
157
|
};
|
159
158
|
//# 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","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
|
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","StyledDownIcon","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,GAGfK,IAAiBF,EAAOG,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,GAEKG,IAAiBR,EAAO,IAA0B,CAAC,EAAE,WAAAK,GAAW,OAAAD,QAAY;AAC1E,QAAA,EAAE,QAAAK,EAAW,IAAAL;AAEZ,SAAA;AAAA;AAAA,yBAEgBC,IAAY,IAAI,CAA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OAAO,SAAS,OAAQ,CAAC;AAAA,MACrCY,MAAe,UAAU,gBAAgB,YAAY;AAAA,GAE1D;AAED,MAAMC,IAAyBjB,EAAO,IAAI,CAAC,EAAE,OAAAI,QAAY;AACjD,QAAA,EAAE,QAAAc,EAAW,IAAAd;AAEZ,SAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAMIc,EAAO,SAAS,IAAI;AAAA,cACnBA,EAAO,SAAS,IAAI;AAAA;AAAA,kBAEhBd,EAAM,OAAO,OAAO;AAAA,yBACbA,EAAM,OAAO,OAAO;AAAA;AAE7C,CAAC,GAEKe,IAAqBnB,EAAO,IAAI,MAC7B;AAAA;AAAA;AAAA;AAAA,GAKR,GAQKoB,IAA2BpB,EAAO;AAAA,EACtC,CAAC,EAAE,OAAAI,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;AAMuBN,EAAOc,CAAI,EAAmB,CAAC,EAAE,OAAAV,GAAO,kBAAAuB,QACtD;AAAA;AAAA,kBAESvB,EAAM,OAAOuB,CAAgB,CAAC;AAAA,GAE/C;"}
|
@@ -1,38 +1,37 @@
|
|
1
1
|
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
2
|
-
import { memo as
|
2
|
+
import { memo as P, useCallback as x, useEffect as m } from "react";
|
3
3
|
import { ILLUSTRATIONS as T } from "../../../../assets/illustrations/illustrations.js";
|
4
|
-
import
|
5
|
-
import
|
4
|
+
import v from "../../../ui/error/error.js";
|
5
|
+
import y from "../../../ui/image/image.js";
|
6
6
|
import C from "../../../ui/layout/flex-view.js";
|
7
|
-
import
|
7
|
+
import I from "../../../ui/loader/app-loader/app-loader.js";
|
8
8
|
import d from "../../../ui/separator/separator.js";
|
9
|
-
import
|
10
|
-
import { useGetTrialPricing as
|
11
|
-
import { useTrialSessionContext as
|
12
|
-
import
|
13
|
-
import
|
14
|
-
import D from "./pricing-
|
15
|
-
|
16
|
-
const
|
17
|
-
const { isTeacher: f, studentId: i, updateButtonState: s } = w(), {
|
9
|
+
import L from "../../../ui/text/text.js";
|
10
|
+
import { useGetTrialPricing as S } from "../../api/trial-pricing.js";
|
11
|
+
import { useTrialSessionContext as $ } from "../../context/use-trial-session-context.js";
|
12
|
+
import w from "../slide-header/index.js";
|
13
|
+
import A from "./pricing-cards.js";
|
14
|
+
import { Container as b, PricingWrapper as D, PolicyWrapper as E, RefundImageWrapper as W } from "./pricing-styled.js";
|
15
|
+
const z = P(() => {
|
16
|
+
const { isTeacher: f, studentId: i, updateButtonState: s } = $(), {
|
18
17
|
data: g,
|
19
18
|
get: p,
|
20
|
-
isProcessed:
|
21
|
-
isProcessing:
|
19
|
+
isProcessed: e,
|
20
|
+
isProcessing: t,
|
22
21
|
isProcessingFailed: h
|
23
|
-
} =
|
22
|
+
} = S("trial-v3-pricing", {
|
24
23
|
student_id: i
|
25
|
-
}), { plans:
|
26
|
-
i && !
|
27
|
-
}, [p,
|
28
|
-
return
|
24
|
+
}), { plans: o, intent_level: c } = g || {}, n = x(() => {
|
25
|
+
i && !e && p("trial-v3-pricing", { student_id: i });
|
26
|
+
}, [p, e, i]);
|
27
|
+
return m(() => {
|
29
28
|
n();
|
30
|
-
}, [n]),
|
31
|
-
s("right", { isDisabled:
|
32
|
-
}, [
|
29
|
+
}, [n]), m(() => {
|
30
|
+
s("right", { isDisabled: t, isLoading: !1 });
|
31
|
+
}, [t, f, s]), t ? /* @__PURE__ */ r(I, { height: "100vh" }) : h ? /* @__PURE__ */ r(v, { height: "100vh", onTryAgain: n }) : e ? /* @__PURE__ */ a(b, { children: [
|
33
32
|
/* @__PURE__ */ r(d, { height: 60 }),
|
34
|
-
/* @__PURE__ */ r(
|
35
|
-
/* @__PURE__ */ a(
|
33
|
+
/* @__PURE__ */ r(w, { marginBottom: 38 }),
|
34
|
+
/* @__PURE__ */ a(D, { children: [
|
36
35
|
/* @__PURE__ */ r(
|
37
36
|
C,
|
38
37
|
{
|
@@ -41,22 +40,22 @@ const M = x(() => {
|
|
41
40
|
$justifyContent: "space-between",
|
42
41
|
$flexGap: 20,
|
43
42
|
$flexWrap: !0,
|
44
|
-
children:
|
45
|
-
|
43
|
+
children: c && o && Array.isArray(o) && o.map((u, l) => /* @__PURE__ */ r(
|
44
|
+
A,
|
46
45
|
{
|
47
|
-
colorIndex:
|
46
|
+
colorIndex: l,
|
48
47
|
intentType: c,
|
49
|
-
pricingConfig:
|
48
|
+
pricingConfig: u
|
50
49
|
},
|
51
|
-
|
52
|
-
))
|
50
|
+
l
|
51
|
+
))
|
53
52
|
}
|
54
53
|
),
|
55
54
|
/* @__PURE__ */ r(d, { height: 50 }),
|
56
|
-
/* @__PURE__ */ a(
|
57
|
-
/* @__PURE__ */ r(
|
58
|
-
/* @__PURE__ */ r(
|
59
|
-
|
55
|
+
/* @__PURE__ */ a(E, { children: [
|
56
|
+
/* @__PURE__ */ r(L, { $renderAs: "ab1-bold", $color: "GREEN_6", children: "We have a no-questions-asked refund policy" }),
|
57
|
+
/* @__PURE__ */ r(W, { children: /* @__PURE__ */ r(
|
58
|
+
y,
|
60
59
|
{
|
61
60
|
src: T.REFUND_POLICY,
|
62
61
|
width: 168,
|
@@ -69,6 +68,6 @@ const M = x(() => {
|
|
69
68
|
] }) : null;
|
70
69
|
});
|
71
70
|
export {
|
72
|
-
|
71
|
+
z as default
|
73
72
|
};
|
74
73
|
//# sourceMappingURL=pricing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricing.js","sources":["../../../../../src/features/trial-session/comps/pricing/pricing.tsx"],"sourcesContent":["import { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetTrialPricing } from '../../api/trial-pricing';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport
|
1
|
+
{"version":3,"file":"pricing.js","sources":["../../../../../src/features/trial-session/comps/pricing/pricing.tsx"],"sourcesContent":["import { memo, useCallback, useEffect } from 'react';\n\nimport { ILLUSTRATIONS } from '../../../../assets/illustrations/illustrations';\nimport Error from '../../../ui/error/error';\nimport Image from '../../../ui/image/image';\nimport FlexView from '../../../ui/layout/flex-view';\nimport AppLoader from '../../../ui/loader/app-loader/app-loader';\nimport Separator from '../../../ui/separator/separator';\nimport Text from '../../../ui/text/text';\nimport { useGetTrialPricing } from '../../api/trial-pricing';\nimport { useTrialSessionContext } from '../../context/use-trial-session-context';\nimport SlideHeader from '../slide-header';\nimport PricingCards from './pricing-cards';\nimport * as Styled from './pricing-styled';\n\nconst SessionPricing = memo(() => {\n const { isTeacher, studentId, updateButtonState } = useTrialSessionContext();\n\n const {\n data: pricingData,\n get: getTrialPricing,\n isProcessed,\n isProcessing,\n isProcessingFailed,\n } = useGetTrialPricing('trial-v3-pricing', {\n student_id: studentId,\n });\n\n const { plans: pricingPlans, intent_level: intentLevel } = pricingData || {};\n const fetchData = useCallback(() => {\n if (studentId && !isProcessed) {\n getTrialPricing('trial-v3-pricing', { student_id: studentId });\n }\n }, [getTrialPricing, isProcessed, studentId]);\n\n useEffect(() => {\n fetchData();\n }, [fetchData]);\n\n useEffect(() => {\n updateButtonState('right', { isDisabled: isProcessing, isLoading: false });\n }, [isProcessing, isTeacher, updateButtonState]);\n\n if (isProcessing) {\n return <AppLoader height=\"100vh\" />;\n }\n\n if (isProcessingFailed) {\n return <Error height=\"100vh\" onTryAgain={fetchData} />;\n }\n\n if (isProcessed) {\n return (\n <Styled.Container>\n <Separator height={60} />\n <SlideHeader marginBottom={38} />\n <Styled.PricingWrapper>\n <FlexView\n $width=\"100%\"\n $flexDirection=\"row\"\n $justifyContent=\"space-between\"\n $flexGap={20}\n $flexWrap\n >\n {intentLevel &&\n pricingPlans &&\n Array.isArray(pricingPlans) &&\n pricingPlans.map((pricing, index) => {\n return (\n <PricingCards\n key={index}\n colorIndex={index}\n intentType={intentLevel}\n pricingConfig={pricing}\n />\n );\n })}\n </FlexView>\n <Separator height={50} />\n <Styled.PolicyWrapper>\n <Text $renderAs=\"ab1-bold\" $color=\"GREEN_6\">\n We have a no-questions-asked refund policy\n </Text>\n <Styled.RefundImageWrapper>\n <Image\n src={ILLUSTRATIONS.REFUND_POLICY}\n width={168}\n height={100}\n withLoader={false}\n />\n </Styled.RefundImageWrapper>\n </Styled.PolicyWrapper>\n </Styled.PricingWrapper>\n </Styled.Container>\n );\n }\n\n return null;\n});\n\nexport default SessionPricing;\n"],"names":["SessionPricing","memo","isTeacher","studentId","updateButtonState","useTrialSessionContext","pricingData","getTrialPricing","isProcessed","isProcessing","isProcessingFailed","useGetTrialPricing","pricingPlans","intentLevel","fetchData","useCallback","useEffect","jsx","AppLoader","Error","jsxs","Styled.Container","Separator","SlideHeader","Styled.PricingWrapper","FlexView","pricing","index","PricingCards","Styled.PolicyWrapper","Text","Styled.RefundImageWrapper","Image","ILLUSTRATIONS"],"mappings":";;;;;;;;;;;;;;AAeM,MAAAA,IAAiBC,EAAK,MAAM;AAChC,QAAM,EAAE,WAAAC,GAAW,WAAAC,GAAW,mBAAAC,MAAsBC,EAAuB,GAErE;AAAA,IACJ,MAAMC;AAAA,IACN,KAAKC;AAAA,IACL,aAAAC;AAAA,I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