@elice/material-survey 1.240718.0-trasncript.2 → 1.240718.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.
Files changed (67) hide show
  1. package/cjs/components/markdown-editor/index.d.ts +2 -1
  2. package/cjs/components/markdown-editor/index.js +10 -19
  3. package/cjs/components/material-survey/MaterialSurvey.js +57 -82
  4. package/cjs/components/material-survey/MaterialSurveyInfo.js +59 -69
  5. package/cjs/components/material-survey/MaterialSurveySelectMultiple.js +90 -131
  6. package/cjs/components/material-survey/MaterialSurveySelectOne.js +86 -125
  7. package/cjs/components/material-survey/MaterialSurveyShimmer.js +40 -47
  8. package/cjs/components/material-survey/MaterialSurveyText.js +75 -114
  9. package/cjs/components/material-survey/SurveyResultBadge.js +10 -17
  10. package/cjs/components/material-survey/SurveySubmitStatusText.js +16 -21
  11. package/cjs/components/material-survey/context/MaterialSurveyContext.d.ts +1 -1
  12. package/cjs/components/material-survey/context/MaterialSurveyContext.js +74 -115
  13. package/cjs/components/material-survey-edit/MaterialSurveyEdit.js +36 -49
  14. package/cjs/components/material-survey-edit/MaterialSurveyEditContent.js +91 -113
  15. package/cjs/components/material-survey-edit/MaterialSurveyEditOptionSelect.js +87 -100
  16. package/cjs/components/material-survey-edit/context.js +2 -8
  17. package/cjs/components/material-survey-edit/utils/editValue.js +11 -17
  18. package/cjs/components/shared/StyledMarkdown.js +1 -5
  19. package/cjs/components/shared/SurveyContentBox.js +74 -85
  20. package/cjs/components/shared/question-checkbox/QuestionCheckbox.js +7 -13
  21. package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
  22. package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.js +17 -24
  23. package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.js +89 -66
  24. package/cjs/components/shared/question-radio/QuestionRadio.js +7 -13
  25. package/cjs/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
  26. package/cjs/components/shared/question-radio/QuestionRadioContext.js +17 -24
  27. package/cjs/components/shared/question-radio/QuestionRadioOption.js +80 -59
  28. package/es/components/markdown-editor/index.d.ts +2 -1
  29. package/es/components/markdown-editor/index.js +10 -15
  30. package/es/components/material-survey/MaterialSurvey.js +57 -77
  31. package/es/components/material-survey/MaterialSurveyInfo.js +59 -65
  32. package/es/components/material-survey/MaterialSurveySelectMultiple.js +90 -127
  33. package/es/components/material-survey/MaterialSurveySelectOne.js +86 -121
  34. package/es/components/material-survey/MaterialSurveyShimmer.js +40 -43
  35. package/es/components/material-survey/MaterialSurveyText.js +75 -109
  36. package/es/components/material-survey/SurveyResultBadge.js +10 -13
  37. package/es/components/material-survey/SurveySubmitStatusText.js +16 -17
  38. package/es/components/material-survey/context/MaterialSurveyContext.d.ts +1 -1
  39. package/es/components/material-survey/context/MaterialSurveyContext.js +75 -112
  40. package/es/components/material-survey-edit/MaterialSurveyEdit.js +36 -45
  41. package/es/components/material-survey-edit/MaterialSurveyEditContent.js +90 -107
  42. package/es/components/material-survey-edit/MaterialSurveyEditOptionSelect.js +87 -96
  43. package/es/components/material-survey-edit/context.js +2 -4
  44. package/es/components/material-survey-edit/utils/editValue.js +11 -17
  45. package/es/components/shared/StyledMarkdown.js +1 -1
  46. package/es/components/shared/SurveyContentBox.js +74 -81
  47. package/es/components/shared/question-checkbox/QuestionCheckbox.js +7 -9
  48. package/es/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
  49. package/es/components/shared/question-checkbox/QuestionCheckboxContext.js +17 -20
  50. package/es/components/shared/question-checkbox/QuestionCheckboxOption.js +89 -61
  51. package/es/components/shared/question-radio/QuestionRadio.js +7 -9
  52. package/es/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
  53. package/es/components/shared/question-radio/QuestionRadioContext.js +17 -20
  54. package/es/components/shared/question-radio/QuestionRadioOption.js +80 -54
  55. package/package.json +12 -9
  56. package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -399
  57. package/cjs/components/material-survey/index.js +0 -9
  58. package/cjs/components/material-survey/locales/index.js +0 -13
  59. package/cjs/components/material-survey-edit/index.js +0 -7
  60. package/cjs/components/material-survey-edit/locales/index.js +0 -13
  61. package/cjs/components/shared/index.js +0 -13
  62. package/es/_virtual/_rollupPluginBabelHelpers.js +0 -386
  63. package/es/components/material-survey/index.js +0 -2
  64. package/es/components/material-survey/locales/index.js +0 -4
  65. package/es/components/material-survey-edit/index.js +0 -1
  66. package/es/components/material-survey-edit/locales/index.js +0 -4
  67. package/es/components/shared/index.js +0 -4
