@elice/material-quiz 1.240802.0 → 1.240806.0-pdf.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.
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +1 -2
- package/cjs/components/shared/StyledMarkdown.js +1 -1
- package/cjs/helpers/index.d.ts +0 -2
- package/cjs/helpers/index.js +0 -10
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupOptionItem.js +1 -2
- package/es/components/shared/StyledMarkdown.js +1 -1
- package/es/helpers/index.d.ts +0 -2
- package/es/helpers/index.js +1 -10
- package/package.json +3 -3
|
@@ -8,7 +8,6 @@ var designTokens = require('@elice/design-tokens');
|
|
|
8
8
|
var icons = require('@elice/icons');
|
|
9
9
|
var markdown = require('@elice/markdown');
|
|
10
10
|
var styled = require('styled-components');
|
|
11
|
-
var index = require('../../../helpers/index.js');
|
|
12
11
|
var EbDraggable = require('../../eb-sortable/EbDraggable.js');
|
|
13
12
|
var MaterialQuizContext = require('../context/MaterialQuizContext.js');
|
|
14
13
|
|
|
@@ -85,7 +84,7 @@ var MaterialQuizGroupOptionItem = function MaterialQuizGroupOptionItem(_ref7) {
|
|
|
85
84
|
children: [isOptionContent ? jsxRuntime.jsx(StyledOptionContent, {
|
|
86
85
|
vertical: vertical,
|
|
87
86
|
children: jsxRuntime.jsx(markdown.MarkdownSSR, {
|
|
88
|
-
children: (_a =
|
|
87
|
+
children: (_a = option.options.content) !== null && _a !== void 0 ? _a : '',
|
|
89
88
|
paddingx: 0,
|
|
90
89
|
paddingy: 0,
|
|
91
90
|
dark: true
|
|
@@ -11,6 +11,6 @@ var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
|
11
11
|
|
|
12
12
|
var StyledMarkdown = styled__default.default(markdown.Markdown).withConfig({
|
|
13
13
|
componentId: "sc-l6r531-0"
|
|
14
|
-
})(["
|
|
14
|
+
})(["p{margin:0 !important;}code{white-space:pre-wrap;word-break:break-all;}"]);
|
|
15
15
|
|
|
16
16
|
exports.default = StyledMarkdown;
|
package/cjs/helpers/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { GetOrgLectureGetResponses, GetOrgMaterialQuizResponseGetResponses } from '@elice/types';
|
|
2
2
|
import type { QuizOptionType } from '@elice/types/es/enums';
|
|
3
|
-
import type { QuizGroupOption } from "../components/material-quiz/material-quiz-group/context/context";
|
|
4
3
|
interface OptionInfo {
|
|
5
4
|
content: string;
|
|
6
5
|
optionType: QuizOptionType;
|
|
@@ -47,5 +46,4 @@ export declare function shouldResetOptions({ materialQuizResponse, }: {
|
|
|
47
46
|
materialQuizResponse?: GetOrgMaterialQuizResponseGetResponses['quizResponse'];
|
|
48
47
|
}): boolean;
|
|
49
48
|
export declare function getQuizResult(materialQuizResponse: GetOrgMaterialQuizResponseGetResponses['quizResponse']): boolean | undefined;
|
|
50
|
-
export declare const addAltTextToImage: ({ content, title, }: QuizGroupOption['options']) => string | undefined;
|
|
51
49
|
export {};
|
package/cjs/helpers/index.js
CHANGED
|
@@ -62,17 +62,7 @@ function getQuizResult(materialQuizResponse) {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
}
|
|
65
|
-
var addAltTextToImage = function addAltTextToImage(_ref3) {
|
|
66
|
-
var content = _ref3.content,
|
|
67
|
-
title = _ref3.title;
|
|
68
|
-
if (!title) return content;
|
|
69
|
-
// Match the pattern 
|
|
70
|
-
var regex = /!\[]\((.*?)\)/;
|
|
71
|
-
// Replace with the alt text inside the []
|
|
72
|
-
return content === null || content === void 0 ? void 0 : content.replace(regex, ""));
|
|
73
|
-
};
|
|
74
65
|
|
|
75
|
-
exports.addAltTextToImage = addAltTextToImage;
|
|
76
66
|
exports.checkUserLectureTestEnded = checkUserLectureTestEnded;
|
|
77
67
|
exports.getOptionStatus = getOptionStatus;
|
|
78
68
|
exports.getQuizResult = getQuizResult;
|
|
@@ -4,7 +4,6 @@ import { base } from '@elice/design-tokens';
|
|
|
4
4
|
import { eilMathsignMultiplyBasic } from '@elice/icons';
|
|
5
5
|
import { MarkdownSSR } from '@elice/markdown';
|
|
6
6
|
import styled from 'styled-components';
|
|
7
|
-
import { addAltTextToImage } from '../../../helpers/index.js';
|
|
8
7
|
import EbDraggable from '../../eb-sortable/EbDraggable.js';
|
|
9
8
|
import { useMaterialQuizState } from '../context/MaterialQuizContext.js';
|
|
10
9
|
|
|
@@ -77,7 +76,7 @@ var MaterialQuizGroupOptionItem = function MaterialQuizGroupOptionItem(_ref7) {
|
|
|
77
76
|
children: [isOptionContent ? jsx(StyledOptionContent, {
|
|
78
77
|
vertical: vertical,
|
|
79
78
|
children: jsx(MarkdownSSR, {
|
|
80
|
-
children: (_a =
|
|
79
|
+
children: (_a = option.options.content) !== null && _a !== void 0 ? _a : '',
|
|
81
80
|
paddingx: 0,
|
|
82
81
|
paddingy: 0,
|
|
83
82
|
dark: true
|
|
@@ -3,6 +3,6 @@ import styled from 'styled-components';
|
|
|
3
3
|
|
|
4
4
|
var StyledMarkdown = styled(Markdown).withConfig({
|
|
5
5
|
componentId: "sc-l6r531-0"
|
|
6
|
-
})(["
|
|
6
|
+
})(["p{margin:0 !important;}code{white-space:pre-wrap;word-break:break-all;}"]);
|
|
7
7
|
|
|
8
8
|
export { StyledMarkdown as default };
|
package/es/helpers/index.d.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { GetOrgLectureGetResponses, GetOrgMaterialQuizResponseGetResponses } from '@elice/types';
|
|
2
2
|
import type { QuizOptionType } from '@elice/types/es/enums';
|
|
3
|
-
import type { QuizGroupOption } from "../components/material-quiz/material-quiz-group/context/context";
|
|
4
3
|
interface OptionInfo {
|
|
5
4
|
content: string;
|
|
6
5
|
optionType: QuizOptionType;
|
|
@@ -47,5 +46,4 @@ export declare function shouldResetOptions({ materialQuizResponse, }: {
|
|
|
47
46
|
materialQuizResponse?: GetOrgMaterialQuizResponseGetResponses['quizResponse'];
|
|
48
47
|
}): boolean;
|
|
49
48
|
export declare function getQuizResult(materialQuizResponse: GetOrgMaterialQuizResponseGetResponses['quizResponse']): boolean | undefined;
|
|
50
|
-
export declare const addAltTextToImage: ({ content, title, }: QuizGroupOption['options']) => string | undefined;
|
|
51
49
|
export {};
|
package/es/helpers/index.js
CHANGED
|
@@ -60,14 +60,5 @@ function getQuizResult(materialQuizResponse) {
|
|
|
60
60
|
return;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
var addAltTextToImage = function addAltTextToImage(_ref3) {
|
|
64
|
-
var content = _ref3.content,
|
|
65
|
-
title = _ref3.title;
|
|
66
|
-
if (!title) return content;
|
|
67
|
-
// Match the pattern 
|
|
68
|
-
var regex = /!\[]\((.*?)\)/;
|
|
69
|
-
// Replace with the alt text inside the []
|
|
70
|
-
return content === null || content === void 0 ? void 0 : content.replace(regex, ""));
|
|
71
|
-
};
|
|
72
63
|
|
|
73
|
-
export { QuizResultStatus,
|
|
64
|
+
export { QuizResultStatus, checkUserLectureTestEnded, getOptionStatus, getQuizResult, getQuizResultStatus, shouldResetOptions };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240806.0-pdf.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",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
67
67
|
"@elice/intl": "0.240425.0-rc.2",
|
|
68
68
|
"@elice/markdown": "^1.240124.0",
|
|
69
|
-
"@elice/material-shared-types": "1.
|
|
70
|
-
"@elice/material-shared-utils": "1.
|
|
69
|
+
"@elice/material-shared-types": "1.240722.0",
|
|
70
|
+
"@elice/material-shared-utils": "1.240722.0",
|
|
71
71
|
"@elice/mui-system": "^5.240108.1",
|
|
72
72
|
"@elice/types": "1.240709.0",
|
|
73
73
|
"@elice/wysiwyg": "1.240716.1",
|