@elice/material-quiz 1.241016.0 → 1.241017.0

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.
@@ -32,7 +32,7 @@ var StyledMarkdownSSR = styled__default.default(markdown.MarkdownSSR).withConfig
32
32
  //
33
33
  var IMAGE_CONTAINER_CLASSNAME = 'markdown-zoomable-image-container';
34
34
  var ZOOM_ICON_CLASSNAME = 'markdown-zoom-icon';
35
- var MarkdownContainer = material.styled('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n .", " {\n position: relative;\n width: fit-content;\n margin: auto;\n\n img {\n min-height: 3rem;\n width: auto;\n }\n\n span.", " {\n cursor: pointer;\n\n position: absolute;\n top: 0;\n right: ", ";\n height: 2rem;\n width: 2rem;\n aspect-ratio: 1;\n background-color: ", ";\n margin: 0.5rem;\n border-radius: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n"])), IMAGE_CONTAINER_CLASSNAME, ZOOM_ICON_CLASSNAME, function (_ref) {
35
+ var MarkdownContainer = material.styled('div')(_templateObject || (_templateObject = _rollupPluginBabelHelpers.taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: auto;\n\n img {\n min-height: 3rem;\n width: auto;\n }\n\n div {\n display: inline-block;\n position: relative;\n width: fit-content;\n }\n\n span.", " {\n cursor: pointer;\n\n position: absolute;\n top: 0;\n right: ", ";\n height: 2rem;\n width: 2rem;\n aspect-ratio: 1;\n background-color: ", ";\n margin: 0.5rem;\n border-radius: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n"])), IMAGE_CONTAINER_CLASSNAME, ZOOM_ICON_CLASSNAME, function (_ref) {
36
36
  var vertical = _ref.vertical;
37
37
  return vertical ? '0!important' : '0';
38
38
  }, function (_ref2) {
@@ -81,6 +81,9 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
81
81
  }
82
82
  parent.classList.add(IMAGE_CONTAINER_CLASSNAME);
83
83
  parent.style.position = 'relative';
84
+ var div = document.createElement('div');
85
+ parent.insertBefore(div, img);
86
+ div.appendChild(img);
84
87
  var span = document.createElement('span');
85
88
  span.innerHTML = zoomIconStr;
86
89
  span.classList.add(ZOOM_ICON_CLASSNAME);
@@ -88,13 +91,13 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
88
91
  span.onclick = function () {
89
92
  setZoomImageUrl(img.src);
90
93
  };
91
- parent.onmousemove = function () {
94
+ div.onmousemove = function () {
92
95
  span.style.display = 'flex';
93
96
  };
94
- parent.onmouseleave = function () {
97
+ div.onmouseleave = function () {
95
98
  span.style.display = 'none';
96
99
  };
97
- parent.appendChild(span);
100
+ div.appendChild(span);
98
101
  }
99
102
  });
100
103
  }, [materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionDescription, isRenderFinish, width]);
@@ -24,7 +24,7 @@ var StyledMarkdownSSR = styled(MarkdownSSR).withConfig({
24
24
  //
25
25
  var IMAGE_CONTAINER_CLASSNAME = 'markdown-zoomable-image-container';
26
26
  var ZOOM_ICON_CLASSNAME = 'markdown-zoom-icon';
27
- var MarkdownContainer = styled$1('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n width: fit-content;\n margin: auto;\n\n img {\n min-height: 3rem;\n width: auto;\n }\n\n span.", " {\n cursor: pointer;\n\n position: absolute;\n top: 0;\n right: ", ";\n height: 2rem;\n width: 2rem;\n aspect-ratio: 1;\n background-color: ", ";\n margin: 0.5rem;\n border-radius: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n"])), IMAGE_CONTAINER_CLASSNAME, ZOOM_ICON_CLASSNAME, function (_ref) {
27
+ var MarkdownContainer = styled$1('div')(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .", " {\n position: relative;\n margin: auto;\n\n img {\n min-height: 3rem;\n width: auto;\n }\n\n div {\n display: inline-block;\n position: relative;\n width: fit-content;\n }\n\n span.", " {\n cursor: pointer;\n\n position: absolute;\n top: 0;\n right: ", ";\n height: 2rem;\n width: 2rem;\n aspect-ratio: 1;\n background-color: ", ";\n margin: 0.5rem;\n border-radius: 50%;\n\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n"])), IMAGE_CONTAINER_CLASSNAME, ZOOM_ICON_CLASSNAME, function (_ref) {
28
28
  var vertical = _ref.vertical;
29
29
  return vertical ? '0!important' : '0';
30
30
  }, function (_ref2) {
@@ -73,6 +73,9 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
73
73
  }
74
74
  parent.classList.add(IMAGE_CONTAINER_CLASSNAME);
75
75
  parent.style.position = 'relative';
76
+ var div = document.createElement('div');
77
+ parent.insertBefore(div, img);
78
+ div.appendChild(img);
76
79
  var span = document.createElement('span');
77
80
  span.innerHTML = zoomIconStr;
78
81
  span.classList.add(ZOOM_ICON_CLASSNAME);
@@ -80,13 +83,13 @@ var MaterialQuizInfo = function MaterialQuizInfo(_ref3) {
80
83
  span.onclick = function () {
81
84
  setZoomImageUrl(img.src);
82
85
  };
83
- parent.onmousemove = function () {
86
+ div.onmousemove = function () {
84
87
  span.style.display = 'flex';
85
88
  };
86
- parent.onmouseleave = function () {
89
+ div.onmouseleave = function () {
87
90
  span.style.display = 'none';
88
91
  };
89
- parent.appendChild(span);
92
+ div.appendChild(span);
90
93
  }
91
94
  });
92
95
  }, [materialQuiz === null || materialQuiz === void 0 ? void 0 : materialQuiz.questionDescription, isRenderFinish, width]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elice/material-quiz",
3
- "version": "1.241016.0",
3
+ "version": "1.241017.0",
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",
@@ -70,8 +70,8 @@
70
70
  "@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
71
71
  "@elice/intl": "0.240710.0",
72
72
  "@elice/markdown": "1.241015.0",
73
- "@elice/material-shared-types": "1.241016.0",
74
- "@elice/material-shared-utils": "1.241016.0",
73
+ "@elice/material-shared-types": "1.241017.0",
74
+ "@elice/material-shared-utils": "1.241017.0",
75
75
  "@elice/mui-elements": "^5.240820.0",
76
76
  "@elice/mui-system": "^5.240820.0",
77
77
  "@elice/openapi-client-course": "^1.230814.0",