@elice/material-quiz 1.240514.0 → 1.240514.1

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,6 +8,7 @@ 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');
11
12
  var types = require('@elice/types');
12
13
  var material = require('@mui/material');
13
14
  var flattenDeep = require('lodash-es/flattenDeep');
@@ -37,7 +38,7 @@ const MaterialQuizEditContent = () => {
37
38
  //
38
39
  // Change `options` according to `optionType`.
39
40
  //
40
- React.useEffect(() => {
41
+ materialSharedUtils.useDeepClonedCompareEffect(() => {
41
42
  const get = () => {
42
43
  const filteredNotMarkdownOptions = watchedOptionInfo === null || watchedOptionInfo === void 0 ? void 0 : watchedOptionInfo.filter(option => {
43
44
  var _a;
@@ -163,7 +164,7 @@ const MaterialQuizEditContent = () => {
163
164
  //
164
165
  // Change `answerHint` according to `optionType`.
165
166
  //
166
- React.useEffect(() => {
167
+ materialSharedUtils.useDeepClonedCompareEffect(() => {
167
168
  const get = () => {
168
169
  switch (watchedOptionType) {
169
170
  case types.enums.QuizOptionType.SelectOne:
@@ -184,7 +185,7 @@ const MaterialQuizEditContent = () => {
184
185
  //
185
186
  // Change `isAutoGrade` according to `optionType`.
186
187
  //
187
- React.useEffect(() => {
188
+ materialSharedUtils.useDeepClonedCompareEffect(() => {
188
189
  const get = () => {
189
190
  switch (watchedOptionType) {
190
191
  case types.enums.QuizOptionType.SelectOne:
@@ -205,7 +206,7 @@ const MaterialQuizEditContent = () => {
205
206
  //
206
207
  // Change `groups` according to `optionType`.
207
208
  //
208
- React.useEffect(() => {
209
+ materialSharedUtils.useDeepClonedCompareEffect(() => {
209
210
  const get = () => {
210
211
  switch (watchedOptionType) {
211
212
  case types.enums.QuizOptionType.SelectOne:
@@ -4,6 +4,7 @@ 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';
7
8
  import { enums } from '@elice/types';
8
9
  import { Tooltip, Stack, TextField, MenuItem, FormControlLabel, Switch, Alert, AlertTitle, Box } from '@mui/material';
9
10
  import flattenDeep from 'lodash-es/flattenDeep';
@@ -33,7 +34,7 @@ const MaterialQuizEditContent = () => {
33
34
  //
34
35
  // Change `options` according to `optionType`.
35
36
  //
36
- React.useEffect(() => {
37
+ useDeepClonedCompareEffect(() => {
37
38
  const get = () => {
38
39
  const filteredNotMarkdownOptions = watchedOptionInfo === null || watchedOptionInfo === void 0 ? void 0 : watchedOptionInfo.filter(option => {
39
40
  var _a;
@@ -159,7 +160,7 @@ const MaterialQuizEditContent = () => {
159
160
  //
160
161
  // Change `answerHint` according to `optionType`.
161
162
  //
162
- React.useEffect(() => {
163
+ useDeepClonedCompareEffect(() => {
163
164
  const get = () => {
164
165
  switch (watchedOptionType) {
165
166
  case enums.QuizOptionType.SelectOne:
@@ -180,7 +181,7 @@ const MaterialQuizEditContent = () => {
180
181
  //
181
182
  // Change `isAutoGrade` according to `optionType`.
182
183
  //
183
- React.useEffect(() => {
184
+ useDeepClonedCompareEffect(() => {
184
185
  const get = () => {
185
186
  switch (watchedOptionType) {
186
187
  case enums.QuizOptionType.SelectOne:
@@ -201,7 +202,7 @@ const MaterialQuizEditContent = () => {
201
202
  //
202
203
  // Change `groups` according to `optionType`.
203
204
  //
204
- React.useEffect(() => {
205
+ useDeepClonedCompareEffect(() => {
205
206
  const get = () => {
206
207
  switch (watchedOptionType) {
207
208
  case enums.QuizOptionType.SelectOne:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-quiz",
3
- "version": "1.240514.0",
3
+ "version": "1.240514.1",
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.0",
68
- "@elice/material-shared-utils": "1.240514.0",
67
+ "@elice/material-shared-types": "1.240514.1",
68
+ "@elice/material-shared-utils": "1.240514.1",
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": "04c7bc30a433e053218d63dedf81d76aa0fe251f"
90
+ "gitHead": "dbab58374d0a0311909a04cfa8621970e8f43a18"
91
91
  }