@instructure/quiz-core 17.44.1-rc.8 → 17.45.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.md +19 -0
- package/es/building/components/resources/ItemFeedbackModal/presenter.js +4 -3
- package/es/common/util/RceConfigProvider.js +10 -7
- package/lib/building/components/resources/ItemFeedbackModal/presenter.js +4 -3
- package/lib/common/util/RceConfigProvider.js +11 -7
- package/package.json +10 -10
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [17.45.0](https://gerrit.instructure.com/quizzes-ui/compare/v17.44.0...v17.45.0) (2022-12-13)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* **browser:** remove aria-expanded from the wrong html element ([fd0d48d](https://gerrit.instructure.com/quizzes-ui/commits/fd0d48d4e424f8161358ac8dc5d91b57aab48660))
|
|
12
|
+
* **core:** scroll into view correctly when scroll keys are null ([f82fb31](https://gerrit.instructure.com/quizzes-ui/commits/f82fb316b37bc8509749707d3a1cce78aa6dc9cc))
|
|
13
|
+
* **RCE5:** set features RCEGlobals until it get fixed ([7d4c5eb](https://gerrit.instructure.com/quizzes-ui/commits/7d4c5eb58cfdc66ccb7a2a4df9f91ee37f88d1f7))
|
|
14
|
+
* **Stimulus:** clear modifications properly on unmount ([5752c86](https://gerrit.instructure.com/quizzes-ui/commits/5752c8638cc3584f3c09e530f80bbb741804fdec))
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* **RCE5:** set RCE5 editor height ([fc7d0d1](https://gerrit.instructure.com/quizzes-ui/commits/fc7d0d1f5868bc7a4145fb1202a0ec68be0d3fd0))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [17.44.0](https://gerrit.instructure.com/quizzes-ui/compare/v17.43.0...v17.44.0) (2022-11-30)
|
|
7
26
|
|
|
8
27
|
|
|
@@ -11,9 +11,9 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
|
11
11
|
import { Button, CloseButton } from '@instructure/ui-buttons';
|
|
12
12
|
import { Heading } from '@instructure/ui-heading';
|
|
13
13
|
import { themeable } from '@instructure/ui-themeable';
|
|
14
|
-
import { RichContentRenderer } from '@instructure/quiz-rce';
|
|
14
|
+
import { RichContentRenderer, RCE_THREE_LINES_HEIGHT } from '@instructure/quiz-rce';
|
|
15
15
|
import { isNewRCEEnabled } from "../../../../common/util/rceChecker.js";
|
|
16
|
-
import RichContentInput from "../../../../common/components/RichContentInput/index.js";
|
|
16
|
+
import { RichContentInput } from "../../../../common/components/RichContentInput/index.js";
|
|
17
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
18
18
|
import { Modal, ModalHeader, ModalBody, ModalFooter, ITEM_FEEDBACK_MODAL, ITEM_FEEDBACK_MODAL_FEEDBACK, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
|
|
19
19
|
var styles = {
|
|
@@ -108,7 +108,8 @@ export var ItemFeedbackModal = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
108
108
|
parentType: this.props.parentType,
|
|
109
109
|
parentId: this.props.parentId,
|
|
110
110
|
importModalCloseOverride: this.returnToFeedback,
|
|
111
|
-
useNewRce: isNewRCEEnabled()
|
|
111
|
+
useNewRce: isNewRCEEnabled(),
|
|
112
|
+
height: RCE_THREE_LINES_HEIGHT
|
|
112
113
|
}));
|
|
113
114
|
}
|
|
114
115
|
}, {
|
|
@@ -9,13 +9,16 @@ import store from "../../reduxStore.js";
|
|
|
9
9
|
import { setRCEError } from "../actions/rce.js";
|
|
10
10
|
import isNewRCEEnabled from "./rceChecker.js";
|
|
11
11
|
import { QuizzesSpinner as Spinner } from "../components/shared/spinner/Spinner.js";
|
|
12
|
+
import { Card } from "../components/shared/Card/index.js";
|
|
12
13
|
import { RceConfigContext, RceConfigKeys } from '@instructure/quiz-common';
|
|
13
14
|
import { addError } from "../actions/alerts.js";
|
|
14
15
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
15
16
|
import { extractTextFromHtml } from '@instructure/quiz-interactions';
|
|
16
17
|
import { isDuringQuizTake } from "./windowChecks.js";
|
|
17
18
|
|
|
18
|
-
var _ref4 = /*#__PURE__*/React.createElement(
|
|
19
|
+
var _ref4 = /*#__PURE__*/React.createElement(Card, {
|
|
20
|
+
wrapped: true
|
|
21
|
+
}, /*#__PURE__*/React.createElement(Spinner, null));
|
|
19
22
|
|
|
20
23
|
export var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
21
24
|
var _useState = useState(props.rcsJwt),
|
|
@@ -120,16 +123,16 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
120
123
|
while (1) {
|
|
121
124
|
switch (_context2.prev = _context2.next) {
|
|
122
125
|
case 0:
|
|
123
|
-
_context2.prev = 0;
|
|
124
|
-
|
|
125
126
|
if (props.useNewRce) {
|
|
126
|
-
_context2.next =
|
|
127
|
+
_context2.next = 2;
|
|
127
128
|
break;
|
|
128
129
|
}
|
|
129
130
|
|
|
130
131
|
return _context2.abrupt("return");
|
|
131
132
|
|
|
132
|
-
case
|
|
133
|
+
case 2:
|
|
134
|
+
_context2.prev = 2;
|
|
135
|
+
|
|
133
136
|
if (hasAllPropsForRcs()) {
|
|
134
137
|
_context2.next = 6;
|
|
135
138
|
break;
|
|
@@ -165,7 +168,7 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
165
168
|
|
|
166
169
|
case 21:
|
|
167
170
|
_context2.prev = 21;
|
|
168
|
-
_context2.t0 = _context2["catch"](
|
|
171
|
+
_context2.t0 = _context2["catch"](2);
|
|
169
172
|
setCanvasConfig(null);
|
|
170
173
|
setErrorIfDuringTaking(t('Error: Full functionality of the Rich Content Editor including accessibility features may not have been available to the user.'));
|
|
171
174
|
|
|
@@ -179,7 +182,7 @@ export var RceConfigProviderComponent = function RceConfigProviderComponent(prop
|
|
|
179
182
|
return _context2.stop();
|
|
180
183
|
}
|
|
181
184
|
}
|
|
182
|
-
}, _callee2, null, [[
|
|
185
|
+
}, _callee2, null, [[2, 21, 25, 28]]);
|
|
183
186
|
}))();
|
|
184
187
|
}, [props.useNewRce]);
|
|
185
188
|
if (!props.useNewRce) return /*#__PURE__*/React.createElement(React.Fragment, null, props.children);
|
|
@@ -33,7 +33,7 @@ var _quizRce = require("@instructure/quiz-rce");
|
|
|
33
33
|
|
|
34
34
|
var _rceChecker = require("../../../../common/util/rceChecker.js");
|
|
35
35
|
|
|
36
|
-
var _index =
|
|
36
|
+
var _index = require("../../../../common/components/RichContentInput/index.js");
|
|
37
37
|
|
|
38
38
|
var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
|
|
39
39
|
|
|
@@ -126,7 +126,7 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
126
126
|
return /*#__PURE__*/_react.default.createElement("div", null, _ref, /*#__PURE__*/_react.default.createElement("label", {
|
|
127
127
|
className: styles.feedbackLabel,
|
|
128
128
|
htmlFor: key
|
|
129
|
-
}, label), /*#__PURE__*/_react.default.createElement(_index.
|
|
129
|
+
}, label), /*#__PURE__*/_react.default.createElement(_index.RichContentInput, {
|
|
130
130
|
label: "",
|
|
131
131
|
textareaId: key,
|
|
132
132
|
defaultContent: this.props.feedback.get(key),
|
|
@@ -134,7 +134,8 @@ var ItemFeedbackModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
|
|
|
134
134
|
parentType: this.props.parentType,
|
|
135
135
|
parentId: this.props.parentId,
|
|
136
136
|
importModalCloseOverride: this.returnToFeedback,
|
|
137
|
-
useNewRce: (0, _rceChecker.isNewRCEEnabled)()
|
|
137
|
+
useNewRce: (0, _rceChecker.isNewRCEEnabled)(),
|
|
138
|
+
height: _quizRce.RCE_THREE_LINES_HEIGHT
|
|
138
139
|
}));
|
|
139
140
|
}
|
|
140
141
|
}, {
|
|
@@ -31,6 +31,8 @@ var _rceChecker = _interopRequireDefault(require("./rceChecker.js"));
|
|
|
31
31
|
|
|
32
32
|
var _Spinner = require("../components/shared/spinner/Spinner.js");
|
|
33
33
|
|
|
34
|
+
var _index = require("../components/shared/Card/index.js");
|
|
35
|
+
|
|
34
36
|
var _quizCommon = require("@instructure/quiz-common");
|
|
35
37
|
|
|
36
38
|
var _alerts = require("../actions/alerts.js");
|
|
@@ -41,7 +43,9 @@ var _quizInteractions = require("@instructure/quiz-interactions");
|
|
|
41
43
|
|
|
42
44
|
var _windowChecks = require("./windowChecks.js");
|
|
43
45
|
|
|
44
|
-
var _ref4 = /*#__PURE__*/_react.default.createElement(
|
|
46
|
+
var _ref4 = /*#__PURE__*/_react.default.createElement(_index.Card, {
|
|
47
|
+
wrapped: true
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_Spinner.QuizzesSpinner, null));
|
|
45
49
|
|
|
46
50
|
var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
47
51
|
var _useState = (0, _react.useState)(props.rcsJwt),
|
|
@@ -146,16 +150,16 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
146
150
|
while (1) {
|
|
147
151
|
switch (_context2.prev = _context2.next) {
|
|
148
152
|
case 0:
|
|
149
|
-
_context2.prev = 0;
|
|
150
|
-
|
|
151
153
|
if (props.useNewRce) {
|
|
152
|
-
_context2.next =
|
|
154
|
+
_context2.next = 2;
|
|
153
155
|
break;
|
|
154
156
|
}
|
|
155
157
|
|
|
156
158
|
return _context2.abrupt("return");
|
|
157
159
|
|
|
158
|
-
case
|
|
160
|
+
case 2:
|
|
161
|
+
_context2.prev = 2;
|
|
162
|
+
|
|
159
163
|
if (hasAllPropsForRcs()) {
|
|
160
164
|
_context2.next = 6;
|
|
161
165
|
break;
|
|
@@ -191,7 +195,7 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
191
195
|
|
|
192
196
|
case 21:
|
|
193
197
|
_context2.prev = 21;
|
|
194
|
-
_context2.t0 = _context2["catch"](
|
|
198
|
+
_context2.t0 = _context2["catch"](2);
|
|
195
199
|
setCanvasConfig(null);
|
|
196
200
|
setErrorIfDuringTaking((0, _formatMessage.default)('Error: Full functionality of the Rich Content Editor including accessibility features may not have been available to the user.'));
|
|
197
201
|
|
|
@@ -205,7 +209,7 @@ var RceConfigProviderComponent = function RceConfigProviderComponent(props) {
|
|
|
205
209
|
return _context2.stop();
|
|
206
210
|
}
|
|
207
211
|
}
|
|
208
|
-
}, _callee2, null, [[
|
|
212
|
+
}, _callee2, null, [[2, 21, 25, 28]]);
|
|
209
213
|
}))();
|
|
210
214
|
}, [props.useNewRce]);
|
|
211
215
|
if (!props.useNewRce) return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, props.children);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.45.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -41,11 +41,11 @@
|
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@instructure/outcomes-ui": "^2.1.2",
|
|
44
|
-
"@instructure/quiz-common": "17.
|
|
45
|
-
"@instructure/quiz-i18n": "17.
|
|
46
|
-
"@instructure/quiz-interactions": "17.
|
|
47
|
-
"@instructure/quiz-number-input": "17.
|
|
48
|
-
"@instructure/quiz-rce": "17.
|
|
44
|
+
"@instructure/quiz-common": "^17.45.0",
|
|
45
|
+
"@instructure/quiz-i18n": "^17.45.0",
|
|
46
|
+
"@instructure/quiz-interactions": "^17.45.0",
|
|
47
|
+
"@instructure/quiz-number-input": "^17.45.0",
|
|
48
|
+
"@instructure/quiz-rce": "^17.45.0",
|
|
49
49
|
"@instructure/ui-a11y-content": "^7.20.0",
|
|
50
50
|
"@instructure/ui-alerts": "^7.20.0",
|
|
51
51
|
"@instructure/ui-avatar": "^7.20.0",
|
|
@@ -106,7 +106,7 @@
|
|
|
106
106
|
"eventemitter3": "^3.1.0",
|
|
107
107
|
"humps": "^2.0.0",
|
|
108
108
|
"immutable": "^3.8.1",
|
|
109
|
-
"instructure-validations": "17.
|
|
109
|
+
"instructure-validations": "^17.45.0",
|
|
110
110
|
"ipaddr.js": "^1.5.4",
|
|
111
111
|
"isomorphic-fetch": "^2.2.0",
|
|
112
112
|
"isuuid": "^0.1.0",
|
|
@@ -137,7 +137,7 @@
|
|
|
137
137
|
"uuid": "^3.2.1"
|
|
138
138
|
},
|
|
139
139
|
"devDependencies": {
|
|
140
|
-
"@instructure/quiz-scripts": "17.
|
|
140
|
+
"@instructure/quiz-scripts": "^17.45.0",
|
|
141
141
|
"@instructure/ui-axe-check": "^7.20.0",
|
|
142
142
|
"@instructure/ui-babel-preset": "^7.20.0",
|
|
143
143
|
"@instructure/ui-karma-config": "^7.20.0",
|
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
"intl": "^1.2.4",
|
|
157
157
|
"jquery": "^2.2.3",
|
|
158
158
|
"most-subject": "^5.3.0",
|
|
159
|
-
"quiz-presets": "17.
|
|
159
|
+
"quiz-presets": "^17.45.0",
|
|
160
160
|
"react": "^16.8.6",
|
|
161
161
|
"react-addons-test-utils": "^15.6.2",
|
|
162
162
|
"react-dom": "^16.8.6",
|
|
@@ -172,5 +172,5 @@
|
|
|
172
172
|
"publishConfig": {
|
|
173
173
|
"access": "public"
|
|
174
174
|
},
|
|
175
|
-
"gitHead": "
|
|
175
|
+
"gitHead": "b302aa334b4e096d9df426a2aec7aed00f2ee7a1"
|
|
176
176
|
}
|