@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.
Files changed (55) hide show
  1. package/cjs/components/material-quiz/MaterialQuiz.js +3 -4
  2. package/cjs/components/material-quiz/MaterialQuizImage.js +9 -7
  3. package/cjs/components/material-quiz/MaterialQuizInfo.js +10 -10
  4. package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +7 -5
  5. package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +4 -4
  6. package/cjs/components/material-quiz/MaterialQuizSelectOne.js +7 -5
  7. package/cjs/components/material-quiz/MaterialQuizText.js +7 -5
  8. package/cjs/components/material-quiz/QuizResultDescription.js +18 -12
  9. package/cjs/components/material-quiz/constants/color.js +6 -6
  10. package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +2 -2
  11. package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +12 -13
  12. package/cjs/components/material-quiz-edit/MaterialQuizEditContent.js +38 -30
  13. package/cjs/components/material-quiz-edit/options/OptionEditor.js +10 -6
  14. package/cjs/components/material-quiz-edit/options/OptionImage.js +3 -3
  15. package/cjs/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.d.ts +1 -1
  16. package/cjs/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.js +4 -4
  17. package/cjs/components/material-quiz-edit/options/option-text/HelpyLogo.js +4 -4
  18. package/cjs/components/material-quiz-edit/options/option-text/OptionText.js +5 -5
  19. package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorAction.js +4 -4
  20. package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorFormDialog.js +23 -18
  21. package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorResult.js +32 -21
  22. package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceAnswerInfoDefaultController.js +13 -9
  23. package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceMethodNotice.js +2 -2
  24. package/cjs/components/material-quiz-edit/options/option-text/OptionTextAdvanceModeController.js +9 -5
  25. package/cjs/components/shared/FallbackLoading.js +9 -7
  26. package/cjs/components/shared/NoData.js +26 -18
  27. package/cjs/components/shared/QuestionBox.js +26 -18
  28. package/es/components/material-quiz/MaterialQuiz.js +1 -2
  29. package/es/components/material-quiz/MaterialQuizImage.js +5 -3
  30. package/es/components/material-quiz/MaterialQuizInfo.js +7 -7
  31. package/es/components/material-quiz/MaterialQuizSelectMultiple.js +5 -3
  32. package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +2 -2
  33. package/es/components/material-quiz/MaterialQuizSelectOne.js +5 -3
  34. package/es/components/material-quiz/MaterialQuizText.js +5 -3
  35. package/es/components/material-quiz/QuizResultDescription.js +17 -11
  36. package/es/components/material-quiz/constants/color.js +1 -1
  37. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +1 -1
  38. package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +8 -9
  39. package/es/components/material-quiz-edit/MaterialQuizEditContent.js +18 -10
  40. package/es/components/material-quiz-edit/options/OptionEditor.js +8 -4
  41. package/es/components/material-quiz-edit/options/OptionImage.js +1 -1
  42. package/es/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.d.ts +1 -1
  43. package/es/components/material-quiz-edit/options/option-text/AnswerInfoDefaultController.js +3 -3
  44. package/es/components/material-quiz-edit/options/option-text/HelpyLogo.js +3 -3
  45. package/es/components/material-quiz-edit/options/option-text/OptionText.js +1 -1
  46. package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorAction.js +3 -3
  47. package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorFormDialog.js +13 -8
  48. package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAiGeneratorResult.js +24 -13
  49. package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceAnswerInfoDefaultController.js +11 -7
  50. package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceMethodNotice.js +1 -1
  51. package/es/components/material-quiz-edit/options/option-text/OptionTextAdvanceModeController.js +7 -3
  52. package/es/components/shared/FallbackLoading.js +7 -5
  53. package/es/components/shared/NoData.js +21 -13
  54. package/es/components/shared/QuestionBox.js +19 -11
  55. package/package.json +15 -21
@@ -1,10 +1,9 @@
1
1
  import { taggedTemplateLiteral as _taggedTemplateLiteral } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { FaIcon } from '@elice/eds-kit';
4
+ import { styled, Paper, colors, Box, Typography, Stack, TextField } from '@elice/eds-material';
3
5
  import { useRawEliceIntl } from '@elice/intl';
4
- import { EliceIcon } from '@elice/mui-elements';
5
- import { colors } from '@elice/mui-system';
6
6
  import { faMagicWandSparkles } from '@fortawesome/pro-solid-svg-icons';
