@elice/material-quiz 1.240718.0-trasncript.2 → 1.240718.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.
- package/cjs/components/eb-sortable/EbDraggable.js +33 -42
- package/cjs/components/eb-sortable/EbDroppable.js +20 -27
- package/cjs/components/markdown-editor/index.d.ts +2 -1
- package/cjs/components/markdown-editor/index.js +10 -19
- package/cjs/components/material-quiz/MaterialQuiz.js +83 -114
- package/cjs/components/material-quiz/MaterialQuizAnswerExplanation.js +29 -36
- package/cjs/components/material-quiz/MaterialQuizInfo.js +149 -151
- package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +127 -175
- package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +286 -360
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +126 -172
- package/cjs/components/material-quiz/MaterialQuizShimmer.js +39 -46
- package/cjs/components/material-quiz/MaterialQuizText.js +115 -163
- package/cjs/components/material-quiz/QuizResultBadge.js +22 -32
- package/cjs/components/material-quiz/QuizSubmitStatusText.js +16 -21
- package/cjs/components/material-quiz/constants/color.js +5 -5
- package/cjs/components/material-quiz/context/MaterialQuizContext.d.ts +1 -1
- package/cjs/components/material-quiz/context/MaterialQuizContext.js +93 -156
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +161 -259
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +100 -134
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +101 -130
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +52 -64
- package/cjs/components/material-quiz/material-quiz-group/context/context.js +1 -5
- package/cjs/components/material-quiz-edit/MaterialQuizEdit.js +36 -47
- package/cjs/components/material-quiz-edit/MaterialQuizEditContent.js +232 -280
- package/cjs/components/material-quiz-edit/context.js +2 -8
- package/cjs/components/material-quiz-edit/options/OptionEditor.js +46 -70
- package/cjs/components/material-quiz-edit/options/OptionSelectMultiple.js +148 -174
- package/cjs/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +149 -175
- package/cjs/components/material-quiz-edit/options/OptionSelectOne.js +144 -164
- package/cjs/components/material-quiz-edit/options/OptionText.js +82 -90
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroup.js +8 -9
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +112 -156
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +196 -288
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +75 -88
- package/cjs/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +92 -108
- package/cjs/components/material-quiz-edit/utils/checkTwoDimensionArray.js +1 -5
- package/cjs/components/material-quiz-edit/utils/editValue.js +12 -21
- package/cjs/components/shared/QuestionBox.js +165 -198
- package/cjs/components/shared/QuizDraggbleDroppedOption.js +12 -11
- package/cjs/components/shared/QuizDraggbleDummyOption.js +16 -23
- package/cjs/components/shared/QuizDraggbleOption.js +59 -65
- package/cjs/components/shared/StyledMarkdown.js +1 -5
- package/cjs/components/shared/question-checkbox/QuestionCheckbox.js +7 -13
- package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
- package/cjs/components/shared/question-checkbox/QuestionCheckboxContext.js +17 -24
- package/cjs/components/shared/question-checkbox/QuestionCheckboxOption.js +68 -59
- package/cjs/components/shared/question-radio/QuestionRadio.js +7 -13
- package/cjs/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
- package/cjs/components/shared/question-radio/QuestionRadioContext.js +17 -24
- package/cjs/components/shared/question-radio/QuestionRadioOption.js +59 -52
- package/cjs/components/shared/utils/getQuestionStatusStyle.js +9 -7
- package/cjs/components/shared/utils/mergeRefs.js +6 -15
- package/cjs/constant/element.js +3 -3
- package/cjs/helpers/index.js +10 -8
- package/cjs/hooks/useCaculatePassage.js +20 -21
- package/es/components/eb-sortable/EbDraggable.js +33 -37
- package/es/components/eb-sortable/EbDroppable.js +20 -22
- package/es/components/markdown-editor/index.d.ts +2 -1
- package/es/components/markdown-editor/index.js +10 -15
- package/es/components/material-quiz/MaterialQuiz.js +83 -109
- package/es/components/material-quiz/MaterialQuizAnswerExplanation.js +29 -32
- package/es/components/material-quiz/MaterialQuizInfo.js +150 -148
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +127 -171
- package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +287 -356
- package/es/components/material-quiz/MaterialQuizSelectOne.js +126 -168
- package/es/components/material-quiz/MaterialQuizShimmer.js +39 -42
- package/es/components/material-quiz/MaterialQuizText.js +115 -158
- package/es/components/material-quiz/QuizResultBadge.js +22 -27
- package/es/components/material-quiz/QuizSubmitStatusText.js +16 -17
- package/es/components/material-quiz/constants/color.js +5 -5
- package/es/components/material-quiz/context/MaterialQuizContext.d.ts +1 -1
- package/es/components/material-quiz/context/MaterialQuizContext.js +94 -153
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroup.js +161 -253
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +100 -129
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupMobile.js +101 -125
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +52 -60
- package/es/components/material-quiz/material-quiz-group/context/context.js +1 -1
- package/es/components/material-quiz-edit/MaterialQuizEdit.js +36 -43
- package/es/components/material-quiz-edit/MaterialQuizEditContent.js +229 -272
- package/es/components/material-quiz-edit/context.js +2 -4
- package/es/components/material-quiz-edit/options/OptionEditor.js +46 -64
- package/es/components/material-quiz-edit/options/OptionSelectMultiple.js +148 -170
- package/es/components/material-quiz-edit/options/OptionSelectMultipleOrder.js +149 -171
- package/es/components/material-quiz-edit/options/OptionSelectOne.js +144 -159
- package/es/components/material-quiz-edit/options/OptionText.js +82 -86
- package/es/components/material-quiz-edit/options/options-group/OptionGroup.js +8 -9
- package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerInfo.js +112 -151
- package/es/components/material-quiz-edit/options/options-group/OptionGroupAnswerListItem.js +197 -283
- package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupInfo.js +75 -83
- package/es/components/material-quiz-edit/options/options-group/OptionGroupGroupListItem.js +92 -103
- package/es/components/material-quiz-edit/utils/checkTwoDimensionArray.js +1 -5
- package/es/components/material-quiz-edit/utils/editValue.js +12 -17
- package/es/components/shared/QuestionBox.js +165 -192
- package/es/components/shared/QuizDraggbleDroppedOption.js +12 -11
- package/es/components/shared/QuizDraggbleDummyOption.js +16 -19
- package/es/components/shared/QuizDraggbleOption.js +59 -61
- package/es/components/shared/StyledMarkdown.js +1 -1
- package/es/components/shared/question-checkbox/QuestionCheckbox.js +7 -9
- package/es/components/shared/question-checkbox/QuestionCheckboxContext.d.ts +1 -1
- package/es/components/shared/question-checkbox/QuestionCheckboxContext.js +17 -20
- package/es/components/shared/question-checkbox/QuestionCheckboxOption.js +68 -54
- package/es/components/shared/question-radio/QuestionRadio.js +7 -9
- package/es/components/shared/question-radio/QuestionRadioContext.d.ts +1 -1
- package/es/components/shared/question-radio/QuestionRadioContext.js +17 -20
- package/es/components/shared/question-radio/QuestionRadioOption.js +59 -47
- package/es/components/shared/utils/getQuestionStatusStyle.js +9 -7
- package/es/components/shared/utils/mergeRefs.js +6 -15
- package/es/constant/element.js +3 -3
- package/es/helpers/index.js +10 -8
- package/es/hooks/useCaculatePassage.js +20 -21
- package/package.json +15 -12
- package/cjs/_virtual/_rollupPluginBabelHelpers.js +0 -423
- package/cjs/components/material-quiz/index.js +0 -9
- package/cjs/components/material-quiz/locales/index.js +0 -13
- package/cjs/components/material-quiz-edit/index.js +0 -7
- package/cjs/components/material-quiz-edit/locales/index.js +0 -13
- package/cjs/components/shared/index.js +0 -19
- package/cjs/constant/index.js +0 -9
- package/cjs/hooks/index.js +0 -7
- package/es/_virtual/_rollupPluginBabelHelpers.js +0 -408
- package/es/components/material-quiz/index.js +0 -2
- package/es/components/material-quiz/locales/index.js +0 -4
- package/es/components/material-quiz-edit/index.js +0 -1
- package/es/components/material-quiz-edit/locales/index.js +0 -4
- package/es/components/shared/index.js +0 -7
- package/es/constant/index.js +0 -1
- package/es/hooks/index.js +0 -1
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
3
|
-
import { useState, useRef, useEffect } from 'react';
|
|
1
|
+
import React, { useState, useRef, useEffect } from 'react';
|
|
4
2
|
import { useMeasure } from 'react-use';
|
|
5
3
|
import { Vspace, Shimmer, IconButton } from '@elice/blocks';
|
|
6
4
|
import { eilMathsignMultiplyBasic } from '@elice/icons';
|
|
@@ -12,179 +10,183 @@ import QuestionBox from '../shared/QuestionBox.js';
|
|
|
12
10
|
import { mergeRefs } from '../shared/utils/mergeRefs.js';
|
|
13
11
|
import { useMaterialQuizState } from './context/MaterialQuizContext.js';
|
|
14
12
|
|
|
15
|
-
var _templateObject;
|
|
16
13
|
//
|
|
17
14
|
//
|
|
18
15
|
//
|
|
19
|
-
|
|
16
|
+
const StyledMarkdownSSR = styled(MarkdownSSR).withConfig({
|
|
20
17
|
componentId: "sc-1s7jbf9-0"
|
|
21
18
|
})([".elicemd--theme-dark{pre{border:0;}table td,table th{border-bottom-color:rgba(255,255,255,0.16);}}", ""], EliceWysiwygEditorTheme.resetMarkdownSSR);
|
|
22
19
|
//
|
|
23
20
|
//
|
|
24
21
|
//
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
22
|
+
const IMAGE_CONTAINER_CLASSNAME = 'markdown-zoomable-image-container';
|
|
23
|
+
const ZOOM_ICON_CLASSNAME = 'markdown-zoom-icon';
|
|
24
|
+
const MarkdownContainer = styled$1('div')`
|
|
25
|
+
.${IMAGE_CONTAINER_CLASSNAME} {
|
|
26
|
+
position: relative;
|
|
27
|
+
|
|
28
|
+
span.${ZOOM_ICON_CLASSNAME} {
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
|
|
31
|
+
position: absolute;
|
|
32
|
+
top: 0;
|
|
33
|
+
right: ${({
|
|
34
|
+
vertical
|
|
35
|
+
}) => vertical ? '0!important' : '0'};
|
|
36
|
+
|
|
37
|
+
width: 2rem;
|
|
38
|
+
aspect-ratio: 1;
|
|
39
|
+
background-color: ${({
|
|
40
|
+
theme
|
|
41
|
+
}) => theme.palette.inverse.main};
|
|
42
|
+
margin: 0.5rem;
|
|
43
|
+
border-radius: 50%;
|
|
44
|
+
|
|
45
|
+
display: flex;
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: center;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
`;
|
|
51
|
+
const MaterialQuizInfo = ({
|
|
52
|
+
renderWithBox = true
|
|
53
|
+
}) => {
|
|
54
|
+
const {
|
|
55
|
+
materialQuiz,
|
|
56
|
+
vertical
|
|
57
|
+
} = useMaterialQuizState();
|
|
58
|
+
const [isRenderFinish, setIsRenderFinish] = useState(false);
|
|
59
|
+
const containerRef = useRef(null);
|
|
60
|
+
const [markdownMeasueRef, {
|
|
61
|
+
width
|
|
62
|
+
}] = useMeasure();
|
|
63
|
+
const ref = mergeRefs(containerRef, markdownMeasueRef);
|
|
64
|
+
const [zoomImageUrl, setZoomImageUrl] = useState('');
|
|
65
|
+
useEffect(() => {
|
|
55
66
|
if (!(materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionDescription) || !isRenderFinish || !containerRef.current) return;
|
|
56
67
|
// append zoom icon for image html render by MarkdownSSR
|
|
57
|
-
containerRef.current.querySelectorAll('img').forEach(
|
|
58
|
-
|
|
59
|
-
|
|
68
|
+
containerRef.current.querySelectorAll('img').forEach(img => {
|
|
69
|
+
const parent = img.parentElement;
|
|
70
|
+
const zoomIconStr = `
|
|
71
|
+
<svg width="25" height="25" viewBox="0 0 25 25" fill="white" xmlns="http://www.w3.org/2000/svg">
|
|
72
|
+
<path d="M5.75 4.875H9.125C9.72266 4.875 10.25 5.40234 10.25 6C10.25 6.63281 9.72266 7.125 9.125 7.125H6.875V9.375C6.875 10.0078 6.34766 10.5 5.75 10.5C5.11719 10.5 4.625 10.0078 4.625 9.375V6C4.625 5.40234 5.11719 4.875 5.75 4.875ZM6.875 16.125V18.375H9.125C9.72266 18.375 10.25 18.9023 10.25 19.5C10.25 20.1328 9.72266 20.625 9.125 20.625H5.75C5.11719 20.625 4.625 20.1328 4.625 19.5V16.125C4.625 15.5273 5.11719 15 5.75 15C6.34766 15 6.875 15.5273 6.875 16.125ZM15.875 4.875H19.25C19.8477 4.875 20.375 5.40234 20.375 6V9.375C20.375 10.0078 19.8477 10.5 19.25 10.5C18.6172 10.5 18.125 10.0078 18.125 9.375V7.125H15.875C15.2422 7.125 14.75 6.63281 14.75 6C14.75 5.40234 15.2422 4.875 15.875 4.875ZM20.375 16.125V19.5C20.375 20.1328 19.8477 20.625 19.25 20.625H15.875C15.2422 20.625 14.75 20.1328 14.75 19.5C14.75 18.9023 15.2422 18.375 15.875 18.375H18.125V16.125C18.125 15.5273 18.6172 15 19.25 15C19.8477 15 20.375 15.5273 20.375 16.125Z" fill="#D6DAE1"/>
|
|
73
|
+
</svg>
|
|
74
|
+
`;
|
|
60
75
|
if (parent) {
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
return item === img;
|
|
67
|
-
});
|
|
76
|
+
const imageRect = img.getBoundingClientRect();
|
|
77
|
+
const parentRect = parent.getBoundingClientRect();
|
|
78
|
+
const zoomIcons = parent.querySelectorAll(`.${ZOOM_ICON_CLASSNAME}`);
|
|
79
|
+
const totalImages = Array.from(parent.querySelectorAll(`img`));
|
|
80
|
+
const idx = totalImages.findIndex(item => item === img);
|
|
68
81
|
// restyle the zoom position when chaging the width instead of recreate it
|
|
69
82
|
if (zoomIcons.length === totalImages.length && idx !== -1) {
|
|
70
|
-
zoomIcons[idx].style.top =
|
|
71
|
-
zoomIcons[idx].style.right =
|
|
83
|
+
zoomIcons[idx].style.top = `${imageRect.top - parentRect.top}px`;
|
|
84
|
+
zoomIcons[idx].style.right = `${parentRect.right - imageRect.right}px`;
|
|
72
85
|
return;
|
|
73
86
|
}
|
|
74
87
|
parent.classList.add(IMAGE_CONTAINER_CLASSNAME);
|
|
75
88
|
parent.style.position = 'relative';
|
|
76
|
-
|
|
89
|
+
const span = document.createElement('span');
|
|
77
90
|
span.innerHTML = zoomIconStr;
|
|
78
91
|
span.classList.add(ZOOM_ICON_CLASSNAME);
|
|
79
|
-
span.style.top =
|
|
80
|
-
span.style.right =
|
|
81
|
-
span.onclick =
|
|
92
|
+
span.style.top = `${imageRect.top - parentRect.top}px`;
|
|
93
|
+
span.style.right = `${parentRect.right - imageRect.right}px`;
|
|
94
|
+
span.onclick = () => {
|
|
82
95
|
setZoomImageUrl(img.src);
|
|
83
96
|
};
|
|
84
97
|
parent.appendChild(span);
|
|
85
98
|
}
|
|
86
99
|
});
|
|
87
100
|
}, [materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionDescription, isRenderFinish, width]);
|
|
88
|
-
|
|
101
|
+
const onCloseImageModal = () => {
|
|
89
102
|
setZoomImageUrl('');
|
|
90
103
|
};
|
|
91
|
-
|
|
92
|
-
return
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
top: '-10%'
|
|
175
|
-
},
|
|
176
|
-
onClick: onCloseImageModal
|
|
177
|
-
})]
|
|
178
|
-
})
|
|
179
|
-
})]
|
|
180
|
-
});
|
|
104
|
+
const _renderQuiz = () => {
|
|
105
|
+
return React.createElement(React.Fragment, null, materialQuiz ? React.createElement(MarkdownContainer, {
|
|
106
|
+
ref: ref,
|
|
107
|
+
vertical: vertical
|
|
108
|
+
}, React.createElement(StyledMarkdownSSR, {
|
|
109
|
+
onRender: () => {
|
|
110
|
+
// set timeout for waiting time to the image can render
|
|
111
|
+
setTimeout(() => {
|
|
112
|
+
setIsRenderFinish(true);
|
|
113
|
+
}, 300);
|
|
114
|
+
},
|
|
115
|
+
children: materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionDescription,
|
|
116
|
+
dark: true,
|
|
117
|
+
paddingx: 0,
|
|
118
|
+
paddingy: 0
|
|
119
|
+
})) : React.createElement(React.Fragment, null, React.createElement(Vspace, {
|
|
120
|
+
height: 1
|
|
121
|
+
}), React.createElement(Shimmer, {
|
|
122
|
+
dark: true,
|
|
123
|
+
borderRadius: '4px',
|
|
124
|
+
width: "80%",
|
|
125
|
+
height: '40px'
|
|
126
|
+
}), React.createElement(Vspace, {
|
|
127
|
+
height: 1
|
|
128
|
+
}), React.createElement(Shimmer, {
|
|
129
|
+
dark: true,
|
|
130
|
+
borderRadius: '4px',
|
|
131
|
+
width: "100%",
|
|
132
|
+
height: '40px'
|
|
133
|
+
}), React.createElement(Vspace, {
|
|
134
|
+
height: 1
|
|
135
|
+
}), React.createElement(Shimmer, {
|
|
136
|
+
dark: true,
|
|
137
|
+
borderRadius: '4px',
|
|
138
|
+
width: "100%",
|
|
139
|
+
height: '40px'
|
|
140
|
+
}), React.createElement(Vspace, {
|
|
141
|
+
height: 1
|
|
142
|
+
}), React.createElement(Shimmer, {
|
|
143
|
+
dark: true,
|
|
144
|
+
borderRadius: '4px',
|
|
145
|
+
width: "100%",
|
|
146
|
+
height: '40px'
|
|
147
|
+
})), React.createElement(Modal, {
|
|
148
|
+
open: !!zoomImageUrl,
|
|
149
|
+
sx: {
|
|
150
|
+
border: 'none',
|
|
151
|
+
outline: '0',
|
|
152
|
+
display: 'flex',
|
|
153
|
+
justifyContent: 'center',
|
|
154
|
+
alignItems: 'center'
|
|
155
|
+
}
|
|
156
|
+
}, React.createElement(Box, {
|
|
157
|
+
width: "70%",
|
|
158
|
+
height: "70%",
|
|
159
|
+
display: "flex",
|
|
160
|
+
alignItems: "center",
|
|
161
|
+
justifyContent: "center",
|
|
162
|
+
position: "relative",
|
|
163
|
+
sx: {
|
|
164
|
+
outline: 'none'
|
|
165
|
+
}
|
|
166
|
+
}, React.createElement("img", {
|
|
167
|
+
src: zoomImageUrl,
|
|
168
|
+
"aria-hidden": true,
|
|
169
|
+
alt: "zoom image",
|
|
170
|
+
style: {
|
|
171
|
+
maxWidth: '100%',
|
|
172
|
+
maxHeight: '100%'
|
|
173
|
+
}
|
|
174
|
+
}), React.createElement(IconButton, {
|
|
175
|
+
icon: eilMathsignMultiplyBasic,
|
|
176
|
+
role: "white",
|
|
177
|
+
size: "micro",
|
|
178
|
+
border: false,
|
|
179
|
+
transparent: true,
|
|
180
|
+
style: {
|
|
181
|
+
position: 'absolute',
|
|
182
|
+
right: '-10%',
|
|
183
|
+
top: '-10%'
|
|
184
|
+
},
|
|
185
|
+
onClick: onCloseImageModal
|
|
186
|
+
}))));
|
|
181
187
|
};
|
|
182
|
-
if (renderWithBox) return
|
|
183
|
-
|
|
184
|
-
});
|
|
185
|
-
return jsx(Fragment, {
|
|
186
|
-
children: _renderQuiz()
|
|
187
|
-
});
|
|
188
|
+
if (renderWithBox) return React.createElement(QuestionBox, null, _renderQuiz());
|
|
189
|
+
return React.createElement(React.Fragment, null, _renderQuiz());
|
|
188
190
|
};
|
|
189
191
|
|
|
190
192
|
export { MaterialQuizInfo as default };
|