@elice/material-quiz 1.240514.1 → 1.240514.2
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.
|
@@ -8,7 +8,6 @@ var reactTransitionGroup = require('react-transition-group');
|
|
|
8
8
|
var blocks = require('@elice/blocks');
|
|
9
9
|
var intl = require('@elice/intl');
|
|
10
10
|
var markdown = require('@elice/markdown');
|
|
11
|
-
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
12
11
|
var types = require('@elice/types');
|
|
13
12
|
var material = require('@mui/material');
|
|
14
13
|
var flattenDeep = require('lodash-es/flattenDeep');
|
|
@@ -38,7 +37,7 @@ const MaterialQuizEditContent = () => {
|
|
|
38
37
|
//
|
|
39
38
|
// Change `options` according to `optionType`.
|
|
40
39
|
//
|
|
41
|
-
|
|
40
|
+
React.useEffect(() => {
|
|
42
41
|
const get = () => {
|
|
43
42
|
const filteredNotMarkdownOptions = watchedOptionInfo === null || watchedOptionInfo === void 0 ? void 0 : watchedOptionInfo.filter(option => {
|
|
44
43
|
var _a;
|
|
@@ -124,7 +123,7 @@ const MaterialQuizEditContent = () => {
|
|
|
124
123
|
setValue('optionsDefault', get());
|
|
125
124
|
},
|
|
126
125
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
127
|
-
[watchedOptionType, setValue
|
|
126
|
+
[watchedOptionType, setValue]);
|
|
128
127
|
//
|
|
129
128
|
// Change `answerInfo` according to `optionType`.
|
|
130
129
|
//
|
|
@@ -160,11 +159,11 @@ const MaterialQuizEditContent = () => {
|
|
|
160
159
|
setValue('answerInfoDefault', get());
|
|
161
160
|
},
|
|
162
161
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
163
|
-
[watchedOptionType, setValue
|
|
162
|
+
[watchedOptionType, setValue]);
|
|
164
163
|
//
|
|
165
164
|
// Change `answerHint` according to `optionType`.
|
|
166
165
|
//
|
|
167
|
-
|
|
166
|
+
React.useEffect(() => {
|
|
168
167
|
const get = () => {
|
|
169
168
|
switch (watchedOptionType) {
|
|
170
169
|
case types.enums.QuizOptionType.SelectOne:
|
|
@@ -181,11 +180,11 @@ const MaterialQuizEditContent = () => {
|
|
|
181
180
|
setValue('answerHint', get());
|
|
182
181
|
},
|
|
183
182
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
184
|
-
[watchedOptionType, setValue
|
|
183
|
+
[watchedOptionType, setValue]);
|
|
185
184
|
//
|
|
186
185
|
// Change `isAutoGrade` according to `optionType`.
|
|
187
186
|
//
|
|
188
|
-
|
|
187
|
+
React.useEffect(() => {
|
|
189
188
|
const get = () => {
|
|
190
189
|
switch (watchedOptionType) {
|
|
191
190
|
case types.enums.QuizOptionType.SelectOne:
|
|
@@ -202,11 +201,11 @@ const MaterialQuizEditContent = () => {
|
|
|
202
201
|
setValue('isAutoGrade', get());
|
|
203
202
|
},
|
|
204
203
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
205
|
-
[watchedOptionType, setValue
|
|
204
|
+
[watchedOptionType, setValue]);
|
|
206
205
|
//
|
|
207
206
|
// Change `groups` according to `optionType`.
|
|
208
207
|
//
|
|
209
|
-
|
|
208
|
+
React.useEffect(() => {
|
|
210
209
|
const get = () => {
|
|
211
210
|
switch (watchedOptionType) {
|
|
212
211
|
case types.enums.QuizOptionType.SelectOne:
|
|
@@ -237,7 +236,7 @@ const MaterialQuizEditContent = () => {
|
|
|
237
236
|
setValue('groups', get());
|
|
238
237
|
},
|
|
239
238
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
240
|
-
[watchedOptionType, setValue
|
|
239
|
+
[watchedOptionType, setValue]);
|
|
241
240
|
/**
|
|
242
241
|
* Input of option info and answer info,
|
|
243
242
|
* according to option type.
|
|
@@ -4,7 +4,6 @@ import { Transition } from 'react-transition-group';
|
|
|
4
4
|
import { FormInputVerticalLayout, Label, Input, StatusText, Text, Checkbox, Vspace, Flex } from '@elice/blocks';
|
|
5
5
|
import { useRawEliceIntl } from '@elice/intl';
|
|
6
6
|
import { MarkdownEditor } from '@elice/markdown';
|
|
7
|
-
import { useDeepClonedCompareEffect } from '@elice/material-shared-utils';
|
|
8
7
|
import { enums } from '@elice/types';
|
|
9
8
|
import { Tooltip, Stack, TextField, MenuItem, FormControlLabel, Switch, Alert, AlertTitle, Box } from '@mui/material';
|
|
10
9
|
import flattenDeep from 'lodash-es/flattenDeep';
|
|
@@ -34,7 +33,7 @@ const MaterialQuizEditContent = () => {
|
|
|
34
33
|
//
|
|
35
34
|
// Change `options` according to `optionType`.
|
|
36
35
|
//
|
|
37
|
-
|
|
36
|
+
React.useEffect(() => {
|
|
38
37
|
const get = () => {
|
|
39
38
|
const filteredNotMarkdownOptions = watchedOptionInfo === null || watchedOptionInfo === void 0 ? void 0 : watchedOptionInfo.filter(option => {
|
|
40
39
|
var _a;
|
|
@@ -120,7 +119,7 @@ const MaterialQuizEditContent = () => {
|
|
|
120
119
|
setValue('optionsDefault', get());
|
|
121
120
|
},
|
|
122
121
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
123
|
-
[watchedOptionType, setValue
|
|
122
|
+
[watchedOptionType, setValue]);
|
|
124
123
|
//
|
|
125
124
|
// Change `answerInfo` according to `optionType`.
|
|
126
125
|
//
|
|
@@ -156,11 +155,11 @@ const MaterialQuizEditContent = () => {
|
|
|
156
155
|
setValue('answerInfoDefault', get());
|
|
157
156
|
},
|
|
158
157
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
159
|
-
[watchedOptionType, setValue
|
|
158
|
+
[watchedOptionType, setValue]);
|
|
160
159
|
//
|
|
161
160
|
// Change `answerHint` according to `optionType`.
|
|
162
161
|
//
|
|
163
|
-
|
|
162
|
+
React.useEffect(() => {
|
|
164
163
|
const get = () => {
|
|
165
164
|
switch (watchedOptionType) {
|
|
166
165
|
case enums.QuizOptionType.SelectOne:
|
|
@@ -177,11 +176,11 @@ const MaterialQuizEditContent = () => {
|
|
|
177
176
|
setValue('answerHint', get());
|
|
178
177
|
},
|
|
179
178
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
180
|
-
[watchedOptionType, setValue
|
|
179
|
+
[watchedOptionType, setValue]);
|
|
181
180
|
//
|
|
182
181
|
// Change `isAutoGrade` according to `optionType`.
|
|
183
182
|
//
|
|
184
|
-
|
|
183
|
+
React.useEffect(() => {
|
|
185
184
|
const get = () => {
|
|
186
185
|
switch (watchedOptionType) {
|
|
187
186
|
case enums.QuizOptionType.SelectOne:
|
|
@@ -198,11 +197,11 @@ const MaterialQuizEditContent = () => {
|
|
|
198
197
|
setValue('isAutoGrade', get());
|
|
199
198
|
},
|
|
200
199
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
201
|
-
[watchedOptionType, setValue
|
|
200
|
+
[watchedOptionType, setValue]);
|
|
202
201
|
//
|
|
203
202
|
// Change `groups` according to `optionType`.
|
|
204
203
|
//
|
|
205
|
-
|
|
204
|
+
React.useEffect(() => {
|
|
206
205
|
const get = () => {
|
|
207
206
|
switch (watchedOptionType) {
|
|
208
207
|
case enums.QuizOptionType.SelectOne:
|
|
@@ -233,7 +232,7 @@ const MaterialQuizEditContent = () => {
|
|
|
233
232
|
setValue('groups', get());
|
|
234
233
|
},
|
|
235
234
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
236
|
-
[watchedOptionType, setValue
|
|
235
|
+
[watchedOptionType, setValue]);
|
|
237
236
|
/**
|
|
238
237
|
* Input of option info and answer info,
|
|
239
238
|
* according to option type.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.240514.
|
|
3
|
+
"version": "1.240514.2",
|
|
4
4
|
"description": "User view and editing components of Elice material quiz",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -64,8 +64,8 @@
|
|
|
64
64
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
65
65
|
"@elice/intl": "0.240425.0-rc.0",
|
|
66
66
|
"@elice/markdown": "^1.240124.0",
|
|
67
|
-
"@elice/material-shared-types": "1.240514.
|
|
68
|
-
"@elice/material-shared-utils": "1.240514.
|
|
67
|
+
"@elice/material-shared-types": "1.240514.2",
|
|
68
|
+
"@elice/material-shared-utils": "1.240514.2",
|
|
69
69
|
"@elice/mui-system": "^5.240108.1",
|
|
70
70
|
"@elice/types": "1.240131.0",
|
|
71
71
|
"@emotion/react": "^11.10.0",
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"react-use": "^17.2.4",
|
|
88
88
|
"styled-components": "^5.3.0"
|
|
89
89
|
},
|
|
90
|
-
"gitHead": "
|
|
90
|
+
"gitHead": "b13df05d69f1f8b7081d670ec2986a6212875563"
|
|
91
91
|
}
|