@@ -1,35 +1,28 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
3
  var React = require('react');
5
4
 
6
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
7
-
8
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
9
-
10
- var QuestionRadioContext = React__default.default.createContext(undefined);
5
+ const QuestionRadioContext = React.createContext(undefined);
11
6
  QuestionRadioContext.displayName = 'QuestionRadioContext';
12
- function QuestionRadioContextProvider(_ref) {
13
- var selectedValue = _ref.selectedValue,
14
- onSelect = _ref.onSelect,
15
- disabled = _ref.disabled,
16
- children = _ref.children;
7
+ function QuestionRadioContextProvider({
8
+ selectedValue,
9
+ onSelect,
10
+ disabled,
11
+ children
12
+ }) {
17
13
  // eslint-disable-next-line react-hooks/exhaustive-deps
18
- var onSelectValue = React__default.default.useCallback(onSelect, []);
19
- var value = React__default.default.useMemo(function () {
20
- return {
21
- selectedValue: selectedValue,
22
- disabled: disabled,
23
- onSelect: onSelectValue
24
- };
25
- }, [selectedValue, disabled, onSelectValue]);
26
- return jsxRuntime.jsx(QuestionRadioContext.Provider, {
27
- value: value,
28
- children: children
29
- });
14
+ const onSelectValue = React.useCallback(onSelect, []);
15
+ const value = React.useMemo(() => ({
16
+ selectedValue,
17
+ disabled,
18
+ onSelect: onSelectValue
19
+ }), [selectedValue, disabled, onSelectValue]);
20
+ return React.createElement(QuestionRadioContext.Provider, {
21
+ value: value
22
+ }, children);
30
23
  }
31
24
  function useQuestionRadioContext() {
32
- var context = React__default.default.useContext(QuestionRadioContext);
25
+ const context = React.useContext(QuestionRadioContext);
33
26
  if (context === undefined) {
34
27
  throw new Error('useQuestionRadioContext must be used within a QuestionRadioContextProvider');
35
28
  }
@@ -2,22 +2,17 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var jsxRuntime = require('react/jsx-runtime');
6
5
  var React = require('react');
7
6
  var designTokens = require('@elice/design-tokens');
8
7
  var styled = require('styled-components');
9
8
  var QuestionRadioContext = require('./QuestionRadioContext.js');
10
9
 
11
- function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
12
-
13
- var React__default = /*#__PURE__*/_interopDefaultCompat(React);
14
- var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
15
-
16
- var StyledQuestionRadioOption = styled__default.default.div.withConfig({
10
+ const StyledQuestionRadioOption = styled.div.withConfig({
17
11
  componentId: "sc-zgbv8k-0"
18
- })(["display:flex;align-items:center;padding:1.125rem;border-radius:8px;background-color:", ";&:not(:last-of-type){margin-bottom:1rem;}&:hover,& *:hover{cursor:", ";}", ""], function (_ref) {
19
- var checked = _ref.checked,
20
- status = _ref.status;
12
+ })(["display:flex;align-items:center;padding:1.125rem;border-radius:8px;background-color:", ";&:not(:last-of-type){margin-bottom:1rem;}&:hover,& *:hover{cursor:", ";}", ""], ({
13
+ checked,
14
+ status
15
+ }) => {
21
16
  if (checked) {
22
17
  return designTokens.base.color.primary1;
23
18
  }
@@ -29,18 +24,17 @@ var StyledQuestionRadioOption = styled__default.default.div.withConfig({
29
24
  default:
30
25
  return designTokens.base.color.navy5;
31
26
  }
32
- }, function (_ref2) {
33
- var disabled = _ref2.disabled;
34
- return disabled ? 'not-allowed' : 'pointer';
35
- }, function (_ref3) {
36
- var isAnswer = _ref3.isAnswer;
37
- return isAnswer ? "border: 3px solid ".concat(designTokens.base.color.green5) : '';
38
- });
39
- var StyledQuestionRadioInput = styled__default.default.input.withConfig({
27
+ }, ({
28
+ disabled
29
+ }) => disabled ? 'not-allowed' : 'pointer', ({
30
+ isAnswer
31
+ }) => isAnswer ? `border: 3px solid ${designTokens.base.color.green5}` : '');
32
+ const StyledQuestionRadioInput = styled.input.withConfig({
40
33
  componentId: "sc-zgbv8k-1"
41
- })(["flex:none;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;border-radius:50%;width:1.25rem;height:1.25rem;margin-right:0.875rem;border:2px solid ", ";", ""], function (_ref4) {
42
- var checked = _ref4.checked,
43
- status = _ref4.status;
34
+ })(["flex:none;margin:0;-webkit-appearance:none;-moz-appearance:none;appearance:none;position:relative;border-radius:50%;width:1.25rem;height:1.25rem;margin-right:0.875rem;border:2px solid ", ";", ""], ({
35
+ checked,
36
+ status
37
+ }) => {
44
38
  if (checked) {
45
39
  return designTokens.base.color.primary6;
46
40
  }
@@ -52,14 +46,27 @@ var StyledQuestionRadioInput = styled__default.default.input.withConfig({
52
46
  default:
53
47
  return designTokens.base.color.gray3;
54
48
  }
55
- }, function (_ref5) {
56
- var status = _ref5.status,
57
- checked = _ref5.checked;
49
+ }, ({
50
+ status,
51
+ checked
52
+ }) => {
58
53
  if (checked) {
59
- return "\n &:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 70%;\n height: 70%;\n border-radius: 50%;\n background-color: ".concat(designTokens.base.color.primary6, ";\n }\n ");
54
+ return `
55
+ &:after {
56
+ content: '';
57
+ position: absolute;
58
+ top: 50%;
59
+ left: 50%;
60
+ transform: translate(-50%, -50%);
61
+ width: 70%;
62
+ height: 70%;
63
+ border-radius: 50%;
64
+ background-color: ${designTokens.base.color.primary6};
65
+ }
66
+ `;
60
67
  }
61
68
  if (status) {
62
- var bgColor;
69
+ let bgColor;
63
70
  switch (status) {
64
71
  case 'correct':
65
72
  bgColor = designTokens.base.color.green9;
@@ -71,14 +78,27 @@ var StyledQuestionRadioInput = styled__default.default.input.withConfig({
71
78
  bgColor = designTokens.base.color.gray3;
72
79
  break;
73
80
  }
74
- return "\n &:after {\n content: '';\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n width: 70%;\n height: 70%;\n border-radius: 50%;\n background-color: ".concat(bgColor, ";\n }\n ");
81
+ return `
82
+ &:after {
83
+ content: '';
84
+ position: absolute;
85
+ top: 50%;
86
+ left: 50%;
87
+ transform: translate(-50%, -50%);
88
+ width: 70%;
89
+ height: 70%;
90
+ border-radius: 50%;
91
+ background-color: ${bgColor};
92
+ }
93
+ `;
75
94
  }
76
95
  });
77
- var StyledLabel = styled__default.default.label.withConfig({
96
+ const StyledLabel = styled.label.withConfig({
78
97
  componentId: "sc-zgbv8k-2"
79
- })(["word-break:break-all;margin-right:0.875rem;font-size:", ";color:", ";& p{color:", ";}"], designTokens.base.size.body3, function (_ref6) {
80
- var checked = _ref6.checked,
81
- status = _ref6.status;
98
+ })(["word-break:break-all;margin-right:0.875rem;font-size:", ";color:", ";& p{color:", ";}"], designTokens.base.size.body3, ({
99
+ checked,
100
+ status
101
+ }) => {
82
102
  if (checked) {
83
103
  return designTokens.base.color.primary6;
84
104
  }
@@ -90,9 +110,10 @@ var StyledLabel = styled__default.default.label.withConfig({
90
110
  default:
91
111
  return designTokens.base.color.navy0;
92
112
  }
93
- }, function (_ref7) {
94
- var checked = _ref7.checked,
95
- status = _ref7.status;
113
+ }, ({
114
+ checked,
115
+ status
116
+ }) => {
96
117
  if (checked) {
97
118
  return designTokens.base.color.primary6;
98
119
  }
@@ -105,40 +126,40 @@ var StyledLabel = styled__default.default.label.withConfig({
105
126
  return designTokens.base.color.navy0;
106
127
  }
107
128
  });
108
- var QuestionRadioOption = React__default.default.memo(function (_ref8) {
109
- var value = _ref8.value,
110
- status = _ref8.status,
111
- isAnswer = _ref8.isAnswer,
112
- children = _ref8.children;
113
- var _useQuestionRadioCont = QuestionRadioContext.useQuestionRadioContext(),
114
- selectedValue = _useQuestionRadioCont.selectedValue,
115
- disabled = _useQuestionRadioCont.disabled,
116
- onSelect = _useQuestionRadioCont.onSelect;
117
- return jsxRuntime.jsxs(StyledQuestionRadioOption, {
129
+ const QuestionRadioOption = React.memo(({
130
+ value,
131
+ status,
132
+ isAnswer,
133
+ children
134
+ }) => {
135
+ const {
136
+ selectedValue,
137
+ disabled,
138
+ onSelect
139
+ } = QuestionRadioContext.useQuestionRadioContext();
140
+ return React.createElement(StyledQuestionRadioOption, {
118
141
  isAnswer: isAnswer,
119
142
  disabled: disabled,
120
143
  checked: selectedValue === value,
121
- onClick: function onClick(e) {
144
+ onClick: e => {
122
145
  e.preventDefault();
123
146
  if (disabled) {
124
147
  return;
125
148
  }
126
149
  onSelect(value);
127
150
  },
128
- status: status,
129
- children: [jsxRuntime.jsx(StyledQuestionRadioInput, {
130
- id: value,
131
- type: "radio",
132
- readOnly: true,
133
- checked: selectedValue === value,
134
- status: status
135
- }), jsxRuntime.jsx(StyledLabel, {
136
- htmlFor: value,
137
- checked: selectedValue === value,
138
- status: status,
139
- children: children
140
- })]
141
- });
151
+ status: status
152
+ }, React.createElement(StyledQuestionRadioInput, {
153
+ id: value,
154
+ type: "radio",
155
+ readOnly: true,
156
+ checked: selectedValue === value,
157
+ status: status
158
+ }), React.createElement(StyledLabel, {
159
+ htmlFor: value,
160
+ checked: selectedValue === value,
161
+ status: status
162
+ }, children));
142
163
  });
143
164
 
144
165
  exports.default = QuestionRadioOption;
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import type { EliceWysiwygEditorProps } from '@elice/wysiwyg';
2
- export declare const MarkdownEditor: ({ value, onChange, ...props }: EliceWysiwygEditorProps) => JSX.Element;
3
+ export declare const MarkdownEditor: ({ value, onChange, ...props }: EliceWysiwygEditorProps) => React.JSX.Element;
@@ -1,28 +1,23 @@
1
- import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
1
  import { __rest } from 'tslib';
3
- import { jsx } from 'react/jsx-runtime';
4
2
  import React from 'react';
5
3
  import { useDebounce } from 'react-use';
6
4
  import { EliceWysiwygEditor } from '@elice/wysiwyg';
7
5
 
8
- var STATE_SYNC_DEBOUNCE_TIME = 50;
9
- var MarkdownEditor = function MarkdownEditor(_a) {
10
- var value = _a.value,
11
- onChange = _a.onChange,
6
+ const STATE_SYNC_DEBOUNCE_TIME = 50;
7
+ const MarkdownEditor = _a => {
8
+ var {
9
+ value,
10
+ onChange
11
+ } = _a,
12
12
  props = __rest(_a, ["value", "onChange"]);
13
- var _React$useState = React.useState(value),
14
- _React$useState2 = _slicedToArray(_React$useState, 2),
15
- __value = _React$useState2[0],
16
- __setValue = _React$useState2[1];
17
- useDebounce(function () {
18
- return __setValue(value);
19
- }, STATE_SYNC_DEBOUNCE_TIME, [value]);
20
- useDebounce(function () {
13
+ const [__value, __setValue] = React.useState(value);
14
+ useDebounce(() => __setValue(value), STATE_SYNC_DEBOUNCE_TIME, [value]);
15
+ useDebounce(() => {
21
16
  if (__value !== value && typeof onChange === 'function') {
22
17
  onChange(__value !== null && __value !== void 0 ? __value : '');
23
18
  }
24
19
  }, STATE_SYNC_DEBOUNCE_TIME, [__value]);
25
- return jsx(EliceWysiwygEditor, Object.assign({
20
+ return React.createElement(EliceWysiwygEditor, Object.assign({
26
21
  value: value,
27
22
  onChange: __setValue
28
23
  }, props));
@@ -1,5 +1,3 @@
1
- import { slicedToArray as _slicedToArray } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { jsx, jsxs } from 'react/jsx-runtime';
3
1
  import React from 'react';
4
2
  import { useMeasure } from 'react-use';
5
3
  import { base } from '@elice/design-tokens';
@@ -12,101 +10,83 @@ import messageKo from './locales/ko.json.js';
12
10
  import MaterialSurveyShimmer from './MaterialSurveyShimmer.js';
13
11
  import MaterialSurveyInfo from './MaterialSurveyInfo.js';
14
12
 
15
- var AsyncMaterialSurveySelectMultiple = React.lazy(function () {
16
- return import('./MaterialSurveySelectMultiple.js');
17
- });
18
- var AsyncMaterialSurveyText = React.lazy(function () {
19
- return import('./MaterialSurveyText.js');
20
- });
21
- var AsyncMaterialSurveySelectOne = React.lazy(function () {
22
- return import('./MaterialSurveySelectOne.js');
23
- });
24
- var StyledMaterialSurveyInfo = styled.div.withConfig({
13
+ const AsyncMaterialSurveySelectMultiple = React.lazy(() => import('./MaterialSurveySelectMultiple.js'));
14
+ const AsyncMaterialSurveyText = React.lazy(() => import('./MaterialSurveyText.js'));
15
+ const AsyncMaterialSurveySelectOne = React.lazy(() => import('./MaterialSurveySelectOne.js'));
16
+ const StyledMaterialSurveyInfo = styled.div.withConfig({
25
17
  componentId: "sc-1fyzkvm-0"
26
18
  })([""]);
27
- var StyledMaterialSurveyContent = styled.div.withConfig({
19
+ const StyledMaterialSurveyContent = styled.div.withConfig({
28
20
  componentId: "sc-1fyzkvm-1"
29
21
  })([""]);
30
- var StyledMaterialSurveyWrapper = styled.div.withConfig({
22
+ const StyledMaterialSurveyWrapper = styled.div.withConfig({
31
23
  componentId: "sc-1fyzkvm-2"
32
- })(["display:flex;height:100%;flex-direction:", ";& > *{flex:", ";}& > *:first-child{margin-right:", ";margin-bottom:", ";}", "{height:", ";overflow-y:", ";}"], function (_ref) {
33
- var vertical = _ref.vertical;
34
- return vertical ? 'column' : 'row';
35
- }, function (_ref2) {
36
- var vertical = _ref2.vertical;
37
- return vertical ? 'auto' : '1 0 calc(50% - 1rem);';
38
- }, function (_ref3) {
39
- var vertical = _ref3.vertical;
40
- return vertical ? '0' : '1rem';
41
- }, function (_ref4) {
42
- var vertical = _ref4.vertical;
43
- return vertical ? '1rem' : '0';
44
- }, StyledMaterialSurveyInfo, function (_ref5) {
45
- var vertical = _ref5.vertical;
46
- return vertical ? 'auto' : '100%';
47
- }, function (_ref6) {
48
- var vertical = _ref6.vertical;
49
- return vertical ? 'intial' : 'auto';
50
- });
51
- var MaterialSurvey = function MaterialSurvey() {
52
- var _useMaterialSurveySta = useMaterialSurveyState(),
53
- materialSurvey = _useMaterialSurveySta.materialSurvey,
54
- vertical = _useMaterialSurveySta.vertical;
55
- var _useMaterialSurveyDis = useMaterialSurveyDispatch(),
56
- setVertical = _useMaterialSurveyDis.setVertical;
57
- var _useMeasure = useMeasure(),
58
- _useMeasure2 = _slicedToArray(_useMeasure, 2),
59
- ref = _useMeasure2[0],
60
- width = _useMeasure2[1].width;
61
- React.useEffect(function () {
24
+ })(["display:flex;height:100%;flex-direction:", ";& > *{flex:", ";}& > *:first-child{margin-right:", ";margin-bottom:", ";}", "{height:", ";overflow-y:", ";}"], ({
25
+ vertical
26
+ }) => vertical ? 'column' : 'row', ({
27
+ vertical
28
+ }) => vertical ? 'auto' : '1 0 calc(50% - 1rem);', ({
29
+ vertical
30
+ }) => vertical ? '0' : '1rem', ({
31
+ vertical
32
+ }) => vertical ? '1rem' : '0', StyledMaterialSurveyInfo, ({
33
+ vertical
34
+ }) => vertical ? 'auto' : '100%', ({
35
+ vertical
36
+ }) => vertical ? 'intial' : 'auto');
37
+ const MaterialSurvey = () => {
38
+ const {
39
+ materialSurvey,
40
+ vertical
41
+ } = useMaterialSurveyState();
42
+ const {
43
+ setVertical
44
+ } = useMaterialSurveyDispatch();
45
+ const [ref, {
46
+ width
47
+ }] = useMeasure();
48
+ React.useEffect(() => {
62
49
  if (width > 0) {
63
50
  setVertical(width <= base.screen.medium);
64
51
  }
65
52
  }, [width, setVertical]);
66
- var Component = null;
53
+ let Component = null;
67
54
  switch (materialSurvey === null || materialSurvey === void 0 ? void 0 : materialSurvey.questionInfoList[0].optionType) {
68
55
  case enums.SurveyOptionType.SelectOne:
69
- Component = jsx(AsyncMaterialSurveySelectOne, {});
56
+ Component = React.createElement(AsyncMaterialSurveySelectOne, null);
70
57
  break;
71
58
  case enums.SurveyOptionType.SelectMultiple:
72
- Component = jsx(AsyncMaterialSurveySelectMultiple, {});
59
+ Component = React.createElement(AsyncMaterialSurveySelectMultiple, null);
73
60
  break;
74
61
  case enums.SurveyOptionType.Text:
75
- Component = jsx(AsyncMaterialSurveyText, {});
62
+ Component = React.createElement(AsyncMaterialSurveyText, null);
76
63
  break;
77
64
  default:
78
- Component = jsx(MaterialSurveyShimmer, {});
65
+ Component = React.createElement(MaterialSurveyShimmer, null);
79
66
  break;
80
67
  }
81
- return jsx(React.Suspense, {
82
- fallback: null,
83
- children: jsxs(StyledMaterialSurveyWrapper, {
84
- ref: ref,
85
- vertical: vertical,
86
- children: [jsx(StyledMaterialSurveyInfo, {
87
- children: jsx(MaterialSurveyInfo, {})
88
- }), jsx(StyledMaterialSurveyContent, {
89
- children: Component
90
- })]
91
- })
92
- });
68
+ return React.createElement(React.Suspense, {
69
+ fallback: null
70
+ }, React.createElement(StyledMaterialSurveyWrapper, {
71
+ ref: ref,
72
+ vertical: vertical
73
+ }, React.createElement(StyledMaterialSurveyInfo, null, React.createElement(MaterialSurveyInfo, null)), React.createElement(StyledMaterialSurveyContent, null, Component)));
93
74
  };
94
- var MaterialSurveyContainer = function MaterialSurveyContainer(_ref7) {
95
- var materialSurveyId = _ref7.materialSurveyId,
96
- userId = _ref7.userId,
97
- onSubmit = _ref7.onSubmit,
98
- onNext = _ref7.onNext,
99
- __intl = _ref7.__intl;
100
- return jsx(RawEliceIntlProvider, {
101
- value: __intl,
102
- children: jsx(MaterialSurveyProvider, {
103
- materialSurveyId: materialSurveyId,
104
- userId: userId,
105
- onSubmit: onSubmit,
106
- onNext: onNext,
107
- children: jsx(MaterialSurvey, {})
108
- })
109
- });
75
+ const MaterialSurveyContainer = ({
76
+ materialSurveyId,
77
+ userId,
78
+ onSubmit,
79
+ onNext,
80
+ __intl
81
+ }) => {
82
+ return React.createElement(RawEliceIntlProvider, {
83
+ value: __intl
84
+ }, React.createElement(MaterialSurveyProvider, {
85
+ materialSurveyId: materialSurveyId,
86
+ userId: userId,
87
+ onSubmit: onSubmit,
88
+ onNext: onNext
89
+ }, React.createElement(MaterialSurvey, null)));
110
90
  };
111
91
  var MaterialSurvey$1 = new IntlComponentBuilder(MaterialSurveyContainer).add('en', messageEn).add('ko', messageKo).addAsync('th', import('./locales/th.json.js')).addAsync('ja', import('./locales/ja.json.js')).build();
112
92
 
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
1
+ import React from 'react';
2
2
  import { Flex, Text, Shimmer, Vspace } from '@elice/blocks';
3
3
  import { base } from '@elice/design-tokens';
4
4
  import { MarkdownSSR } from '@elice/markdown';
@@ -7,72 +7,66 @@ import styled from 'styled-components';
7
7
  import SurveyContentBox from '../shared/SurveyContentBox.js';
8
8
  import { useMaterialSurveyState } from './context/MaterialSurveyContext.js';
9
9
 
10
- var StyledMarkdownSSR = styled(MarkdownSSR).withConfig({
10
+ const StyledMarkdownSSR = styled(MarkdownSSR).withConfig({
11
11
  componentId: "sc-1b9l43w-0"
12
12
  })(["", ""], EliceWysiwygEditorTheme.resetMarkdownSSR);
13
- var MaterialSurveyInfo = function MaterialSurveyInfo() {
14
- var _useMaterialSurveySta = useMaterialSurveyState(),
15
- materialSurvey = _useMaterialSurveySta.materialSurvey;
16
- return jsxs(SurveyContentBox, {
17
- title: materialSurvey === null || materialSurvey === void 0 ? void 0 : materialSurvey.title,
18
- children: [materialSurvey ? jsxs(Flex, {
19
- children: [jsx(Text, {
20
- bold: true,
21
- size: "large",
22
- customStyles: {
23
- color: base.color.primary3,
24
- marginRight: '0.5rem'
25
- },
26
- children: 'Q.'
27
- }), jsx(Text, {
28
- bold: true,
29
- role: "white",
30
- size: "large",
31
- wordBreak: "break-word",
32
- children: materialSurvey.questionInfoList[0].questionTitle
33
- })]
34
- }) : jsx(Shimmer, {
35
- dark: true,
36
- borderRadius: '4px',
37
- width: "80%",
38
- height: '40px'
39
- }), jsx(Vspace, {
40
- height: 1
41
- }), materialSurvey ? jsx(StyledMarkdownSSR, {
42
- children: materialSurvey.questionInfoList[0].questionDescription,
43
- dark: true,
44
- paddingx: 0,
45
- paddingy: 0
46
- }) : jsxs(Fragment, {
47
- children: [jsx(Shimmer, {
48
- dark: true,
49
- borderRadius: '4px',
50
- width: "80%",
51
- height: '40px'
52
- }), jsx(Vspace, {
53
- height: 1
54
- }), jsx(Shimmer, {
55
- dark: true,
56
- borderRadius: '4px',
57
- width: "100%",
58
- height: '40px'
59
- }), jsx(Vspace, {
60
- height: 1
61
- }), jsx(Shimmer, {
62
- dark: true,
63
- borderRadius: '4px',
64
- width: "100%",
65
- height: '40px'
66
- }), jsx(Vspace, {
67
- height: 1
68
- }), jsx(Shimmer, {
69
- dark: true,
70
- borderRadius: '4px',
71
- width: "100%",
72
- height: '40px'
73
- })]
74
- })]
75
- });
13
+ const MaterialSurveyInfo = () => {
14
+ const {
15
+ materialSurvey
16
+ } = useMaterialSurveyState();
17
+ return React.createElement(SurveyContentBox, {
18
+ title: materialSurvey === null || materialSurvey === void 0 ? void 0 : materialSurvey.title
19
+ }, materialSurvey ? React.createElement(Flex, null, React.createElement(Text, {
20
+ bold: true,
21
+ size: "large",
22
+ customStyles: {
23
+ color: base.color.primary3,
24
+ marginRight: '0.5rem'
25
+ }
26
+ }, 'Q.'), React.createElement(Text, {
27
+ bold: true,
28
+ role: "white",
29
+ size: "large",
30
+ wordBreak: "break-word"
31
+ }, materialSurvey.questionInfoList[0].questionTitle)) : React.createElement(Shimmer, {
32
+ dark: true,
33
+ borderRadius: '4px',
34
+ width: "80%",
35
+ height: '40px'
36
+ }), React.createElement(Vspace, {
37
+ height: 1
38
+ }), materialSurvey ? React.createElement(StyledMarkdownSSR, {
39
+ children: materialSurvey.questionInfoList[0].questionDescription,
40
+ dark: true,
41
+ paddingx: 0,
42
+ paddingy: 0
43
+ }) : React.createElement(React.Fragment, null, React.createElement(Shimmer, {
44
+ dark: true,
45
+ borderRadius: '4px',
46
+ width: "80%",
47
+ height: '40px'
48
+ }), React.createElement(Vspace, {
49
+ height: 1
50
+ }), React.createElement(Shimmer, {
51
+ dark: true,
52
+ borderRadius: '4px',
53
+ width: "100%",
54
+ height: '40px'
55
+ }), React.createElement(Vspace, {
56
+ height: 1
57
+ }), React.createElement(Shimmer, {
58
+ dark: true,
59
+ borderRadius: '4px',
60
+ width: "100%",
61
+ height: '40px'
62
+ }), React.createElement(Vspace, {
63
+ height: 1
64
+ }), React.createElement(Shimmer, {
65
+ dark: true,
66
+ borderRadius: '4px',
67
+ width: "100%",
68
+ height: '40px'
69
+ })));
76
70
  };
77
71
 
78
72
  export { MaterialSurveyInfo as default };