@pie-lib/mask-markup 2.0.0-beta.1 → 2.0.0-next.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/CHANGELOG.json +1 -871
- package/CHANGELOG.md +434 -32
- package/LICENSE.md +5 -0
- package/NEXT.CHANGELOG.json +1 -0
- package/lib/choices/choice.js +101 -129
- package/lib/choices/choice.js.map +1 -1
- package/lib/choices/index.js +28 -48
- package/lib/choices/index.js.map +1 -1
- package/lib/componentize.js +2 -6
- package/lib/componentize.js.map +1 -1
- package/lib/components/blank.js +315 -246
- package/lib/components/blank.js.map +1 -1
- package/lib/components/correct-input.js +47 -66
- package/lib/components/correct-input.js.map +1 -1
- package/lib/components/dropdown.js +399 -156
- package/lib/components/dropdown.js.map +1 -1
- package/lib/components/input.js +15 -19
- package/lib/components/input.js.map +1 -1
- package/lib/constructed-response.js +81 -28
- package/lib/constructed-response.js.map +1 -1
- package/lib/customizable.js +44 -0
- package/lib/customizable.js.map +1 -0
- package/lib/drag-in-the-blank.js +160 -96
- package/lib/drag-in-the-blank.js.map +1 -1
- package/lib/index.js +8 -7
- package/lib/index.js.map +1 -1
- package/lib/inline-dropdown.js +10 -14
- package/lib/inline-dropdown.js.map +1 -1
- package/lib/mask.js +93 -101
- package/lib/mask.js.map +1 -1
- package/lib/serialization.js +36 -81
- package/lib/serialization.js.map +1 -1
- package/lib/with-mask.js +53 -49
- package/lib/with-mask.js.map +1 -1
- package/package.json +26 -15
- package/src/__tests__/drag-in-the-blank.test.js +111 -0
- package/src/__tests__/index.test.js +39 -0
- package/src/__tests__/mask.test.js +187 -0
- package/src/__tests__/serialization.test.js +54 -0
- package/src/__tests__/utils.js +1 -0
- package/src/__tests__/with-mask.test.js +76 -0
- package/src/choices/__tests__/index.test.js +75 -0
- package/src/choices/choice.jsx +84 -83
- package/src/choices/index.jsx +25 -15
- package/src/components/__tests__/blank.test.js +138 -0
- package/src/components/__tests__/correct-input.test.js +90 -0
- package/src/components/__tests__/dropdown.test.js +93 -0
- package/src/components/__tests__/input.test.js +102 -0
- package/src/components/blank.jsx +319 -195
- package/src/components/correct-input.jsx +45 -46
- package/src/components/dropdown.jsx +374 -139
- package/src/components/input.jsx +6 -3
- package/src/constructed-response.jsx +81 -18
- package/src/customizable.jsx +35 -0
- package/src/drag-in-the-blank.jsx +159 -47
- package/src/index.js +3 -1
- package/src/inline-dropdown.jsx +6 -3
- package/src/mask.jsx +75 -30
- package/src/serialization.js +37 -44
- package/src/with-mask.jsx +36 -3
- package/README.md +0 -14
- package/lib/new-serialization.js +0 -320
- package/lib/parse-html.js +0 -16
- package/lib/test-serializer.js +0 -215
- package/src/new-serialization.jsx +0 -291
- package/src/parse-html.js +0 -8
- package/src/test-serializer.js +0 -163
|
@@ -1,216 +1,459 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
4
|
Object.defineProperty(exports, "__esModule", {
|
|
6
5
|
value: true
|
|
7
6
|
});
|
|
8
7
|
exports["default"] = void 0;
|
|
9
|
-
|
|
10
8
|
var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
|
|
11
|
-
|
|
12
9
|
var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
|
|
13
|
-
|
|
14
|
-
var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
|
|
15
|
-
|
|
16
|
-
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
17
|
-
|
|
18
10
|
var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
|
|
19
|
-
|
|
20
11
|
var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
|
|
21
|
-
|
|
12
|
+
var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
|
|
22
13
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
23
|
-
|
|
24
14
|
var _react = _interopRequireDefault(require("react"));
|
|
25
|
-
|
|
26
15
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
27
|
-
|
|
28
|
-
var
|
|
29
|
-
|
|
30
|
-
var _MenuItem = _interopRequireDefault(require("@material
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
var
|
|
35
|
-
|
|
16
|
+
var _Button = _interopRequireDefault(require("@mui/material/Button"));
|
|
17
|
+
var _InputLabel = _interopRequireDefault(require("@mui/material/InputLabel"));
|
|
18
|
+
var _Menu = _interopRequireDefault(require("@mui/material/Menu"));
|
|
19
|
+
var _MenuItem = _interopRequireDefault(require("@mui/material/MenuItem"));
|
|
20
|
+
var _ArrowDropDown = _interopRequireDefault(require("@mui/icons-material/ArrowDropDown"));
|
|
21
|
+
var _ArrowDropUp = _interopRequireDefault(require("@mui/icons-material/ArrowDropUp"));
|
|
22
|
+
var _Close = _interopRequireDefault(require("@mui/icons-material/Close"));
|
|
23
|
+
var _Check = _interopRequireDefault(require("@mui/icons-material/Check"));
|
|
24
|
+
var _styles = require("@mui/material/styles");
|
|
36
25
|
var _renderUi = require("@pie-lib/render-ui");
|
|
37
|
-
|
|
38
|
-
function
|
|
39
|
-
|
|
40
|
-
function
|
|
41
|
-
|
|
26
|
+
var _mathRendering = require("@pie-lib/math-rendering");
|
|
27
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
|
+
function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (0, _possibleConstructorReturn2["default"])(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], (0, _getPrototypeOf2["default"])(t).constructor) : o.apply(t, e)); }
|
|
30
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
31
|
+
var StyledButton = (0, _styles.styled)(_Button["default"])(function () {
|
|
32
|
+
return {
|
|
33
|
+
color: _renderUi.color.text(),
|
|
34
|
+
border: "1px solid ".concat(_renderUi.color.borderGray()),
|
|
35
|
+
borderRadius: '4px',
|
|
36
|
+
justifyContent: 'space-between',
|
|
37
|
+
backgroundColor: _renderUi.color.background(),
|
|
38
|
+
position: 'relative',
|
|
39
|
+
height: '45px',
|
|
40
|
+
width: 'fit-content',
|
|
41
|
+
margin: '2px',
|
|
42
|
+
textTransform: 'none',
|
|
43
|
+
'& span': {
|
|
44
|
+
paddingRight: '5px'
|
|
45
|
+
},
|
|
46
|
+
'& svg': {
|
|
47
|
+
position: 'absolute',
|
|
48
|
+
right: 0,
|
|
49
|
+
top: 'calc(50% - 12px)',
|
|
50
|
+
pointerEvents: 'none',
|
|
51
|
+
color: _renderUi.color.text(),
|
|
52
|
+
marginLeft: '5px'
|
|
53
|
+
},
|
|
54
|
+
'&.Mui-focused': {
|
|
55
|
+
outline: "3px solid ".concat(_renderUi.color.tertiary()),
|
|
56
|
+
outlineOffset: '2px',
|
|
57
|
+
borderWidth: '3px'
|
|
58
|
+
},
|
|
59
|
+
'&.disabledCorrect': {
|
|
60
|
+
borderWidth: '2px',
|
|
61
|
+
borderColor: _renderUi.color.correct(),
|
|
62
|
+
color: "".concat(_renderUi.color.text(), " !important")
|
|
63
|
+
},
|
|
64
|
+
'&.disabledIncorrect': {
|
|
65
|
+
borderWidth: '2px',
|
|
66
|
+
borderColor: _renderUi.color.incorrectWithIcon(),
|
|
67
|
+
color: "".concat(_renderUi.color.text(), " !important")
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
});
|
|
71
|
+
var StyledMenu = (0, _styles.styled)(_Menu["default"])(function () {
|
|
72
|
+
return {
|
|
73
|
+
backgroundColor: _renderUi.color.background(),
|
|
74
|
+
border: "1px solid ".concat(_renderUi.color.correct(), " !important"),
|
|
75
|
+
'&:hover': {
|
|
76
|
+
border: "1px solid ".concat(_renderUi.color.text(), " "),
|
|
77
|
+
borderColor: 'initial'
|
|
78
|
+
},
|
|
79
|
+
'&:focus': {
|
|
80
|
+
border: "1px solid ".concat(_renderUi.color.text()),
|
|
81
|
+
borderColor: 'initial'
|
|
82
|
+
},
|
|
83
|
+
// remove default padding on the inner list
|
|
84
|
+
'& .MuiList-root': {
|
|
85
|
+
padding: 0
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
var StyledMenuItem = (0, _styles.styled)(_MenuItem["default"])(function () {
|
|
90
|
+
return {
|
|
91
|
+
color: _renderUi.color.text(),
|
|
92
|
+
backgroundColor: _renderUi.color.background(),
|
|
93
|
+
'&.Mui-focused': {
|
|
94
|
+
outline: "3px solid ".concat(_renderUi.color.tertiary()),
|
|
95
|
+
outlineOffset: '-1px',
|
|
96
|
+
// keeps it inside the item
|
|
97
|
+
color: _renderUi.color.text(),
|
|
98
|
+
backgroundColor: _renderUi.color.background()
|
|
99
|
+
},
|
|
100
|
+
'&:hover': {
|
|
101
|
+
color: _renderUi.color.text(),
|
|
102
|
+
backgroundColor: _renderUi.color.dropdownBackground()
|
|
103
|
+
},
|
|
104
|
+
boxSizing: 'border-box',
|
|
105
|
+
padding: '25px',
|
|
106
|
+
borderRadius: '4px',
|
|
107
|
+
'&.selected': {
|
|
108
|
+
color: "".concat(_renderUi.color.text(), " !important"),
|
|
109
|
+
backgroundColor: "".concat(_renderUi.color.background(), " !important"),
|
|
110
|
+
'&:hover': {
|
|
111
|
+
color: _renderUi.color.text(),
|
|
112
|
+
backgroundColor: "".concat(_renderUi.color.dropdownBackground(), " !important")
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
});
|
|
117
|
+
var StyledLabel = (0, _styles.styled)('span')(function () {
|
|
118
|
+
return {
|
|
119
|
+
fontSize: 'max(1rem, 14px)'
|
|
120
|
+
};
|
|
121
|
+
});
|
|
122
|
+
var StyledSelectedIndicator = (0, _styles.styled)('span')(function () {
|
|
123
|
+
return {
|
|
124
|
+
fontSize: 'max(1rem, 14px)',
|
|
125
|
+
position: 'absolute',
|
|
126
|
+
right: '10px'
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
var StyledInputLabel = (0, _styles.styled)(_InputLabel["default"])(function () {
|
|
130
|
+
return {
|
|
131
|
+
position: 'absolute',
|
|
132
|
+
left: '-10000px',
|
|
133
|
+
top: 'auto',
|
|
134
|
+
width: '1px',
|
|
135
|
+
height: '1px',
|
|
136
|
+
overflow: 'hidden'
|
|
137
|
+
};
|
|
138
|
+
});
|
|
139
|
+
var StyledCorrectnessIcon = (0, _styles.styled)(_Check["default"])(function () {
|
|
140
|
+
return {
|
|
141
|
+
color: "".concat(_renderUi.color.white(), " !important"),
|
|
142
|
+
position: 'absolute',
|
|
143
|
+
top: '-8px !important',
|
|
144
|
+
left: '-8px',
|
|
145
|
+
marginLeft: '0 !important',
|
|
146
|
+
borderRadius: '50%',
|
|
147
|
+
fontSize: '16px',
|
|
148
|
+
padding: '2px',
|
|
149
|
+
'&.correct': {
|
|
150
|
+
backgroundColor: _renderUi.color.correct()
|
|
151
|
+
},
|
|
152
|
+
'&.incorrect': {
|
|
153
|
+
backgroundColor: _renderUi.color.incorrectWithIcon()
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
});
|
|
157
|
+
var StyledIncorrectnessIcon = (0, _styles.styled)(_Close["default"])(function () {
|
|
158
|
+
return {
|
|
159
|
+
color: "".concat(_renderUi.color.white(), " !important"),
|
|
160
|
+
position: 'absolute',
|
|
161
|
+
top: '-8px !important',
|
|
162
|
+
left: '-8px',
|
|
163
|
+
marginLeft: '0 !important',
|
|
164
|
+
borderRadius: '50%',
|
|
165
|
+
fontSize: '16px',
|
|
166
|
+
padding: '2px',
|
|
167
|
+
'&.correct': {
|
|
168
|
+
backgroundColor: _renderUi.color.correct()
|
|
169
|
+
},
|
|
170
|
+
'&.incorrect': {
|
|
171
|
+
backgroundColor: _renderUi.color.incorrectWithIcon()
|
|
172
|
+
}
|
|
173
|
+
};
|
|
174
|
+
});
|
|
42
175
|
var Dropdown = /*#__PURE__*/function (_React$Component) {
|
|
43
|
-
(0, _inherits2["default"])(Dropdown, _React$Component);
|
|
44
|
-
|
|
45
|
-
var _super = _createSuper(Dropdown);
|
|
46
|
-
|
|
47
176
|
function Dropdown(props) {
|
|
48
177
|
var _this;
|
|
49
|
-
|
|
50
178
|
(0, _classCallCheck2["default"])(this, Dropdown);
|
|
51
|
-
_this =
|
|
52
|
-
(0, _defineProperty2["default"])(
|
|
179
|
+
_this = _callSuper(this, Dropdown, [props]);
|
|
180
|
+
(0, _defineProperty2["default"])(_this, "handleClick", function (event) {
|
|
181
|
+
return _this.setState({
|
|
182
|
+
anchorEl: event.currentTarget
|
|
183
|
+
});
|
|
184
|
+
});
|
|
185
|
+
(0, _defineProperty2["default"])(_this, "handleClose", function () {
|
|
186
|
+
var value = _this.props.value;
|
|
53
187
|
_this.setState({
|
|
54
|
-
|
|
55
|
-
|
|
188
|
+
anchorEl: null,
|
|
189
|
+
previewValue: null,
|
|
190
|
+
highlightedOptionId: null
|
|
56
191
|
});
|
|
192
|
+
// clear displayed preview if no selection
|
|
193
|
+
if (!value && _this.previewRef.current) {
|
|
194
|
+
_this.previewRef.current.innerHTML = '';
|
|
195
|
+
}
|
|
57
196
|
});
|
|
58
|
-
(0, _defineProperty2["default"])(
|
|
197
|
+
(0, _defineProperty2["default"])(_this, "handleHighlight", function (index) {
|
|
198
|
+
var highlightedOptionId = "dropdown-option-".concat(_this.props.id, "-").concat(index);
|
|
199
|
+
|
|
200
|
+
// preview on hover if nothing selected
|
|
201
|
+
var stateUpdate = {
|
|
202
|
+
highlightedOptionId: highlightedOptionId
|
|
203
|
+
};
|
|
204
|
+
if (!_this.props.value) {
|
|
205
|
+
stateUpdate.previewValue = _this.props.choices[index].value;
|
|
206
|
+
}
|
|
207
|
+
_this.setState(stateUpdate);
|
|
208
|
+
});
|
|
209
|
+
(0, _defineProperty2["default"])(_this, "handleSelect", function (value, index) {
|
|
210
|
+
_this.props.onChange(_this.props.id, value);
|
|
211
|
+
_this.handleHighlight(index);
|
|
212
|
+
_this.handleClose();
|
|
213
|
+
});
|
|
214
|
+
(0, _defineProperty2["default"])(_this, "handleHover", function (index) {
|
|
215
|
+
var selectedValue = _this.props.value;
|
|
216
|
+
if (selectedValue) return;
|
|
217
|
+
var highlightedOptionId = "dropdown-option-".concat(_this.props.id, "-").concat(index);
|
|
218
|
+
var previewValue = _this.state.previewValue;
|
|
59
219
|
_this.setState({
|
|
60
|
-
|
|
61
|
-
|
|
220
|
+
highlightedOptionId: highlightedOptionId,
|
|
221
|
+
previewValue: previewValue
|
|
222
|
+
}, function () {
|
|
223
|
+
// On hover, preview the math-rendered content inside the button if no value is selected.
|
|
224
|
+
var ref = _this.elementRefs[index];
|
|
225
|
+
var preview = _this.previewRef.current;
|
|
226
|
+
if (ref && preview) {
|
|
227
|
+
preview.innerHTML = ref.innerHTML;
|
|
228
|
+
}
|
|
62
229
|
});
|
|
63
230
|
});
|
|
64
231
|
_this.state = {
|
|
65
|
-
|
|
66
|
-
|
|
232
|
+
anchorEl: null,
|
|
233
|
+
highlightedOptionId: null,
|
|
234
|
+
menuWidth: null,
|
|
235
|
+
previewValue: null
|
|
67
236
|
};
|
|
237
|
+
_this.hiddenRef = /*#__PURE__*/_react["default"].createRef();
|
|
238
|
+
_this.buttonRef = /*#__PURE__*/_react["default"].createRef();
|
|
239
|
+
_this.previewRef = /*#__PURE__*/_react["default"].createRef();
|
|
240
|
+
_this.elementRefs = [];
|
|
68
241
|
return _this;
|
|
69
242
|
}
|
|
70
|
-
|
|
71
|
-
(0, _createClass2["default"])(Dropdown, [{
|
|
243
|
+
(0, _inherits2["default"])(Dropdown, _React$Component);
|
|
244
|
+
return (0, _createClass2["default"])(Dropdown, [{
|
|
245
|
+
key: "componentDidMount",
|
|
246
|
+
value: function componentDidMount() {
|
|
247
|
+
// measure hidden menu width once
|
|
248
|
+
if (this.hiddenRef.current && this.state.menuWidth === null) {
|
|
249
|
+
this.setState({
|
|
250
|
+
menuWidth: this.hiddenRef.current.clientWidth
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
}, {
|
|
255
|
+
key: "componentDidUpdate",
|
|
256
|
+
value: function componentDidUpdate(prevProps, prevState) {
|
|
257
|
+
var hiddenEl = this.hiddenRef.current;
|
|
258
|
+
var dropdownJustOpened = !prevState.anchorEl && this.state.anchorEl;
|
|
259
|
+
if (dropdownJustOpened) {
|
|
260
|
+
this.elementRefs.forEach(function (ref) {
|
|
261
|
+
if (!ref) return;
|
|
262
|
+
var containsLatex = ref.querySelector('[data-latex], [data-raw]');
|
|
263
|
+
var hasMathJax = ref.querySelector('mjx-container');
|
|
264
|
+
var mathHandled = ref.querySelector('[data-math-handled="true"]');
|
|
265
|
+
if (containsLatex && (!mathHandled || !hasMathJax)) {
|
|
266
|
+
(0, _mathRendering.renderMath)(ref);
|
|
267
|
+
}
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
if (hiddenEl) {
|
|
271
|
+
var newWidth = hiddenEl.clientWidth;
|
|
272
|
+
if (newWidth !== this.state.menuWidth) {
|
|
273
|
+
this.elementRefs.forEach(function (ref) {
|
|
274
|
+
if (ref) (0, _mathRendering.renderMath)(ref);
|
|
275
|
+
});
|
|
276
|
+
(0, _mathRendering.renderMath)(hiddenEl);
|
|
277
|
+
this.setState({
|
|
278
|
+
menuWidth: newWidth
|
|
279
|
+
});
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
}, {
|
|
284
|
+
key: "getLabel",
|
|
285
|
+
value: function getLabel(choices, value) {
|
|
286
|
+
var found = (choices || []).find(function (choice) {
|
|
287
|
+
return choice.value === value;
|
|
288
|
+
});
|
|
289
|
+
return found ? found.label.trim() : undefined;
|
|
290
|
+
}
|
|
291
|
+
}, {
|
|
72
292
|
key: "render",
|
|
73
293
|
value: function render() {
|
|
294
|
+
var _this2 = this;
|
|
74
295
|
var _this$props = this.props,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
296
|
+
id = _this$props.id,
|
|
297
|
+
correct = _this$props.correct,
|
|
298
|
+
disabled = _this$props.disabled,
|
|
299
|
+
value = _this$props.value,
|
|
300
|
+
choices = _this$props.choices,
|
|
301
|
+
showCorrectAnswer = _this$props.showCorrectAnswer,
|
|
302
|
+
singleQuery = _this$props.singleQuery,
|
|
303
|
+
correctValue = _this$props.correctValue;
|
|
304
|
+
var anchorEl = this.state.anchorEl;
|
|
305
|
+
var open = Boolean(anchorEl);
|
|
306
|
+
var buttonId = "dropdown-button-".concat(id);
|
|
307
|
+
var menuId = "dropdown-menu-".concat(id);
|
|
308
|
+
var valueDisplayId = "dropdown-value-".concat(id);
|
|
309
|
+
|
|
310
|
+
// Determine the class for disabled state, view mode and evaluate mode
|
|
311
|
+
var disabledClass;
|
|
312
|
+
// Reset elementRefs before each render to avoid stale references
|
|
313
|
+
this.elementRefs = [];
|
|
314
|
+
if (disabled && correct !== undefined) {
|
|
315
|
+
disabledClass = correct || showCorrectAnswer ? 'disabledCorrect' : 'disabledIncorrect';
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
// Create distinct, visually hidden labels for each dropdown
|
|
319
|
+
var incrementedId = parseInt(id, 10) + 1;
|
|
320
|
+
var labelId = singleQuery ? 'Query-label' : "Query-label-".concat(incrementedId);
|
|
321
|
+
var labelText = singleQuery ? 'Query' : "Query ".concat(incrementedId);
|
|
322
|
+
|
|
323
|
+
// Changed from Select to Button for dropdown to enhance accessibility. This modification offers explicit control over aria attributes and focuses management, ensuring the dropdown is compliant with accessibility standards. The use of Button and Menu components allows for better handling of keyboard interactions and provides accessible labels and menus, aligning with WCAG guidelines and improving usability for assistive technology users.
|
|
324
|
+
var correctnessIcon = null;
|
|
325
|
+
if (disabled && correct !== undefined) {
|
|
326
|
+
correctnessIcon = correct || showCorrectAnswer ? /*#__PURE__*/_react["default"].createElement(StyledCorrectnessIcon, {
|
|
327
|
+
className: "correct"
|
|
328
|
+
}) : /*#__PURE__*/_react["default"].createElement(StyledIncorrectnessIcon, {
|
|
329
|
+
className: "incorrect"
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
333
|
+
ref: this.hiddenRef,
|
|
334
|
+
style: {
|
|
335
|
+
position: 'absolute',
|
|
336
|
+
visibility: 'hidden',
|
|
337
|
+
top: 0,
|
|
338
|
+
left: 0
|
|
92
339
|
},
|
|
340
|
+
tabIndex: -1,
|
|
341
|
+
"aria-hidden": "true"
|
|
342
|
+
}, (choices || []).map(function (c, index) {
|
|
343
|
+
return /*#__PURE__*/_react["default"].createElement(StyledMenuItem, {
|
|
344
|
+
key: index,
|
|
345
|
+
tabIndex: -1,
|
|
346
|
+
"aria-hidden": "true"
|
|
347
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledLabel, {
|
|
348
|
+
dangerouslySetInnerHTML: {
|
|
349
|
+
__html: c.label
|
|
350
|
+
}
|
|
351
|
+
}));
|
|
352
|
+
})), /*#__PURE__*/_react["default"].createElement(StyledInputLabel, {
|
|
353
|
+
id: labelId,
|
|
354
|
+
tabIndex: -1,
|
|
355
|
+
"aria-hidden": "true"
|
|
356
|
+
}, labelText), /*#__PURE__*/_react["default"].createElement(StyledButton, {
|
|
357
|
+
ref: this.buttonRef,
|
|
358
|
+
style: _objectSpread(_objectSpread({}, this.state.menuWidth && {
|
|
359
|
+
minWidth: "calc(".concat(this.state.menuWidth, "px + 8px)")
|
|
360
|
+
}), {}, {
|
|
361
|
+
borderWidth: open ? '2px' : '1px',
|
|
362
|
+
transition: 'border-width 0.2s ease-in-out'
|
|
363
|
+
}),
|
|
364
|
+
"aria-controls": open ? menuId : undefined,
|
|
365
|
+
"aria-haspopup": "listbox",
|
|
366
|
+
"aria-expanded": open ? 'true' : undefined,
|
|
367
|
+
"aria-activedescendant": this.state.highlightedOptionId,
|
|
368
|
+
onClick: this.handleClick,
|
|
369
|
+
className: disabledClass,
|
|
93
370
|
disabled: disabled,
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
371
|
+
id: buttonId,
|
|
372
|
+
role: "combobox",
|
|
373
|
+
"aria-label": "Select an option for ".concat(labelText),
|
|
374
|
+
"aria-labelledby": valueDisplayId
|
|
375
|
+
}, correctnessIcon, /*#__PURE__*/_react["default"].createElement(StyledLabel, {
|
|
376
|
+
id: valueDisplayId,
|
|
377
|
+
ref: this.previewRef,
|
|
378
|
+
dangerouslySetInnerHTML: {
|
|
379
|
+
__html: correctValue ? correctValue : open && this.state.previewValue ? this.getLabel(choices, this.state.previewValue) : this.getLabel(choices, value) || ''
|
|
380
|
+
}
|
|
381
|
+
}), open ? /*#__PURE__*/_react["default"].createElement(_ArrowDropUp["default"], null) : /*#__PURE__*/_react["default"].createElement(_ArrowDropDown["default"], null)), /*#__PURE__*/_react["default"].createElement(StyledMenu, {
|
|
382
|
+
id: menuId,
|
|
383
|
+
anchorEl: anchorEl,
|
|
384
|
+
keepMounted: true,
|
|
97
385
|
open: open,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
386
|
+
onClose: this.handleClose,
|
|
387
|
+
getContentAnchorEl: null,
|
|
388
|
+
anchorOrigin: {
|
|
389
|
+
vertical: 'bottom',
|
|
390
|
+
horizontal: 'left'
|
|
391
|
+
},
|
|
392
|
+
transformOrigin: {
|
|
393
|
+
vertical: 'top',
|
|
394
|
+
horizontal: 'left'
|
|
395
|
+
},
|
|
396
|
+
transitionDuration: {
|
|
397
|
+
enter: 225,
|
|
398
|
+
exit: 195
|
|
104
399
|
},
|
|
105
|
-
|
|
106
|
-
|
|
400
|
+
slotProps: {
|
|
401
|
+
paper: this.state.menuWidth ? {
|
|
402
|
+
style: {
|
|
403
|
+
minWidth: this.state.menuWidth,
|
|
404
|
+
padding: '4px'
|
|
405
|
+
}
|
|
406
|
+
} : undefined,
|
|
407
|
+
list: {
|
|
408
|
+
'aria-labelledby': buttonId,
|
|
409
|
+
role: 'listbox',
|
|
410
|
+
disablePadding: true
|
|
411
|
+
}
|
|
107
412
|
}
|
|
108
413
|
}, (choices || []).map(function (c, index) {
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
},
|
|
414
|
+
var optionId = "dropdown-option-".concat(id, "-").concat(index);
|
|
415
|
+
return /*#__PURE__*/_react["default"].createElement(StyledMenuItem, {
|
|
416
|
+
id: optionId,
|
|
417
|
+
className: c.value === value ? 'selected' : '',
|
|
114
418
|
key: "".concat(c.label, "-").concat(index),
|
|
115
|
-
value: c.value
|
|
116
|
-
|
|
117
|
-
|
|
419
|
+
value: c.value,
|
|
420
|
+
onClick: function onClick() {
|
|
421
|
+
return _this2.handleSelect(c.value, index);
|
|
422
|
+
},
|
|
423
|
+
role: "option",
|
|
424
|
+
"aria-selected": _this2.state.highlightedOptionId === optionId ? 'true' : undefined,
|
|
425
|
+
onMouseOver: function onMouseOver() {
|
|
426
|
+
return _this2.handleHover(index);
|
|
427
|
+
}
|
|
428
|
+
}, /*#__PURE__*/_react["default"].createElement(StyledLabel, {
|
|
429
|
+
ref: function ref(_ref) {
|
|
430
|
+
return _this2.elementRefs[index] = _ref;
|
|
431
|
+
},
|
|
118
432
|
dangerouslySetInnerHTML: {
|
|
119
433
|
__html: c.label
|
|
120
434
|
}
|
|
121
|
-
}),
|
|
122
|
-
className: classes.label,
|
|
435
|
+
}), /*#__PURE__*/_react["default"].createElement(StyledSelectedIndicator, {
|
|
123
436
|
dangerouslySetInnerHTML: {
|
|
124
437
|
__html: c.value === value ? ' ✓' : ''
|
|
125
438
|
}
|
|
126
439
|
}));
|
|
127
|
-
}));
|
|
440
|
+
})));
|
|
128
441
|
}
|
|
129
442
|
}]);
|
|
130
|
-
return Dropdown;
|
|
131
443
|
}(_react["default"].Component);
|
|
132
|
-
|
|
133
444
|
(0, _defineProperty2["default"])(Dropdown, "propTypes", {
|
|
134
445
|
id: _propTypes["default"].string,
|
|
135
446
|
value: _propTypes["default"].string,
|
|
136
447
|
disabled: _propTypes["default"].bool,
|
|
137
448
|
onChange: _propTypes["default"].func,
|
|
138
|
-
classes: _propTypes["default"].object,
|
|
139
449
|
correct: _propTypes["default"].bool,
|
|
140
450
|
choices: _propTypes["default"].arrayOf(_propTypes["default"].shape({
|
|
141
451
|
value: _propTypes["default"].string,
|
|
142
452
|
label: _propTypes["default"].string
|
|
143
453
|
})),
|
|
144
|
-
showCorrectAnswer: _propTypes["default"].bool
|
|
454
|
+
showCorrectAnswer: _propTypes["default"].bool,
|
|
455
|
+
singleQuery: _propTypes["default"].bool,
|
|
456
|
+
correctValue: _propTypes["default"].string
|
|
145
457
|
});
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
return {
|
|
149
|
-
root: {
|
|
150
|
-
color: _renderUi.color.text(),
|
|
151
|
-
backgroundColor: _renderUi.color.background(),
|
|
152
|
-
borderColor: _renderUi.color.secondaryLight(),
|
|
153
|
-
'& ul': {
|
|
154
|
-
paddingTop: 0,
|
|
155
|
-
paddingBottom: 0,
|
|
156
|
-
border: "1px solid ".concat(_renderUi.color.text()),
|
|
157
|
-
borderRadius: '5px',
|
|
158
|
-
color: _renderUi.color.text(),
|
|
159
|
-
backgroundColor: _renderUi.color.background()
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
select: {
|
|
163
|
-
'&:focus': {
|
|
164
|
-
borderRadius: '4px'
|
|
165
|
-
}
|
|
166
|
-
},
|
|
167
|
-
selectMenu: {
|
|
168
|
-
backgroundColor: _renderUi.color.background(),
|
|
169
|
-
'&:hover': {
|
|
170
|
-
borderColor: 'initial'
|
|
171
|
-
},
|
|
172
|
-
'&:focus': {
|
|
173
|
-
borderColor: 'initial'
|
|
174
|
-
}
|
|
175
|
-
},
|
|
176
|
-
icon: {
|
|
177
|
-
color: _renderUi.color.text()
|
|
178
|
-
},
|
|
179
|
-
selected: {
|
|
180
|
-
color: "".concat(_renderUi.color.text(), " !important"),
|
|
181
|
-
backgroundColor: "".concat(_renderUi.color.background(), " !important"),
|
|
182
|
-
'&:hover': {
|
|
183
|
-
color: _renderUi.color.text(),
|
|
184
|
-
backgroundColor: "".concat(_renderUi.color.secondaryLight(), " !important")
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
menuRoot: {
|
|
188
|
-
color: _renderUi.color.text(),
|
|
189
|
-
backgroundColor: _renderUi.color.background(),
|
|
190
|
-
'&:focus': {
|
|
191
|
-
color: _renderUi.color.text(),
|
|
192
|
-
backgroundColor: _renderUi.color.background()
|
|
193
|
-
},
|
|
194
|
-
'&:hover': {
|
|
195
|
-
color: _renderUi.color.text(),
|
|
196
|
-
backgroundColor: _renderUi.color.secondaryLight()
|
|
197
|
-
},
|
|
198
|
-
boxSizing: 'border-box',
|
|
199
|
-
padding: '25px',
|
|
200
|
-
'&:first-of-type': {
|
|
201
|
-
borderRadius: '3px 3px 0 0'
|
|
202
|
-
},
|
|
203
|
-
'&:last-of-type': {
|
|
204
|
-
borderRadius: '0 0 3px 3px'
|
|
205
|
-
}
|
|
206
|
-
},
|
|
207
|
-
label: {
|
|
208
|
-
fontSize: 'max(1rem, 14px)'
|
|
209
|
-
}
|
|
210
|
-
};
|
|
211
|
-
};
|
|
212
|
-
|
|
213
|
-
var _default = (0, _styles.withStyles)(styles)(Dropdown);
|
|
214
|
-
|
|
215
|
-
exports["default"] = _default;
|
|
216
|
-
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJEcm9wZG93biIsInByb3BzIiwic2V0U3RhdGUiLCJzaG93Q2hlY2ttYXJrIiwib3BlbiIsInN0YXRlIiwiY2xhc3NlcyIsImlkIiwiY29ycmVjdCIsImRpc2FibGVkIiwidmFsdWUiLCJvbkNoYW5nZSIsImNob2ljZXMiLCJzaG93Q29ycmVjdEFuc3dlciIsInJvb3QiLCJpY29uIiwic2VsZWN0TWVudSIsInNlbGVjdCIsInNob3dDaGVja21hcmtBbmRPcGVuIiwiaGlkZUNoZWNrbWFya0FuZENsb3NlIiwia2VlcE1vdW50ZWQiLCJkaXNhYmxlUG9ydGFsIiwiZSIsInRhcmdldCIsIm1hcCIsImMiLCJpbmRleCIsIm1lbnVSb290Iiwic2VsZWN0ZWQiLCJsYWJlbCIsIl9faHRtbCIsIlJlYWN0IiwiQ29tcG9uZW50IiwiUHJvcFR5cGVzIiwic3RyaW5nIiwiYm9vbCIsImZ1bmMiLCJvYmplY3QiLCJhcnJheU9mIiwic2hhcGUiLCJzdHlsZXMiLCJjb2xvciIsInRleHQiLCJiYWNrZ3JvdW5kQ29sb3IiLCJiYWNrZ3JvdW5kIiwiYm9yZGVyQ29sb3IiLCJzZWNvbmRhcnlMaWdodCIsInBhZGRpbmdUb3AiLCJwYWRkaW5nQm90dG9tIiwiYm9yZGVyIiwiYm9yZGVyUmFkaXVzIi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hYmxlZD17ZGlzYWJsZWR9XG4gICAgICAgIHZhbHVlPXt2YWx1ZSB8fCAnJ31cbiAgICAgICAgb25PcGVuPXt0aGlzLnNob3dDaGVja21hcmtBbmRPcGVufVxuICAgICAgICBvbkNsb3NlPXt0aGlzLmhpZGVDaGVja21hcmtBbmRDbG9zZX1cbiAgICAgICAgb3Blbj17b3Blbn1cbiAgICAgICAgaW5wdXQ9ezxDb3JyZWN0SW5wdXQgY29ycmVjdD17c2hvd0NvcnJlY3RBbnN3ZXIgfHwgY29ycmVjdH0gLz59XG4gICAgICAgIE1lbnVQcm9wcz17e1xuICAgICAgICAgIGtlZXBNb3VudGVkOiB0cnVlLFxuICAgICAgICAgIGRpc2FibGVQb3J0YWw6IHRydWVcbiAgICAgICAgfX1cbiAgICAgICAgb25DaGFuZ2U9e2UgPT4ge1xuICAgICAgICAgIG9uQ2hhbmdlKGlkLCBlLnRhcmdldC52YWx1ZSk7XG4gICAgICAgIH19XG4gICAgICA+XG4gICAgICAgIHsoY2hvaWNlcyB8fCBbXSkubWFwKChjLCBpbmRleCkgPT4gKFxuICAgICAgICAgIDxNZW51SXRlbVxuICAgICAgICAgICAgY2xhc3Nlcz17eyByb290OiBjbGFzc2VzLm1lbnVSb290LCBzZWxlY3RlZDogY2xhc3Nlcy5zZWxlY3RlZCB9fVxuICAgICAgICAgICAga2V5PXtgJHtjLmxhYmVsfS0ke2luZGV4fWB9XG4gICAgICAgICAgICB2YWx1ZT17Yy52YWx1ZX1cbiAgICAgICAgICA+XG4gICAgICAgICAgICA8c3BhblxuICAgICAgICAgICAgICBjbGFzc05hbWU9e2NsYXNzZXMubGFiZWx9XG4gICAgICAgICAgICAgIGRhbmdlcm91c2x5U2V0SW5uZXJIVE1MPXt7XG4gICAgICAgICAgICAgICAgX19odG1sOiBjLmxhYmVsXG4gICAgICAgICAgICAgIH19XG4gICAgICAgICAgICAvPlxuICAgICAgICAgICAge3Nob3dDaGVja21hcmsgJiYgKFxuICAgICAgICAgICAgIC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