@nualang/nualang-ui-components 0.1.1246 → 0.1.1248
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/AssignmentRoleplaySelection/AssignmentRoleplaySelection.js +1 -1
- package/dist/Forms/FeedbackForm/FeedbackForm.js +2 -1
- package/dist/Lists/Courses/Courses.js +27 -8
- package/dist/Lists/Leaderboard/Leaderboard.js +26 -21
- package/dist/Live/GameControls/GameControls.js +3 -1
- package/dist/Live/GameQuestionResults/GameQuestionResults.js +2 -1
- package/dist/Screens/Classrooms/ViewClassroom/ViewClassroom.js +0 -3
- package/dist/Screens/Courses/SearchCourses/SearchCourses.js +1 -0
- package/dist/Screens/Search/Search.js +1 -0
- package/dist/Tables/Progress/Progress.js +1 -1
- package/package.json +7 -5
|
@@ -366,7 +366,7 @@ function AssignmentRoleplaySelection({
|
|
|
366
366
|
lastClickedExerciseId
|
|
367
367
|
}) {
|
|
368
368
|
const [isRoleplaySelected, setIsRoleplaySelected] = (0, _react.useState)(false);
|
|
369
|
-
const filteredCompletions = memberCourseCompletions.filter(completion => completion.courseSectionTopicId === courseSectionTopicId);
|
|
369
|
+
const filteredCompletions = Array.isArray(memberCourseCompletions) && memberCourseCompletions.length > 0 ? memberCourseCompletions.filter(completion => completion.courseSectionTopicId === courseSectionTopicId) : [];
|
|
370
370
|
return roleplays.map(roleplay => /*#__PURE__*/(0, _jsxRuntime.jsx)(Roleplay, {
|
|
371
371
|
roleplay: roleplay,
|
|
372
372
|
isRoleplaySelected: isRoleplaySelected,
|
|
@@ -27,19 +27,19 @@ const useStyles = (0, _mui.makeStyles)()(theme => ({
|
|
|
27
27
|
gridAutoFlow: "column"
|
|
28
28
|
},
|
|
29
29
|
gridListTileRoot: {
|
|
30
|
-
[theme.breakpoints.up("sm")]: {
|
|
31
|
-
minWidth: 380
|
|
32
|
-
},
|
|
33
30
|
height: "auto",
|
|
34
|
-
minWidth:
|
|
31
|
+
minWidth: {
|
|
32
|
+
xs: 330,
|
|
33
|
+
sm: 380
|
|
34
|
+
},
|
|
35
35
|
padding: theme.spacing(0.75, 0.75, 2, 0.75)
|
|
36
36
|
},
|
|
37
37
|
gridListItemRoot: {
|
|
38
|
-
[theme.breakpoints.up("sm")]: {
|
|
39
|
-
minWidth: 380
|
|
40
|
-
},
|
|
41
38
|
height: "auto",
|
|
42
|
-
minWidth:
|
|
39
|
+
minWidth: {
|
|
40
|
+
xs: 330,
|
|
41
|
+
sm: 380
|
|
42
|
+
}
|
|
43
43
|
}
|
|
44
44
|
}));
|
|
45
45
|
function CourseList({
|
|
@@ -111,10 +111,22 @@ function CourseList({
|
|
|
111
111
|
cols: singleLineGridCols,
|
|
112
112
|
rowHeight: "auto",
|
|
113
113
|
gap: 0,
|
|
114
|
+
sx: {
|
|
115
|
+
display: 'flex',
|
|
116
|
+
gridAutoFlow: 'column',
|
|
117
|
+
justifyContent: 'flex-start'
|
|
118
|
+
},
|
|
114
119
|
children: [items.map(course => {
|
|
115
120
|
const selected = selectedCourses.includes(course.courseId);
|
|
116
121
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ImageListItem, {
|
|
117
122
|
className: classes.gridListTileRoot,
|
|
123
|
+
sx: {
|
|
124
|
+
flex: '0 0 auto',
|
|
125
|
+
width: {
|
|
126
|
+
xs: 330,
|
|
127
|
+
sm: 380
|
|
128
|
+
} // Stop flex overwriting
|
|
129
|
+
},
|
|
118
130
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Course.default, {
|
|
119
131
|
t: t,
|
|
120
132
|
course: course,
|
|
@@ -139,6 +151,13 @@ function CourseList({
|
|
|
139
151
|
}), (items || []).length < (courses || []).length && new Array(3).fill(null).map((_, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.ImageListItem, {
|
|
140
152
|
className: classes.gridListTileRoot,
|
|
141
153
|
ref: index === 0 ? ref : null,
|
|
154
|
+
sx: {
|
|
155
|
+
flex: '0 0 auto',
|
|
156
|
+
width: {
|
|
157
|
+
xs: 330,
|
|
158
|
+
sm: 380
|
|
159
|
+
}
|
|
160
|
+
},
|
|
142
161
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Course.default, {
|
|
143
162
|
t: t
|
|
144
163
|
})
|
|
@@ -10,7 +10,7 @@ var _material = require("@mui/material");
|
|
|
10
10
|
var _Person = _interopRequireDefault(require("@mui/icons-material/Person"));
|
|
11
11
|
var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
|
|
12
12
|
var _Members = _interopRequireDefault(require("../../Misc/NotFound/Members"));
|
|
13
|
-
var
|
|
13
|
+
var _reactFlipToolkit = require("react-flip-toolkit");
|
|
14
14
|
var _system = require("@mui/system");
|
|
15
15
|
var _TrendingUp = _interopRequireDefault(require("@mui/icons-material/TrendingUp"));
|
|
16
16
|
var _TrendingDown = _interopRequireDefault(require("@mui/icons-material/TrendingDown"));
|
|
@@ -293,25 +293,30 @@ function MemberList(props) {
|
|
|
293
293
|
children: [members.length === 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Members.default, {
|
|
294
294
|
t: t,
|
|
295
295
|
placeholderImageUrl: placeholderImageUrl
|
|
296
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
297
|
-
|
|
298
|
-
children:
|
|
299
|
-
|
|
300
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
296
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFlipToolkit.Flipper, {
|
|
297
|
+
flipKey: members.map(m => m.memberId).join(','),
|
|
298
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
299
|
+
className: "member-list",
|
|
300
|
+
children: members.map(member => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFlipToolkit.Flipped, {
|
|
301
|
+
flipId: member.memberId,
|
|
302
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
303
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(Member, {
|
|
304
|
+
member: member,
|
|
305
|
+
isCreator: isCreator,
|
|
306
|
+
isCourseMember: isCourseMember,
|
|
307
|
+
t: t,
|
|
308
|
+
lastTwoIndexes: gameMembersHistory.slice(-2).map(members => members.find(m => m.memberId === member.memberId)?.index),
|
|
309
|
+
lastFourScores: gameMembersHistory.slice(-4).map(members => members.find(m => m.memberId === member.memberId)?.score),
|
|
310
|
+
topThreeScores: topThreeScores,
|
|
311
|
+
remainingQuestions: remainingQuestions,
|
|
312
|
+
numOfCorrectAnswers: numOfCorrectAnswers,
|
|
313
|
+
isIconsVisible: isIconsVisible,
|
|
314
|
+
showRoleplayLeaderboardIcons: showRoleplayLeaderboardIcons,
|
|
315
|
+
lastThreeAnswerResults: gameMembersHistory.slice(-3).map(members => members.find(m => m.memberId === member.memberId)?.isCorrect)
|
|
316
|
+
})
|
|
317
|
+
})
|
|
318
|
+
}, member.memberId))
|
|
319
|
+
})
|
|
315
320
|
})]
|
|
316
321
|
});
|
|
317
322
|
}
|
|
@@ -330,7 +335,7 @@ function Leaderboard({
|
|
|
330
335
|
numOfCorrectAnswers,
|
|
331
336
|
isIconsVisible,
|
|
332
337
|
showRoleplayLeaderboardIcons,
|
|
333
|
-
exercise,
|
|
338
|
+
exercise = '',
|
|
334
339
|
handleNext,
|
|
335
340
|
nextScriptLine,
|
|
336
341
|
setIsIconsVisible
|
|
@@ -35,7 +35,8 @@ function GameControls({
|
|
|
35
35
|
}),
|
|
36
36
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Grid, {
|
|
37
37
|
sx: {
|
|
38
|
-
ml: 2
|
|
38
|
+
ml: 2,
|
|
39
|
+
mt: 1
|
|
39
40
|
},
|
|
40
41
|
component: _material.Typography,
|
|
41
42
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_material.Typography, {
|
|
@@ -56,6 +57,7 @@ function GameControls({
|
|
|
56
57
|
}
|
|
57
58
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Grid, {
|
|
58
59
|
mr: 2,
|
|
60
|
+
mt: 1,
|
|
59
61
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_material.Button, {
|
|
60
62
|
color: "primary",
|
|
61
63
|
onClick: handleTimeUp,
|
|
@@ -499,9 +499,6 @@ function Classroom({
|
|
|
499
499
|
(0, _react.useEffect)(() => {
|
|
500
500
|
if (!condition || !cId) return;
|
|
501
501
|
const lastFetched = initialStored.current[cId] || 0;
|
|
502
|
-
console.log({
|
|
503
|
-
lastFetched
|
|
504
|
-
});
|
|
505
502
|
const hasNew = assignments.some(item => item.updatedAt && Number(item.updatedAt) > lastFetched);
|
|
506
503
|
setHasNewAssignments(hasNew);
|
|
507
504
|
if (hasNew) {
|
|
@@ -216,7 +216,7 @@ function Progress({
|
|
|
216
216
|
} else {
|
|
217
217
|
return [];
|
|
218
218
|
}
|
|
219
|
-
}, [
|
|
219
|
+
}, [currentCourses, courseSectionsQueriesIsLoading]);
|
|
220
220
|
const deleteCourseId = () => {
|
|
221
221
|
if ("URLSearchParams" in window) {
|
|
222
222
|
const searchParams = (0, _utils2.searchStringToObj)(window.location.search);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nualang/nualang-ui-components",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1248",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
14
|
"@dnd-kit/core": "6.3.1",
|
|
15
|
+
"@dnd-kit/modifiers": "9.0.0",
|
|
15
16
|
"@dnd-kit/sortable": "10.0.0",
|
|
16
17
|
"@dnd-kit/utilities": "3.2.2",
|
|
17
|
-
"@dnd-kit/modifiers": "9.0.0",
|
|
18
18
|
"@emotion/react": "^11.13",
|
|
19
19
|
"@emotion/styled": "^11.13",
|
|
20
20
|
"@hookform/resolvers": "^3.6.0",
|
|
@@ -67,7 +67,6 @@
|
|
|
67
67
|
"react-dropzone": "^14.2.3",
|
|
68
68
|
"react-easy-crop": "^5.0.0",
|
|
69
69
|
"react-feather": "^2.0",
|
|
70
|
-
"react-flip-move": "^3.0.5",
|
|
71
70
|
"react-flip-toolkit": "^7.1.0",
|
|
72
71
|
"react-hook-form": "^7.52.0",
|
|
73
72
|
"react-i18next": "^15.4.1",
|
|
@@ -111,7 +110,6 @@
|
|
|
111
110
|
"@mui/x-date-pickers": "^7.28.3",
|
|
112
111
|
"@nualang/eslint-config-nualang": "0.2.0-alpha-4",
|
|
113
112
|
"@react-theming/storybook-addon": "^1.1.10",
|
|
114
|
-
"react-router-dom": "^6.30.0",
|
|
115
113
|
"@storybook/addon-actions": "^8.6.12",
|
|
116
114
|
"@storybook/addon-essentials": "^8.6.12",
|
|
117
115
|
"@storybook/addon-links": "^8.6.12",
|
|
@@ -129,11 +127,13 @@
|
|
|
129
127
|
"@testing-library/dom": "^10.4.0",
|
|
130
128
|
"@testing-library/react": "^16.3.0",
|
|
131
129
|
"babel-plugin-macros": "^3.1.0",
|
|
130
|
+
"chalk": "^5.4.1",
|
|
132
131
|
"clsx": "^2.0.0",
|
|
133
132
|
"cross-env": "^7.0.3",
|
|
134
133
|
"eslint": "^9.24.0",
|
|
135
134
|
"eslint-plugin-jsx-a11y": "^6.8.0",
|
|
136
135
|
"eslint-plugin-react-hooks": "^5.1.0",
|
|
136
|
+
"glob": "^11.0.2",
|
|
137
137
|
"globals": "^16.0.0",
|
|
138
138
|
"intersection-observer": "^0.12.0",
|
|
139
139
|
"jsdom": "^26.1.0",
|
|
@@ -141,9 +141,11 @@
|
|
|
141
141
|
"prettier": "^3.2.5",
|
|
142
142
|
"react": "19.1.0",
|
|
143
143
|
"react-dom": "19.1.0",
|
|
144
|
+
"react-router-dom": "^6.30.0",
|
|
144
145
|
"react-scripts": "^5.0.1",
|
|
145
146
|
"storybook": "^8.6.12",
|
|
146
|
-
"vitest": "^3.1.1"
|
|
147
|
+
"vitest": "^3.1.1",
|
|
148
|
+
"zx": "^8.5.4"
|
|
147
149
|
},
|
|
148
150
|
"scripts": {
|
|
149
151
|
"postinstall": "patch-package",
|