@nualang/nualang-ui-components 0.1.1300 → 0.1.1302
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/Assignments/AssignmentExerciseSelection/AssignmentExerciseSelection.js +4 -2
- package/dist/Cards/Classroom/Classroom.js +4 -2
- package/dist/Dialogs/Members/Members.js +2 -0
- package/dist/Forms/Settings/Settings.js +4 -4
- package/dist/Lists/Classrooms/Classrooms.js +3 -0
- package/dist/Screens/Classrooms/Classrooms.js +8 -4
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -892,10 +892,12 @@ function SectionList({
|
|
|
892
892
|
const [courseSectionWithProgress, setCourseSectionWithProgress] = useState([]);
|
|
893
893
|
useEffect(() => {
|
|
894
894
|
if (sections && memberCourseCompletions && selectedExercises) {
|
|
895
|
-
const sectionsWithProgress = calcCompletions(sections, memberCourseCompletions,
|
|
895
|
+
const sectionsWithProgress = calcCompletions(sections, memberCourseCompletions, selectedExercises, {
|
|
896
|
+
includeChallengeBots: isChallengeModeEnabled
|
|
897
|
+
});
|
|
896
898
|
setCourseSectionWithProgress(sectionsWithProgress);
|
|
897
899
|
}
|
|
898
|
-
}, [sections, memberCourseCompletions, selectedExercises]);
|
|
900
|
+
}, [sections, memberCourseCompletions, selectedExercises, isChallengeModeEnabled]);
|
|
899
901
|
const courseSections = courseSectionWithProgress && courseSectionWithProgress.length ? courseSectionWithProgress : sections;
|
|
900
902
|
return /*#__PURE__*/_jsx(_Fragment, {
|
|
901
903
|
children: courseSections.length > 0 ? courseSections.map((section, index) => {
|
|
@@ -129,7 +129,8 @@ function ClassroomCard({
|
|
|
129
129
|
username,
|
|
130
130
|
handleViewUserProfile,
|
|
131
131
|
disableRaised,
|
|
132
|
-
cardTitleComponent = "h3"
|
|
132
|
+
cardTitleComponent = "h3",
|
|
133
|
+
featureFlags
|
|
133
134
|
}) {
|
|
134
135
|
const [placeholderRef, visible] = useInView({
|
|
135
136
|
rootMargin: "320px",
|
|
@@ -346,7 +347,8 @@ function ClassroomCard({
|
|
|
346
347
|
handleClose: handleCloseMembers,
|
|
347
348
|
members: membersQuery.isSuccess ? membersQuery.data.Items : [],
|
|
348
349
|
getMemberDetails: getMemberDetails,
|
|
349
|
-
...membersProps
|
|
350
|
+
...membersProps,
|
|
351
|
+
featureFlags: featureFlags
|
|
350
352
|
})]
|
|
351
353
|
});
|
|
352
354
|
}
|
|
@@ -9,6 +9,7 @@ export default function Members({
|
|
|
9
9
|
members,
|
|
10
10
|
getMemberDetails,
|
|
11
11
|
isClassroomArchived = false,
|
|
12
|
+
featureFlags,
|
|
12
13
|
...otherProps
|
|
13
14
|
}) {
|
|
14
15
|
return /*#__PURE__*/_jsx(ResponsiveDialog, {
|
|
@@ -19,6 +20,7 @@ export default function Members({
|
|
|
19
20
|
members: members,
|
|
20
21
|
getMemberDetails: getMemberDetails,
|
|
21
22
|
isClassroomArchived: isClassroomArchived,
|
|
23
|
+
featureFlags: featureFlags,
|
|
22
24
|
...otherProps
|
|
23
25
|
})
|
|
24
26
|
});
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Box from "@mui/material/Box";
|
|
2
2
|
import ResponsiveTabs from "../../Navigation/ResponsiveTabs/ResponsiveTabs";
|
|
3
|
-
import General from "./Tabs/General";
|
|
4
|
-
import Display from "./Tabs/Display";
|
|
5
|
-
import Subscription from "./Tabs/Subscription";
|
|
6
|
-
import EmailNotifications from "./Tabs/EmailNotifications";
|
|
3
|
+
import General from "./Tabs/General/General.jsx";
|
|
4
|
+
import Display from "./Tabs/Display/Display.jsx";
|
|
5
|
+
import Subscription from "./Tabs/Subscription/Subscription.jsx";
|
|
6
|
+
import EmailNotifications from "./Tabs/EmailNotifications/EmailNotifications.jsx";
|
|
7
7
|
import { checkIsGeneratedEmail } from "../../utils";
|
|
8
8
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
9
9
|
export default function Settings({
|
|
@@ -12,6 +12,7 @@ function ClassroomList({
|
|
|
12
12
|
getMemberDetails,
|
|
13
13
|
singleLineGrid = false,
|
|
14
14
|
singleLineGridCols = 3.5,
|
|
15
|
+
featureFlags,
|
|
15
16
|
...otherProps
|
|
16
17
|
}) {
|
|
17
18
|
const [items, ref] = useListScroll({
|
|
@@ -49,6 +50,7 @@ function ClassroomList({
|
|
|
49
50
|
classroom: classroom,
|
|
50
51
|
getMemberDetails: getMemberDetails,
|
|
51
52
|
disableRaised: true,
|
|
53
|
+
featureFlags: featureFlags,
|
|
52
54
|
...otherProps
|
|
53
55
|
}, classroom.classroomId)
|
|
54
56
|
}, classroom.classroomId);
|
|
@@ -77,6 +79,7 @@ function ClassroomList({
|
|
|
77
79
|
classroom: classroom,
|
|
78
80
|
getMemberDetails: getMemberDetails,
|
|
79
81
|
disableRaised: false,
|
|
82
|
+
featureFlags: featureFlags,
|
|
80
83
|
...otherProps
|
|
81
84
|
}, classroom.classroomId)
|
|
82
85
|
}, classroom.classroomId)), (items || []).length < (classrooms || []).length && new Array(3).fill(null).map((_, index) => /*#__PURE__*/_jsx(GridListItem, {
|
|
@@ -54,7 +54,8 @@ function Classrooms({
|
|
|
54
54
|
getClassroomMembers,
|
|
55
55
|
username,
|
|
56
56
|
subscription = {},
|
|
57
|
-
handleViewUserProfile
|
|
57
|
+
handleViewUserProfile,
|
|
58
|
+
featureFlags
|
|
58
59
|
}) {
|
|
59
60
|
const {
|
|
60
61
|
classes
|
|
@@ -123,7 +124,8 @@ function Classrooms({
|
|
|
123
124
|
getClassroomMembers: getClassroomMembers,
|
|
124
125
|
username: username,
|
|
125
126
|
handleViewUserProfile: handleViewUserProfile,
|
|
126
|
-
cardTitleComponent: "h2"
|
|
127
|
+
cardTitleComponent: "h2",
|
|
128
|
+
featureFlags: featureFlags
|
|
127
129
|
}) : /*#__PURE__*/_jsx(Box, {
|
|
128
130
|
py: 2,
|
|
129
131
|
children: /*#__PURE__*/_jsx(ClassroomsNotFound, {
|
|
@@ -155,7 +157,8 @@ function Classrooms({
|
|
|
155
157
|
getClassroomMembers: getClassroomMembers,
|
|
156
158
|
username: username,
|
|
157
159
|
handleViewUserProfile: handleViewUserProfile,
|
|
158
|
-
cardTitleComponent: "h2"
|
|
160
|
+
cardTitleComponent: "h2",
|
|
161
|
+
featureFlags: featureFlags
|
|
159
162
|
}) : /*#__PURE__*/_jsx(Box, {
|
|
160
163
|
py: 2,
|
|
161
164
|
children: /*#__PURE__*/_jsx(ClassroomsNotFound, {
|
|
@@ -189,7 +192,8 @@ function Classrooms({
|
|
|
189
192
|
getClassroomMembers: getClassroomMembers,
|
|
190
193
|
username: username,
|
|
191
194
|
handleViewUserProfile: handleViewUserProfile,
|
|
192
|
-
cardTitleComponent: "h2"
|
|
195
|
+
cardTitleComponent: "h2",
|
|
196
|
+
featureFlags: featureFlags
|
|
193
197
|
}) : /*#__PURE__*/_jsx(Box, {
|
|
194
198
|
py: 2,
|
|
195
199
|
children: /*#__PURE__*/_jsx(ClassroomsNotFound, {
|
package/dist/utils/index.js
CHANGED
|
@@ -389,7 +389,7 @@ export const calcTopicCompletions = (topic, completions = [], isSectionHidden, a
|
|
|
389
389
|
}
|
|
390
390
|
};
|
|
391
391
|
};
|
|
392
|
-
export const calcCompletions = (sections = [], completions = [], assignmentExercises, opts = {}) => sections.map(section => {
|
|
392
|
+
export const calcCompletions = (sections = [], completions = [], assignmentExercises = [], opts = {}) => sections.map(section => {
|
|
393
393
|
const {
|
|
394
394
|
includeChallengeBots = false
|
|
395
395
|
} = opts;
|