@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
|
@@ -5,7 +5,7 @@ interface QuizDraggbleDroppedOptionProps {
|
|
|
5
5
|
content: string;
|
|
6
6
|
disabled: boolean;
|
|
7
7
|
role: QuizDraggbleOptionRole;
|
|
8
|
-
indexOrder
|
|
8
|
+
indexOrder: number;
|
|
9
9
|
isMarkdown?: boolean;
|
|
10
10
|
}
|
|
11
11
|
declare const QuizDraggbleDroppedOption: React.FC<QuizDraggbleDroppedOptionProps>;
|
|
@@ -2,9 +2,32 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
+
var _styled = require('@emotion/styled/base');
|
|
5
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
|
+
var EbDroppable = require('../eb-sortable/EbDroppable.js');
|
|
6
8
|
var QuizDraggbleOption = require('./QuizDraggbleOption.js');
|
|
7
9
|
|
|
10
|
+
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
11
|
+
|
|
12
|
+
var _styled__default = /*#__PURE__*/_interopDefaultCompat(_styled);
|
|
13
|
+
|
|
14
|
+
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)."; }
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
//
|
|
18
|
+
var StyledQuizDroppedOptionWrapper = /*#__PURE__*/_styled__default.default(EbDroppable.default, {
|
|
19
|
+
target: "e1dhzt110"
|
|
20
|
+
})("production" === "production" ? {
|
|
21
|
+
name: "15nejzs",
|
|
22
|
+
styles: "&:not(:last-of-type){margin-bottom:1rem;}"
|
|
23
|
+
} : {
|
|
24
|
+
name: "15nejzs",
|
|
25
|
+
styles: "&:not(:last-of-type){margin-bottom:1rem;}",
|
|
26
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
27
|
+
});
|
|
28
|
+
//
|
|
29
|
+
//
|
|
30
|
+
//
|
|
8
31
|
var QuizDraggbleDroppedOption = function QuizDraggbleDroppedOption(_ref) {
|
|
9
32
|
var id = _ref.id,
|
|
10
33
|
content = _ref.content,
|
|
@@ -13,16 +36,18 @@ var QuizDraggbleDroppedOption = function QuizDraggbleDroppedOption(_ref) {
|
|
|
13
36
|
role = _ref.role,
|
|
14
37
|
indexOrder = _ref.indexOrder,
|
|
15
38
|
isMarkdown = _ref.isMarkdown;
|
|
16
|
-
return jsxRuntime.jsx(
|
|
17
|
-
id:
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
39
|
+
return jsxRuntime.jsx(StyledQuizDroppedOptionWrapper, {
|
|
40
|
+
id: "quiz-answer-zone-".concat(indexOrder - 1),
|
|
41
|
+
children: jsxRuntime.jsx(QuizDraggbleOption.default, {
|
|
42
|
+
id: id,
|
|
43
|
+
content: content,
|
|
44
|
+
className: "quiz-answer",
|
|
45
|
+
disabled: disabled,
|
|
46
|
+
role: role,
|
|
47
|
+
indexOrder: indexOrder,
|
|
48
|
+
isMarkdown: isMarkdown
|
|
49
|
+
}, id)
|
|
50
|
+
});
|
|
26
51
|
};
|
|
27
52
|
|
|
28
53
|
exports.default = QuizDraggbleDroppedOption;
|
|
@@ -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;
|
|
@@ -12,18 +12,23 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
12
12
|
|
|
13
13
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
14
14
|
|
|
15
|
+
//
|
|
16
|
+
//
|
|
17
|
+
//
|
|
15
18
|
var StyledQuizDraggbleDummyOption = styled__default.default(EbDroppable.default).withConfig({
|
|
16
19
|
componentId: "sc-1ayp8c1-0"
|
|
17
20
|
})(["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 ", ";}"], designTokens.base.color.navy4, designTokens.base.color.navy5, designTokens.base.color.navy0, designTokens.base.color.navy0);
|
|
18
21
|
var StyledOrder = styled__default.default.div.withConfig({
|
|
19
22
|
componentId: "sc-1ayp8c1-1"
|
|
20
23
|
})(["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;"], designTokens.base.color.navy0, designTokens.base.color.navy4);
|
|
24
|
+
//
|
|
25
|
+
//
|
|
26
|
+
//
|
|
21
27
|
var QuizDraggbleDummyOption = function QuizDraggbleDummyOption(_ref) {
|
|
22
28
|
var children = _ref.children,
|
|
23
|
-
indexOrder = _ref.indexOrder
|
|
24
|
-
onDrop = _ref.onDrop;
|
|
29
|
+
indexOrder = _ref.indexOrder;
|
|
25
30
|
return jsxRuntime.jsxs(StyledQuizDraggbleDummyOption, {
|
|
26
|
-
|
|
31
|
+
id: "quiz-dummy-zone-".concat(indexOrder - 1),
|
|
27
32
|
children: [jsxRuntime.jsx(blocks.Text, {
|
|
28
33
|
wordBreak: "break-all",
|
|
29
34
|
customStyles: {
|
|
@@ -15,6 +15,9 @@ function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'defau
|
|
|
15
15
|
|
|
16
16
|
var styled__default = /*#__PURE__*/_interopDefaultCompat(styled);
|
|
17
17
|
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
//
|
|
18
21
|
var StyledQuizDraggbleOptionHandle = styled__default.default.div.withConfig({
|
|
19
22
|
componentId: "sc-19b0zkq-0"
|
|
20
23
|
})(["display:flex;align-items:center;justify-content:center;background-color:", ";width:1.5rem;flex:none;"], designTokens.base.color.navy5);
|
|
@@ -44,7 +47,7 @@ var StyledOrder = styled__default.default.div.withConfig({
|
|
|
44
47
|
})(["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;"], designTokens.base.color.navy0, designTokens.base.color.navy4);
|
|
45
48
|
var StyledQuizDraggbleOption = styled__default.default(EbDraggable.default).withConfig({
|
|
46
49
|
componentId: "sc-19b0zkq-3"
|
|
47
|
-
})(["display:flex;border-radius:8px;border:1px solid ", ";background-color:", ";overflow:hidden
|
|
50
|
+
})(["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);}"], designTokens.base.color.navy4, designTokens.base.color.navy5, StyledQuizDraggbleOptionHandle, function (_ref3) {
|
|
48
51
|
var role = _ref3.role;
|
|
49
52
|
switch (role) {
|
|
50
53
|
case 'answer':
|
|
@@ -123,6 +126,9 @@ var StyledQuizDraggbleOption = styled__default.default(EbDraggable.default).with
|
|
|
123
126
|
return designTokens.base.color.navy0;
|
|
124
127
|
}
|
|
125
128
|
}, designTokens.base.color.navy0, StyledQuizDraggbleOptionHandle, designTokens.base.color.navy5, StyledQuizDraggbleOptionContent, designTokens.base.color.navy4, designTokens.base.color.navy4, StyledOrder, designTokens.base.color.navy0, designTokens.base.color.navy5, designTokens.base.color.navy0);
|
|
129
|
+
//
|
|
130
|
+
//
|
|
131
|
+
//
|
|
126
132
|
var QuizDraggbleOption = function QuizDraggbleOption(_ref9) {
|
|
127
133
|
var id = _ref9.id,
|
|
128
134
|
className = _ref9.className,
|
|
@@ -132,18 +138,18 @@ var QuizDraggbleOption = function QuizDraggbleOption(_ref9) {
|
|
|
132
138
|
_ref9$role = _ref9.role,
|
|
133
139
|
role = _ref9$role === void 0 ? 'default' : _ref9$role,
|
|
134
140
|
indexOrder = _ref9.indexOrder,
|
|
135
|
-
_ref9$clone = _ref9.clone,
|
|
136
|
-
clone = _ref9$clone === void 0 ? false : _ref9$clone,
|
|
137
141
|
_ref9$isMarkdown = _ref9.isMarkdown,
|
|
138
142
|
isMarkdown = _ref9$isMarkdown === void 0 ? false : _ref9$isMarkdown;
|
|
139
143
|
var _useMaterialQuizState = MaterialQuizContext.useMaterialQuizState(),
|
|
140
144
|
vertical = _useMaterialQuizState.vertical;
|
|
145
|
+
//
|
|
146
|
+
//
|
|
147
|
+
//
|
|
141
148
|
return jsxRuntime.jsxs(StyledQuizDraggbleOption, {
|
|
142
149
|
id: id,
|
|
143
150
|
className: className,
|
|
144
151
|
disabled: disabled,
|
|
145
152
|
role: role,
|
|
146
|
-
clone: clone,
|
|
147
153
|
vertical: vertical,
|
|
148
154
|
children: [jsxRuntime.jsx(StyledQuizDraggbleOptionHandle, {
|
|
149
155
|
children: jsxRuntime.jsx(blocks.Icon, {
|
|
@@ -1,19 +1,8 @@
|
|
|
1
|
-
/// <reference types="jquery" />
|
|
2
|
-
/// <reference types="jquery" />
|
|
3
|
-
/// <reference types="jqueryui" />
|
|
4
1
|
import React from 'react';
|
|
5
|
-
import 'jquery-ui/ui/widgets/draggable';
|
|
6
2
|
interface EbDraggableProps {
|
|
7
|
-
id
|
|
3
|
+
id: string;
|
|
8
4
|
className?: string;
|
|
9
|
-
connectWith?: JQuery.Selector;
|
|
10
5
|
disabled?: boolean;
|
|
11
|
-
revert?: boolean;
|
|
12
|
-
clone?: boolean;
|
|
13
|
-
onStart?: (event: JQueryEventObject, ui: JQueryUI.DraggableEventUIParams) => void;
|
|
14
|
-
onStop?: (event: JQueryEventObject, ui: JQueryUI.DraggableEventUIParams) => void;
|
|
15
|
-
onDrag?: (event: JQueryEventObject, ui: JQueryUI.DraggableEventUIParams) => void;
|
|
16
|
-
onCreate?: (event: JQueryEventObject, ui: JQueryUI.DraggableEventUIParams) => void;
|
|
17
6
|
}
|
|
18
7
|
declare const EbDraggable: React.FC<EbDraggableProps>;
|
|
19
8
|
export default EbDraggable;
|
|
@@ -1,106 +1,41 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import 'jquery-ui/ui/widgets/draggable';
|
|
2
|
+
import { useDraggable } from '@dnd-kit/core';
|
|
3
|
+
import { CSS } from '@dnd-kit/utilities';
|
|
5
4
|
|
|
5
|
+
//
|
|
6
|
+
//
|
|
7
|
+
//
|
|
6
8
|
var EbDraggable = function EbDraggable(_ref) {
|
|
7
9
|
var children = _ref.children,
|
|
8
10
|
id = _ref.id,
|
|
9
|
-
_ref$disabled = _ref.disabled,
|
|
10
|
-
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
11
|
-
_ref$revert = _ref.revert,
|
|
12
|
-
revert = _ref$revert === void 0 ? true : _ref$revert,
|
|
13
|
-
_ref$clone = _ref.clone,
|
|
14
|
-
clone = _ref$clone === void 0 ? false : _ref$clone,
|
|
15
11
|
className = _ref.className,
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
var rootEl = React.useRef(null);
|
|
21
|
-
var onStartCallback = React.useCallback(function (event, ui) {
|
|
22
|
-
if (onStart) {
|
|
23
|
-
return onStart(event, ui);
|
|
24
|
-
} else {
|
|
25
|
-
return function () {
|
|
26
|
-
return;
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
}, [onStart]);
|
|
30
|
-
var onStopCallback = React.useCallback(function (event, ui) {
|
|
31
|
-
if (onStop) {
|
|
32
|
-
return onStop(event, ui);
|
|
33
|
-
} else {
|
|
34
|
-
return function () {
|
|
35
|
-
return;
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
}, [onStop]);
|
|
39
|
-
var onDragCallback = React.useCallback(function (event, ui) {
|
|
40
|
-
if (onDrag) {
|
|
41
|
-
return onDrag(event, ui);
|
|
42
|
-
} else {
|
|
43
|
-
return function () {
|
|
44
|
-
return;
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
}, [onDrag]);
|
|
48
|
-
var onCreateCallback = React.useCallback(function (event, ui) {
|
|
49
|
-
if (onCreate) {
|
|
50
|
-
return onCreate(event, ui);
|
|
51
|
-
} else {
|
|
52
|
-
return function () {
|
|
53
|
-
return;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
}, [onCreate]);
|
|
57
|
-
React.useEffect(function () {
|
|
58
|
-
if (!rootEl.current) {
|
|
59
|
-
return;
|
|
60
|
-
}
|
|
61
|
-
var draggableEl = $(rootEl.current);
|
|
62
|
-
draggableEl.draggable(Object.assign(Object.assign(Object.assign(Object.assign({}, disabled ? {
|
|
12
|
+
_ref$disabled = _ref.disabled,
|
|
13
|
+
disabled = _ref$disabled === void 0 ? false : _ref$disabled;
|
|
14
|
+
var _useDraggable = useDraggable({
|
|
15
|
+
id: id,
|
|
63
16
|
disabled: disabled
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
// draggableEl.draggable('cancel');
|
|
82
|
-
onStopCallback(event, ui);
|
|
83
|
-
},
|
|
84
|
-
drag: function drag(event, ui) {
|
|
85
|
-
onDragCallback(event, ui);
|
|
86
|
-
},
|
|
87
|
-
create: function create(event, ui) {
|
|
88
|
-
onCreateCallback(event, ui);
|
|
89
|
-
}
|
|
90
|
-
}));
|
|
91
|
-
return function () {
|
|
92
|
-
draggableEl.draggable('destroy');
|
|
93
|
-
};
|
|
94
|
-
}, [clone, disabled, onCreateCallback, onDragCallback, onStartCallback, onStopCallback, revert]);
|
|
95
|
-
return jsx("div", {
|
|
96
|
-
ref: rootEl,
|
|
97
|
-
id: id,
|
|
17
|
+
}),
|
|
18
|
+
attributes = _useDraggable.attributes,
|
|
19
|
+
listeners = _useDraggable.listeners,
|
|
20
|
+
setNodeRef = _useDraggable.setNodeRef,
|
|
21
|
+
transform = _useDraggable.transform,
|
|
22
|
+
isDragging = _useDraggable.isDragging;
|
|
23
|
+
var style = {
|
|
24
|
+
transform: CSS.Translate.toString(transform),
|
|
25
|
+
cursor: disabled ? 'auto' : 'move'
|
|
26
|
+
};
|
|
27
|
+
//
|
|
28
|
+
//
|
|
29
|
+
//
|
|
30
|
+
return jsx("div", Object.assign({
|
|
31
|
+
ref: setNodeRef,
|
|
98
32
|
className: className,
|
|
99
|
-
style: {
|
|
100
|
-
|
|
101
|
-
}
|
|
33
|
+
style: isDragging ? Object.assign(Object.assign({}, style), {
|
|
34
|
+
zIndex: 1000
|
|
35
|
+
}) : style
|
|
36
|
+
}, listeners, attributes, {
|
|
102
37
|
children: children
|
|
103
|
-
});
|
|
38
|
+
}));
|
|
104
39
|
};
|
|
105
40
|
|
|
106
41
|
export { EbDraggable as default };
|
|
@@ -1,14 +1,9 @@
|
|
|
1
|
-
/// <reference types="jquery" />
|
|
2
|
-
/// <reference types="jquery" />
|
|
3
|
-
/// <reference types="jqueryui" />
|
|
4
1
|
import React from 'react';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
id?: string;
|
|
2
|
+
interface EbDroppableProps {
|
|
3
|
+
id: string;
|
|
8
4
|
className?: string;
|
|
9
5
|
disabled?: boolean;
|
|
10
|
-
accept?:
|
|
11
|
-
onDrop?: (event: JQueryEventObject, ui: JQueryUI.DroppableEventUIParam) => void;
|
|
6
|
+
accept?: string;
|
|
12
7
|
}
|
|
13
8
|
declare const EbDroppable: React.FC<EbDroppableProps>;
|
|
14
9
|
export default EbDroppable;
|
|
@@ -1,50 +1,29 @@
|
|
|
1
1
|
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import
|
|
3
|
-
import $ from 'jquery';
|
|
4
|
-
import 'jquery-ui/ui/widgets/droppable';
|
|
2
|
+
import { useDroppable } from '@dnd-kit/core';
|
|
5
3
|
|
|
4
|
+
//
|
|
5
|
+
//
|
|
6
|
+
//
|
|
6
7
|
var EbDroppable = function EbDroppable(_ref) {
|
|
7
8
|
var children = _ref.children,
|
|
8
9
|
id = _ref.id,
|
|
10
|
+
className = _ref.className,
|
|
9
11
|
_ref$disabled = _ref.disabled,
|
|
10
12
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
11
|
-
accept = _ref.accept
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return onDrop(event, ui);
|
|
18
|
-
} else {
|
|
19
|
-
return function () {
|
|
20
|
-
return;
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
}, [onDrop]);
|
|
24
|
-
React.useEffect(function () {
|
|
25
|
-
if (!rootEl.current) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
var draggableEl = $(rootEl.current);
|
|
29
|
-
draggableEl.droppable(Object.assign(Object.assign(Object.assign({}, disabled ? {
|
|
30
|
-
disabled: disabled
|
|
31
|
-
} : null), accept ? {
|
|
32
|
-
accept: accept
|
|
33
|
-
} : null), {
|
|
34
|
-
drop: function drop(event, ui) {
|
|
35
|
-
if (!onDropCallback) {
|
|
36
|
-
return;
|
|
37
|
-
}
|
|
38
|
-
onDropCallback(event, ui);
|
|
13
|
+
accept = _ref.accept;
|
|
14
|
+
var _useDroppable = useDroppable({
|
|
15
|
+
id: id,
|
|
16
|
+
disabled: disabled,
|
|
17
|
+
data: {
|
|
18
|
+
accept: accept
|
|
39
19
|
}
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
20
|
+
}),
|
|
21
|
+
setNodeRef = _useDroppable.setNodeRef;
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
//
|
|
45
25
|
return jsx("div", {
|
|
46
|
-
ref:
|
|
47
|
-
id: id,
|
|
26
|
+
ref: setNodeRef,
|
|
48
27
|
className: className,
|
|
49
28
|
children: children
|
|
50
29
|
});
|
|
@@ -8,8 +8,9 @@ import { useTheme, Stack } from '@mui/material';
|
|
|
8
8
|
import { MATERIAL_QUIZ_PASSIVE_ID, MATERIAL_QUIZ_ANSWER_ID } from '../../constant/element.js';
|
|
9
9
|
import { checkUserLectureTestEnded, shouldResetOptions, getOptionStatus, getQuizResult } from '../../helpers/index.js';
|
|
10
10
|
import { useCaculatePassage } from '../../hooks/useCaculatePassage.js';
|
|
11
|
-
import '../shared/
|
|
11
|
+
import '../shared/QuizDraggbleDroppedOption.js';
|
|
12
12
|
import '../shared/QuizDraggbleDummyOption.js';
|
|
13
|
+
import '../shared/QuizDraggbleOption.js';
|
|
13
14
|
import '../shared/question-radio/QuestionRadio.js';
|
|
14
15
|
import '../shared/question-radio/QuestionRadioOption.js';
|
|
15
16
|
import QuestionCheckbox from '../shared/question-checkbox/QuestionCheckbox.js';
|