@elice/material-quiz 1.260910.0 → 1.260915.0-edsmigration.0
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/cjs/components/material-quiz/MaterialQuiz.js +3 -4
- package/cjs/components/material-quiz/MaterialQuizImage.js +9 -7
- package/cjs/components/material-quiz/MaterialQuizInfo.js +10 -10
- package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +7 -5
- package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +4 -4
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +7 -5
- package/cjs/components/material-quiz/MaterialQuizText.js +7 -5
- package/cjs/components/material-quiz/QuizResultDescription.js +18 -12
- package/cjs/components/material-quiz/constants/color.js +6 -6
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +2 -2
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +12 -13
- package/cjs/components/material-quiz-edit/MaterialQuizEditContent.js +38 -30
- package/cjs/components/material-quiz-edit/options/OptionEditor.js +10 -6
- package/cjs/components/material-quiz-edit/options/OptionImage.js +3 -3
- package/cjs/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.d.ts +1 -1
- package/cjs/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.js +4 -4
- package/cjs/components/material-quiz-edit/options/option-text/HelpyLogo.js +4 -4
- package/cjs/components/material-quiz-edit/options/option-text/OptionText.js +5 -5
- package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorAction.js +4 -4
- package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorFormDialog.js +23 -18
- package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorResult.js +32 -21
- package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAnswerInfoDefaultController.js +13 -9
- package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceMethodNotice.js +2 -2
- package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceModeController.js +9 -5
- package/cjs/components/shared/FallbackLoading.js +9 -7
- package/cjs/components/shared/NoData.js +26 -18
- package/cjs/components/shared/QuestionBox.js +26 -18
- package/es/components/material-quiz/MaterialQuiz.js +1 -2
- package/es/components/material-quiz/MaterialQuizImage.js +5 -3
- package/es/components/material-quiz/MaterialQuizInfo.js +7 -7
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +5 -3
- package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +2 -2
- package/es/components/material-quiz/MaterialQuizSelectOne.js +5 -3
- package/es/components/material-quiz/MaterialQuizText.js +5 -3
- package/es/components/material-quiz/QuizResultDescription.js +17 -11
- package/es/components/material-quiz/constants/color.js +1 -1
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +1 -1
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +8 -9
- package/es/components/material-quiz-edit/MaterialQuizEditContent.js +18 -10
- package/es/components/material-quiz-edit/options/OptionEditor.js +8 -4
- package/es/components/material-quiz-edit/options/OptionImage.js +1 -1
- package/es/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.d.ts +1 -1
- package/es/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.js +3 -3
- package/es/components/material-quiz-edit/options/option-text/HelpyLogo.js +3 -3
- package/es/components/material-quiz-edit/options/option-text/OptionText.js +1 -1
- package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorAction.js +3 -3
- package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorFormDialog.js +13 -8
- package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorResult.js +24 -13
- package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAnswerInfoDefaultController.js +11 -7
- package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceMethodNotice.js +1 -1
- package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceModeController.js +7 -3
- package/es/components/shared/FallbackLoading.js +7 -5
- package/es/components/shared/NoData.js +21 -13
- package/es/components/shared/QuestionBox.js +19 -11
- package/package.json +15 -18
|
@@ -8,10 +8,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
8
8
|
var React = require('react');
|
|
9
9
|
var reactUse = require('react-use');
|
|
10
10
|
var designTokens = require('@elice/design-tokens');
|
|
11
|
+
var edsMaterial = require('@elice/eds-material');
|
|
11
12
|
var intl = require('@elice/intl');
|
|
12
|
-
var muiSystem = require('@elice/mui-system');
|
|
13
13
|
var types = require('@elice/types');
|
|
14
|
-
var material = require('@mui/material');
|
|
15
14
|
var CourseApiContext = require('./context/CourseApiContext.js');
|
|
16
15
|
var MaterialQuizContext = require('./context/MaterialQuizContext.js');
|
|
17
16
|
var MaterialQuizInfo = require('./MaterialQuizInfo.js');
|
|
@@ -25,7 +24,7 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
25
24
|
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
26
25
|
var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
27
26
|
|
|
28
|
-
var eliceTheme =
|
|
27
|
+
var eliceTheme = edsMaterial.createEliceTheme({
|
|
29
28
|
paletteMode: 'dark',
|
|
30
29
|
paletteName: 'purple'
|
|
31
30
|
});
|
|
@@ -199,7 +198,7 @@ var MaterialQuizContainer = function MaterialQuizContainer(_ref7) {
|
|
|
199
198
|
__intl = _ref7.__intl;
|
|
200
199
|
return jsxRuntime.jsx(intl.RawEliceIntlProvider, {
|
|
201
200
|
value: __intl,
|
|
202
|
-
children: jsxRuntime.jsx(
|
|
201
|
+
children: jsxRuntime.jsx(edsMaterial.ThemeProvider, {
|
|
203
202
|
theme: eliceTheme,
|
|
204
203
|
children: jsxRuntime.jsx(CourseApiContext.default, {
|
|
205
204
|
eliceCourseApiConfiguration: eliceCourseApiConfiguration,
|
|
@@ -8,10 +8,10 @@ var React = require('react');
|
|
|
8
8
|
var reactUse = require('react-use');
|
|
9
9
|
var apiClient = require('@elice/api-client');
|
|
10
10
|
var designTokens = require('@elice/design-tokens');
|
|
11
|
+
var edsMaterial = require('@elice/eds-material');
|
|
11
12
|
var fileClient = require('@elice/file-client');
|
|
12
13
|
var intl = require('@elice/intl');
|
|
13
14
|
var types = require('@elice/types');
|
|
14
|
-
var material = require('@mui/material');
|
|
15
15
|
var reactQuery = require('@tanstack/react-query');
|
|
16
16
|
var index = require('../../helpers/index.js');
|
|
17
17
|
var FallbackLoading = require('../shared/FallbackLoading.js');
|
|
@@ -38,7 +38,7 @@ var MATERAIL_QUIZ_RESPONSE_KEY = 'materialQuizResponse';
|
|
|
38
38
|
var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
39
39
|
var hasInlinePassage = _ref.hasInlinePassage;
|
|
40
40
|
//
|
|
41
|
-
var theme =
|
|
41
|
+
var theme = edsMaterial.useTheme();
|
|
42
42
|
var queryClient = reactQuery.useQueryClient();
|
|
43
43
|
//
|
|
44
44
|
var _useMaterialQuizState = MaterialQuizContext.useMaterialQuizState(),
|
|
@@ -207,8 +207,8 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
207
207
|
*
|
|
208
208
|
*/
|
|
209
209
|
var renderResourceIdController = function renderResourceIdController() {
|
|
210
|
-
return jsxRuntime.jsxs(
|
|
211
|
-
children: [jsxRuntime.jsx(
|
|
210
|
+
return jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
211
|
+
children: [jsxRuntime.jsx(edsMaterial.FormLabel, {
|
|
212
212
|
sx: {
|
|
213
213
|
fontSize: function fontSize(theme) {
|
|
214
214
|
return theme.typography.body2.fontSize;
|
|
@@ -369,9 +369,11 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
369
369
|
footerActions: getFooterActions(),
|
|
370
370
|
onNext: onNext,
|
|
371
371
|
onHint: onHint,
|
|
372
|
-
children: jsxRuntime.jsxs(
|
|
373
|
-
|
|
374
|
-
|
|
372
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
373
|
+
sx: {
|
|
374
|
+
height: '100%',
|
|
375
|
+
gap: '1rem'
|
|
376
|
+
},
|
|
375
377
|
children: [hasInlinePassage && jsxRuntime.jsx(MaterialQuizInfo.default, {
|
|
376
378
|
renderWithBox: false
|
|
377
379
|
}), renderContent(), jsxRuntime.jsx(MaterialQuizAnswerExplanation.default, {})]
|
|
@@ -7,10 +7,10 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var reactUse = require('react-use');
|
|
9
9
|
var blocks = require('@elice/blocks');
|
|
10
|
+
var edsMaterial = require('@elice/eds-material');
|
|
10
11
|
var icons = require('@elice/icons');
|
|
11
12
|
var markdown = require('@elice/markdown');
|
|
12
13
|
var wysiwyg = require('@elice/wysiwyg');
|
|
13
|
-
var material = require('@mui/material');
|
|
14
14
|
var styled = require('styled-components');
|
|
15
15
|
var QuestionBox = require('../shared/QuestionBox.js');
|
|
16
16
|
var mergeRefs = require('../shared/utils/mergeRefs.js');
|
|
@@ -32,7 +32,7 @@ var StyledMarkdownSSR = styled__default.default(markdown.MarkdownSSR).withConfig
|
|
|
32
32
|
//
|
|
33
33
|
var IMAGE_CONTAINER_CLASSNAME = 'markdown-zoomable-image-container';
|
|
34
34
|
var ZOOM_ICON_CLASSNAME = 'markdown-zoom-icon';
|
|
35
|
-
var MarkdownContainer =
|
|
35
|
+
var MarkdownContainer = edsMaterial.styled('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: auto;\n\n img {\n min-height: 3rem;\n width: auto;\n }\n\n div {\n display: inline-block;\n position: relative;\n width: fit-content;\n }\n\n span.", " {\n cursor: pointer;\n\n position: absolute;\n top: 0;\n right: ", ";\n height: 2rem;\n width: 2rem;\n aspect-ratio: 1;\n background-color: ", ";\n margin: 0.5rem;\n border-radius: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n"])), IMAGE_CONTAINER_CLASSNAME, ZOOM_ICON_CLASSNAME, function (_ref) {
|
|
36
36
|
var vertical = _ref.vertical;
|
|
37
37
|
return vertical ? '0!important' : '0';
|
|
38
38
|
}, function (_ref2) {
|
|
@@ -151,7 +151,7 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
|
|
|
151
151
|
width: "100%",
|
|
152
152
|
height: '40px'
|
|
153
153
|
})]
|
|
154
|
-
}), jsxRuntime.jsx(
|
|
154
|
+
}), jsxRuntime.jsx(edsMaterial.Modal, {
|
|
155
155
|
open: !!zoomImageUrl,
|
|
156
156
|
sx: {
|
|
157
157
|
border: 'none',
|
|
@@ -160,14 +160,14 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
|
|
|
160
160
|
justifyContent: 'center',
|
|
161
161
|
alignItems: 'center'
|
|
162
162
|
},
|
|
163
|
-
children: jsxRuntime.jsxs(
|
|
164
|
-
width: "70%",
|
|
165
|
-
height: "70%",
|
|
166
|
-
display: "flex",
|
|
167
|
-
alignItems: "center",
|
|
168
|
-
justifyContent: "center",
|
|
169
|
-
position: "relative",
|
|
163
|
+
children: jsxRuntime.jsxs(edsMaterial.Box, {
|
|
170
164
|
sx: {
|
|
165
|
+
width: '70%',
|
|
166
|
+
height: '70%',
|
|
167
|
+
display: 'flex',
|
|
168
|
+
alignItems: 'center',
|
|
169
|
+
justifyContent: 'center',
|
|
170
|
+
position: 'relative',
|
|
171
171
|
outline: 'none'
|
|
172
172
|
},
|
|
173
173
|
children: [jsxRuntime.jsx("img", {
|
|
@@ -7,9 +7,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var apiClient = require('@elice/api-client');
|
|
9
9
|
var designTokens = require('@elice/design-tokens');
|
|
10
|
+
var edsMaterial = require('@elice/eds-material');
|
|
10
11
|
var intl = require('@elice/intl');
|
|
11
12
|
var types = require('@elice/types');
|
|
12
|
-
var material = require('@mui/material');
|
|
13
13
|
var index = require('../../helpers/index.js');
|
|
14
14
|
var QuestionBox = require('../shared/QuestionBox.js');
|
|
15
15
|
var StyledMarkdown = require('../shared/StyledMarkdown.js');
|
|
@@ -45,7 +45,7 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
45
45
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
46
46
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
47
47
|
onHint = _useMaterialQuizDispa.onHint;
|
|
48
|
-
var theme =
|
|
48
|
+
var theme = edsMaterial.useTheme();
|
|
49
49
|
// state
|
|
50
50
|
var intl$1 = intl.useRawEliceIntl();
|
|
51
51
|
var _React$useState = React__default.default.useState([]),
|
|
@@ -310,9 +310,11 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
310
310
|
footerActions: getFooterActions(),
|
|
311
311
|
onNext: onNext,
|
|
312
312
|
onHint: onHint,
|
|
313
|
-
children: jsxRuntime.jsxs(
|
|
314
|
-
|
|
315
|
-
|
|
313
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
314
|
+
sx: {
|
|
315
|
+
height: '100%',
|
|
316
|
+
gap: '1rem'
|
|
317
|
+
},
|
|
316
318
|
children: [hasInlinePassage && jsxRuntime.jsx("div", {
|
|
317
319
|
id: element.MATERIAL_QUIZ_PASSIVE_ID,
|
|
318
320
|
ref: questionRef,
|
|
@@ -11,10 +11,10 @@ var modifiers = require('@dnd-kit/modifiers');
|
|
|
11
11
|
var apiClient = require('@elice/api-client');
|
|
12
12
|
var blocks = require('@elice/blocks');
|
|
13
13
|
var designTokens = require('@elice/design-tokens');
|
|
14
|
+
var edsMaterial = require('@elice/eds-material');
|
|
14
15
|
var icons = require('@elice/icons');
|
|
15
16
|
var intl = require('@elice/intl');
|
|
16
17
|
var types = require('@elice/types');
|
|
17
|
-
var material = require('@mui/material');
|
|
18
18
|
var index = require('../../helpers/index.js');
|
|
19
19
|
var EbDroppable = require('../eb-sortable/EbDroppable.js');
|
|
20
20
|
var QuestionBox = require('../shared/QuestionBox.js');
|
|
@@ -80,7 +80,7 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
80
80
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
81
81
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
82
82
|
onHint = _useMaterialQuizDispa.onHint;
|
|
83
|
-
var theme =
|
|
83
|
+
var theme = edsMaterial.useTheme();
|
|
84
84
|
// state
|
|
85
85
|
var intl$1 = intl.useRawEliceIntl();
|
|
86
86
|
var _React$useState = React__default.default.useState(),
|
|
@@ -669,11 +669,11 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
669
669
|
footerActions: getFooterActions(),
|
|
670
670
|
onNext: onNext,
|
|
671
671
|
onHint: onHint,
|
|
672
|
-
children: jsxRuntime.jsxs(
|
|
672
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
673
673
|
sx: {
|
|
674
|
+
gap: '1rem',
|
|
674
675
|
flex: 1
|
|
675
676
|
},
|
|
676
|
-
gap: "1rem",
|
|
677
677
|
children: [hasInlinePassage && jsxRuntime.jsx("div", {
|
|
678
678
|
id: element.MATERIAL_QUIZ_PASSIVE_ID,
|
|
679
679
|
ref: questionRef,
|
|
@@ -7,9 +7,9 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var apiClient = require('@elice/api-client');
|
|
9
9
|
var designTokens = require('@elice/design-tokens');
|
|
10
|
+
var edsMaterial = require('@elice/eds-material');
|
|
10
11
|
var intl = require('@elice/intl');
|
|
11
12
|
var types = require('@elice/types');
|
|
12
|
-
var material = require('@mui/material');
|
|
13
13
|
var index = require('../../helpers/index.js');
|
|
14
14
|
var QuestionBox = require('../shared/QuestionBox.js');
|
|
15
15
|
var StyledMarkdown = require('../shared/StyledMarkdown.js');
|
|
@@ -45,7 +45,7 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
45
45
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
46
46
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
47
47
|
onHint = _useMaterialQuizDispa.onHint;
|
|
48
|
-
var theme =
|
|
48
|
+
var theme = edsMaterial.useTheme();
|
|
49
49
|
// state
|
|
50
50
|
var intl$1 = intl.useRawEliceIntl();
|
|
51
51
|
var _React$useState = React__default.default.useState(),
|
|
@@ -299,9 +299,11 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
299
299
|
footerActions: getFooterActions(),
|
|
300
300
|
onNext: onNext,
|
|
301
301
|
onHint: onHint,
|
|
302
|
-
children: jsxRuntime.jsxs(
|
|
303
|
-
|
|
304
|
-
|
|
302
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
303
|
+
sx: {
|
|
304
|
+
height: '100%',
|
|
305
|
+
gap: '1rem'
|
|
306
|
+
},
|
|
305
307
|
children: [hasInlinePassage && jsxRuntime.jsx("div", {
|
|
306
308
|
id: element.MATERIAL_QUIZ_PASSIVE_ID,
|
|
307
309
|
ref: questionRef,
|
|
@@ -9,9 +9,9 @@ var React = require('react');
|
|
|
9
9
|
var apiClient = require('@elice/api-client');
|
|
10
10
|
var blocks = require('@elice/blocks');
|
|
11
11
|
var designTokens = require('@elice/design-tokens');
|
|
12
|
+
var edsMaterial = require('@elice/eds-material');
|
|
12
13
|
var intl = require('@elice/intl');
|
|
13
14
|
var types = require('@elice/types');
|
|
14
|
-
var material = require('@mui/material');
|
|
15
15
|
var index = require('../../helpers/index.js');
|
|
16
16
|
var QuestionBox = require('../shared/QuestionBox.js');
|
|
17
17
|
var MaterialQuizContext = require('./context/MaterialQuizContext.js');
|
|
@@ -56,7 +56,7 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
56
56
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
57
57
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
58
58
|
onHint = _useMaterialQuizDispa.onHint;
|
|
59
|
-
var theme =
|
|
59
|
+
var theme = edsMaterial.useTheme();
|
|
60
60
|
// state
|
|
61
61
|
var intl$1 = intl.useRawEliceIntl();
|
|
62
62
|
var _React$useState = React__default.default.useState(),
|
|
@@ -305,9 +305,11 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
305
305
|
footerActions: getFooterActions(),
|
|
306
306
|
onNext: onNext,
|
|
307
307
|
onHint: onHint,
|
|
308
|
-
children: jsxRuntime.jsxs(
|
|
309
|
-
|
|
310
|
-
|
|
308
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
309
|
+
sx: {
|
|
310
|
+
height: '100%',
|
|
311
|
+
gap: '1rem'
|
|
312
|
+
},
|
|
311
313
|
children: [hasInlinePassage && jsxRuntime.jsx("div", {
|
|
312
314
|
id: element.MATERIAL_QUIZ_PASSIVE_ID,
|
|
313
315
|
ref: questionRef,
|
|
@@ -5,10 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var React = require('react');
|
|
8
|
+
var edsKit = require('@elice/eds-kit');
|
|
9
|
+
var edsMaterial = require('@elice/eds-material');
|
|
8
10
|
var intl = require('@elice/intl');
|
|
9
|
-
var muiElements = require('@elice/mui-elements');
|
|
10
11
|
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
11
|
-
var material = require('@mui/material');
|
|
12
12
|
var index = require('../../helpers/index.js');
|
|
13
13
|
var MaterialQuizContext = require('./context/MaterialQuizContext.js');
|
|
14
14
|
|
|
@@ -21,7 +21,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringif
|
|
|
21
21
|
//
|
|
22
22
|
//
|
|
23
23
|
//
|
|
24
|
-
var StyledQuizResultTypography = /*#__PURE__*/_styled__default.default(
|
|
24
|
+
var StyledQuizResultTypography = /*#__PURE__*/_styled__default.default(edsMaterial.Typography, {
|
|
25
25
|
target: "e1dv3u8q0"
|
|
26
26
|
})("production" === "production" ? {
|
|
27
27
|
name: "twwtpu",
|
|
@@ -51,10 +51,12 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
51
51
|
case index.QuizResultStatus.Correct:
|
|
52
52
|
return jsxRuntime.jsxs(StyledQuizResultTypography, {
|
|
53
53
|
variant: "body2",
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
sx: {
|
|
55
|
+
color: function color(theme) {
|
|
56
|
+
return theme.palette.success.main;
|
|
57
|
+
}
|
|
56
58
|
},
|
|
57
|
-
children: [jsxRuntime.jsx(
|
|
59
|
+
children: [jsxRuntime.jsx(edsKit.FaIcon, {
|
|
58
60
|
icon: proSolidSvgIcons.faCircleCheck
|
|
59
61
|
}), intl$1.formatMessage({
|
|
60
62
|
id: 'materialQuiz.resultStatus.correct'
|
|
@@ -66,10 +68,12 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
66
68
|
}
|
|
67
69
|
return jsxRuntime.jsxs(StyledQuizResultTypography, {
|
|
68
70
|
variant: "body2",
|
|
69
|
-
|
|
70
|
-
|
|
71
|
+
sx: {
|
|
72
|
+
color: function color(theme) {
|
|
73
|
+
return theme.palette.error.main;
|
|
74
|
+
}
|
|
71
75
|
},
|
|
72
|
-
children: [jsxRuntime.jsx(
|
|
76
|
+
children: [jsxRuntime.jsx(edsKit.FaIcon, {
|
|
73
77
|
icon: proSolidSvgIcons.faCircleXmark
|
|
74
78
|
}), intl$1.formatMessage({
|
|
75
79
|
id: 'materialQuiz.resultStatus.wrong'
|
|
@@ -78,10 +82,12 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
78
82
|
case index.QuizResultStatus.Submitted:
|
|
79
83
|
return jsxRuntime.jsxs(StyledQuizResultTypography, {
|
|
80
84
|
variant: "body2",
|
|
81
|
-
|
|
82
|
-
|
|
85
|
+
sx: {
|
|
86
|
+
color: function color(theme) {
|
|
87
|
+
return theme.palette.primary.main;
|
|
88
|
+
}
|
|
83
89
|
},
|
|
84
|
-
children: [jsxRuntime.jsx(
|
|
90
|
+
children: [jsxRuntime.jsx(edsKit.FaIcon, {
|
|
85
91
|
icon: proSolidSvgIcons.faCircleCheck
|
|
86
92
|
}), intl$1.formatMessage({
|
|
87
93
|
id: 'materialQuiz.resultStatus.submitted'
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var edsMaterial = require('@elice/eds-material');
|
|
4
4
|
|
|
5
|
-
var CORRECT_TEXT_COLOR =
|
|
6
|
-
var CORRECT_BACKGROUND_COLOR =
|
|
7
|
-
var WRONG_TEXT_COLOR =
|
|
8
|
-
var WRONG_BACKGROUND_COLOR =
|
|
9
|
-
var SUCCESS_TEXT_COLOR =
|
|
5
|
+
var CORRECT_TEXT_COLOR = edsMaterial.colors.green[800];
|
|
6
|
+
var CORRECT_BACKGROUND_COLOR = edsMaterial.colors.green[50];
|
|
7
|
+
var WRONG_TEXT_COLOR = edsMaterial.colors.red[800];
|
|
8
|
+
var WRONG_BACKGROUND_COLOR = edsMaterial.colors.red[50];
|
|
9
|
+
var SUCCESS_TEXT_COLOR = edsMaterial.colors.green[400];
|
|
10
10
|
|
|
11
11
|
exports.CORRECT_BACKGROUND_COLOR = CORRECT_BACKGROUND_COLOR;
|
|
12
12
|
exports.CORRECT_TEXT_COLOR = CORRECT_TEXT_COLOR;
|
|
@@ -8,9 +8,9 @@ var React = require('react');
|
|
|
8
8
|
var apiClient = require('@elice/api-client');
|
|
9
9
|
var blocks = require('@elice/blocks');
|
|
10
10
|
var designTokens = require('@elice/design-tokens');
|
|
11
|
+
var edsMaterial = require('@elice/eds-material');
|
|
11
12
|
var intl = require('@elice/intl');
|
|
12
13
|
var types = require('@elice/types');
|
|
13
|
-
var material = require('@mui/material');
|
|
14
14
|
var cloneDeep = require('lodash-es/cloneDeep');
|
|
15
15
|
var flattenDeep = require('lodash-es/flattenDeep');
|
|
16
16
|
var index = require('../../../helpers/index.js');
|
|
@@ -51,7 +51,7 @@ var MaterialQuizGroup = function MaterialQuizGroup() {
|
|
|
51
51
|
refreshOrgMaterialQuiz = _useMaterialQuizDispa.refreshOrgMaterialQuiz,
|
|
52
52
|
onDirty = _useMaterialQuizDispa.onDirty,
|
|
53
53
|
onHint = _useMaterialQuizDispa.onHint;
|
|
54
|
-
var theme =
|
|
54
|
+
var theme = edsMaterial.useTheme();
|
|
55
55
|
var _React$useState = React__default.default.useState([]),
|
|
56
56
|
_React$useState2 = _rollupPluginBabelHelpers.slicedToArray(_React$useState, 2),
|
|
57
57
|
groupList = _React$useState2[0],
|
|
@@ -5,11 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var _styled = require('@emotion/styled/base');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var designTokens = require('@elice/design-tokens');
|
|
8
|
+
var edsKit = require('@elice/eds-kit');
|
|
9
|
+
var edsMaterial = require('@elice/eds-material');
|
|
8
10
|
var markdown = require('@elice/markdown');
|
|
9
|
-
var muiElements = require('@elice/mui-elements');
|
|
10
|
-
var muiSystem = require('@elice/mui-system');
|
|
11
11
|
var proSolidSvgIcons = require('@fortawesome/pro-solid-svg-icons');
|
|
12
|
-
var material = require('@mui/material');
|
|
13
12
|
var index = require('../../../helpers/index.js');
|
|
14
13
|
var EbDraggable = require('../../eb-sortable/EbDraggable.js');
|
|
15
14
|
var MaterialQuizContext = require('../context/MaterialQuizContext.js');
|
|
@@ -62,9 +61,9 @@ var StyledOptionTitle = /*#__PURE__*/_styled__default.default("div", {
|
|
|
62
61
|
}
|
|
63
62
|
switch (status) {
|
|
64
63
|
case 'correct':
|
|
65
|
-
return
|
|
64
|
+
return edsMaterial.colors.green[50];
|
|
66
65
|
case 'wrong':
|
|
67
|
-
return
|
|
66
|
+
return edsMaterial.colors.red[50];
|
|
68
67
|
default:
|
|
69
68
|
return 'auto';
|
|
70
69
|
}
|
|
@@ -78,7 +77,7 @@ var StyledOptionContent = /*#__PURE__*/_styled__default.default("div", {
|
|
|
78
77
|
var vertical = _ref9.vertical;
|
|
79
78
|
return vertical ? '10.25rem' : '11.5rem';
|
|
80
79
|
}, ";background:", designTokens.base.color.navy8, ";& p{line-height:1;}");
|
|
81
|
-
var StyledIconButton = /*#__PURE__*/_styled__default.default(
|
|
80
|
+
var StyledIconButton = /*#__PURE__*/_styled__default.default(edsMaterial.IconButton, {
|
|
82
81
|
target: "ex64yhy0"
|
|
83
82
|
})("border-radius:50%;width:1.5rem;height:1.5rem;position:absolute;top:0.5rem;right:0.5rem;background-color:", function (_ref0) {
|
|
84
83
|
var theme = _ref0.theme;
|
|
@@ -112,7 +111,7 @@ var MaterialQuizGroupOptionItem = function MaterialQuizGroupOptionItem(_ref1) {
|
|
|
112
111
|
e.stopPropagation();
|
|
113
112
|
onClose();
|
|
114
113
|
},
|
|
115
|
-
children: jsxRuntime.jsx(
|
|
114
|
+
children: jsxRuntime.jsx(edsKit.FaIcon, {
|
|
116
115
|
icon: proSolidSvgIcons.faXmark,
|
|
117
116
|
fontSize: "inherit"
|
|
118
117
|
})
|
|
@@ -139,14 +138,14 @@ var MaterialQuizGroupOptionItem = function MaterialQuizGroupOptionItem(_ref1) {
|
|
|
139
138
|
vertical: vertical,
|
|
140
139
|
status: status,
|
|
141
140
|
isOptionContent: isOptionContent,
|
|
142
|
-
children: jsxRuntime.jsx(
|
|
141
|
+
children: jsxRuntime.jsx(edsMaterial.Typography, {
|
|
143
142
|
variant: vertical ? 'body2' : 'body1',
|
|
144
|
-
textAlign: "center",
|
|
145
|
-
fontWeight: "bold",
|
|
146
|
-
color: function color(theme) {
|
|
147
|
-
return status === 'correct' ? 'success.main' : status === 'wrong' ? 'error.main' : theme.palette.common.black;
|
|
148
|
-
},
|
|
149
143
|
sx: {
|
|
144
|
+
color: function color(theme) {
|
|
145
|
+
return status === 'correct' ? 'success.main' : status === 'wrong' ? 'error.main' : theme.palette.common.black;
|
|
146
|
+
},
|
|
147
|
+
textAlign: 'center',
|
|
148
|
+
fontWeight: 'bold',
|
|
150
149
|
wordBreak: 'break-all'
|
|
151
150
|
},
|
|
152
151
|
children: option.options.title
|
|
@@ -9,13 +9,13 @@ var React = require('react');
|
|
|
9
9
|
var reactHookForm = require('react-hook-form');
|
|
10
10
|
var reactTransitionGroup = require('react-transition-group');
|
|
11
11
|
var blocks = require('@elice/blocks');
|
|
12
|
+
var edsKit = require('@elice/eds-kit');
|
|
13
|
+
var edsMaterial = require('@elice/eds-material');
|
|
12
14
|
var intl = require('@elice/intl');
|
|
13
15
|
var markdown = require('@elice/markdown');
|
|
14
|
-
var muiElements = require('@elice/mui-elements');
|
|
15
16
|
var types = require('@elice/types');
|
|
16
17
|
var enums = require('@elice/types/es/enums');
|
|
17
18
|
var proRegularSvgIcons = require('@fortawesome/pro-regular-svg-icons');
|
|
18
|
-
var material = require('@mui/material');
|
|
19
19
|
var flattenDeep = require('lodash-es/flattenDeep');
|
|
20
20
|
var index = require('../markdown-editor/index.js');
|
|
21
21
|
var OptionText = require('./options/option-text/OptionText.js');
|
|
@@ -312,10 +312,12 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
312
312
|
if (!((_a = course === null || course === void 0 ? void 0 : course.preference) === null || _a === void 0 ? void 0 : _a.renderMarkdownInQuizOptions)) {
|
|
313
313
|
return null;
|
|
314
314
|
}
|
|
315
|
-
return jsxRuntime.jsx(
|
|
316
|
-
title: jsxRuntime.jsx(
|
|
317
|
-
|
|
318
|
-
|
|
315
|
+
return jsxRuntime.jsx(edsMaterial.Tooltip, {
|
|
316
|
+
title: jsxRuntime.jsx(edsMaterial.Stack, {
|
|
317
|
+
sx: {
|
|
318
|
+
gap: '0.5rem',
|
|
319
|
+
textAlign: 'start'
|
|
320
|
+
},
|
|
319
321
|
children: intl$1.formatMessage({
|
|
320
322
|
id: 'content.title.markdownInfo.tooltip'
|
|
321
323
|
}, {
|
|
@@ -338,7 +340,7 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
338
340
|
}
|
|
339
341
|
})
|
|
340
342
|
}),
|
|
341
|
-
children: jsxRuntime.jsx(
|
|
343
|
+
children: jsxRuntime.jsx(edsKit.FaIcon, {
|
|
342
344
|
fontSize: "small",
|
|
343
345
|
color: "action",
|
|
344
346
|
icon: proRegularSvgIcons.faInfoCircle
|
|
@@ -350,10 +352,12 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
350
352
|
*/
|
|
351
353
|
var renderQuestionTitleInput = function renderQuestionTitleInput() {
|
|
352
354
|
return jsxRuntime.jsx(blocks.FormInputVerticalLayout, {
|
|
353
|
-
label: jsxRuntime.jsxs(
|
|
355
|
+
label: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
354
356
|
direction: "row",
|
|
355
|
-
|
|
356
|
-
|
|
357
|
+
sx: {
|
|
358
|
+
gap: '0.25rem',
|
|
359
|
+
alignItems: 'center'
|
|
360
|
+
},
|
|
357
361
|
children: [jsxRuntime.jsx(blocks.Label, {
|
|
358
362
|
required: true,
|
|
359
363
|
size: "small",
|
|
@@ -446,17 +450,17 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
446
450
|
control: control,
|
|
447
451
|
render: function render(_ref3) {
|
|
448
452
|
var field = _ref3.field;
|
|
449
|
-
return jsxRuntime.jsx(
|
|
453
|
+
return jsxRuntime.jsx(edsMaterial.Tooltip, {
|
|
450
454
|
title: disabled ? '' : intl$1.formatMessage({
|
|
451
455
|
id: 'content.option.optionsSetEnabled.tooltip'
|
|
452
456
|
}),
|
|
453
457
|
placement: "top",
|
|
454
|
-
children: jsxRuntime.jsx(
|
|
458
|
+
children: jsxRuntime.jsx(edsMaterial.FormControlLabel, {
|
|
455
459
|
disabled: disabled,
|
|
456
460
|
label: intl$1.formatMessage({
|
|
457
461
|
id: 'content.option.optionsSetEnabled.label'
|
|
458
462
|
}),
|
|
459
|
-
control: jsxRuntime.jsx(
|
|
463
|
+
control: jsxRuntime.jsx(edsMaterial.Switch, Object.assign({}, field, {
|
|
460
464
|
checked: field.value
|
|
461
465
|
}))
|
|
462
466
|
})
|
|
@@ -474,11 +478,11 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
474
478
|
name: "isAutoGrade",
|
|
475
479
|
render: function render(_ref4) {
|
|
476
480
|
var field = _ref4.field;
|
|
477
|
-
return jsxRuntime.jsx(
|
|
481
|
+
return jsxRuntime.jsx(edsMaterial.FormControlLabel, Object.assign({}, field, {
|
|
478
482
|
label: intl$1.formatMessage({
|
|
479
483
|
id: 'option.text.isAutoGrade.checkbox.label'
|
|
480
484
|
}),
|
|
481
|
-
control: jsxRuntime.jsx(
|
|
485
|
+
control: jsxRuntime.jsx(edsMaterial.Checkbox, {
|
|
482
486
|
checked: !field.value
|
|
483
487
|
}),
|
|
484
488
|
checked: !field.value,
|
|
@@ -508,16 +512,18 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
508
512
|
name: "optionType",
|
|
509
513
|
render: function render(_ref5) {
|
|
510
514
|
var field = _ref5.field;
|
|
511
|
-
return jsxRuntime.jsx(
|
|
515
|
+
return jsxRuntime.jsx(edsMaterial.Tooltip, {
|
|
512
516
|
title: disabled && intl$1.formatMessage({
|
|
513
517
|
id: 'content.option.tooltip.disabled'
|
|
514
518
|
}),
|
|
515
519
|
placement: "top-end",
|
|
516
|
-
children: jsxRuntime.jsxs(
|
|
520
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
517
521
|
direction: "row",
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
522
|
+
sx: {
|
|
523
|
+
justifyContent: 'space-between',
|
|
524
|
+
marginBottom: '0.5rem'
|
|
525
|
+
},
|
|
526
|
+
children: [jsxRuntime.jsxs(edsMaterial.TextField, Object.assign({
|
|
521
527
|
select: true,
|
|
522
528
|
disabled: disabled
|
|
523
529
|
}, field, {
|
|
@@ -528,32 +534,32 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
528
534
|
}
|
|
529
535
|
field.onChange(event);
|
|
530
536
|
},
|
|
531
|
-
children: [jsxRuntime.jsx(
|
|
537
|
+
children: [jsxRuntime.jsx(edsMaterial.MenuItem, {
|
|
532
538
|
value: types.enums.QuizOptionType.SelectOne,
|
|
533
539
|
children: intl$1.formatMessage({
|
|
534
540
|
id: 'content.option.select.items.selectOne'
|
|
535
541
|
})
|
|
536
|
-
}), jsxRuntime.jsx(
|
|
542
|
+
}), jsxRuntime.jsx(edsMaterial.MenuItem, {
|
|
537
543
|
value: types.enums.QuizOptionType.SelectMultiple,
|
|
538
544
|
children: intl$1.formatMessage({
|
|
539
545
|
id: 'content.option.select.items.selectMultiple'
|
|
540
546
|
})
|
|
541
|
-
}), jsxRuntime.jsx(
|
|
547
|
+
}), jsxRuntime.jsx(edsMaterial.MenuItem, {
|
|
542
548
|
value: types.enums.QuizOptionType.SelectMultipleOrder,
|
|
543
549
|
children: intl$1.formatMessage({
|
|
544
550
|
id: 'content.option.select.items.selectMultipleOrder'
|
|
545
551
|
})
|
|
546
|
-
}), jsxRuntime.jsx(
|
|
552
|
+
}), jsxRuntime.jsx(edsMaterial.MenuItem, {
|
|
547
553
|
value: types.enums.QuizOptionType.Group,
|
|
548
554
|
children: intl$1.formatMessage({
|
|
549
555
|
id: 'content.option.select.items.group'
|
|
550
556
|
})
|
|
551
|
-
}), jsxRuntime.jsx(
|
|
557
|
+
}), jsxRuntime.jsx(edsMaterial.MenuItem, {
|
|
552
558
|
value: types.enums.QuizOptionType.Text,
|
|
553
559
|
children: intl$1.formatMessage({
|
|
554
560
|
id: 'content.option.select.items.text'
|
|
555
561
|
})
|
|
556
|
-
}), jsxRuntime.jsx(
|
|
562
|
+
}), jsxRuntime.jsx(edsMaterial.MenuItem, {
|
|
557
563
|
value: types.enums.QuizOptionType.Image,
|
|
558
564
|
children: intl$1.formatMessage({
|
|
559
565
|
id: 'content.option.select.items.image'
|
|
@@ -563,12 +569,12 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
563
569
|
})
|
|
564
570
|
});
|
|
565
571
|
}
|
|
566
|
-
}), watchedOptionType !== types.enums.QuizOptionType.Text && optionsSetEnabled ? jsxRuntime.jsxs(
|
|
572
|
+
}), watchedOptionType !== types.enums.QuizOptionType.Text && optionsSetEnabled ? jsxRuntime.jsxs(edsMaterial.Alert, {
|
|
567
573
|
severity: "info",
|
|
568
574
|
sx: {
|
|
569
575
|
marginBottom: '1rem'
|
|
570
576
|
},
|
|
571
|
-
children: [jsxRuntime.jsx(
|
|
577
|
+
children: [jsxRuntime.jsx(edsMaterial.AlertTitle, {
|
|
572
578
|
children: intl$1.formatMessage({
|
|
573
579
|
id: 'content.option.alert.randomized.title'
|
|
574
580
|
})
|
|
@@ -580,8 +586,10 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
580
586
|
unmountOnExit: true,
|
|
581
587
|
"in": watchedOptionType === types.enums.QuizOptionType.SelectMultipleOrder || watchedOptionType === types.enums.QuizOptionType.Group,
|
|
582
588
|
timeout: 0,
|
|
583
|
-
children: jsxRuntime.jsx(
|
|
584
|
-
|
|
589
|
+
children: jsxRuntime.jsx(edsMaterial.Box, {
|
|
590
|
+
sx: {
|
|
591
|
+
marginBottom: '0.5rem'
|
|
592
|
+
},
|
|
585
593
|
children: jsxRuntime.jsx(blocks.StatusText, {
|
|
586
594
|
preWrap: true,
|
|
587
595
|
role: "description",
|