@elice/material-quiz 1.260930.0 → 1.261005.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 -21
|
@@ -10,10 +10,10 @@ var React = require('react');
|
|
|
10
10
|
var reactUse = require('react-use');
|
|
11
11
|
var blocks = require('@elice/blocks');
|
|
12
12
|
var designTokens = require('@elice/design-tokens');
|
|
13
|
+
var edsMaterial = require('@elice/eds-material');
|
|
13
14
|
var intl = require('@elice/intl');
|
|
14
15
|
var markdown = require('@elice/markdown');
|
|
15
16
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
16
|
-
var material = require('@mui/material');
|
|
17
17
|
var animateScrollTo = require('animated-scroll-to');
|
|
18
18
|
var index = require('../../helpers/index.js');
|
|
19
19
|
var MaterialQuizContext = require('../material-quiz/context/MaterialQuizContext.js');
|
|
@@ -101,7 +101,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
101
101
|
_a.isNextActive;
|
|
102
102
|
var bodyContainerRef = _a.bodyContainerRef,
|
|
103
103
|
props = tslib.__rest(_a, ["children", "footerActions", "title", "titlePrefix", "submitResult", "submitStatus", "materialQuizResponse", "onNext", "onHint", "isNextActive", "bodyContainerRef"]);
|
|
104
|
-
var theme =
|
|
104
|
+
var theme = edsMaterial.useTheme();
|
|
105
105
|
var intl$1 = intl.useRawEliceIntl();
|
|
106
106
|
var _useMaterialQuizState = MaterialQuizContext.useMaterialQuizState(),
|
|
107
107
|
vertical = _useMaterialQuizState.vertical,
|
|
@@ -157,16 +157,20 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
157
157
|
var header = title ? jsxRuntime.jsx(StyledQuestionBoxHeader, {
|
|
158
158
|
vertical: vertical,
|
|
159
159
|
ref: headerRef,
|
|
160
|
-
children: jsxRuntime.jsxs(
|
|
161
|
-
width: "100%",
|
|
160
|
+
children: jsxRuntime.jsxs(edsMaterial.Stack, {
|
|
162
161
|
direction: "row",
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
sx: {
|
|
163
|
+
width: '100%',
|
|
164
|
+
justifyContent: 'space-between',
|
|
165
|
+
flexWrap: 'wrap',
|
|
166
|
+
alignItems: 'center',
|
|
167
|
+
gap: '1.25rem'
|
|
168
|
+
},
|
|
169
|
+
children: [jsxRuntime.jsxs(edsMaterial.Box, {
|
|
170
|
+
sx: {
|
|
171
|
+
display: 'flex',
|
|
172
|
+
alignItems: 'center'
|
|
173
|
+
},
|
|
170
174
|
children: [titlePrefix ? jsxRuntime.jsx(blocks.Text, {
|
|
171
175
|
bold: true,
|
|
172
176
|
size: "large",
|
|
@@ -176,15 +180,17 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
176
180
|
},
|
|
177
181
|
children: titlePrefix
|
|
178
182
|
}) : null, ((_b = course === null || course === void 0 ? void 0 : course.preference) === null || _b === void 0 ? void 0 : _b.renderMarkdownInQuizOptions) ? jsxRuntime.jsx(StyledMarkdownTypography, {
|
|
179
|
-
color: "
|
|
183
|
+
color: "textPrimary",
|
|
180
184
|
variant: "subtitle2",
|
|
181
185
|
children: title
|
|
182
|
-
}) : jsxRuntime.jsx(
|
|
183
|
-
color: "text.primary",
|
|
186
|
+
}) : jsxRuntime.jsx(edsMaterial.Typography, {
|
|
184
187
|
variant: "subtitle2",
|
|
188
|
+
sx: {
|
|
189
|
+
color: 'text.primary'
|
|
190
|
+
},
|
|
185
191
|
children: title
|
|
186
192
|
})]
|
|
187
|
-
}), index.getQuizResultStatus(materialQuizResponse) === index.QuizResultStatus.Wrong ? jsxRuntime.jsx(
|
|
193
|
+
}), index.getQuizResultStatus(materialQuizResponse) === index.QuizResultStatus.Wrong ? jsxRuntime.jsx(edsMaterial.Button, {
|
|
188
194
|
size: "small",
|
|
189
195
|
variant: "text",
|
|
190
196
|
sx: {
|
|
@@ -192,7 +198,7 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
192
198
|
return theme.palette.primary.opacity02;
|
|
193
199
|
}
|
|
194
200
|
},
|
|
195
|
-
startIcon: jsxRuntime.jsx(
|
|
201
|
+
startIcon: jsxRuntime.jsx(edsMaterial.Avatar, {
|
|
196
202
|
src: helpyLogo,
|
|
197
203
|
sx: {
|
|
198
204
|
width: '2rem',
|
|
@@ -200,9 +206,11 @@ var QuestionBox = function QuestionBox(_a) {
|
|
|
200
206
|
}
|
|
201
207
|
}),
|
|
202
208
|
onClick: onHint,
|
|
203
|
-
children: jsxRuntime.jsx(
|
|
209
|
+
children: jsxRuntime.jsx(edsMaterial.Typography, {
|
|
204
210
|
variant: "button",
|
|
205
|
-
|
|
211
|
+
sx: {
|
|
212
|
+
color: 'text.primary'
|
|
213
|
+
},
|
|
206
214
|
children: intl$1.formatMessage({
|
|
207
215
|
id: 'materialQuiz.hint'
|
|
208
216
|
})
|
|
@@ -4,10 +4,9 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
4
4
|
import React, { useState } from 'react';
|
|
5
5
|
import { useMeasure, useDebounce } from 'react-use';
|
|
6
6
|
import { base } from '@elice/design-tokens';
|
|
7
|
+
import { createEliceTheme, ThemeProvider } from '@elice/eds-material';
|
|
7
8
|
import { IntlComponentBuilder, RawEliceIntlProvider } from '@elice/intl';
|
|
8
|
-
import { createEliceTheme } from '@elice/mui-system';
|
|
9
9
|
import { enums } from '@elice/types';
|
|
10
|
-
import { ThemeProvider } from '@mui/material';
|
|
11
10
|
import CourseApiContextProvider from './context/CourseApiContext.js';
|
|
12
11
|
import { MaterialQuizProvider, useMaterialQuizState, useMaterialQuizDispatch } from './context/MaterialQuizContext.js';
|
|
13
12
|
import MaterialQuizInfo from './MaterialQuizInfo.js';
|
|
@@ -4,10 +4,10 @@ import React from 'react';
|
|
|
4
4
|
import { useMount } from 'react-use';
|
|
5
5
|
import { getOrgMaterialQuizResponseReset, getOrgMaterialQuizResponseGet, postOrgMaterialQuizResponseAdd, getOrgMaterialQuizResponseList } from '@elice/api-client';
|
|
6
6
|
import { base } from '@elice/design-tokens';
|
|
7
|
+
import { useTheme, Stack, FormLabel } from '@elice/eds-material';
|
|
7
8
|
import { FileUpload } from '@elice/file-client';
|
|
8
9
|
import { useRawEliceIntl } from '@elice/intl';
|
|
9
10
|
import { enums } from '@elice/types';
|
|
10
|
-
import { useTheme, Stack, FormLabel } from '@mui/material';
|
|
11
11
|
import { useQueryClient, useQuery } from '@tanstack/react-query';
|
|
12
12
|
import { checkUserLectureTestEnded, getQuizResult } from '../../helpers/index.js';
|
|
13
13
|
import FallbackLoading from '../shared/FallbackLoading.js';
|
|
@@ -362,8 +362,10 @@ var MaterialQuizImage = function MaterialQuizImage(_ref) {
|
|
|
362
362
|
onNext: onNext,
|
|
363
363
|
onHint: onHint,
|
|
364
364
|
children: jsxs(Stack, {
|
|
365
|
-
|
|
366
|
-
|
|
365
|
+
sx: {
|
|
366
|
+
height: '100%',
|
|
367
|
+
gap: '1rem'
|
|
368
|
+
},
|
|
367
369
|
children: [hasInlinePassage && jsx(MaterialQuizInfo, {
|
|
368
370
|
renderWithBox: false
|
|
369
371
|
}), renderContent(), jsx(MaterialQuizAnswerExplanation, {})]
|
|
@@ -3,10 +3,10 @@ import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useRef, useEffect } from 'react';
|
|
4
4
|
import { useMeasure } from 'react-use';
|
|
5
5
|
import { Vspace, Shimmer, IconButton } from '@elice/blocks';
|
|
6
|
+
import { styled as styled$1, Modal, Box } from '@elice/eds-material';
|
|
6
7
|
import { eilMathsignMultiplyBasic } from '@elice/icons';
|
|
7
8
|
import { MarkdownSSR } from '@elice/markdown';
|
|
8
9
|
import { EliceWysiwygEditorTheme } from '@elice/wysiwyg';
|
|
9
|
-
import { styled as styled$1, Modal, Box } from '@mui/material';
|
|
10
10
|
import styled from 'styled-components';
|
|
11
11
|
import QuestionBox from '../shared/QuestionBox.js';
|
|
12
12
|
import { mergeRefs } from '../shared/utils/mergeRefs.js';
|
|
@@ -153,13 +153,13 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
|
|
|
153
153
|
alignItems: 'center'
|
|
154
154
|
},
|
|
155
155
|
children: jsxs(Box, {
|
|
156
|
-
width: "70%",
|
|
157
|
-
height: "70%",
|
|
158
|
-
display: "flex",
|
|
159
|
-
alignItems: "center",
|
|
160
|
-
justifyContent: "center",
|
|
161
|
-
position: "relative",
|
|
162
156
|
sx: {
|
|
157
|
+
width: '70%',
|
|
158
|
+
height: '70%',
|
|
159
|
+
display: 'flex',
|
|
160
|
+
alignItems: 'center',
|
|
161
|
+
justifyContent: 'center',
|
|
162
|
+
position: 'relative',
|
|
163
163
|
outline: 'none'
|
|
164
164
|
},
|
|
165
165
|
children: [jsx("img", {
|
|
@@ -3,9 +3,9 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd, getOrgMaterialQuizResponseReset } from '@elice/api-client';
|
|
5
5
|
import { base } from '@elice/design-tokens';
|
|
6
|
+
import { useTheme, Stack } from '@elice/eds-material';
|
|
6
7
|
import { useRawEliceIntl } from '@elice/intl';
|
|
7
8
|
import { enums } from '@elice/types';
|
|
8
|
-
import { useTheme, Stack } from '@mui/material';
|
|
9
9
|
import { checkUserLectureTestEnded, shouldResetOptions, getQuizSelectMultipleOptionResultStatus, getOptionStatus, getQuizResult } from '../../helpers/index.js';
|
|
10
10
|
import QuestionBox from '../shared/QuestionBox.js';
|
|
11
11
|
import StyledMarkdown from '../shared/StyledMarkdown.js';
|
|
@@ -303,8 +303,10 @@ var MaterialQuizSelectMultiple = function MaterialQuizSelectMultiple(_ref) {
|
|
|
303
303
|
onNext: onNext,
|
|
304
304
|
onHint: onHint,
|
|
305
305
|
children: jsxs(Stack, {
|
|
306
|
-
|
|
307
|
-
|
|
306
|
+
sx: {
|
|
307
|
+
height: '100%',
|
|
308
|
+
gap: '1rem'
|
|
309
|
+
},
|
|
308
310
|
children: [hasInlinePassage && jsx("div", {
|
|
309
311
|
id: MATERIAL_QUIZ_PASSIVE_ID,
|
|
310
312
|
ref: questionRef,
|
|
@@ -7,10 +7,10 @@ import { restrictToFirstScrollableAncestor } from '@dnd-kit/modifiers';
|
|
|
7
7
|
import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd, getOrgMaterialQuizResponseReset } from '@elice/api-client';
|
|
8
8
|
import { Icon, Flex, Text } from '@elice/blocks';
|
|
9
9
|
import { base } from '@elice/design-tokens';
|
|
10
|
+
import { useTheme, Stack } from '@elice/eds-material';
|
|
10
11
|
import { eilSortItem } from '@elice/icons';
|
|
11
12
|
import { useRawEliceIntl } from '@elice/intl';
|
|
12
13
|
import { enums } from '@elice/types';
|
|
13
|
-
import { useTheme, Stack } from '@mui/material';
|
|
14
14
|
import { checkUserLectureTestEnded, getQuizSelectMultipleOrderOptionResultStatus, getQuizResultStatus, QuizResultStatus, getQuizResult } from '../../helpers/index.js';
|
|
15
15
|
import EbDroppable from '../eb-sortable/EbDroppable.js';
|
|
16
16
|
import QuestionBox from '../shared/QuestionBox.js';
|
|
@@ -662,9 +662,9 @@ var MaterialQuizSelectMultipleOrder = function MaterialQuizSelectMultipleOrder(_
|
|
|
662
662
|
onHint: onHint,
|
|
663
663
|
children: jsxs(Stack, {
|
|
664
664
|
sx: {
|
|
665
|
+
gap: '1rem',
|
|
665
666
|
flex: 1
|
|
666
667
|
},
|
|
667
|
-
gap: "1rem",
|
|
668
668
|
children: [hasInlinePassage && jsx("div", {
|
|
669
669
|
id: MATERIAL_QUIZ_PASSIVE_ID,
|
|
670
670
|
ref: questionRef,
|
|
@@ -3,9 +3,9 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd, getOrgMaterialQuizResponseReset } from '@elice/api-client';
|
|
5
5
|
import { base } from '@elice/design-tokens';
|
|
6
|
+
import { useTheme, Stack } from '@elice/eds-material';
|
|
6
7
|
import { useRawEliceIntl } from '@elice/intl';
|
|
7
8
|
import { enums } from '@elice/types';
|
|
8
|
-
import { useTheme, Stack } from '@mui/material';
|
|
9
9
|
import { checkUserLectureTestEnded, getOptionStatus, getQuizResult } from '../../helpers/index.js';
|
|
10
10
|
import QuestionBox from '../shared/QuestionBox.js';
|
|
11
11
|
import StyledMarkdown from '../shared/StyledMarkdown.js';
|
|
@@ -292,8 +292,10 @@ var MaterialQuizSelectOne = function MaterialQuizSelectOne(_ref) {
|
|
|
292
292
|
onNext: onNext,
|
|
293
293
|
onHint: onHint,
|
|
294
294
|
children: jsxs(Stack, {
|
|
295
|
-
|
|
296
|
-
|
|
295
|
+
sx: {
|
|
296
|
+
height: '100%',
|
|
297
|
+
gap: '1rem'
|
|
298
|
+
},
|
|
297
299
|
children: [hasInlinePassage && jsx("div", {
|
|
298
300
|
id: MATERIAL_QUIZ_PASSIVE_ID,
|
|
299
301
|
ref: questionRef,
|
|
@@ -5,9 +5,9 @@ import React from 'react';
|
|
|
5
5
|
import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd, getOrgMaterialQuizResponseReset } from '@elice/api-client';
|
|
6
6
|
import { Flex } from '@elice/blocks';
|
|
7
7
|
import { base } from '@elice/design-tokens';
|
|
8
|
+
import { useTheme, Stack } from '@elice/eds-material';
|
|
8
9
|
import { useRawEliceIntl } from '@elice/intl';
|
|
9
10
|
import { enums } from '@elice/types';
|
|
10
|
-
import { useTheme, Stack } from '@mui/material';
|
|
11
11
|
import { checkUserLectureTestEnded, getQuizResult } from '../../helpers/index.js';
|
|
12
12
|
import QuestionBox from '../shared/QuestionBox.js';
|
|
13
13
|
import { useMaterialQuizState, useMaterialQuizDispatch } from './context/MaterialQuizContext.js';
|
|
@@ -297,8 +297,10 @@ var MaterialQuizText = function MaterialQuizText(_ref2) {
|
|
|
297
297
|
onNext: onNext,
|
|
298
298
|
onHint: onHint,
|
|
299
299
|
children: jsxs(Stack, {
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
sx: {
|
|
301
|
+
height: '100%',
|
|
302
|
+
gap: '1rem'
|
|
303
|
+
},
|
|
302
304
|
children: [hasInlinePassage && jsx("div", {
|
|
303
305
|
id: MATERIAL_QUIZ_PASSIVE_ID,
|
|
304
306
|
ref: questionRef,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import React from 'react';
|
|
4
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
5
|
+
import { Typography } from '@elice/eds-material';
|
|
4
6
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
6
7
|
import { faCircleCheck, faCircleXmark } from '@fortawesome/pro-solid-svg-icons';
|
|
7
|
-
import { Typography } from '@mui/material';
|
|
8
8
|
import { getQuizResultStatus, checkUserLectureTestEnded, QuizResultStatus } from '../../helpers/index.js';
|
|
9
9
|
import { useMaterialQuizState } from './context/MaterialQuizContext.js';
|
|
10
10
|
|
|
@@ -42,10 +42,12 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
42
42
|
case QuizResultStatus.Correct:
|
|
43
43
|
return jsxs(StyledQuizResultTypography, {
|
|
44
44
|
variant: "body2",
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
sx: {
|
|
46
|
+
color: function color(theme) {
|
|
47
|
+
return theme.palette.success.main;
|
|
48
|
+
}
|
|
47
49
|
},
|
|
48
|
-
children: [jsx(
|
|
50
|
+
children: [jsx(FaIcon, {
|
|
49
51
|
icon: faCircleCheck
|
|
50
52
|
}), intl.formatMessage({
|
|
51
53
|
id: 'materialQuiz.resultStatus.correct'
|
|
@@ -57,10 +59,12 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
57
59
|
}
|
|
58
60
|
return jsxs(StyledQuizResultTypography, {
|
|
59
61
|
variant: "body2",
|
|
60
|
-
|
|
61
|
-
|
|
62
|
+
sx: {
|
|
63
|
+
color: function color(theme) {
|
|
64
|
+
return theme.palette.error.main;
|
|
65
|
+
}
|
|
62
66
|
},
|
|
63
|
-
children: [jsx(
|
|
67
|
+
children: [jsx(FaIcon, {
|
|
64
68
|
icon: faCircleXmark
|
|
65
69
|
}), intl.formatMessage({
|
|
66
70
|
id: 'materialQuiz.resultStatus.wrong'
|
|
@@ -69,10 +73,12 @@ var QuizResultDescription = function QuizResultDescription(_ref) {
|
|
|
69
73
|
case QuizResultStatus.Submitted:
|
|
70
74
|
return jsxs(StyledQuizResultTypography, {
|
|
71
75
|
variant: "body2",
|
|
72
|
-
|
|
73
|
-
|
|
76
|
+
sx: {
|
|
77
|
+
color: function color(theme) {
|
|
78
|
+
return theme.palette.primary.main;
|
|
79
|
+
}
|
|
74
80
|
},
|
|
75
|
-
children: [jsx(
|
|
81
|
+
children: [jsx(FaIcon, {
|
|
76
82
|
icon: faCircleCheck
|
|
77
83
|
}), intl.formatMessage({
|
|
78
84
|
id: 'materialQuiz.resultStatus.submitted'
|
|
@@ -4,9 +4,9 @@ import React from 'react';
|
|
|
4
4
|
import { getOrgMaterialQuizResponseGet, getOrgMaterialQuizResponseList, postOrgMaterialQuizResponseAdd, getOrgMaterialQuizResponseReset } from '@elice/api-client';
|
|
5
5
|
import { Flex } from '@elice/blocks';
|
|
6
6
|
import { base } from '@elice/design-tokens';
|
|
7
|
+
import { useTheme } from '@elice/eds-material';
|
|
7
8
|
import { useRawEliceIntl } from '@elice/intl';
|
|
8
9
|
import { enums } from '@elice/types';
|
|
9
|
-
import { useTheme } from '@mui/material';
|
|
10
10
|
import cloneDeep from 'lodash-es/cloneDeep';
|
|
11
11
|
import flattenDeep from 'lodash-es/flattenDeep';
|
|
12
12
|
import { checkUserLectureTestEnded, getQuizResult } from '../../../helpers/index.js';
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import _styled from '@emotion/styled/base';
|
|
2
2
|
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { base } from '@elice/design-tokens';
|
|
4
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
5
|
+
import { Typography, colors, IconButton } from '@elice/eds-material';
|
|
4
6
|
import { MarkdownSSR } from '@elice/markdown';
|
|
5
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
6
|
-
import { colors } from '@elice/mui-system';
|
|
7
7
|
import { faXmark } from '@fortawesome/pro-solid-svg-icons';
|
|
8
|
-
import { Typography, IconButton } from '@mui/material';
|
|
9
8
|
import { addAltTextToImage } from '../../../helpers/index.js';
|
|
10
9
|
import EbDraggable from '../../eb-sortable/EbDraggable.js';
|
|
11
10
|
import { useMaterialQuizState } from '../context/MaterialQuizContext.js';
|
|
@@ -104,7 +103,7 @@ var MaterialQuizGroupOptionItem = function MaterialQuizGroupOptionItem(_ref1) {
|
|
|
104
103
|
e.stopPropagation();
|
|
105
104
|
onClose();
|
|
106
105
|
},
|
|
107
|
-
children: jsx(
|
|
106
|
+
children: jsx(FaIcon, {
|
|
108
107
|
icon: faXmark,
|
|
109
108
|
fontSize: "inherit"
|
|
110
109
|
})
|
|
@@ -133,12 +132,12 @@ var MaterialQuizGroupOptionItem = function MaterialQuizGroupOptionItem(_ref1) {
|
|
|
133
132
|
isOptionContent: isOptionContent,
|
|
134
133
|
children: jsx(Typography, {
|
|
135
134
|
variant: vertical ? 'body2' : 'body1',
|
|
136
|
-
textAlign: "center",
|
|
137
|
-
fontWeight: "bold",
|
|
138
|
-
color: function color(theme) {
|
|
139
|
-
return status === 'correct' ? 'success.main' : status === 'wrong' ? 'error.main' : theme.palette.common.black;
|
|
140
|
-
},
|
|
141
135
|
sx: {
|
|
136
|
+
color: function color(theme) {
|
|
137
|
+
return status === 'correct' ? 'success.main' : status === 'wrong' ? 'error.main' : theme.palette.common.black;
|
|
138
|
+
},
|
|
139
|
+
textAlign: 'center',
|
|
140
|
+
fontWeight: 'bold',
|
|
142
141
|
wordBreak: 'break-all'
|
|
143
142
|
},
|
|
144
143
|
children: option.options.title
|
|
@@ -5,13 +5,13 @@ import React from 'react';
|
|
|
5
5
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
6
6
|
import { Transition } from 'react-transition-group';
|
|
7
7
|
import { FormInputVerticalLayout, Input, Label, StatusText, Text, Checkbox, Vspace, Flex } from '@elice/blocks';
|
|
8
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
9
|
+
import { Stack, Tooltip, TextField, MenuItem, Alert, AlertTitle, Box, FormControlLabel, Switch, Checkbox as Checkbox$1 } from '@elice/eds-material';
|
|
8
10
|
import { useRawEliceIntl } from '@elice/intl';
|
|
9
11
|
import { MarkdownTypography } from '@elice/markdown';
|
|
10
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
11
12
|
import { enums } from '@elice/types';
|
|
12
13
|
import { QuizOptionType } from '@elice/types/es/enums';
|
|
13
14
|
import { faInfoCircle } from '@fortawesome/pro-regular-svg-icons';
|
|
14
|
-
import { Stack, Tooltip, TextField, MenuItem, Alert, AlertTitle, Box, FormControlLabel, Switch, Checkbox as Checkbox$1 } from '@mui/material';
|
|
15
15
|
import flattenDeep from 'lodash-es/flattenDeep';
|
|
16
16
|
import { MarkdownEditor } from '../markdown-editor/index.js';
|
|
17
17
|
import OptionText from './options/option-text/OptionText.js';
|
|
@@ -304,8 +304,10 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
304
304
|
}
|
|
305
305
|
return jsx(Tooltip, {
|
|
306
306
|
title: jsx(Stack, {
|
|
307
|
-
|
|
308
|
-
|
|
307
|
+
sx: {
|
|
308
|
+
gap: '0.5rem',
|
|
309
|
+
textAlign: 'start'
|
|
310
|
+
},
|
|
309
311
|
children: intl.formatMessage({
|
|
310
312
|
id: 'content.title.markdownInfo.tooltip'
|
|
311
313
|
}, {
|
|
@@ -328,7 +330,7 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
328
330
|
}
|
|
329
331
|
})
|
|
330
332
|
}),
|
|
331
|
-
children: jsx(
|
|
333
|
+
children: jsx(FaIcon, {
|
|
332
334
|
fontSize: "small",
|
|
333
335
|
color: "action",
|
|
334
336
|
icon: faInfoCircle
|
|
@@ -342,8 +344,10 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
342
344
|
return jsx(FormInputVerticalLayout, {
|
|
343
345
|
label: jsxs(Stack, {
|
|
344
346
|
direction: "row",
|
|
345
|
-
|
|
346
|
-
|
|
347
|
+
sx: {
|
|
348
|
+
gap: '0.25rem',
|
|
349
|
+
alignItems: 'center'
|
|
350
|
+
},
|
|
347
351
|
children: [jsx(Label, {
|
|
348
352
|
required: true,
|
|
349
353
|
size: "small",
|
|
@@ -505,8 +509,10 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
505
509
|
placement: "top-end",
|
|
506
510
|
children: jsxs(Stack, {
|
|
507
511
|
direction: "row",
|
|
508
|
-
|
|
509
|
-
|
|
512
|
+
sx: {
|
|
513
|
+
justifyContent: 'space-between',
|
|
514
|
+
marginBottom: '0.5rem'
|
|
515
|
+
},
|
|
510
516
|
children: [jsxs(TextField, Object.assign({
|
|
511
517
|
select: true,
|
|
512
518
|
disabled: disabled
|
|
@@ -571,7 +577,9 @@ var MaterialQuizEditContent = function MaterialQuizEditContent() {
|
|
|
571
577
|
"in": watchedOptionType === enums.QuizOptionType.SelectMultipleOrder || watchedOptionType === enums.QuizOptionType.Group,
|
|
572
578
|
timeout: 0,
|
|
573
579
|
children: jsx(Box, {
|
|
574
|
-
|
|
580
|
+
sx: {
|
|
581
|
+
marginBottom: '0.5rem'
|
|
582
|
+
},
|
|
575
583
|
children: jsx(StatusText, {
|
|
576
584
|
preWrap: true,
|
|
577
585
|
role: "description",
|
|
@@ -4,8 +4,8 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
4
4
|
import React from 'react';
|
|
5
5
|
import { Textarea, Text, SortableListItem } from '@elice/blocks';
|
|
6
6
|
import { base } from '@elice/design-tokens';
|
|
7
|
+
import { Box } from '@elice/eds-material';
|
|
7
8
|
import { css } from '@emotion/react';
|
|
8
|
-
import { Box } from '@mui/material';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
|
|
11
11
|
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
@@ -67,7 +67,9 @@ var OptionEditor = React.forwardRef(function (_a, ref) {
|
|
|
67
67
|
disabled: readOnly,
|
|
68
68
|
children: jsxs(Box, {
|
|
69
69
|
className: classNames(PREFIX, props.className),
|
|
70
|
-
|
|
70
|
+
sx: {
|
|
71
|
+
flex: 1
|
|
72
|
+
},
|
|
71
73
|
children: [jsxs(StyledTextareaWrap, {
|
|
72
74
|
className: "".concat(PREFIX, "-textarea-wrapper"),
|
|
73
75
|
children: [prefix ? jsx("div", {
|
|
@@ -92,9 +94,11 @@ var OptionEditor = React.forwardRef(function (_a, ref) {
|
|
|
92
94
|
children: suffix
|
|
93
95
|
}) : null]
|
|
94
96
|
}), invalid ? jsx(Box, {
|
|
95
|
-
padding: "0 0.75rem",
|
|
96
|
-
marginTop: "0.25rem",
|
|
97
97
|
className: "".concat(PREFIX, "-helperText-wrap"),
|
|
98
|
+
sx: {
|
|
99
|
+
padding: '0 0.75rem',
|
|
100
|
+
marginTop: '0.25rem'
|
|
101
|
+
},
|
|
98
102
|
children: jsx(Text, {
|
|
99
103
|
role: "red",
|
|
100
104
|
size: "tiny",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useFormContext, Controller } from 'react-hook-form';
|
|
3
|
+
import { FormControlLabel, Checkbox } from '@elice/eds-material';
|
|
3
4
|
import { useRawEliceIntl } from '@elice/intl';
|
|
4
|
-
import { FormControlLabel, Checkbox } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
//
|
|
7
7
|
//
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
2
|
import { useFormContext, useWatch, Controller } from 'react-hook-form';
|
|
3
|
+
import { TextField } from '@elice/eds-material';
|
|
3
4
|
import { useRawEliceIntl } from '@elice/intl';
|
|
4
|
-
import { TextField } from '@mui/material';
|
|
5
5
|
|
|
6
6
|
//
|
|
7
7
|
//
|
|
@@ -62,8 +62,8 @@ var AnswerInfoDefaultController = function AnswerInfoDefaultController(_ref) {
|
|
|
62
62
|
var _a, _b, _c;
|
|
63
63
|
return jsx(TextField, Object.assign({}, field, slotProps === null || slotProps === void 0 ? void 0 : slotProps.TextField, {
|
|
64
64
|
fullWidth: true,
|
|
65
|
-
|
|
66
|
-
|
|
65
|
+
slotProps: {
|
|
66
|
+
htmlInput: {
|
|
67
67
|
min: MIN_TEXT_LENGTH,
|
|
68
68
|
max: MAX_TEXT_LENGTH
|
|
69
69
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { Box } from '@
|
|
2
|
+
import { Box } from '@elice/eds-material';
|
|
3
3
|
import img from '../../../../assets/imgs/ai_helpy.png.js';
|
|
4
4
|
|
|
5
5
|
// import noBrandLogoImage from 'src/assets/imgs/helpy-logo-no-brand.png';
|
|
@@ -11,9 +11,9 @@ var HelpyLogo = function HelpyLogo() {
|
|
|
11
11
|
alt: "help logo",
|
|
12
12
|
src: img,
|
|
13
13
|
component: "img",
|
|
14
|
-
width: "2.5rem",
|
|
15
|
-
height: "2.5rem",
|
|
16
14
|
sx: {
|
|
15
|
+
width: '2.5rem',
|
|
16
|
+
height: '2.5rem',
|
|
17
17
|
border: function border(theme) {
|
|
18
18
|
return "1px solid ".concat(theme.palette.surface.border);
|
|
19
19
|
},
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
3
3
|
import { useFormContext, useWatch } from 'react-hook-form';
|
|
4
|
+
import { styled, Tab, Divider } from '@elice/eds-material';
|
|
4
5
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
6
|
import { enums } from '@elice/types';
|
|
6
7
|
import { TabPanel, TabContext, TabList } from '@mui/lab';
|
|
7
|
-
import { styled, Tab, Divider } from '@mui/material';
|
|
8
8
|
import OptionTextAdvanceModeController from './OptionTextAdvanceModeController.js';
|
|
9
9
|
import OptionTextNormalModeController from './OptionTextNormalModeController.js';
|
|
10
10
|
|
package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorAction.js
CHANGED
|
@@ -2,10 +2,10 @@ import { slicedToArray as _slicedToArray } from '../../../../_virtual/_rollupPlu
|
|
|
2
2
|
import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import { useFormContext, useWatch } from 'react-hook-form';
|
|
5
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
6
|
+
import { Button } from '@elice/eds-material';
|
|
5
7
|
import { useRawEliceIntl } from '@elice/intl';
|
|
6
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
7
8
|
import { faMagicWandSparkles } from '@fortawesome/pro-solid-svg-icons';
|
|
8
|
-
import { Button } from '@mui/material';
|
|
9
9
|
import OptionTextAdvanceAiGeneratorFormDialog from './OptionTextAdvanceAiGeneratorFormDialog.js';
|
|
10
10
|
|
|
11
11
|
//
|
|
@@ -34,7 +34,7 @@ var OptionTextAdvanceAiGeneratorAction = function OptionTextAdvanceAiGeneratorAc
|
|
|
34
34
|
children: [jsx(Button, {
|
|
35
35
|
disabled: !watchedIsAutoGrade,
|
|
36
36
|
variant: "outlined",
|
|
37
|
-
startIcon: jsx(
|
|
37
|
+
startIcon: jsx(FaIcon, {
|
|
38
38
|
icon: faMagicWandSparkles
|
|
39
39
|
}),
|
|
40
40
|
onClick: function onClick() {
|
|
@@ -3,11 +3,10 @@ import { jsxs, jsx } from 'react/jsx-runtime';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useFormContext } from 'react-hook-form';
|
|
5
5
|
import { getGlobalTaskGet, postOrgMlapiRequest } from '@elice/api-client';
|
|
6
|
+
import { FaIcon } from '@elice/eds-kit';
|
|
7
|
+
import { Dialog, DialogTitle, DialogContent, DialogActions, Stack, Button, Alert, TextField, Box } from '@elice/eds-material';
|
|
6
8
|
import { useRawEliceIntl } from '@elice/intl';
|
|
7
|
-
import { EliceIcon } from '@elice/mui-elements';
|
|
8
9
|
import { faWandMagicSparkles } from '@fortawesome/pro-solid-svg-icons';
|
|
9
|
-
import { LoadingButton } from '@mui/lab';
|
|
10
|
-
import { Dialog, DialogTitle, DialogContent, DialogActions, Stack, Button, Alert, TextField, Box } from '@mui/material';
|
|
11
10
|
import { useMutation } from '@tanstack/react-query';
|
|
12
11
|
import { interval, from } from 'rxjs';
|
|
13
12
|
import { take, mergeMap, first } from 'rxjs/operators';
|
|
@@ -115,7 +114,9 @@ var OptionTextAdvanceAiGeneratorFormDialog = function OptionTextAdvanceAiGenerat
|
|
|
115
114
|
*/
|
|
116
115
|
var renderAiGeneratorPromptController = function renderAiGeneratorPromptController() {
|
|
117
116
|
return jsxs(Stack, {
|
|
118
|
-
|
|
117
|
+
sx: {
|
|
118
|
+
gap: '0.5rem'
|
|
119
|
+
},
|
|
119
120
|
children: [jsx(TextField, {
|
|
120
121
|
multiline: true,
|
|
121
122
|
fullWidth: true,
|
|
@@ -131,13 +132,15 @@ var OptionTextAdvanceAiGeneratorFormDialog = function OptionTextAdvanceAiGenerat
|
|
|
131
132
|
return setPromptText(e.target.value);
|
|
132
133
|
}
|
|
133
134
|
}), jsx(Box, {
|
|
134
|
-
|
|
135
|
-
|
|
135
|
+
sx: {
|
|
136
|
+
alignSelf: 'flex-end'
|
|
137
|
+
},
|
|
138
|
+
children: jsx(Button, {
|
|
136
139
|
color: "primary",
|
|
137
140
|
disabled: !promptText,
|
|
138
141
|
variant: "outlined",
|
|
139
142
|
loading: aibotMutation.isLoading,
|
|
140
|
-
startIcon: jsx(
|
|
143
|
+
startIcon: jsx(FaIcon, {
|
|
141
144
|
icon: faWandMagicSparkles
|
|
142
145
|
}),
|
|
143
146
|
onClick: function onClick() {
|
|
@@ -178,7 +181,9 @@ var OptionTextAdvanceAiGeneratorFormDialog = function OptionTextAdvanceAiGenerat
|
|
|
178
181
|
*/
|
|
179
182
|
var renderContent = function renderContent() {
|
|
180
183
|
return jsxs(Stack, {
|
|
181
|
-
|
|
184
|
+
sx: {
|
|
185
|
+
gap: '1.5rem'
|
|
186
|
+
},
|
|
182
187
|
children: [renderAiGeneratorRuleNotice(), renderAiGeneratorPromptController(), renderAiGeneratorResult()]
|
|
183
188
|
});
|
|
184
189
|
};
|