7
- import { styled, Paper, Box, Typography, Stack, TextField } from '@mui/material';
8
7
  import HelpyLogo from './HelpyLogo.js';
9
8
 
10
9
  var _templateObject, _templateObject2, _templateObject3;
@@ -37,23 +36,29 @@ var OptionTextAdvanceAiGeneratorResult = function OptionTextAdvanceAiGeneratorRe
37
36
  var renderResultTitle = function renderResultTitle() {
38
37
  return jsxs(Stack, {
39
38
  direction: "row",
40
- gap: "0.25rem",
41
- alignItems: "center",
42
- children: [jsx(EliceIcon, {
39
+ sx: {
40
+ gap: '0.25rem',
41
+ alignItems: 'center'
42
+ },
43
+ children: [jsx(FaIcon, {
43
44
  color: "primary",
44
45
  fontSize: "small",
45
46
  icon: faMagicWandSparkles
46
47
  }), jsx(Typography, {
47
48
  variant: "subtitle2",
48
- color: "text.primary",
49
+ sx: {
50
+ color: 'text.primary'
51
+ },
49
52
  children: intl.formatMessage({
50
53
  id: 'material_quiz_edit.option_text.advance_ai_generator.result_title'
51
54
  }, {
52
55
  span: function span(text) {
53
56
  return jsx(Typography, {
54
57
  variant: "inherit",
55
- color: "primary.main",
56
58
  component: "span",
59
+ sx: {
60
+ color: 'primary.main'
61
+ },
57
62
  children: text
58
63
  });
59
64
  }
@@ -70,8 +75,10 @@ var OptionTextAdvanceAiGeneratorResult = function OptionTextAdvanceAiGeneratorRe
70
75
  label: intl.formatMessage({
71
76
  id: 'component.material_quiz.advance_ai_generator_result.regex.label'
72
77
  }),
73
- InputProps: {
74
- readOnly: true
78
+ slotProps: {
79
+ input: {
80
+ readOnly: true
81
+ }
75
82
  },
76
83
  value: pattern
77
84
  });
@@ -83,8 +90,10 @@ var OptionTextAdvanceAiGeneratorResult = function OptionTextAdvanceAiGeneratorRe
83
90
  return jsx(StyledExplanationWrapper, {
84
91
  children: jsx(StyledExplantionBlock, {
85
92
  variant: "body1",
86
- color: "text.primary",
87
- fontWeight: "500",
93
+ color: "textPrimary",
94
+ sx: {
95
+ fontWeight: 500
96
+ },
88
97
  children: explanation
89
98
  })
90
99
  });
@@ -94,7 +103,9 @@ var OptionTextAdvanceAiGeneratorResult = function OptionTextAdvanceAiGeneratorRe
94
103
  */
95
104
  var renderResult = function renderResult() {
96
105
  return jsxs(Stack, {
97
- gap: "0.75rem",
106
+ sx: {
107
+ gap: '0.75rem'
108
+ },
98
109
  children: [renderResultTitle(), renderResultRegex(), renderExplanation()]
99
110
  });
100
111
  };
@@ -3,8 +3,8 @@ import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useState } from 'react';
4
4
  import { useFormContext, useWatch } from 'react-hook-form';
5
5
  import { useDebounce } from 'react-use';
6
+ import { Stack, TextField } from '@elice/eds-material';
6
7
  import { useRawEliceIntl } from '@elice/intl';
7
- import { Stack, TextField } from '@mui/material';
8
8
  import AnswerInfoDefaultController from './AnswerInfoDefaultController.js';
9
9
  import { useMaterialQuizCourse } from '../../hooks/useMaterialQuizCourse.js';
10
10
  import { useMaterialQuizRegex } from '../../hooks/useMaterialQuizRegex.js';
@@ -59,7 +59,9 @@ var OptionTextAdvanceAnswerInfoDefaultController = function OptionTextAdvanceAns
59
59
  //
60
60
  //
61
61
  return jsxs(Stack, {
62
- gap: "1rem",
62
+ sx: {
63
+ gap: '1rem'
64
+ },
63
65
  children: [jsx(AnswerInfoDefaultController, {
64
66
  slotProps: {
65
67
  TextField: {
@@ -89,11 +91,13 @@ var OptionTextAdvanceAnswerInfoDefaultController = function OptionTextAdvanceAns
89
91
  helperText: isRegexShouldValidate ? intl.formatMessage({
90
92
  id: isRegexMatched ? 'common.correct_answer' : 'common.incorrect_answer'
91
93
  }) : '',
92
- FormHelperTextProps: {
93
- sx: {
94
- color: isRegexShouldValidate ? function (theme) {
95
- return theme.palette[isRegexMatched ? 'success' : 'error'].main;
96
- } : 'inherit'
94
+ slotProps: {
95
+ formHelperText: {
96
+ sx: {
97
+ color: isRegexShouldValidate ? function (theme) {
98
+ return theme.palette[isRegexMatched ? 'success' : 'error'].main;
99
+ } : 'inherit'
100
+ }
97
101
  }
98
102
  },
99
103
  onChange: function onChange(e) {
@@ -1,6 +1,6 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { Alert } from '@elice/eds-material';
2
3
  import { useRawEliceIntl } from '@elice/intl';
3
- import { Alert } from '@mui/material';
4
4
 
5
5
  //
6
6
  //
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Stack, Box } from '@mui/material';
2
+ import { Stack, Box } from '@elice/eds-material';
3
3
  import OptionTextAdvanceAiGeneratorAction from './OptionTextAdvanceAiGeneratorAction.js';
4
4
  import OptionTextAdvanceAnswerInfoDefaultController from './OptionTextAdvanceAnswerInfoDefaultController.js';
5
5
  import OptionTextAdvanceMethodNotice from './OptionTextAdvanceMethodNotice.js';
@@ -9,9 +9,13 @@ import OptionTextAdvanceMethodNotice from './OptionTextAdvanceMethodNotice.js';
9
9
  //
10
10
  var OptionTextAdvanceModeController = function OptionTextAdvanceModeController() {
11
11
  return jsxs(Stack, {
12
- gap: "1rem",
12
+ sx: {
13
+ gap: '1rem'
14
+ },
13
15
  children: [jsx(OptionTextAdvanceMethodNotice, {}), jsx(Box, {
14
- alignSelf: "flex-end",
16
+ sx: {
17
+ alignSelf: 'flex-end'
18
+ },
15
19
  children: jsx(OptionTextAdvanceAiGeneratorAction, {})
16
20
  }), jsx(OptionTextAdvanceAnswerInfoDefaultController, {})]
17
21
  });
@@ -1,5 +1,5 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import { Stack, CircularProgress } from '@mui/material';
2
+ import { Stack, CircularProgress } from '@elice/eds-material';
3
3
 
4
4
  //
5
5
  //
@@ -8,10 +8,12 @@ var FallbackLoading = function FallbackLoading(_ref) {
8
8
  var _ref$height = _ref.height,
9
9
  height = _ref$height === void 0 ? '18.75rem' : _ref$height;
10
10
  return jsx(Stack, {
11
- justifyContent: "center",
12
- alignItems: "center",
13
- gap: "1rem",
14
- height: height,
11
+ sx: {
12
+ justifyContent: 'center',
13
+ alignItems: 'center',
14
+ gap: '1rem',
15
+ height: height
16
+ },
15
17
  children: jsx(CircularProgress, {})
16
18
  });
17
19
  };
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import { Stack, Box, Typography } from '@mui/material';
2
+ import { Stack, Box, Typography } from '@elice/eds-material';
3
3
  import img from '../../assets/imgs/list_empty.png.js';
4
4
 
5
5
  //
@@ -26,8 +26,10 @@ var NoData = function NoData(_ref) {
26
26
  if (typeof title === 'string') {
27
27
  return jsx(Typography, {
28
28
  variant: "h6",
29
- color: "text.secondary",
30
- fontWeight: 800,
29
+ sx: {
30
+ color: 'text.secondary',
31
+ fontWeight: 800
32
+ },
31
33
  children: title
32
34
  });
33
35
  }
@@ -37,21 +39,27 @@ var NoData = function NoData(_ref) {
37
39
  //
38
40
  //
39
41
  return jsxs(Stack, {
40
- justifyContent: "center",
41
- alignItems: "center",
42
- gap: "1rem",
43
- height: height,
44
- padding: padding,
42
+ sx: {
43
+ justifyContent: 'center',
44
+ alignItems: 'center',
45
+ gap: '1rem',
46
+ height: height,
47
+ padding: padding
48
+ },
45
49
  children: [!hideImage ? jsx(Box, {
46
50
  component: "img",
47
51
  src: imgSrc !== null && imgSrc !== void 0 ? imgSrc : img,
48
52
  alt: "empty image",
49
- width: imgWidth
53
+ sx: {
54
+ width: imgWidth
55
+ }
50
56
  }) : null, jsx(Stack, {
51
- justifyContent: "center",
52
- alignItems: "center",
53
- gap: "0.25rem",
54
- textAlign: "center",
57
+ sx: {
58
+ justifyContent: 'center',
59
+ alignItems: 'center',
60
+ gap: '0.25rem',
61
+ textAlign: 'center'
62
+ },
55
63
  children: renderTitle()
56
64
  }), action ? jsx(Box, {
57
65
  children: action
@@ -6,10 +6,10 @@ import React, { useEffect } from 'react';
6
6
  import { useIntersection } from 'react-use';
7
7
  import { Button, Text, Box as Box$1 } from '@elice/blocks';
8
8
  import { base } from '@elice/design-tokens';
9
+ import { useTheme, Stack, Box, Typography, Button as Button$1, Avatar } from '@elice/eds-material';
9
10
  import { useRawEliceIntl } from '@elice/intl';
10
11
  import { MarkdownTypography } from '@elice/markdown';
11
12
  import { useHelpyLogo } from '@elice/material-shared-utils';
12
- import { useTheme, Stack, Box, Typography, Button as Button$1, Avatar } from '@mui/material';
13
13
  import animateScrollTo from 'animated-scroll-to';
14
14
  import { getQuizResultStatus, QuizResultStatus } from '../../helpers/index.js';
15
15
  import { useMaterialQuizState } from '../material-quiz/context/MaterialQuizContext.js';
@@ -148,15 +148,19 @@ var QuestionBox = function QuestionBox(_a) {
148
148
  vertical: vertical,
149
149
  ref: headerRef,
150
150
  children: jsxs(Stack, {
151
- width: "100%",
152
151
  direction: "row",
153
- justifyContent: "space-between",
154
- flexWrap: "wrap",
155
- alignItems: "center",
156
- gap: "1.25rem",
152
+ sx: {
153
+ width: '100%',
154
+ justifyContent: 'space-between',
155
+ flexWrap: 'wrap',
156
+ alignItems: 'center',
157
+ gap: '1.25rem'
158
+ },
157
159
  children: [jsxs(Box, {
158
- display: "flex",
159
- alignItems: "center",
160
+ sx: {
161
+ display: 'flex',
162
+ alignItems: 'center'
163
+ },
160
164
  children: [titlePrefix ? jsx(Text, {
161
165
  bold: true,
162
166
  size: "large",
@@ -166,12 +170,14 @@ var QuestionBox = function QuestionBox(_a) {
166
170
  },
167
171
  children: titlePrefix
168
172
  }) : null, ((_b = course === null || course === void 0 ? void 0 : course.preference) === null || _b === void 0 ? void 0 : _b.renderMarkdownInQuizOptions) ? jsx(StyledMarkdownTypography, {
169
- color: "text.primary",
173
+ color: "textPrimary",
170
174
  variant: "subtitle2",
171
175
  children: title
172
176
  }) : jsx(Typography, {
173
- color: "text.primary",
174
177
  variant: "subtitle2",
178
+ sx: {
179
+ color: 'text.primary'
180
+ },
175
181
  children: title
176
182
  })]
177
183
  }), getQuizResultStatus(materialQuizResponse) === QuizResultStatus.Wrong ? jsx(Button$1, {
@@ -192,7 +198,9 @@ var QuestionBox = function QuestionBox(_a) {
192
198
  onClick: onHint,
193
199
  children: jsx(Typography, {
194
200
  variant: "button",
195
- color: "text.primary",
201
+ sx: {
202
+ color: 'text.primary'
203
+ },
196
204
  children: intl.formatMessage({
197
205
  id: 'materialQuiz.hint'
198
206
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-quiz",
3
- "version": "1.260930.0",
3
+ "version": "1.261005.0",
4
4
  "description": "User view and editing components of Elice material quiz",
5
5
  "repository": {
6
6
  "type": "git",
@@ -21,12 +21,12 @@
21
21
  "@elice/api-client": "^1",
22
22
  "@elice/blocks": "^1",
23
23
  "@elice/design-tokens": "^1",
24
+ "@elice/eds-kit": "^1.261005.0",
25
+ "@elice/eds-material": "^1.261005.0",
24
26
  "@elice/file-client": "^1",
25
27
  "@elice/icons": "^1",
26
28
  "@elice/intl": "^0",
27
29
  "@elice/markdown": "^1",
28
- "@elice/mui-elements": "^5",
29
- "@elice/mui-system": "^5",
30
30
  "@elice/openapi-client-course": "^1",
31
31
  "@elice/openapi-client-file": "^1",
32
32
  "@elice/types": "^1",
@@ -35,15 +35,12 @@
35
35
  "@emotion/styled": "^11.10.0",
36
36
  "@fortawesome/pro-regular-svg-icons": "^6",
37
37
  "@fortawesome/pro-solid-svg-icons": "^6",
38
- "@mui/lab": "^5.0.0-alpha.112",
39
- "@mui/material": "^5.10.16",
40
- "@mui/x-data-grid": "^6.7.0",
41
- "@mui/x-date-pickers": "^6.7.0",
38
+ "@mui/lab": "^9.0.0-beta.9",
42
39
  "@tanstack/react-query": "^4",
43
- "react": "^16.8.0 || ^17.0.0 || ^18.0.0",
40
+ "react": "^18.0.0 || ^19.0.0",
44
41
  "react-use": "^17.0.0",
45
- "@elice/material-shared-types": "1.260930.0",
46
- "@elice/material-shared-utils": "1.260930.0"
42
+ "@elice/material-shared-types": "1.261005.0",
43
+ "@elice/material-shared-utils": "1.261005.0"
47
44
  },
48
45
  "dependencies": {
49
46
  "@dnd-kit/core": "^6.1.0",
@@ -66,26 +63,23 @@
66
63
  "@elice/api-client": "1.260529.0",
67
64
  "@elice/blocks": "1.260723.0",
68
65
  "@elice/design-tokens": "^1.220803.0",
69
- "@elice/file-client": "^1.250307.0",
66
+ "@elice/eds-kit": "1.261005.0",
67
+ "@elice/eds-material": "1.261005.0",
68
+ "@elice/file-client": "1.250914.0-edsmigration.1",
70
69
  "@elice/icons": "^1.230814.0",
71
70
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
72
71
  "@elice/intl": "0.260526.0",
73
- "@elice/markdown": "1.241015.0",
74
- "@elice/mui-elements": "5.251204.0",
75
- "@elice/mui-system": "5.251204.0",
72
+ "@elice/markdown": "1.260915.0-edsmigration.1",
76
73
  "@elice/openapi-client-course": "^1.250702.0",
77
74
  "@elice/openapi-client-file": "^1.240619.0",
78
75
  "@elice/rollup-config": "^1.260406.0",
79
76
  "@elice/types": "1.260608.0",
80
- "@elice/wysiwyg": "1.241015.0",
77
+ "@elice/wysiwyg": "1.260915.0-edsmigration.1",
81
78
  "@emotion/react": "^11.10.0",
82
79
  "@emotion/styled": "^11.10.0",
83
80
  "@fortawesome/pro-regular-svg-icons": "^6.4.2",
84
81
  "@fortawesome/pro-solid-svg-icons": "^6.4.2",
85
- "@mui/lab": "^5.0.0-alpha.112",
86
- "@mui/material": "^5.10.16",
87
- "@mui/x-data-grid": "^6.7.0",
88
- "@mui/x-date-pickers": "^6.7.0",
82
+ "@mui/lab": "9.0.0-beta.9",
89
83
  "@tanstack/react-query": "^4.29.3",
90
84
  "@types/classnames": "^2.3.1",
91
85
  "@types/jquery": "^3.5.13",
@@ -102,8 +96,8 @@
102
96
  "react-use": "^17.2.4",
103
97
  "rollup": "^4.0.0",
104
98
  "typescript": "~5.9.3",
105
- "@elice/material-shared-types": "1.260930.0",
106
- "@elice/material-shared-utils": "1.260930.0"
99
+ "@elice/material-shared-types": "1.261005.0",
100
+ "@elice/material-shared-utils": "1.261005.0"
107
101
  },
108
102
  "scripts": {
109
103
  "start": "run-s watch",