@instructure/quiz-core 20.8.1-rc.8 → 20.9.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,24 @@
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
+ # [20.9.0](https://gerrit.instructure.com/quizzes-ui/compare/v20.8.0...v20.9.0) (2024-03-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **TopNavBar:** Fix incorrect ScreenReader behaviour ([f612d19](https://gerrit.instructure.com/quizzes-ui/commits/f612d190c47a9cfec442ae53ab2e056091ea88ec))
12
+
13
+
14
+ ### Features
15
+
16
+ * **Banks:** add subaccount search to sharing modal ([7ddfe12](https://gerrit.instructure.com/quizzes-ui/commits/7ddfe123f7affbad1dc83267ac782ef96b1b24c0))
17
+ * **Moderate:** add toggle to raw scores ([f75409e](https://gerrit.instructure.com/quizzes-ui/commits/f75409ec5f0c436a5ddde0dce8700e8861af1119))
18
+ * **Moderate:** include question position in logs ([bc1306e](https://gerrit.instructure.com/quizzes-ui/commits/bc1306e580538ad70310d908839cf09aa59d240e))
19
+
20
+
21
+
22
+
23
+
6
24
  # [20.8.0](https://gerrit.instructure.com/quizzes-ui/compare/v20.7.0...v20.8.0) (2024-02-28)
7
25
 
8
26
 
@@ -94,8 +94,9 @@ export var LearnosityCalculator = /*#__PURE__*/function (_Component) {
94
94
  this.setState({
95
95
  learnosityCalculatorReady: true
96
96
  });
97
+ this.props.setCalculatorEnabled(true);
97
98
 
98
- case 7:
99
+ case 8:
99
100
  case "end":
100
101
  return _context.stop();
101
102
  }
@@ -157,7 +158,8 @@ LearnosityCalculator.propTypes = {
157
158
  render: PropTypes.func.isRequired,
158
159
  setActiveCalculatorId: PropTypes.func,
159
160
  toggleFeature: PropTypes.func.isRequired,
160
- iceTopNavBarEnabled: PropTypes.bool
161
+ iceTopNavBarEnabled: PropTypes.bool,
162
+ setCalculatorEnabled: PropTypes.func
161
163
  };
162
164
  LearnosityCalculator.defaultProps = {
163
165
  activeCalculatorId: null,
@@ -168,6 +170,7 @@ LearnosityCalculator.defaultProps = {
168
170
  quizSessionId: null,
169
171
  setActiveCalculatorId: Function.prototype,
170
172
  toggleFeature: toggleFeature,
171
- iceTopNavBarEnabled: false
173
+ iceTopNavBarEnabled: false,
174
+ setCalculatorEnabled: function setCalculatorEnabled() {}
172
175
  };
173
176
  export default LearnosityCalculator;
@@ -4,11 +4,13 @@ import store from "../../reduxStore.js";
4
4
  import Calculator from "./layout/header/Calculator/index.js";
5
5
  import PropTypes from 'prop-types';
6
6
  export var SDKHeaderCalculator = function SDKHeaderCalculator(_ref) {
7
- var iceTopNavBarEnabled = _ref.iceTopNavBarEnabled;
7
+ var iceTopNavBarEnabled = _ref.iceTopNavBarEnabled,
8
+ setCalculatorEnabled = _ref.setCalculatorEnabled;
8
9
  return /*#__PURE__*/React.createElement(Provider, {
9
10
  store: store
10
11
  }, /*#__PURE__*/React.createElement(Calculator, {
11
- iceTopNavBarEnabled: iceTopNavBarEnabled
12
+ iceTopNavBarEnabled: iceTopNavBarEnabled,
13
+ setCalculatorEnabled: setCalculatorEnabled
12
14
  }));
13
15
  };
14
16
  Calculator.propTypes = {
@@ -5,12 +5,12 @@ import Timer from "./layout/header/Timer/index.js";
5
5
  import PropTypes from 'prop-types';
6
6
  export var SDKTimer = function SDKTimer(_ref) {
7
7
  var iceTopNavBarEnabled = _ref.iceTopNavBarEnabled,
8
- setTimerRunning = _ref.setTimerRunning;
8
+ setTimerEnabled = _ref.setTimerEnabled;
9
9
  return /*#__PURE__*/React.createElement(Provider, {
10
10
  store: store
11
11
  }, /*#__PURE__*/React.createElement(Timer, {
12
12
  iceTopNavBarEnabled: iceTopNavBarEnabled,
13
- setTimerRunning: setTimerRunning
13
+ setTimerEnabled: setTimerEnabled
14
14
  }));
15
15
  };
16
16
  Timer.propTypes = {
@@ -72,12 +72,14 @@ Calculator.propTypes = {
72
72
  calculatorType: PropTypes.oneOf(['none', 'basic', 'scientific']),
73
73
  quizSessionId: PropTypes.string,
74
74
  setActiveCalculatorId: PropTypes.func.isRequired,
75
- iceTopNavBarEnabled: PropTypes.bool
75
+ iceTopNavBarEnabled: PropTypes.bool,
76
+ setCalculatorEnabled: PropTypes.func
76
77
  };
77
78
  Calculator.defaultProps = {
78
79
  activeCalculatorId: void 0,
79
80
  calculatorType: void 0,
80
81
  quizSessionId: void 0,
81
- iceTopNavBarEnabled: false
82
+ iceTopNavBarEnabled: false,
83
+ setCalculatorEnabled: function setCalculatorEnabled() {}
82
84
  };
83
85
  export default Calculator;
@@ -93,7 +93,8 @@ export var Timer = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
93
93
  var _this$props = this.props,
94
94
  timerMinimized = _this$props.timerMinimized,
95
95
  screenreaderNotification = _this$props.screenreaderNotification,
96
- timerRunning = _this$props.timerRunning;
96
+ timerRunning = _this$props.timerRunning,
97
+ showTimer = _this$props.showTimer;
97
98
 
98
99
  if (timerMinimized !== prevProps.timerMinimized) {
99
100
  var message = timerMinimized ? t('timer minimized') : t('timer showing');
@@ -104,11 +105,11 @@ export var Timer = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
104
105
 
105
106
  if (timerRunning && !prevProps.timerRunning) {
106
107
  document.body.addEventListener('keydown', this.handleKeyDown);
107
- this.props.setTimerRunning(true);
108
108
  } else if (!timerRunning && prevProps.timerRunning) {
109
109
  document.body.removeEventListener('keydown', this.handleKeyDown);
110
- this.props.setTimerRunning(false);
111
110
  }
111
+
112
+ this.props.setTimerEnabled(showTimer && timerRunning);
112
113
  }
113
114
  }, {
114
115
  key: "componentWillUnmount",
@@ -203,12 +204,12 @@ export var Timer = (_dec = themeable(theme, styles), _dec(_class = (_temp = _cla
203
204
  timerRunning: PropTypes.bool,
204
205
  updateTimerMinimized: PropTypes.func.isRequired,
205
206
  iceTopNavBarEnabled: PropTypes.bool,
206
- setTimerRunning: PropTypes.func
207
+ setTimerEnabled: PropTypes.func
207
208
  }, _class2.defaultProps = {
208
209
  timerRunning: false,
209
210
  timeLeftInSeconds: 0,
210
211
  timerMinimized: false,
211
212
  iceTopNavBarEnabled: false,
212
- setTimerRunning: function setTimerRunning() {}
213
+ setTimerEnabled: function setTimerEnabled() {}
213
214
  }, _temp)) || _class);
214
215
  export default Timer;
@@ -114,8 +114,9 @@ var LearnosityCalculator = /*#__PURE__*/function (_Component) {
114
114
  this.setState({
115
115
  learnosityCalculatorReady: true
116
116
  });
117
+ this.props.setCalculatorEnabled(true);
117
118
 
118
- case 7:
119
+ case 8:
119
120
  case "end":
120
121
  return _context.stop();
121
122
  }
@@ -178,7 +179,8 @@ LearnosityCalculator.propTypes = {
178
179
  render: _propTypes.default.func.isRequired,
179
180
  setActiveCalculatorId: _propTypes.default.func,
180
181
  toggleFeature: _propTypes.default.func.isRequired,
181
- iceTopNavBarEnabled: _propTypes.default.bool
182
+ iceTopNavBarEnabled: _propTypes.default.bool,
183
+ setCalculatorEnabled: _propTypes.default.func
182
184
  };
183
185
  LearnosityCalculator.defaultProps = {
184
186
  activeCalculatorId: null,
@@ -189,7 +191,8 @@ LearnosityCalculator.defaultProps = {
189
191
  quizSessionId: null,
190
192
  setActiveCalculatorId: Function.prototype,
191
193
  toggleFeature: _index.toggleFeature,
192
- iceTopNavBarEnabled: false
194
+ iceTopNavBarEnabled: false,
195
+ setCalculatorEnabled: function setCalculatorEnabled() {}
193
196
  };
194
197
  var _default = LearnosityCalculator;
195
198
  exports.default = _default;
@@ -18,11 +18,13 @@ var _index = _interopRequireDefault(require("./layout/header/Calculator/index.js
18
18
  var _propTypes = _interopRequireDefault(require("prop-types"));
19
19
 
20
20
  var SDKHeaderCalculator = function SDKHeaderCalculator(_ref) {
21
- var iceTopNavBarEnabled = _ref.iceTopNavBarEnabled;
21
+ var iceTopNavBarEnabled = _ref.iceTopNavBarEnabled,
22
+ setCalculatorEnabled = _ref.setCalculatorEnabled;
22
23
  return /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
23
24
  store: _reduxStore.default
24
25
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
25
- iceTopNavBarEnabled: iceTopNavBarEnabled
26
+ iceTopNavBarEnabled: iceTopNavBarEnabled,
27
+ setCalculatorEnabled: setCalculatorEnabled
26
28
  }));
27
29
  };
28
30
 
@@ -19,12 +19,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
19
19
 
20
20
  var SDKTimer = function SDKTimer(_ref) {
21
21
  var iceTopNavBarEnabled = _ref.iceTopNavBarEnabled,
22
- setTimerRunning = _ref.setTimerRunning;
22
+ setTimerEnabled = _ref.setTimerEnabled;
23
23
  return /*#__PURE__*/_react.default.createElement(_reactRedux.Provider, {
24
24
  store: _reduxStore.default
25
25
  }, /*#__PURE__*/_react.default.createElement(_index.default, {
26
26
  iceTopNavBarEnabled: iceTopNavBarEnabled,
27
- setTimerRunning: setTimerRunning
27
+ setTimerEnabled: setTimerEnabled
28
28
  }));
29
29
  };
30
30
 
@@ -95,13 +95,15 @@ Calculator.propTypes = {
95
95
  calculatorType: _propTypes.default.oneOf(['none', 'basic', 'scientific']),
96
96
  quizSessionId: _propTypes.default.string,
97
97
  setActiveCalculatorId: _propTypes.default.func.isRequired,
98
- iceTopNavBarEnabled: _propTypes.default.bool
98
+ iceTopNavBarEnabled: _propTypes.default.bool,
99
+ setCalculatorEnabled: _propTypes.default.func
99
100
  };
100
101
  Calculator.defaultProps = {
101
102
  activeCalculatorId: void 0,
102
103
  calculatorType: void 0,
103
104
  quizSessionId: void 0,
104
- iceTopNavBarEnabled: false
105
+ iceTopNavBarEnabled: false,
106
+ setCalculatorEnabled: function setCalculatorEnabled() {}
105
107
  };
106
108
  var _default = Calculator;
107
109
  exports.default = _default;
@@ -120,7 +120,8 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
120
120
  var _this$props = this.props,
121
121
  timerMinimized = _this$props.timerMinimized,
122
122
  screenreaderNotification = _this$props.screenreaderNotification,
123
- timerRunning = _this$props.timerRunning;
123
+ timerRunning = _this$props.timerRunning,
124
+ showTimer = _this$props.showTimer;
124
125
 
125
126
  if (timerMinimized !== prevProps.timerMinimized) {
126
127
  var message = timerMinimized ? (0, _formatMessage.default)('timer minimized') : (0, _formatMessage.default)('timer showing');
@@ -131,11 +132,11 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
131
132
 
132
133
  if (timerRunning && !prevProps.timerRunning) {
133
134
  document.body.addEventListener('keydown', this.handleKeyDown);
134
- this.props.setTimerRunning(true);
135
135
  } else if (!timerRunning && prevProps.timerRunning) {
136
136
  document.body.removeEventListener('keydown', this.handleKeyDown);
137
- this.props.setTimerRunning(false);
138
137
  }
138
+
139
+ this.props.setTimerEnabled(showTimer && timerRunning);
139
140
  }
140
141
  }, {
141
142
  key: "componentWillUnmount",
@@ -229,13 +230,13 @@ var Timer = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_c
229
230
  timerRunning: _propTypes.default.bool,
230
231
  updateTimerMinimized: _propTypes.default.func.isRequired,
231
232
  iceTopNavBarEnabled: _propTypes.default.bool,
232
- setTimerRunning: _propTypes.default.func
233
+ setTimerEnabled: _propTypes.default.func
233
234
  }, _class2.defaultProps = {
234
235
  timerRunning: false,
235
236
  timeLeftInSeconds: 0,
236
237
  timerMinimized: false,
237
238
  iceTopNavBarEnabled: false,
238
- setTimerRunning: function setTimerRunning() {}
239
+ setTimerEnabled: function setTimerEnabled() {}
239
240
  }, _temp)) || _class);
240
241
  exports.Timer = Timer;
241
242
  var _default = Timer;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.8.1-rc.8+8cbe46b45",
3
+ "version": "20.9.0",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -44,11 +44,11 @@
44
44
  "@instructure/emotion": "^8.51.0",
45
45
  "@instructure/grading-utils": "^1.0.0",
46
46
  "@instructure/outcomes-ui": "^3.1.0",
47
- "@instructure/quiz-common": "20.8.1-rc.8+8cbe46b45",
48
- "@instructure/quiz-i18n": "20.8.1-rc.8+8cbe46b45",
49
- "@instructure/quiz-interactions": "20.8.1-rc.8+8cbe46b45",
50
- "@instructure/quiz-number-input": "20.8.1-rc.8+8cbe46b45",
51
- "@instructure/quiz-rce": "20.8.1-rc.8+8cbe46b45",
47
+ "@instructure/quiz-common": "^20.9.0",
48
+ "@instructure/quiz-i18n": "^20.9.0",
49
+ "@instructure/quiz-interactions": "^20.9.0",
50
+ "@instructure/quiz-number-input": "^20.9.0",
51
+ "@instructure/quiz-rce": "^20.9.0",
52
52
  "@instructure/ui-a11y-content": "^8.51.0",
53
53
  "@instructure/ui-alerts": "^8.51.0",
54
54
  "@instructure/ui-avatar": "^8.51.0",
@@ -112,7 +112,7 @@
112
112
  "file-saver": "~2.0.5",
113
113
  "humps": "^2.0.0",
114
114
  "immutable": "^3.8.1",
115
- "instructure-validations": "20.8.1-rc.8+8cbe46b45",
115
+ "instructure-validations": "^20.9.0",
116
116
  "ipaddr.js": "^1.5.4",
117
117
  "isomorphic-fetch": "^2.2.0",
118
118
  "isuuid": "^0.1.0",
@@ -143,7 +143,7 @@
143
143
  "uuid": "^3.2.1"
144
144
  },
145
145
  "devDependencies": {
146
- "@instructure/quiz-scripts": "20.8.0",
146
+ "@instructure/quiz-scripts": "^20.9.0",
147
147
  "@instructure/ui-axe-check": "^8.51.0",
148
148
  "@instructure/ui-babel-preset": "^7.22.1",
149
149
  "@instructure/ui-karma-config": "^7.22.1",
@@ -163,7 +163,7 @@
163
163
  "intl": "^1.2.4",
164
164
  "jquery": "^2.2.3",
165
165
  "most-subject": "^5.3.0",
166
- "quiz-presets": "20.8.1-rc.8+8cbe46b45",
166
+ "quiz-presets": "^20.9.0",
167
167
  "react": "^16.8.6",
168
168
  "react-addons-test-utils": "^15.6.2",
169
169
  "react-dom": "^16.8.6",
@@ -179,5 +179,5 @@
179
179
  "publishConfig": {
180
180
  "access": "public"
181
181
  },
182
- "gitHead": "8cbe46b45b3d200d3414a127fc490d9374f7121c"
182
+ "gitHead": "0666e0a0e9fef538169f02d413e94382709385ce"
183
183
  }