@elice/material-quiz 1.240719.1 → 1.240722.0-dev2.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/eb-sortable/EbDraggable.d.ts +1 -12
- package/cjs/components/eb-sortable/EbDraggable.js +29 -99
- package/cjs/components/eb-sortable/EbDroppable.d.ts +3 -8
- package/cjs/components/eb-sortable/EbDroppable.js +17 -43
- package/cjs/components/material-quiz/MaterialQuizSelectMultiple.js +2 -1
- package/cjs/components/material-quiz/MaterialQuizSelectMultipleOrder.js +246 -173
- package/cjs/components/material-quiz/MaterialQuizSelectOne.js +2 -1
- package/cjs/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +41 -10
- package/cjs/components/shared/QuizDraggbleDroppedOption.d.ts +1 -1
- package/cjs/components/shared/QuizDraggbleDroppedOption.js +35 -10
- package/cjs/components/shared/QuizDraggbleDummyOption.d.ts +1 -3
- package/cjs/components/shared/QuizDraggbleDummyOption.js +8 -3
- package/cjs/components/shared/QuizDraggbleOption.d.ts +0 -1
- package/cjs/components/shared/QuizDraggbleOption.js +10 -4
- package/es/components/eb-sortable/EbDraggable.d.ts +1 -12
- package/es/components/eb-sortable/EbDraggable.js +29 -94
- package/es/components/eb-sortable/EbDroppable.d.ts +3 -8
- package/es/components/eb-sortable/EbDroppable.js +17 -38
- package/es/components/material-quiz/MaterialQuizSelectMultiple.js +2 -1
- package/es/components/material-quiz/MaterialQuizSelectMultipleOrder.js +246 -173
- package/es/components/material-quiz/MaterialQuizSelectOne.js +2 -1
- package/es/components/material-quiz/material-quiz-group/MaterialQuizGroupDesktop.js +42 -11
- package/es/components/shared/QuizDraggbleDroppedOption.d.ts +1 -1
- package/es/components/shared/QuizDraggbleDroppedOption.js +31 -10
- package/es/components/shared/QuizDraggbleDummyOption.d.ts +1 -3
- package/es/components/shared/QuizDraggbleDummyOption.js +8 -3
- package/es/components/shared/QuizDraggbleOption.d.ts +0 -1
- package/es/components/shared/QuizDraggbleOption.js +10 -4
- package/package.json +5 -3
|
@@ -1,6 +1,25 @@
|
|
|
1
|
+
import _styled from '@emotion/styled/base';
|
|
1
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
|
+
import EbDroppable from '../eb-sortable/EbDroppable.js';
|
|
2
4
|
import QuizDraggbleOption from './QuizDraggbleOption.js';
|
|
3
5
|
|
|
6
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
//
|
|
10
|
+
var StyledQuizDroppedOptionWrapper = /*#__PURE__*/_styled(EbDroppable, {
|
|
11
|
+
target: "e1dhzt110"
|
|
12
|
+
})("production" === "production" ? {
|
|
13
|
+
name: "15nejzs",
|
|
14
|
+
styles: "&:not(:last-of-type){margin-bottom:1rem;}"
|
|
15
|
+
} : {
|
|
16
|
+
name: "15nejzs",
|
|
17
|
+
styles: "&:not(:last-of-type){margin-bottom:1rem;}",
|
|
18
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
19
|
+
});
|
|
20
|
+
//
|
|
21
|
+
//
|
|
22
|
+
//
|
|
4
23
|
var QuizDraggbleDroppedOption = function QuizDraggbleDroppedOption(_ref) {
|
|
5
24
|
var id = _ref.id,
|
|
6
25
|
content = _ref.content,
|
|
@@ -9,16 +28,18 @@ var QuizDraggbleDroppedOption = function QuizDraggbleDroppedOption(_ref) {
|
|
|
9
28
|
role = _ref.role,
|
|
10
29
|
indexOrder = _ref.indexOrder,
|
|
11
30
|
isMarkdown = _ref.isMarkdown;
|
|
12
|
-
return jsx(
|
|
13
|
-
id:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
31
|
+
return jsx(StyledQuizDroppedOptionWrapper, {
|
|
32
|
+
id: "quiz-answer-zone-".concat(indexOrder - 1),
|
|
33
|
+
children: jsx(QuizDraggbleOption, {
|
|
34
|
+
id: id,
|
|
35
|
+
content: content,
|
|
36
|
+
className: "quiz-answer",
|
|
37
|
+
disabled: disabled,
|
|
38
|
+
role: role,
|
|
39
|
+
indexOrder: indexOrder,
|
|
40
|
+
isMarkdown: isMarkdown
|
|
41
|
+
}, id)
|
|
42
|
+
});
|
|
22
43
|
};
|
|
23
44
|
|
|
24
45
|
export { QuizDraggbleDroppedOption as default };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { EbDroppableProps } from '../eb-sortable/EbDroppable';
|
|
3
2
|
interface QuizDraggbleDummyOptionProps {
|
|
4
|
-
children?: React.ReactNode;
|
|
5
3
|
indexOrder: number;
|
|
6
|
-
|
|
4
|
+
children?: React.ReactNode;
|
|
7
5
|
}
|
|
8
6
|
declare const QuizDraggbleDummyOption: React.FC<QuizDraggbleDummyOptionProps>;
|
|
9
7
|
export default QuizDraggbleDummyOption;
|
|
@@ -4,18 +4,23 @@ import { base } from '@elice/design-tokens';
|
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import EbDroppable from '../eb-sortable/EbDroppable.js';
|
|
6
6
|
|
|
7
|
+
//
|
|
8
|
+
//
|
|
9
|
+
//
|
|
7
10
|
var StyledQuizDraggbleDummyOption = styled(EbDroppable).withConfig({
|
|
8
11
|
componentId: "sc-1ayp8c1-0"
|
|
9
12
|
})(["display:flex;justify-content:space-between;align-items:center;border:1px dashed ", ";border-radius:8px;overflow:hidden;background-color:", ";padding:0.875rem 1rem;color:", ";font-size:0.875rem;&:not(:last-of-type){margin-bottom:1rem;}&.ui-droppable-hover{outline:1px dashed ", ";}"], base.color.navy4, base.color.navy5, base.color.navy0, base.color.navy0);
|
|
10
13
|
var StyledOrder = styled.div.withConfig({
|
|
11
14
|
componentId: "sc-1ayp8c1-1"
|
|
12
15
|
})(["width:1.5rem;height:1.5rem;display:flex;border-radius:4px;align-items:center;justify-content:center;color:", ";background-color:", ";flex:none;margin-left:0.5rem;"], base.color.navy0, base.color.navy4);
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
//
|
|
13
19
|
var QuizDraggbleDummyOption = function QuizDraggbleDummyOption(_ref) {
|
|
14
20
|
var children = _ref.children,
|
|
15
|
-
indexOrder = _ref.indexOrder
|
|
16
|
-
onDrop = _ref.onDrop;
|
|
21
|
+
indexOrder = _ref.indexOrder;
|
|
17
22
|
return jsxs(StyledQuizDraggbleDummyOption, {
|
|
18
|
-
|
|
23
|
+
id: "quiz-dummy-zone-".concat(indexOrder - 1),
|
|
19
24
|
children: [jsx(Text, {
|
|
20
25
|
wordBreak: "break-all",
|
|
21
26
|
customStyles: {
|
|
@@ -7,6 +7,9 @@ import EbDraggable from '../eb-sortable/EbDraggable.js';
|
|
|
7
7
|
import { useMaterialQuizState } from '../material-quiz/context/MaterialQuizContext.js';
|
|
8
8
|
import StyledMarkdown from './StyledMarkdown.js';
|
|
9
9
|
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
//
|
|
10
13
|
var StyledQuizDraggbleOptionHandle = styled.div.withConfig({
|
|
11
14
|
componentId: "sc-19b0zkq-0"
|
|
12
15
|
})(["display:flex;align-items:center;justify-content:center;background-color:", ";width:1.5rem;flex:none;"], base.color.navy5);
|
|
@@ -36,7 +39,7 @@ var StyledOrder = styled.div.withConfig({
|
|
|
36
39
|
})(["width:1.5rem;height:1.5rem;display:flex;border-radius:4px;align-items:center;justify-content:center;color:", ";background-color:", ";flex:none;margin-left:0.5rem;"], base.color.navy0, base.color.navy4);
|
|
37
40
|
var StyledQuizDraggbleOption = styled(EbDraggable).withConfig({
|
|
38
41
|
componentId: "sc-19b0zkq-3"
|
|
39
|
-
})(["display:flex;border-radius:8px;border:1px solid ", ";background-color:", ";overflow:hidden
|
|
42
|
+
})(["display:flex;border-radius:8px;border:1px solid ", ";background-color:", ";overflow:hidden;&:not(:last-of-type){margin-bottom:1rem;}", "{background-color:", ";color:", ";}", "{background-color:", ";& *{color:", ";}}", "{background-color:", ";color:", ";}&.ui-draggable-dragging{z-index:1000 !important;color:", " !important;border:none !important;", "{background-color:", ";}", "{background-color:", ";border:1px solid ", " !important;}", "{color:", ";background-color:", ";}& *{color:", " !important;}}&.ui-draggable-dragging.quiz-answer{width:calc(100% - 1rem * 2);}"], base.color.navy4, base.color.navy5, StyledQuizDraggbleOptionHandle, function (_ref3) {
|
|
40
43
|
var role = _ref3.role;
|
|
41
44
|
switch (role) {
|
|
42
45
|
case 'answer':
|
|
@@ -115,6 +118,9 @@ var StyledQuizDraggbleOption = styled(EbDraggable).withConfig({
|
|
|
115
118
|
return base.color.navy0;
|
|
116
119
|
}
|
|
117
120
|
}, base.color.navy0, StyledQuizDraggbleOptionHandle, base.color.navy5, StyledQuizDraggbleOptionContent, base.color.navy4, base.color.navy4, StyledOrder, base.color.navy0, base.color.navy5, base.color.navy0);
|
|
121
|
+
//
|
|
122
|
+
//
|
|
123
|
+
//
|
|
118
124
|
var QuizDraggbleOption = function QuizDraggbleOption(_ref9) {
|
|
119
125
|
var id = _ref9.id,
|
|
120
126
|
className = _ref9.className,
|
|
@@ -124,18 +130,18 @@ var QuizDraggbleOption = function QuizDraggbleOption(_ref9) {
|
|
|
124
130
|
_ref9$role = _ref9.role,
|
|
125
131
|
role = _ref9$role === void 0 ? 'default' : _ref9$role,
|
|
126
132
|
indexOrder = _ref9.indexOrder,
|
|
127
|
-
_ref9$clone = _ref9.clone,
|
|
128
|
-
clone = _ref9$clone === void 0 ? false : _ref9$clone,
|
|
129
133
|
_ref9$isMarkdown = _ref9.isMarkdown,
|
|
130
134
|
isMarkdown = _ref9$isMarkdown === void 0 ? false : _ref9$isMarkdown;
|
|
131
135
|
var _useMaterialQuizState = useMaterialQuizState(),
|
|
132
136
|
vertical = _useMaterialQuizState.vertical;
|
|
137
|
+
//
|
|
138
|
+
//
|
|
139
|
+
//
|
|
133
140
|
return jsxs(StyledQuizDraggbleOption, {
|
|
134
141
|
id: id,
|
|
135
142
|
className: className,
|
|
136
143
|
disabled: disabled,
|
|
137
144
|
role: role,
|
|
138
|
-
clone: clone,
|
|
139
145
|
vertical: vertical,
|
|
140
146
|
children: [jsx(StyledQuizDraggbleOptionHandle, {
|
|
141
147
|
children: jsx(Icon, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-quiz",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.240722.0-dev2.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",
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
|
+
"@dnd-kit/core": "^6.1.0",
|
|
26
27
|
"@elice/api-client": "^1",
|
|
27
28
|
"@elice/blocks": "^1",
|
|
28
29
|
"@elice/design-tokens": "^1",
|
|
@@ -57,6 +58,7 @@
|
|
|
57
58
|
"tslib": "^2.6.1"
|
|
58
59
|
},
|
|
59
60
|
"devDependencies": {
|
|
61
|
+
"@dnd-kit/core": "^6.1.0",
|
|
60
62
|
"@elice/api-client": "^1.240619.0",
|
|
61
63
|
"@elice/blocks": "^1.240529.0",
|
|
62
64
|
"@elice/design-tokens": "^1.220803.0",
|
|
@@ -64,8 +66,8 @@
|
|
|
64
66
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
65
67
|
"@elice/intl": "0.240425.0-rc.2",
|
|
66
68
|
"@elice/markdown": "^1.240124.0",
|
|
67
|
-
"@elice/material-shared-types": "1.
|
|
68
|
-
"@elice/material-shared-utils": "1.
|
|
69
|
+
"@elice/material-shared-types": "1.240722.0-dev2.0",
|
|
70
|
+
"@elice/material-shared-utils": "1.240722.0-dev2.0",
|
|
69
71
|
"@elice/mui-system": "^5.240108.1",
|
|
70
72
|
"@elice/types": "1.240709.0",
|
|
71
73
|
"@elice/wysiwyg": "1.240716.1",
|