@nualang/nualang-ui-components 0.1.1175 → 0.1.1177
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/Cards/Course/Course.js +5 -17
- package/dist/Chat/Messages/Question/Question.js +0 -6
- package/dist/Dialogs/CourseOutline/CourseOutline.js +3 -1
- package/dist/Editors/Bot/Bot.js +4 -2
- package/dist/Editors/Roleplay/Roleplay.js +4 -2
- package/dist/Forms/CreateBot/CreateBot.js +4 -2
- package/dist/Forms/CreateBot/Steps/BotInformation/BotInformation.js +4 -2
- package/dist/Forms/CreateRoleplay/CreateRoleplay.js +4 -2
- package/dist/Forms/CreateRoleplay/Steps/RoleplayInformation/RoleplayInformation.js +10 -5
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplayInformation/RoleplayInformation.js +10 -5
- package/dist/Forms/CreateTopic/CreateTopic.js +4 -2
- package/dist/Forms/CreateTopic/Steps/TopicInformation/TopicInformation.js +2 -1
- package/dist/Forms/CreateTopic/Steps/TopicSettings/TopicSettings.js +4 -2
- package/dist/Forms/UpdateBot/UpdateBot.js +4 -2
- package/dist/Forms/UpdateRoleplay/UpdateRoleplay.js +4 -2
- package/dist/Forms/UpdateTopic/UpdateTopic.js +4 -2
- package/dist/Forms/VoiceSelector/VoiceSelector.js +5 -3
- package/dist/Lists/CourseOutline/CourseOutline.js +3 -1
- package/dist/Lists/ExerciseSelection/ExerciseSelection.js +14 -1
- package/dist/Lists/Phrases/Phrases.js +130 -118
- package/dist/Misc/StudentWaitingMessage/StudentWaitingMessage.js +6 -4
- package/dist/Navigation/Breadcrumbs/Breadcrumbs.js +8 -0
- package/dist/Navigation/ResponsiveDrawer/ResponsiveDrawer.js +4 -1
- package/dist/Screens/Classrooms/Classrooms.js +5 -16
- package/dist/Screens/Courses/ViewCourse/ViewCourse.js +7 -15
- package/dist/Screens/Courses/ViewCourse/ViewCourse.stories.js +11 -3
- package/dist/Screens/Courses/ViewCourse/ViewTopic/ViewTopic.js +10 -9
- package/dist/Screens/GenerateAudio/GenerateAudio.js +224 -0
- package/dist/config.js +3 -1
- package/package.json +2 -3
|
@@ -9,7 +9,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _reactIntersectionObserver = require("react-intersection-observer");
|
|
10
10
|
var _material = require("@mui/material");
|
|
11
11
|
var _Skeleton = _interopRequireDefault(require("@mui/material/Skeleton"));
|
|
12
|
-
var _Rating = _interopRequireDefault(require("@mui/material/Rating"));
|
|
13
12
|
var _Group = _interopRequireDefault(require("@mui/icons-material/Group"));
|
|
14
13
|
var _ExitToApp = _interopRequireDefault(require("@mui/icons-material/ExitToApp"));
|
|
15
14
|
var _Edit = _interopRequireDefault(require("@mui/icons-material/Edit"));
|
|
@@ -132,14 +131,7 @@ function CourseLoading() {
|
|
|
132
131
|
width: "20%"
|
|
133
132
|
}), /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
134
133
|
flexGrow: 1
|
|
135
|
-
}), /*#__PURE__*/_react.default.createElement(_material.
|
|
136
|
-
mr: 0.5
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement(_Rating.default, {
|
|
138
|
-
value: 0,
|
|
139
|
-
precision: 0.5,
|
|
140
|
-
readOnly: true,
|
|
141
|
-
size: "small"
|
|
142
|
-
}))), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
134
|
+
})), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
143
135
|
variant: "body1",
|
|
144
136
|
color: "textSecondary",
|
|
145
137
|
component: "div"
|
|
@@ -443,7 +435,7 @@ function CourseCard({
|
|
|
443
435
|
}
|
|
444
436
|
}, /*#__PURE__*/_react.default.createElement(_OndemandVideo.default, {
|
|
445
437
|
sx: _CardElements.classes.infoIcon
|
|
446
|
-
}), t("video_included")), isPlaysVisible
|
|
438
|
+
}), t("video_included")), isPlaysVisible && /*#__PURE__*/_react.default.createElement(_CardElements.CardInfoSectionItem, {
|
|
447
439
|
variant: "body2",
|
|
448
440
|
component: "span",
|
|
449
441
|
sx: {
|
|
@@ -455,12 +447,7 @@ function CourseCard({
|
|
|
455
447
|
sx: _CardElements.classes.infoIcon
|
|
456
448
|
}), t("plays", {
|
|
457
449
|
number: (0, _index2.formatNumberTotal)(exerciseStartTotal)
|
|
458
|
-
}))
|
|
459
|
-
style: {
|
|
460
|
-
width: "100%",
|
|
461
|
-
height: "1.5em"
|
|
462
|
-
}
|
|
463
|
-
})), /*#__PURE__*/_react.default.createElement(_CardElements.CardDescription, {
|
|
450
|
+
}))), /*#__PURE__*/_react.default.createElement(_CardElements.CardDescription, {
|
|
464
451
|
variant: "body1",
|
|
465
452
|
color: "textSecondary",
|
|
466
453
|
component: "p"
|
|
@@ -552,7 +539,8 @@ function CourseCard({
|
|
|
552
539
|
isLoading: sectionsQuery.isLoading,
|
|
553
540
|
isMember: isMember,
|
|
554
541
|
completions: completions,
|
|
555
|
-
isClassroomArchived: isClassroomArchived
|
|
542
|
+
isClassroomArchived: isClassroomArchived,
|
|
543
|
+
classroomId: classroomId
|
|
556
544
|
}));
|
|
557
545
|
}
|
|
558
546
|
function Course(props) {
|
|
@@ -115,12 +115,6 @@ function Answers({
|
|
|
115
115
|
};
|
|
116
116
|
(0, _react.useEffect)(() => {
|
|
117
117
|
if (showResults) {
|
|
118
|
-
setTotalVotes(Object.values(answerCounts).reduce((sum, count) => sum + count, 0));
|
|
119
|
-
setIsLoading(false);
|
|
120
|
-
}
|
|
121
|
-
}, [answerCounts, showResults]);
|
|
122
|
-
(0, _react.useEffect)(() => {
|
|
123
|
-
if (showResults && noAnswerCounts > 0) {
|
|
124
118
|
const totalAnswerVotes = Object.values(answerCounts).reduce((sum, count) => sum + count, 0);
|
|
125
119
|
const totalVotesIncludingNoAnswer = totalAnswerVotes + (noAnswerCounts || 0);
|
|
126
120
|
setTotalVotes(totalVotesIncludingNoAnswer);
|
|
@@ -15,6 +15,7 @@ function CourseOutline({
|
|
|
15
15
|
dialogTitle,
|
|
16
16
|
handleViewCourseTopic,
|
|
17
17
|
isClassroomArchived = false,
|
|
18
|
+
classroomId,
|
|
18
19
|
...otherProps
|
|
19
20
|
}) {
|
|
20
21
|
return /*#__PURE__*/_react.default.createElement(_ResponsiveDialog.default, {
|
|
@@ -25,6 +26,7 @@ function CourseOutline({
|
|
|
25
26
|
handleViewCourseTopic: handleViewCourseTopic,
|
|
26
27
|
disableDrag: true,
|
|
27
28
|
showViewTopicButton: false,
|
|
28
|
-
isClassroomArchived: isClassroomArchived
|
|
29
|
+
isClassroomArchived: isClassroomArchived,
|
|
30
|
+
classroomId: classroomId
|
|
29
31
|
})));
|
|
30
32
|
}
|
package/dist/Editors/Bot/Bot.js
CHANGED
|
@@ -112,7 +112,8 @@ function Bot({
|
|
|
112
112
|
courseId,
|
|
113
113
|
sectionId,
|
|
114
114
|
topicId,
|
|
115
|
-
initialTopicGoal
|
|
115
|
+
initialTopicGoal,
|
|
116
|
+
isUserInternal
|
|
116
117
|
}) {
|
|
117
118
|
const {
|
|
118
119
|
recognitionState,
|
|
@@ -693,7 +694,8 @@ function Bot({
|
|
|
693
694
|
fileSizeLimit: fileSizeLimit,
|
|
694
695
|
onSubmit: onSubmit,
|
|
695
696
|
subscription: subscription,
|
|
696
|
-
handleBotInstructionsImageUpload: handleBotInstructionsImageUpload
|
|
697
|
+
handleBotInstructionsImageUpload: handleBotInstructionsImageUpload,
|
|
698
|
+
isUserInternal: isUserInternal
|
|
697
699
|
})) : null), /*#__PURE__*/_react.default.createElement(_ResponsiveDialog.default, {
|
|
698
700
|
open: creatorInstructionsDialogOpen,
|
|
699
701
|
handleClose: handleCloseCreatorInstructions,
|
|
@@ -271,7 +271,8 @@ function Roleplay({
|
|
|
271
271
|
siteLanguage,
|
|
272
272
|
phrases,
|
|
273
273
|
topicId,
|
|
274
|
-
initialTopicGoal
|
|
274
|
+
initialTopicGoal,
|
|
275
|
+
isUserInternal
|
|
275
276
|
}) {
|
|
276
277
|
console.log("Edit Roleplay -> phrases", phrases);
|
|
277
278
|
const [isGenerateRoleplayDialogOpen, setIsGenerateRoleplayDialogOpen] = (0, _react.useState)(false);
|
|
@@ -783,7 +784,8 @@ function Roleplay({
|
|
|
783
784
|
initialValues: initialValues,
|
|
784
785
|
onSubmit: onSubmit,
|
|
785
786
|
fileSizeLimit: fileSizeLimit,
|
|
786
|
-
subscription: subscription
|
|
787
|
+
subscription: subscription,
|
|
788
|
+
isUserInternal: isUserInternal
|
|
787
789
|
})) : null, /*#__PURE__*/_react.default.createElement(_CreateQuestion.default, {
|
|
788
790
|
t: t,
|
|
789
791
|
learnLang: learnLang,
|
|
@@ -48,7 +48,8 @@ function CreateBot({
|
|
|
48
48
|
subscription = {
|
|
49
49
|
isUpgradePossible: true
|
|
50
50
|
},
|
|
51
|
-
langChar
|
|
51
|
+
langChar,
|
|
52
|
+
isUserInternal
|
|
52
53
|
}) {
|
|
53
54
|
const difficultyOptions = difficulties.map((d, idx) => {
|
|
54
55
|
const keyId = `creabotvoicx_${(0, _index.randomId)()}${idx}`;
|
|
@@ -69,7 +70,8 @@ function CreateBot({
|
|
|
69
70
|
fileSizeLimit: fileSizeLimit,
|
|
70
71
|
subscription: subscription,
|
|
71
72
|
voiceOptions: voices,
|
|
72
|
-
langChar: langChar
|
|
73
|
+
langChar: langChar,
|
|
74
|
+
isUserInternal: isUserInternal
|
|
73
75
|
});
|
|
74
76
|
}
|
|
75
77
|
CreateBot.propTypes = {};
|
|
@@ -62,7 +62,8 @@ function BotInformation({
|
|
|
62
62
|
update,
|
|
63
63
|
fileSizeLimit,
|
|
64
64
|
handleBotInstructionsImageUpload,
|
|
65
|
-
langChar
|
|
65
|
+
langChar,
|
|
66
|
+
isUserInternal
|
|
66
67
|
}) {
|
|
67
68
|
const {
|
|
68
69
|
classes
|
|
@@ -400,7 +401,8 @@ function BotInformation({
|
|
|
400
401
|
onBlur: handleBlur,
|
|
401
402
|
helperText: touched.voice ? t(errors.voice) : "",
|
|
402
403
|
error: touched.voice && Boolean(errors.voice),
|
|
403
|
-
voicePitch: voicePitch
|
|
404
|
+
voicePitch: voicePitch,
|
|
405
|
+
isUserInternal: isUserInternal
|
|
404
406
|
}), /*#__PURE__*/_react.default.createElement(_InputHelper.default, {
|
|
405
407
|
t: t,
|
|
406
408
|
id: "name",
|
|
@@ -61,7 +61,8 @@ function CreateRoleplay({
|
|
|
61
61
|
subscription = {
|
|
62
62
|
isUpgradePossible: true
|
|
63
63
|
},
|
|
64
|
-
langChar
|
|
64
|
+
langChar,
|
|
65
|
+
isUserInternal
|
|
65
66
|
}) {
|
|
66
67
|
const difficultyOptions = difficulties.map((d, idx) => {
|
|
67
68
|
const keyId = `crearolax${(0, _index.randomId)()}${idx}`;
|
|
@@ -83,7 +84,8 @@ function CreateRoleplay({
|
|
|
83
84
|
difficultyOptions: difficultyOptions,
|
|
84
85
|
fileSizeLimit: fileSizeLimit,
|
|
85
86
|
subscription: subscription,
|
|
86
|
-
langChar: langChar
|
|
87
|
+
langChar: langChar,
|
|
88
|
+
isUserInternal: isUserInternal
|
|
87
89
|
});
|
|
88
90
|
}
|
|
89
91
|
CreateRoleplay.propTypes = {};
|
|
@@ -49,7 +49,8 @@ function ActorForm({
|
|
|
49
49
|
learnLang,
|
|
50
50
|
voiceOptions = {},
|
|
51
51
|
handleSpeak,
|
|
52
|
-
langChar
|
|
52
|
+
langChar,
|
|
53
|
+
isUserInternal
|
|
53
54
|
}) {
|
|
54
55
|
const {
|
|
55
56
|
classes
|
|
@@ -175,7 +176,8 @@ function ActorForm({
|
|
|
175
176
|
onBlur: handleBlur,
|
|
176
177
|
helperText: touched[`actor${number}`] && errors[`actor${number}`] ? errors[`actor${number}`].voice : "",
|
|
177
178
|
error: touched[`actor${number}`] && errors[`actor${number}`] && Boolean(errors[`actor${number}`].voice),
|
|
178
|
-
voicePitch: voicePitch
|
|
179
|
+
voicePitch: voicePitch,
|
|
180
|
+
isUserInternal: isUserInternal
|
|
179
181
|
}), /*#__PURE__*/_react.default.createElement(_InputHelper.default, {
|
|
180
182
|
t: t,
|
|
181
183
|
id: `actor${number}.name`,
|
|
@@ -216,7 +218,8 @@ function RoleplayInformation({
|
|
|
216
218
|
values,
|
|
217
219
|
fileSizeLimit,
|
|
218
220
|
errors,
|
|
219
|
-
langChar
|
|
221
|
+
langChar,
|
|
222
|
+
isUserInternal
|
|
220
223
|
}) {
|
|
221
224
|
const {
|
|
222
225
|
roleplayName,
|
|
@@ -349,7 +352,8 @@ function RoleplayInformation({
|
|
|
349
352
|
voiceOptions: voiceOptions,
|
|
350
353
|
handleSpeak: handleSpeak,
|
|
351
354
|
avatars: avatars,
|
|
352
|
-
langChar: langChar
|
|
355
|
+
langChar: langChar,
|
|
356
|
+
isUserInternal: isUserInternal
|
|
353
357
|
})), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
354
358
|
item: true,
|
|
355
359
|
xs: 12,
|
|
@@ -366,7 +370,8 @@ function RoleplayInformation({
|
|
|
366
370
|
voiceOptions: voiceOptions,
|
|
367
371
|
handleSpeak: handleSpeak,
|
|
368
372
|
avatars: avatars,
|
|
369
|
-
langChar: langChar
|
|
373
|
+
langChar: langChar,
|
|
374
|
+
isUserInternal: isUserInternal
|
|
370
375
|
}))));
|
|
371
376
|
}
|
|
372
377
|
RoleplayInformation.propTypes = {};
|
|
@@ -45,7 +45,8 @@ function ActorForm({
|
|
|
45
45
|
avatars,
|
|
46
46
|
learnLang,
|
|
47
47
|
voiceOptions = {},
|
|
48
|
-
handleSpeak
|
|
48
|
+
handleSpeak,
|
|
49
|
+
isUserInternal
|
|
49
50
|
}) {
|
|
50
51
|
const {
|
|
51
52
|
classes
|
|
@@ -156,7 +157,8 @@ function ActorForm({
|
|
|
156
157
|
onBlur: onBlur,
|
|
157
158
|
helperText: touchedFields[`actor${number}`] && errors[`actor${number}`] ? errors[`actor${number}`].voice : "",
|
|
158
159
|
error: touchedFields[`actor${number}`] && errors[`actor${number}`] && Boolean(errors[`actor${number}`].voice),
|
|
159
|
-
voicePitch: voicePitch
|
|
160
|
+
voicePitch: voicePitch,
|
|
161
|
+
isUserInternal: isUserInternal
|
|
160
162
|
})
|
|
161
163
|
}), /*#__PURE__*/_react.default.createElement(_reactHookForm.Controller, {
|
|
162
164
|
name: `actor${number}.name`,
|
|
@@ -211,7 +213,8 @@ function RoleplayInformation({
|
|
|
211
213
|
learnLang,
|
|
212
214
|
handleSpeak,
|
|
213
215
|
avatars,
|
|
214
|
-
fileSizeLimit
|
|
216
|
+
fileSizeLimit,
|
|
217
|
+
isUserInternal
|
|
215
218
|
}) {
|
|
216
219
|
const formContext = (0, _reactHookForm.useFormContext)();
|
|
217
220
|
const {
|
|
@@ -405,7 +408,8 @@ function RoleplayInformation({
|
|
|
405
408
|
learnLang: learnLang,
|
|
406
409
|
voiceOptions: voiceOptions,
|
|
407
410
|
handleSpeak: handleSpeak,
|
|
408
|
-
avatars: avatars
|
|
411
|
+
avatars: avatars,
|
|
412
|
+
isUserInternal: isUserInternal
|
|
409
413
|
})), /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
410
414
|
item: true,
|
|
411
415
|
xs: 12,
|
|
@@ -419,7 +423,8 @@ function RoleplayInformation({
|
|
|
419
423
|
learnLang: learnLang,
|
|
420
424
|
voiceOptions: voiceOptions,
|
|
421
425
|
handleSpeak: handleSpeak,
|
|
422
|
-
avatars: avatars
|
|
426
|
+
avatars: avatars,
|
|
427
|
+
isUserInternal: isUserInternal
|
|
423
428
|
}))));
|
|
424
429
|
}
|
|
425
430
|
RoleplayInformation.propTypes = {};
|
|
@@ -41,7 +41,8 @@ function CreateTopic({
|
|
|
41
41
|
fileSizeLimit,
|
|
42
42
|
subscription = {
|
|
43
43
|
isUpgradePossible: true
|
|
44
|
-
}
|
|
44
|
+
},
|
|
45
|
+
isUserInternal
|
|
45
46
|
}) {
|
|
46
47
|
const difficultyOptions = difficulties.map((d, idx) => {
|
|
47
48
|
const keyId = `cretopicx_${(0, _index.randomId)()}${idx}`;
|
|
@@ -60,7 +61,8 @@ function CreateTopic({
|
|
|
60
61
|
learnLang: learnLang,
|
|
61
62
|
fileSizeLimit: fileSizeLimit,
|
|
62
63
|
subscription: subscription,
|
|
63
|
-
voiceOptions: voices
|
|
64
|
+
voiceOptions: voices,
|
|
65
|
+
isUserInternal: isUserInternal
|
|
64
66
|
});
|
|
65
67
|
}
|
|
66
68
|
CreateTopic.propTypes = {};
|
|
@@ -27,7 +27,8 @@ function TopicSettings({
|
|
|
27
27
|
subscription,
|
|
28
28
|
learnLang,
|
|
29
29
|
voiceOptions,
|
|
30
|
-
handleSpeak
|
|
30
|
+
handleSpeak,
|
|
31
|
+
isUserInternal
|
|
31
32
|
}) {
|
|
32
33
|
const {
|
|
33
34
|
classes
|
|
@@ -162,7 +163,8 @@ function TopicSettings({
|
|
|
162
163
|
onBlur: handleBlur,
|
|
163
164
|
helperText: touched.voice ? errors.voice : "",
|
|
164
165
|
error: touched.voice && Boolean(errors.voice),
|
|
165
|
-
voicePitch: voicePitch
|
|
166
|
+
voicePitch: voicePitch,
|
|
167
|
+
isUserInternal: isUserInternal
|
|
166
168
|
}))));
|
|
167
169
|
}
|
|
168
170
|
TopicSettings.propTypes = {};
|
|
@@ -57,7 +57,8 @@ function UpdateBot({
|
|
|
57
57
|
subscription = {
|
|
58
58
|
isUpgradePossible: true
|
|
59
59
|
},
|
|
60
|
-
handleBotInstructionsImageUpload = () => {}
|
|
60
|
+
handleBotInstructionsImageUpload = () => {},
|
|
61
|
+
isUserInternal
|
|
61
62
|
}) {
|
|
62
63
|
const {
|
|
63
64
|
classes
|
|
@@ -143,7 +144,8 @@ function UpdateBot({
|
|
|
143
144
|
avatars: avatars,
|
|
144
145
|
fileSizeLimit: fileSizeLimit,
|
|
145
146
|
handleBotInstructionsImageUpload: handleBotInstructionsImageUpload,
|
|
146
|
-
update: true
|
|
147
|
+
update: true,
|
|
148
|
+
isUserInternal: isUserInternal
|
|
147
149
|
}, otherProps))), /*#__PURE__*/_react.default.createElement(_Divider.default, null), /*#__PURE__*/_react.default.createElement(_CardActions.default, {
|
|
148
150
|
className: classes.padding
|
|
149
151
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
@@ -68,7 +68,8 @@ function UpdateRoleplay({
|
|
|
68
68
|
fileSizeLimit,
|
|
69
69
|
subscription = {
|
|
70
70
|
isUpgradePossible: true
|
|
71
|
-
}
|
|
71
|
+
},
|
|
72
|
+
isUserInternal
|
|
72
73
|
}) {
|
|
73
74
|
const {
|
|
74
75
|
classes
|
|
@@ -145,7 +146,8 @@ function UpdateRoleplay({
|
|
|
145
146
|
handleSpeak: handleSpeak,
|
|
146
147
|
learnLang: learnLang,
|
|
147
148
|
avatars: avatars,
|
|
148
|
-
fileSizeLimit: fileSizeLimit
|
|
149
|
+
fileSizeLimit: fileSizeLimit,
|
|
150
|
+
isUserInternal: isUserInternal
|
|
149
151
|
}, otherProps))), /*#__PURE__*/_react.default.createElement(_Divider.default, null), /*#__PURE__*/_react.default.createElement(_CardActions.default, {
|
|
150
152
|
className: classes.padding
|
|
151
153
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
@@ -55,7 +55,8 @@ function UpdateTopic({
|
|
|
55
55
|
},
|
|
56
56
|
voices = {},
|
|
57
57
|
handleSpeak,
|
|
58
|
-
learnLang
|
|
58
|
+
learnLang,
|
|
59
|
+
isUserInternal
|
|
59
60
|
}) {
|
|
60
61
|
const {
|
|
61
62
|
classes
|
|
@@ -179,7 +180,8 @@ function UpdateTopic({
|
|
|
179
180
|
subscription: subscription,
|
|
180
181
|
voiceOptions: voices,
|
|
181
182
|
handleSpeak: handleSpeak,
|
|
182
|
-
learnLang: learnLang
|
|
183
|
+
learnLang: learnLang,
|
|
184
|
+
isUserInternal: isUserInternal
|
|
183
185
|
}))), /*#__PURE__*/_react.default.createElement(_Divider.default, null), /*#__PURE__*/_react.default.createElement(_CardActions.default, {
|
|
184
186
|
className: classes.padding
|
|
185
187
|
}, /*#__PURE__*/_react.default.createElement(_Button.default, {
|
|
@@ -9,6 +9,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
9
9
|
var _material = require("@mui/material");
|
|
10
10
|
var _aws = _interopRequireDefault(require("../../img/aws.svg"));
|
|
11
11
|
var _azure = _interopRequireDefault(require("../../img/azure.svg"));
|
|
12
|
+
var _config = _interopRequireDefault(require("../../config"));
|
|
12
13
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
14
|
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
14
15
|
function VoicePitchSilder({
|
|
@@ -80,12 +81,13 @@ function VoiceSelector(props) {
|
|
|
80
81
|
voicePitch,
|
|
81
82
|
generateAudio = false,
|
|
82
83
|
csv = false,
|
|
84
|
+
isUserInternal,
|
|
83
85
|
...otherProps
|
|
84
86
|
} = props;
|
|
85
87
|
const voiceAccents = Object.values(voices);
|
|
86
88
|
const voicesArray = voiceAccents.flatMap(voiceOption => voiceOption.voiceOptions);
|
|
87
89
|
const selectedVoice = (voicesArray || []).find(v => v.name === value);
|
|
88
|
-
const
|
|
90
|
+
const showProviderIcons = generateAudio || window.location.host === "localhost:9009" || isUserInternal;
|
|
89
91
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_material.TextField, _extends({
|
|
90
92
|
select: true,
|
|
91
93
|
value: value
|
|
@@ -108,11 +110,11 @@ function VoiceSelector(props) {
|
|
|
108
110
|
alt: ""
|
|
109
111
|
}))), /*#__PURE__*/_react.default.createElement(_material.Grid, _extends({
|
|
110
112
|
item: true
|
|
111
|
-
},
|
|
113
|
+
}, showProviderIcons ? {
|
|
112
114
|
sx: {
|
|
113
115
|
flexGrow: 1
|
|
114
116
|
}
|
|
115
|
-
} : {}), voiceOption.isChild && voiceOption.isChild === true ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", `${voiceOption.name} (${t("child")}) `, " ") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, voiceOption.name)),
|
|
117
|
+
} : {}), voiceOption.isChild && voiceOption.isChild === true ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, " ", `${voiceOption.name} (${t("child")}) `, " ") : /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, voiceOption.name)), showProviderIcons && /*#__PURE__*/_react.default.createElement(_material.Grid, {
|
|
116
118
|
item: true,
|
|
117
119
|
sx: {
|
|
118
120
|
mr: 2,
|
|
@@ -1017,6 +1017,7 @@ function CourseOutline({
|
|
|
1017
1017
|
courseSettings,
|
|
1018
1018
|
showViewTopicButton = true,
|
|
1019
1019
|
isClassroomArchived = false,
|
|
1020
|
+
classroomId,
|
|
1020
1021
|
...otherProps
|
|
1021
1022
|
}) {
|
|
1022
1023
|
const [sects, setSects] = (0, _react.useState)([]);
|
|
@@ -1162,7 +1163,8 @@ function CourseOutline({
|
|
|
1162
1163
|
disableDrag: disableDrag,
|
|
1163
1164
|
courseSettings: courseSettings,
|
|
1164
1165
|
showViewTopicButton: showViewTopicButton,
|
|
1165
|
-
isClassroomArchived: isClassroomArchived
|
|
1166
|
+
isClassroomArchived: isClassroomArchived,
|
|
1167
|
+
classroomId: classroomId
|
|
1166
1168
|
})));
|
|
1167
1169
|
}
|
|
1168
1170
|
var _default = exports.default = CourseOutline;
|
|
@@ -15,7 +15,9 @@ var _SwapHoriz = _interopRequireDefault(require("@mui/icons-material/SwapHoriz")
|
|
|
15
15
|
var _ExpandMore = _interopRequireDefault(require("@mui/icons-material/ExpandMore"));
|
|
16
16
|
var _ExpandLess = _interopRequireDefault(require("@mui/icons-material/ExpandLess"));
|
|
17
17
|
var _Forum = _interopRequireDefault(require("@mui/icons-material/Forum"));
|
|
18
|
+
var _OndemandVideo = _interopRequireDefault(require("@mui/icons-material/OndemandVideo"));
|
|
18
19
|
var _RoleplaySelection = _interopRequireDefault(require("../RoleplaySelection/RoleplaySelection"));
|
|
20
|
+
var _CardElements = require("../../Cards/CardElements");
|
|
19
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20
22
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
21
23
|
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
@@ -144,6 +146,7 @@ function Topic({
|
|
|
144
146
|
sectionId,
|
|
145
147
|
topicId,
|
|
146
148
|
topicName,
|
|
149
|
+
videoUrl,
|
|
147
150
|
description,
|
|
148
151
|
picture,
|
|
149
152
|
roleplays = [],
|
|
@@ -219,7 +222,17 @@ function Topic({
|
|
|
219
222
|
component: "p",
|
|
220
223
|
color: "textSecondary"
|
|
221
224
|
}, description))
|
|
222
|
-
})
|
|
225
|
+
}), videoUrl && /*#__PURE__*/_react.default.createElement(_material.Box, {
|
|
226
|
+
display: "flex",
|
|
227
|
+
alignItems: "center"
|
|
228
|
+
}, /*#__PURE__*/_react.default.createElement(_CardElements.CardInfoSectionItem, {
|
|
229
|
+
component: "span",
|
|
230
|
+
color: "textSecondary"
|
|
231
|
+
}, /*#__PURE__*/_react.default.createElement(_OndemandVideo.default, null), /*#__PURE__*/_react.default.createElement(_material.Typography, {
|
|
232
|
+
variant: "body2",
|
|
233
|
+
ml: 0.5,
|
|
234
|
+
color: "textSecondary"
|
|
235
|
+
}, t("video_included"))))), /*#__PURE__*/_react.default.createElement(_material.ListItemIcon, null, isExerciseListOpen ? /*#__PURE__*/_react.default.createElement(_ExpandLess.default, null) : /*#__PURE__*/_react.default.createElement(_ExpandMore.default, null))), /*#__PURE__*/_react.default.createElement(_material.Collapse, {
|
|
223
236
|
in: isExerciseListOpen,
|
|
224
237
|
timeout: "auto",
|
|
225
238
|
unmountOnExit: true
|