@nualang/nualang-ui-components 0.1.1413 → 0.1.1414
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/AssignmentCardsList/AssignmentCardsList.js +4 -2
- package/dist/Dialogs/CreatePhrase/CreatePhrase.js +3 -1
- package/dist/Dialogs/CreatePhraseGroupDialog/CreatePhraseGroupDialog.js +4 -2
- package/dist/Dialogs/ImageBuilder/ImageBuilderDialog.js +3 -14
- package/dist/Dialogs/ImageBuilder/imageBuilderUtils.js +47 -5
- package/dist/Dialogs/QuickCreateClassroomDialog/QuickCreateClassroomDialog.js +4 -2
- package/dist/Dialogs/QuickCreateCourseDialog/QuickCreateCourseDialog.js +4 -2
- package/dist/Dialogs/QuickCreateTopicDialog/QuickCreateTopicDialog.js +4 -2
- package/dist/Editors/Bot/Bot.js +4 -2
- package/dist/Editors/Bot/Editor/BotDesigner/AddImageModal/AddImageModal.js +4 -2
- package/dist/Editors/Bot/Editor/BotDesigner/BotDesigner.js +4 -2
- package/dist/Editors/Bot/Editor/BotDesigner/VarList.js +7 -3
- package/dist/Editors/Bot/Editor/Editor.js +6 -3
- package/dist/Editors/PhraseList/PhraseList.js +6 -3
- package/dist/Editors/Phrases/Phrases.js +4 -2
- package/dist/Editors/Roleplay/Roleplay.js +4 -2
- package/dist/Forms/CreateBot/Steps/BotInformation/BotInformation.js +4 -2
- package/dist/Forms/CreateClassroom/Steps/Customization/Customization.js +6 -3
- package/dist/Forms/CreateCourse/Steps/Customization/Customization.js +6 -3
- package/dist/Forms/CreateMeetingMultiStepForm/CreateMeetingMultiStepForm.js +6 -3
- package/dist/Forms/CreateMeetingMultiStepForm/MeetingForm.js +6 -3
- package/dist/Forms/CreateRoleplay/Steps/RoleplayInformation/RoleplayInformation.js +4 -2
- package/dist/Forms/CreateTopic/Steps/Customization/Customization.js +6 -3
- package/dist/Forms/ImageSelector/ImageSelector.js +39 -9
- package/dist/Forms/UpdateBot/UpdateBot.js +3 -1
- package/dist/Forms/UpdateClassroom/UpdateClassroom.js +3 -1
- package/dist/Forms/UpdateCourse/UpdateCourse.js +3 -1
- package/dist/Forms/UpdatePhraseList/UpdatePhraseList.js +4 -2
- package/dist/Forms/UpdateRoleplay/UpdateRoleplay.js +4 -2
- package/dist/Forms/UpdateTopic/UpdateTopic.js +3 -1
- package/dist/Lists/CourseOutline/CourseOutline.js +3 -1
- package/dist/Lists/Exercises/Exercises.js +2 -1
- package/dist/Lists/Phrases/Phrases.js +4 -2
- package/dist/Navigation/ResponsiveTabs/ResponsiveTabs.js +1 -1
- package/dist/Tables/MeetingPrompstList/MeetingPromptsList.js +4 -2
- package/dist/utils/canvasUtils.js +1 -1
- package/package.json +1 -1
- package/dist/Forms/CreateRoleplayHook/CreateRoleplayHook.js +0 -83
- package/dist/Forms/CreateRoleplayHook/CreateRoleplayHook.test.js +0 -20
- package/dist/Forms/CreateRoleplayHook/Steps/Confirmation/Confirmation.js +0 -174
- package/dist/Forms/CreateRoleplayHook/Steps/Confirmation/package.json +0 -6
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplayInformation/RoleplayInformation.js +0 -487
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplayInformation/package.json +0 -6
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplaySettings/RoleplaySettings.js +0 -330
- package/dist/Forms/CreateRoleplayHook/Steps/RoleplaySettings/package.json +0 -6
- package/dist/Forms/CreateRoleplayHook/Steps/index.js +0 -4
- package/dist/Forms/CreateRoleplayHook/package.json +0 -6
|
@@ -30,7 +30,8 @@ const AssignmentCardsList = ({
|
|
|
30
30
|
isLoadingAssignments,
|
|
31
31
|
isChallengeModeStudent,
|
|
32
32
|
isReadWriteModeStudent,
|
|
33
|
-
scrollableTarget = null
|
|
33
|
+
scrollableTarget = null,
|
|
34
|
+
openSnackbar
|
|
34
35
|
}) => {
|
|
35
36
|
const [lastClickedExerciseId, setLastClickedExerciseId] = useState(null);
|
|
36
37
|
const [filter, setFilter] = useState("all");
|
|
@@ -355,7 +356,8 @@ const AssignmentCardsList = ({
|
|
|
355
356
|
handleViewProgress: handleViewProgress,
|
|
356
357
|
assignedStudents: assignmentMembersById[assignment.assignmentId] || [],
|
|
357
358
|
isChallengeModeStudent: isChallengeModeStudent,
|
|
358
|
-
isReadWriteModeStudent: isReadWriteModeStudent
|
|
359
|
+
isReadWriteModeStudent: isReadWriteModeStudent,
|
|
360
|
+
openSnackbar: openSnackbar
|
|
359
361
|
}, assignment.assignmentId))
|
|
360
362
|
})]
|
|
361
363
|
});
|
|
@@ -57,6 +57,7 @@ function CreatePhrase({
|
|
|
57
57
|
verificationStatus,
|
|
58
58
|
makeChatGptApiRequest,
|
|
59
59
|
difficulty,
|
|
60
|
+
openSnackbar,
|
|
60
61
|
...otherProps
|
|
61
62
|
}) {
|
|
62
63
|
const translationInputRef = useRef();
|
|
@@ -723,7 +724,8 @@ function CreatePhrase({
|
|
|
723
724
|
autoSuggest: true,
|
|
724
725
|
autoSuggestedImages: autoSuggestedImages,
|
|
725
726
|
selectedImage: selectedImage,
|
|
726
|
-
verificationStatus: verificationStatus
|
|
727
|
+
verificationStatus: verificationStatus,
|
|
728
|
+
openSnackbar: openSnackbar
|
|
727
729
|
})
|
|
728
730
|
})]
|
|
729
731
|
})]
|
|
@@ -71,7 +71,8 @@ export default function CreatePhraseGroupDialog({
|
|
|
71
71
|
onCreated,
|
|
72
72
|
t = text => text,
|
|
73
73
|
fileSizeLimit,
|
|
74
|
-
verificationStatus
|
|
74
|
+
verificationStatus,
|
|
75
|
+
openSnackbar
|
|
75
76
|
}) {
|
|
76
77
|
const [name, setName] = useState("");
|
|
77
78
|
const [description, setDescription] = useState("");
|
|
@@ -180,7 +181,8 @@ export default function CreatePhraseGroupDialog({
|
|
|
180
181
|
autoCrop: true,
|
|
181
182
|
autoSuggest: false,
|
|
182
183
|
selectedImage: selectedImage,
|
|
183
|
-
verificationStatus: verificationStatus
|
|
184
|
+
verificationStatus: verificationStatus,
|
|
185
|
+
openSnackbar: openSnackbar
|
|
184
186
|
})
|
|
185
187
|
})]
|
|
186
188
|
})
|
|
@@ -7,13 +7,8 @@ import ImageBuilderControls from "./ImageBuilderControls";
|
|
|
7
7
|
import ImageBuilderPreview from "./ImageBuilderPreview";
|
|
8
8
|
import ResponsiveDialog from "../ResponsiveDialog/ResponsiveDialog";
|
|
9
9
|
import { PRESET_COLORS, ICON_KEYS } from "./iconPaths";
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
// Matches placeholder SVG ratio (21144 x 4890), scaled down 10x
|
|
10
|
+
import { generateBuilderImages, getOptimalIconOpacity, shouldUseDarkIcons } from "./imageBuilderUtils";
|
|
13
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
|
-
const BANNER_W = 2114;
|
|
15
|
-
const BANNER_H = 489;
|
|
16
|
-
const CARD_SIZE = 489;
|
|
17
12
|
const useStyles = makeStyles()(theme => ({
|
|
18
13
|
body: {
|
|
19
14
|
display: "flex",
|
|
@@ -51,19 +46,13 @@ export default function ImageBuilderDialog({
|
|
|
51
46
|
cardDataUrl: null
|
|
52
47
|
};
|
|
53
48
|
}
|
|
54
|
-
|
|
49
|
+
return generateBuilderImages({
|
|
55
50
|
color,
|
|
56
51
|
iconKey,
|
|
57
52
|
density: "dense",
|
|
58
53
|
iconOpacity,
|
|
59
|
-
darkIcons
|
|
60
|
-
width: BANNER_W,
|
|
61
|
-
height: BANNER_H
|
|
54
|
+
darkIcons
|
|
62
55
|
});
|
|
63
|
-
return {
|
|
64
|
-
bannerDataUrl: canvas.toDataURL("image/png"),
|
|
65
|
-
cardDataUrl: getCenterCropDataUrl(canvas, CARD_SIZE)
|
|
66
|
-
};
|
|
67
56
|
}, [color, iconKey, iconOpacity, darkIcons]);
|
|
68
57
|
|
|
69
58
|
// Reset state when dialog opens
|
|
@@ -4,6 +4,19 @@ const DENSITY_COLS = {
|
|
|
4
4
|
medium: 10,
|
|
5
5
|
dense: 14
|
|
6
6
|
};
|
|
7
|
+
|
|
8
|
+
// Base (logical) dimensions of a builder image. Matches placeholder SVG ratio
|
|
9
|
+
// (21144 x 4890), scaled down 10x. The card is a centre-cropped square.
|
|
10
|
+
export const BANNER_W = 2114;
|
|
11
|
+
export const BANNER_H = 489;
|
|
12
|
+
export const CARD_SIZE = 489;
|
|
13
|
+
|
|
14
|
+
// Supersampling factor applied to the generated pixel dimensions so the stored
|
|
15
|
+
// image stays crisp when scaled up on large / HiDPI screens. Device-independent
|
|
16
|
+
// on purpose — the image is persisted and shared across devices, so we must not
|
|
17
|
+
// bake window.devicePixelRatio into it. Tune this single knob to trade payload
|
|
18
|
+
// size against sharpness.
|
|
19
|
+
export const OUTPUT_SCALE = 2;
|
|
7
20
|
function hexToRgb(hex) {
|
|
8
21
|
const result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
|
|
9
22
|
return result ? {
|
|
@@ -87,6 +100,7 @@ export function generatePatternCanvas({
|
|
|
87
100
|
canvas.width = width;
|
|
88
101
|
canvas.height = height;
|
|
89
102
|
const ctx = canvas.getContext("2d");
|
|
103
|
+
ctx.imageSmoothingQuality = "high";
|
|
90
104
|
|
|
91
105
|
// 1. Solid background
|
|
92
106
|
ctx.fillStyle = color;
|
|
@@ -107,10 +121,18 @@ export function generatePatternCanvas({
|
|
|
107
121
|
};
|
|
108
122
|
const maxDim = Math.max(vb.width, vb.height);
|
|
109
123
|
const scale = iconSize / maxDim;
|
|
124
|
+
|
|
125
|
+
// Rasterise the stamp at its final on-canvas size by filling the vector paths
|
|
126
|
+
// through a scaled context. Previously the stamp was drawn at the raw viewBox
|
|
127
|
+
// size (e.g. 24px) and then upscaled ~4x when blitted onto the pattern canvas,
|
|
128
|
+
// which baked a blurry raster upscale into the source image. Filling from
|
|
129
|
+
// vectors at the target size keeps icons crisp while preserving the single
|
|
130
|
+
// stamp (so overlapping sub-paths don't double-composite at globalAlpha < 1).
|
|
110
131
|
const stampCanvas = document.createElement("canvas");
|
|
111
|
-
stampCanvas.width = vb.width;
|
|
112
|
-
stampCanvas.height = vb.height;
|
|
132
|
+
stampCanvas.width = Math.ceil(vb.width * scale);
|
|
133
|
+
stampCanvas.height = Math.ceil(vb.height * scale);
|
|
113
134
|
const stampCtx = stampCanvas.getContext("2d");
|
|
135
|
+
stampCtx.scale(scale, scale);
|
|
114
136
|
stampCtx.fillStyle = darkIcons ? "#000" : "#fff";
|
|
115
137
|
const path2Ds = iconData.paths.map(d => new Path2D(d));
|
|
116
138
|
for (const p of path2Ds) {
|
|
@@ -131,9 +153,8 @@ export function generatePatternCanvas({
|
|
|
131
153
|
ctx.save();
|
|
132
154
|
ctx.translate(x, y);
|
|
133
155
|
ctx.rotate(rotation);
|
|
134
|
-
|
|
135
|
-
ctx.
|
|
136
|
-
ctx.drawImage(stampCanvas, 0, 0);
|
|
156
|
+
// Draw the pre-scaled stamp 1:1 (centred) — no upscaling here.
|
|
157
|
+
ctx.drawImage(stampCanvas, -stampCanvas.width / 2, -stampCanvas.height / 2);
|
|
137
158
|
ctx.restore();
|
|
138
159
|
}
|
|
139
160
|
}
|
|
@@ -156,4 +177,25 @@ export function getCenterCropDataUrl(source, size) {
|
|
|
156
177
|
const sx = (source.width - source.height) / 2;
|
|
157
178
|
ctx.drawImage(source, sx, 0, source.height, source.height, 0, 0, size, size);
|
|
158
179
|
return cropCanvas.toDataURL("image/png");
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* Generate the builder images (banner + centre-cropped card) at the shared
|
|
184
|
+
* supersampled output resolution. Single source of truth for the builder
|
|
185
|
+
* dimensions so callers don't duplicate the magic numbers.
|
|
186
|
+
*
|
|
187
|
+
* @param {Object} opts – forwarded to generatePatternCanvas (color, iconKey,
|
|
188
|
+
* density, iconOpacity, darkIcons, seed)
|
|
189
|
+
* @returns {{ bannerDataUrl: string, cardDataUrl: string }}
|
|
190
|
+
*/
|
|
191
|
+
export function generateBuilderImages(opts) {
|
|
192
|
+
const canvas = generatePatternCanvas({
|
|
193
|
+
...opts,
|
|
194
|
+
width: BANNER_W * OUTPUT_SCALE,
|
|
195
|
+
height: BANNER_H * OUTPUT_SCALE
|
|
196
|
+
});
|
|
197
|
+
return {
|
|
198
|
+
bannerDataUrl: canvas.toDataURL("image/png"),
|
|
199
|
+
cardDataUrl: getCenterCropDataUrl(canvas, CARD_SIZE * OUTPUT_SCALE)
|
|
200
|
+
};
|
|
159
201
|
}
|
|
@@ -80,7 +80,8 @@ export default function QuickCreateClassroomDialog({
|
|
|
80
80
|
userImage,
|
|
81
81
|
forLang,
|
|
82
82
|
languages,
|
|
83
|
-
forLanguages
|
|
83
|
+
forLanguages,
|
|
84
|
+
openSnackbar
|
|
84
85
|
}) {
|
|
85
86
|
const [classroomName, setClassroomName] = useState("");
|
|
86
87
|
const [classroomDescription, setClassroomDescription] = useState("");
|
|
@@ -275,7 +276,8 @@ export default function QuickCreateClassroomDialog({
|
|
|
275
276
|
autoSuggest: false,
|
|
276
277
|
selectedImage: selectedImage,
|
|
277
278
|
verificationStatus: verificationStatus,
|
|
278
|
-
onBuilderSettingsChange: setBuilderSettings
|
|
279
|
+
onBuilderSettingsChange: setBuilderSettings,
|
|
280
|
+
openSnackbar: openSnackbar
|
|
279
281
|
})
|
|
280
282
|
})]
|
|
281
283
|
})
|
|
@@ -83,7 +83,8 @@ export default function QuickCreateCourseDialog({
|
|
|
83
83
|
difficulties = ["A1", "A2", "B1", "B2", "C1", "C2"],
|
|
84
84
|
fileSizeLimit,
|
|
85
85
|
verificationStatus,
|
|
86
|
-
userImage
|
|
86
|
+
userImage,
|
|
87
|
+
openSnackbar
|
|
87
88
|
}) {
|
|
88
89
|
const defaultSelectedImage = {
|
|
89
90
|
image: "",
|
|
@@ -289,7 +290,8 @@ export default function QuickCreateCourseDialog({
|
|
|
289
290
|
autoSuggest: false,
|
|
290
291
|
selectedImage: selectedImage,
|
|
291
292
|
verificationStatus: verificationStatus,
|
|
292
|
-
onBuilderSettingsChange: setBuilderSettings
|
|
293
|
+
onBuilderSettingsChange: setBuilderSettings,
|
|
294
|
+
openSnackbar: openSnackbar
|
|
293
295
|
})
|
|
294
296
|
})]
|
|
295
297
|
})
|
|
@@ -83,7 +83,8 @@ export default function QuickCreateTopicDialog({
|
|
|
83
83
|
userImage,
|
|
84
84
|
coursePicture,
|
|
85
85
|
coursePictureBuilderColor,
|
|
86
|
-
coursePictureBuilderIcon
|
|
86
|
+
coursePictureBuilderIcon,
|
|
87
|
+
openSnackbar
|
|
87
88
|
}) {
|
|
88
89
|
// Only inherit the parent course image when it's a real user-set image.
|
|
89
90
|
// If the course has no image, or its image was itself generated by the image
|
|
@@ -274,7 +275,8 @@ export default function QuickCreateTopicDialog({
|
|
|
274
275
|
autoSuggest: false,
|
|
275
276
|
selectedImage: selectedImage,
|
|
276
277
|
verificationStatus: verificationStatus,
|
|
277
|
-
onBuilderSettingsChange: setBuilderSettings
|
|
278
|
+
onBuilderSettingsChange: setBuilderSettings,
|
|
279
|
+
openSnackbar: openSnackbar
|
|
278
280
|
})
|
|
279
281
|
})]
|
|
280
282
|
})
|
package/dist/Editors/Bot/Bot.js
CHANGED
|
@@ -770,7 +770,8 @@ function Bot({
|
|
|
770
770
|
courseId: courseId,
|
|
771
771
|
sectionId: sectionId,
|
|
772
772
|
topicId: topicId,
|
|
773
|
-
initialTopicGoal: initialTopicGoal
|
|
773
|
+
initialTopicGoal: initialTopicGoal,
|
|
774
|
+
openSnackbar: openSnackbar
|
|
774
775
|
}) : null, tabValue === 1 ? /*#__PURE__*/_jsx(Box, {
|
|
775
776
|
className: hidden ? classes.paneFull : classes.pane,
|
|
776
777
|
children: BotPreview
|
|
@@ -791,7 +792,8 @@ function Bot({
|
|
|
791
792
|
subscription: subscription,
|
|
792
793
|
handleBotInstructionsImageUpload: handleBotInstructionsImageUpload,
|
|
793
794
|
isUserInternal: isUserInternal,
|
|
794
|
-
verificationStatus: verificationStatus
|
|
795
|
+
verificationStatus: verificationStatus,
|
|
796
|
+
openSnackbar: openSnackbar
|
|
795
797
|
})
|
|
796
798
|
}) : null]
|
|
797
799
|
}), /*#__PURE__*/_jsx(ResponsiveDialog, {
|
|
@@ -14,7 +14,8 @@ function AddImageModal(props) {
|
|
|
14
14
|
open,
|
|
15
15
|
handleUploadBotExerciseImage,
|
|
16
16
|
botId,
|
|
17
|
-
verificationStatus
|
|
17
|
+
verificationStatus,
|
|
18
|
+
openSnackbar
|
|
18
19
|
} = props;
|
|
19
20
|
const theme = useTheme();
|
|
20
21
|
const fullScreen = useMediaQuery(theme.breakpoints.down("sm"));
|
|
@@ -76,7 +77,8 @@ function AddImageModal(props) {
|
|
|
76
77
|
name: "image",
|
|
77
78
|
value: selectedImage.image,
|
|
78
79
|
handleChange: handleImageChange,
|
|
79
|
-
verificationStatus: verificationStatus
|
|
80
|
+
verificationStatus: verificationStatus,
|
|
81
|
+
openSnackbar: openSnackbar
|
|
80
82
|
})]
|
|
81
83
|
}), /*#__PURE__*/_jsxs(DialogActions, {
|
|
82
84
|
children: [/*#__PURE__*/_jsx(Button, {
|
|
@@ -36,7 +36,8 @@ function BotDesigner(props) {
|
|
|
36
36
|
handleUpdateAllVariables,
|
|
37
37
|
handleUploadBotExerciseImage,
|
|
38
38
|
botId,
|
|
39
|
-
handleOnBlur
|
|
39
|
+
handleOnBlur,
|
|
40
|
+
openSnackbar
|
|
40
41
|
} = props;
|
|
41
42
|
return /*#__PURE__*/_jsxs(_Fragment, {
|
|
42
43
|
children: [rivescriptJSON && rivescriptJSON.begin.var && /*#__PURE__*/_jsx(VarList, {
|
|
@@ -49,7 +50,8 @@ function BotDesigner(props) {
|
|
|
49
50
|
handleUploadBotExerciseImage: handleUploadBotExerciseImage,
|
|
50
51
|
botId: botId,
|
|
51
52
|
handleOnBlur: handleOnBlur,
|
|
52
|
-
handleUpdateVariable: handleUpdateVariable
|
|
53
|
+
handleUpdateVariable: handleUpdateVariable,
|
|
54
|
+
openSnackbar: openSnackbar
|
|
53
55
|
}), rivescriptJSON && rivescriptJSON.begin.array && /*#__PURE__*/_jsx(AlternativesList, {
|
|
54
56
|
t: t,
|
|
55
57
|
alternatives: rivescriptJSON.begin.array,
|
|
@@ -26,7 +26,8 @@ function VarListItem({
|
|
|
26
26
|
handleOnBlur,
|
|
27
27
|
handleUploadBotExerciseImage,
|
|
28
28
|
verificationStatus,
|
|
29
|
-
botId
|
|
29
|
+
botId,
|
|
30
|
+
openSnackbar
|
|
30
31
|
}) {
|
|
31
32
|
const [selectedImage, setSelectedImage] = useState("");
|
|
32
33
|
if (varValue && markdownImageLinkRegex.test(varValue)) {
|
|
@@ -72,6 +73,7 @@ function VarListItem({
|
|
|
72
73
|
handleChange: handleImageChange,
|
|
73
74
|
cropCompletedCallback: cropCompletedCallback,
|
|
74
75
|
verificationStatus: verificationStatus,
|
|
76
|
+
openSnackbar: openSnackbar,
|
|
75
77
|
autoGenerateDefault: false
|
|
76
78
|
// fileSizeLimit={fileSizeLimit}
|
|
77
79
|
,
|
|
@@ -256,7 +258,8 @@ function VarList({
|
|
|
256
258
|
handleSelectCurrentInput,
|
|
257
259
|
handleUploadBotExerciseImage,
|
|
258
260
|
botId,
|
|
259
|
-
handleOnBlur
|
|
261
|
+
handleOnBlur,
|
|
262
|
+
openSnackbar
|
|
260
263
|
}) {
|
|
261
264
|
const [open, setOpen] = useState(true);
|
|
262
265
|
const [varUploader, setVarUploader] = useState(false);
|
|
@@ -276,7 +279,8 @@ function VarList({
|
|
|
276
279
|
handleUploadBotExerciseImage: handleUploadBotExerciseImage,
|
|
277
280
|
handleOnBlur: handleOnBlur,
|
|
278
281
|
botId: botId,
|
|
279
|
-
handleUpdateVariable: handleUpdateVariable
|
|
282
|
+
handleUpdateVariable: handleUpdateVariable,
|
|
283
|
+
openSnackbar: openSnackbar
|
|
280
284
|
}));
|
|
281
285
|
}
|
|
282
286
|
return /*#__PURE__*/_jsxs(List, {
|
|
@@ -93,7 +93,8 @@ function Editor({
|
|
|
93
93
|
sectionId,
|
|
94
94
|
topicId,
|
|
95
95
|
initialTopicGoal,
|
|
96
|
-
verificationStatus
|
|
96
|
+
verificationStatus,
|
|
97
|
+
openSnackbar
|
|
97
98
|
}) {
|
|
98
99
|
const [formattingOptionsAnchorEl, setFormattingOptionsAnchorEl] = useState(null);
|
|
99
100
|
const isFormattingOptionsOpen = Boolean(formattingOptionsAnchorEl);
|
|
@@ -566,7 +567,8 @@ function Editor({
|
|
|
566
567
|
handleUpdateAlternatives: handleUpdateAlternatives,
|
|
567
568
|
handleUploadBotExerciseImage: handleUploadBotExerciseImage,
|
|
568
569
|
botId: bot.botId,
|
|
569
|
-
handleUpdateVariable: handleUpdateVariable
|
|
570
|
+
handleUpdateVariable: handleUpdateVariable,
|
|
571
|
+
openSnackbar: openSnackbar
|
|
570
572
|
}), /*#__PURE__*/_jsx(TriggerDialog, {
|
|
571
573
|
t: t,
|
|
572
574
|
open: isTriggerModalOpen,
|
|
@@ -602,7 +604,8 @@ function Editor({
|
|
|
602
604
|
botId: bot.botId,
|
|
603
605
|
handleUploadBotExerciseImage: handleUploadBotExerciseImage,
|
|
604
606
|
handleAddImage: handleAddImage,
|
|
605
|
-
verificationStatus: verificationStatus
|
|
607
|
+
verificationStatus: verificationStatus,
|
|
608
|
+
openSnackbar: openSnackbar
|
|
606
609
|
}), /*#__PURE__*/_jsx(AddLinkModal, {
|
|
607
610
|
classes: {},
|
|
608
611
|
t: t,
|
|
@@ -96,7 +96,8 @@ function PhraseList({
|
|
|
96
96
|
otherPhraseLists,
|
|
97
97
|
otherPhraseListsLoading,
|
|
98
98
|
handleTransferPhrase,
|
|
99
|
-
handleCreatePhraseListFromSelection
|
|
99
|
+
handleCreatePhraseListFromSelection,
|
|
100
|
+
openSnackbar
|
|
100
101
|
}) {
|
|
101
102
|
const theme = useTheme();
|
|
102
103
|
const {
|
|
@@ -357,7 +358,8 @@ function PhraseList({
|
|
|
357
358
|
isGeneratePhrasesDialogOpen: isGeneratePhrasesDialogOpen,
|
|
358
359
|
setIsGeneratePhrasesDialogOpen: setIsGeneratePhrasesDialogOpen,
|
|
359
360
|
mode: mode,
|
|
360
|
-
scriptDownloadRef: scriptDownloadRef
|
|
361
|
+
scriptDownloadRef: scriptDownloadRef,
|
|
362
|
+
openSnackbar: openSnackbar
|
|
361
363
|
})
|
|
362
364
|
}) : null, tabValue === 1 ? /*#__PURE__*/_jsx(Box, {
|
|
363
365
|
sx: {
|
|
@@ -378,7 +380,8 @@ function PhraseList({
|
|
|
378
380
|
onSubmitExerciseSettings: onSubmitExerciseSettings,
|
|
379
381
|
handleSpeak: handleSpeak,
|
|
380
382
|
fileSizeLimit: fileSizeLimit,
|
|
381
|
-
verificationStatus: verificationStatus
|
|
383
|
+
verificationStatus: verificationStatus,
|
|
384
|
+
openSnackbar: openSnackbar
|
|
382
385
|
})
|
|
383
386
|
}) : null]
|
|
384
387
|
})
|
|
@@ -289,7 +289,8 @@ function PhrasesEditor(props) {
|
|
|
289
289
|
isGeneratePhrasesDialogOpen,
|
|
290
290
|
setIsGeneratePhrasesDialogOpen,
|
|
291
291
|
mode = Modes.NORMAL,
|
|
292
|
-
scriptDownloadRef
|
|
292
|
+
scriptDownloadRef,
|
|
293
|
+
openSnackbar
|
|
293
294
|
} = props;
|
|
294
295
|
const [errors, setErrors] = useState([]);
|
|
295
296
|
const [selectionModel, setSelectionModel] = useState({
|
|
@@ -551,7 +552,8 @@ function PhrasesEditor(props) {
|
|
|
551
552
|
siteLanguage: siteLanguage,
|
|
552
553
|
verificationStatus: verificationStatus,
|
|
553
554
|
makeChatGptApiRequest: makeChatGptApiRequest,
|
|
554
|
-
difficulty: difficulty
|
|
555
|
+
difficulty: difficulty,
|
|
556
|
+
openSnackbar: openSnackbar
|
|
555
557
|
}), /*#__PURE__*/_jsx(UploadPhrasesDialog, {
|
|
556
558
|
t: t,
|
|
557
559
|
learnLang: learnLang,
|
|
@@ -280,7 +280,8 @@ function Roleplay({
|
|
|
280
280
|
topicId,
|
|
281
281
|
initialTopicGoal,
|
|
282
282
|
isUserInternal,
|
|
283
|
-
verificationStatus
|
|
283
|
+
verificationStatus,
|
|
284
|
+
openSnackbar
|
|
284
285
|
}) {
|
|
285
286
|
// console.log("Edit Roleplay -> phrases", phrases);
|
|
286
287
|
const [isGenerateRoleplayDialogOpen, setIsGenerateRoleplayDialogOpen] = useState(false);
|
|
@@ -848,7 +849,8 @@ function Roleplay({
|
|
|
848
849
|
fileSizeLimit: fileSizeLimit,
|
|
849
850
|
subscription: subscription,
|
|
850
851
|
isUserInternal: isUserInternal,
|
|
851
|
-
verificationStatus: verificationStatus
|
|
852
|
+
verificationStatus: verificationStatus,
|
|
853
|
+
openSnackbar: openSnackbar
|
|
852
854
|
})
|
|
853
855
|
}) : null, /*#__PURE__*/_jsx(CreateQuestionDialog, {
|
|
854
856
|
t: t,
|
|
@@ -59,7 +59,8 @@ function BotInformation({
|
|
|
59
59
|
handleBotInstructionsImageUpload,
|
|
60
60
|
langChar,
|
|
61
61
|
isUserInternal,
|
|
62
|
-
verificationStatus
|
|
62
|
+
verificationStatus,
|
|
63
|
+
openSnackbar
|
|
63
64
|
}) {
|
|
64
65
|
const {
|
|
65
66
|
classes
|
|
@@ -257,7 +258,8 @@ function BotInformation({
|
|
|
257
258
|
handleChange: handleChange,
|
|
258
259
|
fileSizeLimit: fileSizeLimit,
|
|
259
260
|
previewComponent: PreviewCard,
|
|
260
|
-
verificationStatus: verificationStatus
|
|
261
|
+
verificationStatus: verificationStatus,
|
|
262
|
+
openSnackbar: openSnackbar
|
|
261
263
|
})
|
|
262
264
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
263
265
|
size: 12,
|
|
@@ -10,7 +10,8 @@ function Customization({
|
|
|
10
10
|
values,
|
|
11
11
|
fileSizeLimit,
|
|
12
12
|
verificationStatus,
|
|
13
|
-
isUpdateClassroom = false
|
|
13
|
+
isUpdateClassroom = false,
|
|
14
|
+
openSnackbar
|
|
14
15
|
}) {
|
|
15
16
|
const {
|
|
16
17
|
picture,
|
|
@@ -56,7 +57,8 @@ function Customization({
|
|
|
56
57
|
}) => {
|
|
57
58
|
setFieldValue("pictureBuilderColor", color);
|
|
58
59
|
setFieldValue("pictureBuilderIcon", iconKey);
|
|
59
|
-
}
|
|
60
|
+
},
|
|
61
|
+
openSnackbar: openSnackbar
|
|
60
62
|
})
|
|
61
63
|
})]
|
|
62
64
|
}), /*#__PURE__*/_jsxs(Grid, {
|
|
@@ -87,7 +89,8 @@ function Customization({
|
|
|
87
89
|
}) => {
|
|
88
90
|
setFieldValue("bannerBuilderColor", color);
|
|
89
91
|
setFieldValue("bannerBuilderIcon", iconKey);
|
|
90
|
-
}
|
|
92
|
+
},
|
|
93
|
+
openSnackbar: openSnackbar
|
|
91
94
|
})
|
|
92
95
|
})]
|
|
93
96
|
})]
|
|
@@ -10,7 +10,8 @@ function Customization({
|
|
|
10
10
|
values,
|
|
11
11
|
fileSizeLimit,
|
|
12
12
|
isUpdateCourse = false,
|
|
13
|
-
verificationStatus
|
|
13
|
+
verificationStatus,
|
|
14
|
+
openSnackbar
|
|
14
15
|
}) {
|
|
15
16
|
const {
|
|
16
17
|
picture,
|
|
@@ -56,7 +57,8 @@ function Customization({
|
|
|
56
57
|
}) => {
|
|
57
58
|
setFieldValue("pictureBuilderColor", color);
|
|
58
59
|
setFieldValue("pictureBuilderIcon", iconKey);
|
|
59
|
-
}
|
|
60
|
+
},
|
|
61
|
+
openSnackbar: openSnackbar
|
|
60
62
|
})
|
|
61
63
|
})]
|
|
62
64
|
}), /*#__PURE__*/_jsxs(Grid, {
|
|
@@ -87,7 +89,8 @@ function Customization({
|
|
|
87
89
|
}) => {
|
|
88
90
|
setFieldValue("bannerBuilderColor", color);
|
|
89
91
|
setFieldValue("bannerBuilderIcon", iconKey);
|
|
90
|
-
}
|
|
92
|
+
},
|
|
93
|
+
openSnackbar: openSnackbar
|
|
91
94
|
})
|
|
92
95
|
})]
|
|
93
96
|
})]
|
|
@@ -37,7 +37,8 @@ export default function CreateMeetingMultiStepForm({
|
|
|
37
37
|
getCourseSections,
|
|
38
38
|
courseSectionTopicId,
|
|
39
39
|
createDiscussion,
|
|
40
|
-
username
|
|
40
|
+
username,
|
|
41
|
+
openSnackbar
|
|
41
42
|
}) {
|
|
42
43
|
function getSteps() {
|
|
43
44
|
return [MeetingForm, GroupAssignment];
|
|
@@ -65,7 +66,8 @@ export default function CreateMeetingMultiStepForm({
|
|
|
65
66
|
getCourseSections: getCourseSections,
|
|
66
67
|
courseSectionTopicId: courseSectionTopicId,
|
|
67
68
|
createDiscussion: createDiscussion,
|
|
68
|
-
username: username
|
|
69
|
+
username: username,
|
|
70
|
+
openSnackbar: openSnackbar
|
|
69
71
|
});
|
|
70
72
|
}
|
|
71
73
|
return /*#__PURE__*/_jsx(MultiStepForm, {
|
|
@@ -83,6 +85,7 @@ export default function CreateMeetingMultiStepForm({
|
|
|
83
85
|
getCourseSections: getCourseSections,
|
|
84
86
|
courseSectionTopicId: courseSectionTopicId,
|
|
85
87
|
createDiscussion: createDiscussion,
|
|
86
|
-
username: username
|
|
88
|
+
username: username,
|
|
89
|
+
openSnackbar: openSnackbar
|
|
87
90
|
});
|
|
88
91
|
}
|
|
@@ -32,7 +32,8 @@ function MeetingForm({
|
|
|
32
32
|
getCourseSections,
|
|
33
33
|
courseSectionTopicId,
|
|
34
34
|
createDiscussion,
|
|
35
|
-
username
|
|
35
|
+
username,
|
|
36
|
+
openSnackbar
|
|
36
37
|
}) {
|
|
37
38
|
const {
|
|
38
39
|
meetingPrompt,
|
|
@@ -348,7 +349,8 @@ function MeetingForm({
|
|
|
348
349
|
handleChange: handleChange,
|
|
349
350
|
fileSizeLimit: 5000000,
|
|
350
351
|
initialImages: initialBackgroundImages,
|
|
351
|
-
previewComponent: PreviewCard
|
|
352
|
+
previewComponent: PreviewCard,
|
|
353
|
+
openSnackbar: openSnackbar
|
|
352
354
|
})]
|
|
353
355
|
}), /*#__PURE__*/_jsxs(Grid, {
|
|
354
356
|
size: {
|
|
@@ -379,7 +381,8 @@ function MeetingForm({
|
|
|
379
381
|
handleChange: handleChange,
|
|
380
382
|
fileSizeLimit: 5000000,
|
|
381
383
|
initialImages: initialMeetingImages,
|
|
382
|
-
previewComponent: PreviewCard
|
|
384
|
+
previewComponent: PreviewCard,
|
|
385
|
+
openSnackbar: openSnackbar
|
|
383
386
|
})]
|
|
384
387
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
385
388
|
size: {
|
|
@@ -299,7 +299,8 @@ function RoleplayInformation({
|
|
|
299
299
|
errors,
|
|
300
300
|
langChar,
|
|
301
301
|
isUserInternal,
|
|
302
|
-
verificationStatus
|
|
302
|
+
verificationStatus,
|
|
303
|
+
openSnackbar
|
|
303
304
|
}) {
|
|
304
305
|
const {
|
|
305
306
|
roleplayName,
|
|
@@ -380,7 +381,8 @@ function RoleplayInformation({
|
|
|
380
381
|
handleChange: handleChange,
|
|
381
382
|
fileSizeLimit: fileSizeLimit,
|
|
382
383
|
previewComponent: PreviewCard,
|
|
383
|
-
verificationStatus: verificationStatus
|
|
384
|
+
verificationStatus: verificationStatus,
|
|
385
|
+
openSnackbar: openSnackbar
|
|
384
386
|
})
|
|
385
387
|
}), /*#__PURE__*/_jsx(Grid, {
|
|
386
388
|
size: 12,
|
|
@@ -10,7 +10,8 @@ function Customization({
|
|
|
10
10
|
values,
|
|
11
11
|
fileSizeLimit,
|
|
12
12
|
isUpdateTopic = false,
|
|
13
|
-
verificationStatus
|
|
13
|
+
verificationStatus,
|
|
14
|
+
openSnackbar
|
|
14
15
|
}) {
|
|
15
16
|
const {
|
|
16
17
|
picture,
|
|
@@ -56,7 +57,8 @@ function Customization({
|
|
|
56
57
|
}) => {
|
|
57
58
|
setFieldValue("pictureBuilderColor", color);
|
|
58
59
|
setFieldValue("pictureBuilderIcon", iconKey);
|
|
59
|
-
}
|
|
60
|
+
},
|
|
61
|
+
openSnackbar: openSnackbar
|
|
60
62
|
})
|
|
61
63
|
})]
|
|
62
64
|
}), isUpdateTopic ? /*#__PURE__*/_jsxs(Grid, {
|
|
@@ -87,7 +89,8 @@ function Customization({
|
|
|
87
89
|
}) => {
|
|
88
90
|
setFieldValue("bannerBuilderColor", color);
|
|
89
91
|
setFieldValue("bannerBuilderIcon", iconKey);
|
|
90
|
-
}
|
|
92
|
+
},
|
|
93
|
+
openSnackbar: openSnackbar
|
|
91
94
|
})
|
|
92
95
|
})]
|
|
93
96
|
}) : null]
|