@elice/material-survey 1.240514.1 → 1.240514.3
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-survey/MaterialSurvey.js +3 -1
- package/cjs/components/material-survey-edit/MaterialSurveyEdit.js +3 -1
- package/cjs/components/material-survey-edit/MaterialSurveyEditContent.js +2 -3
- package/es/components/material-survey/MaterialSurvey.js +3 -1
- package/es/components/material-survey-edit/MaterialSurveyEdit.js +3 -1
- package/es/components/material-survey-edit/MaterialSurveyEditContent.js +2 -3
- package/package.json +5 -5
|
@@ -84,7 +84,9 @@ const MaterialSurveyContainer = ({
|
|
|
84
84
|
onNext,
|
|
85
85
|
__intl
|
|
86
86
|
}) => {
|
|
87
|
-
return React.createElement(intl.RawEliceIntlProvider,
|
|
87
|
+
return React.createElement(intl.RawEliceIntlProvider, {
|
|
88
|
+
value: __intl
|
|
89
|
+
}, React.createElement(MaterialSurveyContext.MaterialSurveyProvider, {
|
|
88
90
|
materialSurveyId: materialSurveyId,
|
|
89
91
|
userId: userId,
|
|
90
92
|
onSubmit: onSubmit,
|
|
@@ -78,7 +78,9 @@ const MaterialSurveyEdit = React.forwardRef(({
|
|
|
78
78
|
//
|
|
79
79
|
//
|
|
80
80
|
//
|
|
81
|
-
return React.createElement(intl.RawEliceIntlProvider,
|
|
81
|
+
return React.createElement(intl.RawEliceIntlProvider, {
|
|
82
|
+
value: __intl
|
|
83
|
+
}, React.createElement("form", {
|
|
82
84
|
ref: formElRef
|
|
83
85
|
}, React.createElement(context.default.Provider, {
|
|
84
86
|
value: {
|
|
@@ -7,7 +7,6 @@ var reactHookForm = require('react-hook-form');
|
|
|
7
7
|
var blocks = require('@elice/blocks');
|
|
8
8
|
var intl = require('@elice/intl');
|
|
9
9
|
var markdown = require('@elice/markdown');
|
|
10
|
-
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
11
10
|
var types = require('@elice/types');
|
|
12
11
|
var styled = require('styled-components');
|
|
13
12
|
var randomId = require('./utils/randomId.js');
|
|
@@ -34,7 +33,7 @@ const MaterialSurveyEditContent = () => {
|
|
|
34
33
|
//
|
|
35
34
|
// Change `optionInfo` according to `optionType`.
|
|
36
35
|
//
|
|
37
|
-
|
|
36
|
+
React.useEffect(() => {
|
|
38
37
|
const get = () => {
|
|
39
38
|
switch (watchedOptionType) {
|
|
40
39
|
case types.enums.SurveyOptionType.SelectOne:
|
|
@@ -65,7 +64,7 @@ const MaterialSurveyEditContent = () => {
|
|
|
65
64
|
setValue('questionInfoList.0.optionInfo', get());
|
|
66
65
|
},
|
|
67
66
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
68
|
-
[watchedOptionType,
|
|
67
|
+
[watchedOptionType, setValue]);
|
|
69
68
|
/**
|
|
70
69
|
* Input of option info and answer info,
|
|
71
70
|
* according to option type.
|
|
@@ -80,7 +80,9 @@ const MaterialSurveyContainer = ({
|
|
|
80
80
|
onNext,
|
|
81
81
|
__intl
|
|
82
82
|
}) => {
|
|
83
|
-
return React.createElement(RawEliceIntlProvider,
|
|
83
|
+
return React.createElement(RawEliceIntlProvider, {
|
|
84
|
+
value: __intl
|
|
85
|
+
}, React.createElement(MaterialSurveyProvider, {
|
|
84
86
|
materialSurveyId: materialSurveyId,
|
|
85
87
|
userId: userId,
|
|
86
88
|
onSubmit: onSubmit,
|
|
@@ -74,7 +74,9 @@ const MaterialSurveyEdit = forwardRef(({
|
|
|
74
74
|
//
|
|
75
75
|
//
|
|
76
76
|
//
|
|
77
|
-
return React.createElement(RawEliceIntlProvider,
|
|
77
|
+
return React.createElement(RawEliceIntlProvider, {
|
|
78
|
+
value: __intl
|
|
79
|
+
}, React.createElement("form", {
|
|
78
80
|
ref: formElRef
|
|
79
81
|
}, React.createElement(MaterialSurveyEditContext.Provider, {
|
|
80
82
|
value: {
|
|
@@ -3,7 +3,6 @@ import { useFormContext, Controller } from 'react-hook-form';
|
|
|
3
3
|
import { FormInputVerticalLayout, Label, Input, Tooltip, Select, Vspace } from '@elice/blocks';
|
|
4
4
|
import { useRawEliceIntl } from '@elice/intl';
|
|
5
5
|
import { MarkdownEditor } from '@elice/markdown';
|
|
6
|
-
import { useDeepClonedCompareEffect } from '@elice/material-shared-utils';
|
|
7
6
|
import { enums } from '@elice/types';
|
|
8
7
|
import styled from 'styled-components';
|
|
9
8
|
import { createRandomId } from './utils/randomId.js';
|
|
@@ -30,7 +29,7 @@ const MaterialSurveyEditContent = () => {
|
|
|
30
29
|
//
|
|
31
30
|
// Change `optionInfo` according to `optionType`.
|
|
32
31
|
//
|
|
33
|
-
|
|
32
|
+
React.useEffect(() => {
|
|
34
33
|
const get = () => {
|
|
35
34
|
switch (watchedOptionType) {
|
|
36
35
|
case enums.SurveyOptionType.SelectOne:
|
|
@@ -61,7 +60,7 @@ const MaterialSurveyEditContent = () => {
|
|
|
61
60
|
setValue('questionInfoList.0.optionInfo', get());
|
|
62
61
|
},
|
|
63
62
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
64
|
-
[watchedOptionType,
|
|
63
|
+
[watchedOptionType, setValue]);
|
|
65
64
|
/**
|
|
66
65
|
* Input of option info and answer info,
|
|
67
66
|
* according to option type.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-survey",
|
|
3
|
-
"version": "1.240514.
|
|
3
|
+
"version": "1.240514.3",
|
|
4
4
|
"description": "User view and editing components of Elice material survey",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -50,10 +50,10 @@
|
|
|
50
50
|
"@elice/design-tokens": "^1.220803.0",
|
|
51
51
|
"@elice/icons": "^1.230814.0",
|
|
52
52
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
53
|
-
"@elice/intl": "0.240425.0-rc.
|
|
53
|
+
"@elice/intl": "0.240425.0-rc.1",
|
|
54
54
|
"@elice/markdown": "^1.220815.0",
|
|
55
|
-
"@elice/material-shared-types": "1.240514.
|
|
56
|
-
"@elice/material-shared-utils": "1.240514.
|
|
55
|
+
"@elice/material-shared-types": "1.240514.3",
|
|
56
|
+
"@elice/material-shared-utils": "1.240514.3",
|
|
57
57
|
"@elice/types": "^1.240208.0",
|
|
58
58
|
"@types/classnames": "^2.3.1",
|
|
59
59
|
"@types/react": "~17.0.9",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"react-use": "^17.2.4",
|
|
64
64
|
"styled-components": "^5.3.0"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "9b236526a4f638425f61387ae95c4e07a28aea7a"
|
|
67
67
|
}
|