@instructure/quiz-core 17.49.1-rc.7 → 17.50.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 CHANGED
@@ -3,6 +3,30 @@
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.50.0](https://gerrit.instructure.com/quizzes-ui/compare/v17.49.0...v17.50.0) (2023-03-16)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **a11y:** add accessibility to moderate table ([f764223](https://gerrit.instructure.com/quizzes-ui/commits/f7642232ac0a572d4dc5265ed46f74e4f55ae4e9))
12
+
13
+
14
+ ### Features
15
+
16
+ * **GBQ:** add grade by question banner ([b6cd887](https://gerrit.instructure.com/quizzes-ui/commits/b6cd887c3bb6c8d582d9a7ef59e27f9b6abc3955))
17
+ * **GBQ:** add hidden button to jump to sidebar from grading questions ([fd884fc](https://gerrit.instructure.com/quizzes-ui/commits/fd884fc589dcef38f3ba0ad20d615c4868fafa08))
18
+ * **GBQ:** add modal when active question not found ([9bd3bc8](https://gerrit.instructure.com/quizzes-ui/commits/9bd3bc8000129449c35fb05480a8955447f4a481))
19
+ * **GBQ:** set and scroll to active item ([209011c](https://gerrit.instructure.com/quizzes-ui/commits/209011c05b8c437e7e1809c61d268c8021930d4b))
20
+ * **gradeBQM:** add support for gradeByQuestionMode ([4edda95](https://gerrit.instructure.com/quizzes-ui/commits/4edda9558c107916281346c7a8f5de4c29352425))
21
+ * **Grading:** Add sidebar to grading page ([67a51dc](https://gerrit.instructure.com/quizzes-ui/commits/67a51dce3d75661bf30ed46ce38dd5151490589d))
22
+ * **RCE5:** Forward canvas tool id to Canvas-rce 5 ([64019c5](https://gerrit.instructure.com/quizzes-ui/commits/64019c505076e70430601ccbed94f7a94898ca21))
23
+ * **Reports:** Create skeleton for new item analysis report page ([0b7fea3](https://gerrit.instructure.com/quizzes-ui/commits/0b7fea3862df6b8e938238011f50617fd656e52f))
24
+ * **sharing:** Add share checkbox on bank create ([5175224](https://gerrit.instructure.com/quizzes-ui/commits/5175224bda8b6eba33d9d2e41a8d01f8723a0bd0))
25
+
26
+
27
+
28
+
29
+
6
30
  # [17.49.0](https://gerrit.instructure.com/quizzes-ui/compare/v17.48.0...v17.49.0) (2023-02-22)
7
31
 
8
32
 
@@ -10,7 +10,7 @@ import { removeSharedBank, updateSharedBankPermission as updateSharedBankPermiss
10
10
  import { clear, newActiveBankEntry, newActiveBank } from "../../common/actions/ui.js";
11
11
  import t from '@instructure/quiz-i18n/es/format-message';
12
12
  import { handleError } from "../../common/api/helpers.js";
13
- import { BANKS_BANK_PAGINATION, BANKS_BANK_ENTRY_PAGINATION, DELETE_BANK_CALL, UPDATE_BANK_CALL, CAN_EDIT, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE } from '@instructure/quiz-common';
13
+ import { BANKS_BANK_PAGINATION, BANKS_BANK_ENTRY_PAGINATION, DELETE_BANK_CALL, UPDATE_BANK_CALL, CAN_EDIT, READ_ONLY, REMOVED_ACCESS, SHARED_WITH_USER, SHARED_WITH_COURSE } from '@instructure/quiz-common';
14
14
  var banksApiEndpoint = '/api/banks';
15
15
  var DEFAULT_PAGE_SIZE = 100;
16
16
 
@@ -71,7 +71,7 @@ export var getBank = function getBank(bankId) {
71
71
  });
72
72
  };
73
73
  };
74
- export var createBank = function createBank(newBank) {
74
+ export var createBank = function createBank(newBank, shareWithCourseUuid) {
75
75
  return function (dispatch, getState) {
76
76
  var newBankData = JSON.stringify({
77
77
  bank: {
@@ -84,10 +84,34 @@ export var createBank = function createBank(newBank) {
84
84
  body: newBankData
85
85
  }).then(function (bankData) {
86
86
  dispatch([handleBankResponse(bankData), clear(BANKS_BANK_PAGINATION)]);
87
+
88
+ if (shareWithCourseUuid) {
89
+ simpleShareWithCourse(dispatch, bankData.id, shareWithCourseUuid);
90
+ }
91
+
87
92
  return bankData;
88
93
  });
89
94
  };
95
+ }; // not an action creator
96
+
97
+ var simpleShareWithCourse = function simpleShareWithCourse(dispatch, bankId, courseUuid) {
98
+ var url = "".concat(banksApiEndpoint, "/").concat(bankId, "/shared_banks");
99
+ var shareBankData = JSON.stringify({
100
+ shared_bank: {
101
+ entity_id: courseUuid,
102
+ entityType: SHARED_WITH_COURSE,
103
+ bank_id: bankId,
104
+ permission: READ_ONLY
105
+ }
106
+ });
107
+ var fetcher = new Fetcher({
108
+ onError: handleError(dispatch, t('Failed to share bank.'))
109
+ });
110
+ return fetcher.post(url, {
111
+ body: shareBankData
112
+ });
90
113
  };
114
+
91
115
  export function getExistingBankAndEntries(bankId) {
92
116
  return function (dispatch, getState) {
93
117
  return dispatch([clear("".concat(BANKS_BANK_ENTRY_PAGINATION, ":").concat(bankId)), getBank(bankId)]);
@@ -44,9 +44,6 @@ var sortOrderIcons = {
44
44
  ASC: IconArrowUpLine,
45
45
  DESC: IconArrowDownLine
46
46
  };
47
-
48
- var _ref4 = /*#__PURE__*/React.createElement(CreateBankModal, null);
49
-
50
47
  export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
51
48
  _inherits(Banks, _Component);
52
49
 
@@ -366,7 +363,9 @@ export var Banks = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
366
363
  getPage: this.getPage,
367
364
  renderRecords: this.renderRecords,
368
365
  stateKey: BANKS_BANK_PAGINATION
369
- }), _ref4));
366
+ }), /*#__PURE__*/React.createElement(CreateBankModal, {
367
+ itemBanksScope: this.props.scope
368
+ })));
370
369
  }
371
370
  }]);
372
371
 
@@ -10,6 +10,7 @@ import Bank from "../../../common/records/Bank.js";
10
10
  import { showError, hideError } from "../../../common/actions/errorsShowing.js";
11
11
  import { getModalTrigger } from "../../../common/util/modalHelpers.js";
12
12
  import { screenreaderNotification } from "../../../common/actions/alerts.js";
13
+ import { featureOn } from "../../../common/util/featureCheck.js";
13
14
 
14
15
  function mapStateToProps(state) {
15
16
  var temporaryBank = new Bank(state.getIn(['modifications', 'banks', TEMPORARY_BANK_ID]));
@@ -21,7 +22,8 @@ function mapStateToProps(state) {
21
22
  onCreateBank: state.getIn(['modal', 'options', 'onCreateBank']),
22
23
  temporaryBank: temporaryBank,
23
24
  errorKey: errorKey,
24
- displayError: errorsMap.get(errorKey)
25
+ displayError: errorsMap.get(errorKey),
26
+ showShareBankOnCreate: featureOn('share_bank_on_create')
25
27
  };
26
28
  }
27
29
 
@@ -8,6 +8,8 @@ var _dec, _class, _class2, _temp;
8
8
  import React, { Component } from 'react';
9
9
  import PropTypes from 'prop-types';
10
10
  import { Button, CloseButton } from '@instructure/ui-buttons';
11
+ import { Checkbox } from '@instructure/ui-checkbox';
12
+ import { View } from '@instructure/ui-view';
11
13
  import { TextInput } from '@instructure/ui-text-input';
12
14
  import { Heading } from '@instructure/ui-heading';
13
15
  import { themeable } from '@instructure/ui-themeable';
@@ -39,12 +41,17 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
39
41
  }
40
42
 
41
43
  _this = _super.call.apply(_super, [this].concat(args));
44
+ _this.state = {
45
+ shareWithCourse: false
46
+ };
42
47
 
43
48
  _this.continueAction = function () {
44
49
  _this.props.showError(_this.props.errorKey);
45
50
 
46
51
  if (_this.props.temporaryBank.isValid()) {
47
- _this.props.createBank(_this.props.temporaryBank);
52
+ var courseUuid = _this.state.shareWithCourse ? _this.props.itemBanksScope.uuid : null;
53
+
54
+ _this.props.createBank(_this.props.temporaryBank, courseUuid);
48
55
 
49
56
  _this.props.onCreateBank();
50
57
 
@@ -57,6 +64,10 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
57
64
  _this.closeAction = function () {
58
65
  _this.props.hideError(_this.props.errorKey);
59
66
 
67
+ _this.setState({
68
+ shareWithCourse: false
69
+ });
70
+
60
71
  _this.props.clearModifications('banks', _this.props.temporaryBank.id);
61
72
 
62
73
  if (_this.props.modalTrigger) {
@@ -80,6 +91,12 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
80
91
  }
81
92
  };
82
93
 
94
+ _this.toggleCheckbox = function (event) {
95
+ _this.setState({
96
+ shareWithCourse: event.target.checked
97
+ });
98
+ };
99
+
83
100
  return _this;
84
101
  }
85
102
 
@@ -117,6 +134,27 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
117
134
  type: "text",
118
135
  placeholder: t('Enter a name...'),
119
136
  "data-automation": "sdk-create-bank-name-textinput"
137
+ }), this.renderCheckbox());
138
+ }
139
+ }, {
140
+ key: "renderCheckbox",
141
+ value: function renderCheckbox() {
142
+ var hide = !this.props.showShareBankOnCreate || this.props.itemBanksScope.type !== 'course' || !this.props.itemBanksScope.title || !this.props.itemBanksScope.uuid;
143
+
144
+ if (hide) {
145
+ return null;
146
+ }
147
+
148
+ var label = t('Share with { courseName }', {
149
+ courseName: this.props.itemBanksScope.title
150
+ });
151
+ return /*#__PURE__*/React.createElement(View, {
152
+ margin: "medium 0 0 0",
153
+ as: "div"
154
+ }, /*#__PURE__*/React.createElement(Checkbox, {
155
+ label: label,
156
+ checked: this.state.shareWithCourse,
157
+ onChange: this.toggleCheckbox
120
158
  }));
121
159
  }
122
160
  }, {
@@ -155,10 +193,18 @@ export var CreateBankModal = (_dec = themeable(theme, styles), _dec(_class = (_t
155
193
  hideError: PropTypes.func.isRequired,
156
194
  closeModal: PropTypes.func.isRequired,
157
195
  screenreaderNotification: PropTypes.func.isRequired,
158
- onCreateBank: PropTypes.func
196
+ onCreateBank: PropTypes.func,
197
+ showShareBankOnCreate: PropTypes.bool,
198
+ itemBanksScope: PropTypes.shape({
199
+ type: PropTypes.string,
200
+ uuid: PropTypes.string,
201
+ title: PropTypes.string
202
+ })
159
203
  }, _class2.defaultProps = {
160
204
  displayError: false,
161
205
  modalTrigger: null,
206
+ showShareBankOnCreate: false,
207
+ itemBanksScope: {},
162
208
  onCreateBank: function onCreateBank() {}
163
209
  }, _temp)) || _class);
164
210
  export default CreateBankModal;
@@ -1,4 +1,4 @@
1
- import { GRADE_BY_QUESTION_ENABLED, GBQ_SET_ACTIVE_ITEM } from '@instructure/quiz-common';
1
+ import { DISMISS_GBQ_BANNER, GRADE_BY_QUESTION_ENABLED, GBQ_SET_ACTIVE_ITEM } from '@instructure/quiz-common';
2
2
  export function setGradeByQuestionEnabled(enabled) {
3
3
  return {
4
4
  type: GRADE_BY_QUESTION_ENABLED,
@@ -10,4 +10,9 @@ export function setActiveItem(itemId) {
10
10
  type: GBQ_SET_ACTIVE_ITEM,
11
11
  payload: itemId
12
12
  };
13
+ }
14
+ export function dismissGradeByQuestionBanner() {
15
+ return {
16
+ type: DISMISS_GBQ_BANNER
17
+ };
13
18
  }
@@ -111,7 +111,7 @@ ConfirmationModal.propTypes = {
111
111
  title: PropTypes.string,
112
112
  text: PropTypes.string,
113
113
  cancelText: PropTypes.string,
114
- continueText: PropTypes.string,
114
+ continueText: PropTypes.oneOfType([PropTypes.string, PropTypes.node]),
115
115
  continueVariant: PropTypes.string,
116
116
  size: PropTypes.string,
117
117
  shouldReturnFocus: PropTypes.bool,
@@ -313,7 +313,9 @@ export var Sidebar = (_dec = themeable(theme, styles), _dec(_class = (_temp = _c
313
313
  value: function render() {
314
314
  var sidebarClassList = classNames(styles.sidebar, _defineProperty({}, styles.sidebarIsOpen, this.props.sidebarOpen));
315
315
  return /*#__PURE__*/React.createElement(View, null, /*#__PURE__*/React.createElement("div", {
316
- className: styles.commonContainer
316
+ className: styles.commonContainer,
317
+ id: "sidebar-wrapper",
318
+ tabIndex: "-1"
317
319
  }, /*#__PURE__*/React.createElement("div", {
318
320
  className: sidebarClassList,
319
321
  onTransitionEnd: this.handleTransitionEnd,
@@ -1,5 +1,5 @@
1
1
  import { fromJS } from 'immutable';
2
- import { GRADE_BY_QUESTION_ENABLED, GBQ_SET_ACTIVE_ITEM } from '@instructure/quiz-common';
2
+ import { DISMISS_GBQ_BANNER, GRADE_BY_QUESTION_ENABLED, GBQ_SET_ACTIVE_ITEM } from '@instructure/quiz-common';
3
3
  export default (function () {
4
4
  var state = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : fromJS({});
5
5
  var action = arguments.length > 1 ? arguments[1] : void 0;
@@ -11,6 +11,9 @@ export default (function () {
11
11
  case GBQ_SET_ACTIVE_ITEM:
12
12
  return state.set('activeItemId', action.payload);
13
13
 
14
+ case DISMISS_GBQ_BANNER:
15
+ return state.set('gradeByQuestionBannerDismissed', true);
16
+
14
17
  default:
15
18
  return state;
16
19
  }
package/es/index.js CHANGED
@@ -109,7 +109,7 @@ export { takingApiActions }; // Actions
109
109
 
110
110
  export { addSuccess, addInfo, addError, screenreaderNotification, removeAlert } from "./common/actions/alerts.js";
111
111
  export { openModal, closeModal } from "./common/actions/modal.js";
112
- export { setGradeByQuestionEnabled } from "./common/actions/grading.js";
112
+ export { setGradeByQuestionEnabled, setActiveItem, dismissGradeByQuestionBanner } from "./common/actions/grading.js";
113
113
  export { setRegradingPayload, setScoreReconciliation, toggleRegradingEditMode } from "./common/actions/regrading.js";
114
114
  export { showError, hideError, clearErrorsShowing } from "./common/actions/errorsShowing.js";
115
115
  export { changeItemState, changeQuizEntryPoints, changeQuizEntryProperties, clearModifications, moveTemporaryQuizEntry, changeQuizOutcomeAlignmentSetGuid, changeFudgePoints, sessionItemResultsModification } from "./common/actions/modifications.js";
@@ -103,7 +103,7 @@ var getBank = function getBank(bankId) {
103
103
 
104
104
  exports.getBank = getBank;
105
105
 
106
- var createBank = function createBank(newBank) {
106
+ var createBank = function createBank(newBank, shareWithCourseUuid) {
107
107
  return function (dispatch, getState) {
108
108
  var newBankData = JSON.stringify({
109
109
  bank: {
@@ -116,13 +116,37 @@ var createBank = function createBank(newBank) {
116
116
  body: newBankData
117
117
  }).then(function (bankData) {
118
118
  dispatch([(0, _callHandlers.handleBankResponse)(bankData), (0, _ui.clear)(_quizCommon.BANKS_BANK_PAGINATION)]);
119
+
120
+ if (shareWithCourseUuid) {
121
+ simpleShareWithCourse(dispatch, bankData.id, shareWithCourseUuid);
122
+ }
123
+
119
124
  return bankData;
120
125
  });
121
126
  };
122
- };
127
+ }; // not an action creator
128
+
123
129
 
124
130
  exports.createBank = createBank;
125
131
 
132
+ var simpleShareWithCourse = function simpleShareWithCourse(dispatch, bankId, courseUuid) {
133
+ var url = "".concat(banksApiEndpoint, "/").concat(bankId, "/shared_banks");
134
+ var shareBankData = JSON.stringify({
135
+ shared_bank: {
136
+ entity_id: courseUuid,
137
+ entityType: _quizCommon.SHARED_WITH_COURSE,
138
+ bank_id: bankId,
139
+ permission: _quizCommon.READ_ONLY
140
+ }
141
+ });
142
+ var fetcher = new _Fetcher.default({
143
+ onError: (0, _helpers.handleError)(dispatch, (0, _formatMessage.default)('Failed to share bank.'))
144
+ });
145
+ return fetcher.post(url, {
146
+ body: shareBankData
147
+ });
148
+ };
149
+
126
150
  function getExistingBankAndEntries(bankId) {
127
151
  return function (dispatch, getState) {
128
152
  return dispatch([(0, _ui.clear)("".concat(_quizCommon.BANKS_BANK_ENTRY_PAGINATION, ":").concat(bankId)), getBank(bankId)]);
@@ -81,9 +81,6 @@ var sortOrderIcons = {
81
81
  ASC: _uiIcons.IconArrowUpLine,
82
82
  DESC: _uiIcons.IconArrowDownLine
83
83
  };
84
-
85
- var _ref4 = /*#__PURE__*/_react.default.createElement(_index4.default, null);
86
-
87
84
  var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
88
85
  (0, _inherits2.default)(Banks, _Component);
89
86
 
@@ -405,7 +402,9 @@ var Banks = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
405
402
  getPage: this.getPage,
406
403
  renderRecords: this.renderRecords,
407
404
  stateKey: _quizCommon.BANKS_BANK_PAGINATION
408
- }), _ref4));
405
+ }), /*#__PURE__*/_react.default.createElement(_index4.default, {
406
+ itemBanksScope: this.props.scope
407
+ })));
409
408
  }
410
409
  }]);
411
410
  Banks.displayName = "Banks";
@@ -33,6 +33,8 @@ var _modalHelpers = require("../../../common/util/modalHelpers.js");
33
33
 
34
34
  var _alerts = require("../../../common/actions/alerts.js");
35
35
 
36
+ var _featureCheck = require("../../../common/util/featureCheck.js");
37
+
36
38
  function mapStateToProps(state) {
37
39
  var temporaryBank = new _Bank.default(state.getIn(['modifications', 'banks', _quizCommon.TEMPORARY_BANK_ID]));
38
40
  var errorsMap = state.get('errorsShowing', (0, _immutable.Map)());
@@ -43,7 +45,8 @@ function mapStateToProps(state) {
43
45
  onCreateBank: state.getIn(['modal', 'options', 'onCreateBank']),
44
46
  temporaryBank: temporaryBank,
45
47
  errorKey: errorKey,
46
- displayError: errorsMap.get(errorKey)
48
+ displayError: errorsMap.get(errorKey),
49
+ showShareBankOnCreate: (0, _featureCheck.featureOn)('share_bank_on_create')
47
50
  };
48
51
  }
49
52
 
@@ -23,6 +23,10 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
23
23
 
24
24
  var _uiButtons = require("@instructure/ui-buttons");
25
25
 
26
+ var _uiCheckbox = require("@instructure/ui-checkbox");
27
+
28
+ var _uiView = require("@instructure/ui-view");
29
+
26
30
  var _uiTextInput = require("@instructure/ui-text-input");
27
31
 
28
32
  var _uiHeading = require("@instructure/ui-heading");
@@ -64,12 +68,17 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
64
68
  }
65
69
 
66
70
  _this = _super.call.apply(_super, [this].concat(args));
71
+ _this.state = {
72
+ shareWithCourse: false
73
+ };
67
74
 
68
75
  _this.continueAction = function () {
69
76
  _this.props.showError(_this.props.errorKey);
70
77
 
71
78
  if (_this.props.temporaryBank.isValid()) {
72
- _this.props.createBank(_this.props.temporaryBank);
79
+ var courseUuid = _this.state.shareWithCourse ? _this.props.itemBanksScope.uuid : null;
80
+
81
+ _this.props.createBank(_this.props.temporaryBank, courseUuid);
73
82
 
74
83
  _this.props.onCreateBank();
75
84
 
@@ -82,6 +91,10 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
82
91
  _this.closeAction = function () {
83
92
  _this.props.hideError(_this.props.errorKey);
84
93
 
94
+ _this.setState({
95
+ shareWithCourse: false
96
+ });
97
+
85
98
  _this.props.clearModifications('banks', _this.props.temporaryBank.id);
86
99
 
87
100
  if (_this.props.modalTrigger) {
@@ -105,6 +118,12 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
105
118
  }
106
119
  };
107
120
 
121
+ _this.toggleCheckbox = function (event) {
122
+ _this.setState({
123
+ shareWithCourse: event.target.checked
124
+ });
125
+ };
126
+
108
127
  return _this;
109
128
  }
110
129
 
@@ -142,6 +161,27 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
142
161
  type: "text",
143
162
  placeholder: (0, _formatMessage.default)('Enter a name...'),
144
163
  "data-automation": "sdk-create-bank-name-textinput"
164
+ }), this.renderCheckbox());
165
+ }
166
+ }, {
167
+ key: "renderCheckbox",
168
+ value: function renderCheckbox() {
169
+ var hide = !this.props.showShareBankOnCreate || this.props.itemBanksScope.type !== 'course' || !this.props.itemBanksScope.title || !this.props.itemBanksScope.uuid;
170
+
171
+ if (hide) {
172
+ return null;
173
+ }
174
+
175
+ var label = (0, _formatMessage.default)('Share with { courseName }', {
176
+ courseName: this.props.itemBanksScope.title
177
+ });
178
+ return /*#__PURE__*/_react.default.createElement(_uiView.View, {
179
+ margin: "medium 0 0 0",
180
+ as: "div"
181
+ }, /*#__PURE__*/_react.default.createElement(_uiCheckbox.Checkbox, {
182
+ label: label,
183
+ checked: this.state.shareWithCourse,
184
+ onChange: this.toggleCheckbox
145
185
  }));
146
186
  }
147
187
  }, {
@@ -179,10 +219,18 @@ var CreateBankModal = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
179
219
  hideError: _propTypes.default.func.isRequired,
180
220
  closeModal: _propTypes.default.func.isRequired,
181
221
  screenreaderNotification: _propTypes.default.func.isRequired,
182
- onCreateBank: _propTypes.default.func
222
+ onCreateBank: _propTypes.default.func,
223
+ showShareBankOnCreate: _propTypes.default.bool,
224
+ itemBanksScope: _propTypes.default.shape({
225
+ type: _propTypes.default.string,
226
+ uuid: _propTypes.default.string,
227
+ title: _propTypes.default.string
228
+ })
183
229
  }, _class2.defaultProps = {
184
230
  displayError: false,
185
231
  modalTrigger: null,
232
+ showShareBankOnCreate: false,
233
+ itemBanksScope: {},
186
234
  onCreateBank: function onCreateBank() {}
187
235
  }, _temp)) || _class);
188
236
  exports.CreateBankModal = CreateBankModal;
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.setGradeByQuestionEnabled = setGradeByQuestionEnabled;
7
7
  exports.setActiveItem = setActiveItem;
8
+ exports.dismissGradeByQuestionBanner = dismissGradeByQuestionBanner;
8
9
 
9
10
  var _quizCommon = require("@instructure/quiz-common");
10
11
 
@@ -20,4 +21,10 @@ function setActiveItem(itemId) {
20
21
  type: _quizCommon.GBQ_SET_ACTIVE_ITEM,
21
22
  payload: itemId
22
23
  };
24
+ }
25
+
26
+ function dismissGradeByQuestionBanner() {
27
+ return {
28
+ type: _quizCommon.DISMISS_GBQ_BANNER
29
+ };
23
30
  }
@@ -134,7 +134,7 @@ ConfirmationModal.propTypes = {
134
134
  title: _propTypes.default.string,
135
135
  text: _propTypes.default.string,
136
136
  cancelText: _propTypes.default.string,
137
- continueText: _propTypes.default.string,
137
+ continueText: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node]),
138
138
  continueVariant: _propTypes.default.string,
139
139
  size: _propTypes.default.string,
140
140
  shouldReturnFocus: _propTypes.default.bool,
@@ -348,7 +348,9 @@ var Sidebar = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(
348
348
  value: function render() {
349
349
  var sidebarClassList = (0, _classnames.default)(styles.sidebar, (0, _defineProperty2.default)({}, styles.sidebarIsOpen, this.props.sidebarOpen));
350
350
  return /*#__PURE__*/_react.default.createElement(_uiView.View, null, /*#__PURE__*/_react.default.createElement("div", {
351
- className: styles.commonContainer
351
+ className: styles.commonContainer,
352
+ id: "sidebar-wrapper",
353
+ tabIndex: "-1"
352
354
  }, /*#__PURE__*/_react.default.createElement("div", {
353
355
  className: sidebarClassList,
354
356
  onTransitionEnd: this.handleTransitionEnd,
@@ -20,6 +20,9 @@ var _default = function _default() {
20
20
  case _quizCommon.GBQ_SET_ACTIVE_ITEM:
21
21
  return state.set('activeItemId', action.payload);
22
22
 
23
+ case _quizCommon.DISMISS_GBQ_BANNER:
24
+ return state.set('gradeByQuestionBannerDismissed', true);
25
+
23
26
  default:
24
27
  return state;
25
28
  }
package/lib/index.js CHANGED
@@ -149,6 +149,8 @@ var _exportNames = {
149
149
  closeModal: true,
150
150
  modalActions: true,
151
151
  setGradeByQuestionEnabled: true,
152
+ setActiveItem: true,
153
+ dismissGradeByQuestionBanner: true,
152
154
  setRegradingPayload: true,
153
155
  setScoreReconciliation: true,
154
156
  toggleRegradingEditMode: true,
@@ -1045,6 +1047,18 @@ Object.defineProperty(exports, "setGradeByQuestionEnabled", {
1045
1047
  return _grading.setGradeByQuestionEnabled;
1046
1048
  }
1047
1049
  });
1050
+ Object.defineProperty(exports, "setActiveItem", {
1051
+ enumerable: true,
1052
+ get: function get() {
1053
+ return _grading.setActiveItem;
1054
+ }
1055
+ });
1056
+ Object.defineProperty(exports, "dismissGradeByQuestionBanner", {
1057
+ enumerable: true,
1058
+ get: function get() {
1059
+ return _grading.dismissGradeByQuestionBanner;
1060
+ }
1061
+ });
1048
1062
  Object.defineProperty(exports, "setRegradingPayload", {
1049
1063
  enumerable: true,
1050
1064
  get: function get() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "17.49.1-rc.7+67a51dce3",
3
+ "version": "17.50.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.49.1-rc.7+67a51dce3",
45
- "@instructure/quiz-i18n": "17.49.1-rc.7+67a51dce3",
46
- "@instructure/quiz-interactions": "17.49.1-rc.7+67a51dce3",
47
- "@instructure/quiz-number-input": "17.49.1-rc.7+67a51dce3",
48
- "@instructure/quiz-rce": "17.49.1-rc.7+67a51dce3",
44
+ "@instructure/quiz-common": "^17.50.0",
45
+ "@instructure/quiz-i18n": "^17.50.0",
46
+ "@instructure/quiz-interactions": "^17.50.0",
47
+ "@instructure/quiz-number-input": "^17.50.0",
48
+ "@instructure/quiz-rce": "^17.50.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.49.1-rc.7+67a51dce3",
109
+ "instructure-validations": "^17.50.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.49.0",
140
+ "@instructure/quiz-scripts": "^17.50.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.49.1-rc.7+67a51dce3",
159
+ "quiz-presets": "^17.50.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": "67a51dce3d75661bf30ed46ce38dd5151490589d"
175
+ "gitHead": "869c125bbdacee137fc532ee403d89e0dbb07807"
176
176
  }