@instructure/quiz-core 20.16.1-rc.7 → 20.16.1-rc.9

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.
@@ -7,7 +7,8 @@ export function addAlert(_ref) {
7
7
  removeIn = _ref$removeIn === void 0 ? DEFAULT_ALERT_TIME : _ref$removeIn,
8
8
  _ref$guid = _ref.guid,
9
9
  guid = _ref$guid === void 0 ? uuid() : _ref$guid,
10
- politeness = _ref.politeness;
10
+ _ref$politeness = _ref.politeness,
11
+ politeness = _ref$politeness === void 0 ? ASSERTIVE : _ref$politeness;
11
12
  return {
12
13
  type: ADD_ALERT,
13
14
  payload: {
@@ -46,8 +47,7 @@ export function addInfo(message) {
46
47
  variant: 'info'
47
48
  });
48
49
  }
49
- export function screenreaderNotification(message) {
50
- var politeness = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ASSERTIVE;
50
+ export function screenreaderNotification(message, politeness) {
51
51
  return addAlert({
52
52
  message: message,
53
53
  variant: 'screenreader',
@@ -11,6 +11,7 @@ import PropTypes from 'prop-types';
11
11
  import partial from 'lodash/partial';
12
12
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
13
13
  import { IconClockLine, IconClockSolid, IconArrowOpenStartLine } from '@instructure/ui-icons';
14
+ import * as platform from 'platform';
14
15
  import { Button } from '@instructure/ui-buttons';
15
16
  import { TopNavBar } from '@instructure/ui-top-nav-bar';
16
17
  import { View } from '@instructure/ui-view';
@@ -111,7 +112,10 @@ export var Timer = (_dec = withStyle(generateStyle, generateComponentTheme), _de
111
112
  }, {
112
113
  key: "renderHelpScreenreaderText",
113
114
  value: function renderHelpScreenreaderText() {
114
- return jsx(ScreenReaderContent, null, t('During the quiz, press Alt+Shift+T to have the remaining time read'));
115
+ var shortcutKey = platform.os.toString().startsWith('OS X') ? 'Option+Shift+T' : 'Alt+Shift+T';
116
+ return jsx(ScreenReaderContent, null, t('During the quiz, press {shortcutKey} to have the remaining time read', {
117
+ shortcutKey: shortcutKey
118
+ }));
115
119
  }
116
120
  }, {
117
121
  key: "renderMinimizedTimer",
@@ -22,7 +22,8 @@ function addAlert(_ref) {
22
22
  removeIn = _ref$removeIn === void 0 ? _quizCommon.DEFAULT_ALERT_TIME : _ref$removeIn,
23
23
  _ref$guid = _ref.guid,
24
24
  guid = _ref$guid === void 0 ? (0, _uuid.v4)() : _ref$guid,
25
- politeness = _ref.politeness;
25
+ _ref$politeness = _ref.politeness,
26
+ politeness = _ref$politeness === void 0 ? _quizCommon.ASSERTIVE : _ref$politeness;
26
27
  return {
27
28
  type: _quizCommon.ADD_ALERT,
28
29
  payload: {
@@ -66,8 +67,7 @@ function addInfo(message) {
66
67
  });
67
68
  }
68
69
 
69
- function screenreaderNotification(message) {
70
- var politeness = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : _quizCommon.ASSERTIVE;
70
+ function screenreaderNotification(message, politeness) {
71
71
  return addAlert({
72
72
  message: message,
73
73
  variant: 'screenreader',
@@ -2,6 +2,8 @@
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
4
 
5
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard");
6
+
5
7
  Object.defineProperty(exports, "__esModule", {
6
8
  value: true
7
9
  });
@@ -25,6 +27,8 @@ var _uiA11yContent = require("@instructure/ui-a11y-content");
25
27
 
26
28
  var _uiIcons = require("@instructure/ui-icons");
27
29
 
30
+ var platform = _interopRequireWildcard(require("platform"));
31
+
28
32
  var _uiButtons = require("@instructure/ui-buttons");
29
33
 
30
34
  var _uiTopNavBar = require("@instructure/ui-top-nav-bar");
@@ -135,7 +139,10 @@ var Timer = (_dec = (0, _emotion.withStyle)(_styles.default, _theme.default), _d
135
139
  }, {
136
140
  key: "renderHelpScreenreaderText",
137
141
  value: function renderHelpScreenreaderText() {
138
- return (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('During the quiz, press Alt+Shift+T to have the remaining time read'));
142
+ var shortcutKey = platform.os.toString().startsWith('OS X') ? 'Option+Shift+T' : 'Alt+Shift+T';
143
+ return (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('During the quiz, press {shortcutKey} to have the remaining time read', {
144
+ shortcutKey: shortcutKey
145
+ }));
139
146
  }
140
147
  }, {
141
148
  key: "renderMinimizedTimer",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.16.1-rc.7+16f4c9eaa",
3
+ "version": "20.16.1-rc.9+18b632a90",
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.2.2",
47
- "@instructure/quiz-common": "20.16.1-rc.7+16f4c9eaa",
48
- "@instructure/quiz-i18n": "20.16.1-rc.7+16f4c9eaa",
49
- "@instructure/quiz-interactions": "20.16.1-rc.7+16f4c9eaa",
50
- "@instructure/quiz-number-input": "20.16.1-rc.7+16f4c9eaa",
51
- "@instructure/quiz-rce": "20.16.1-rc.7+16f4c9eaa",
47
+ "@instructure/quiz-common": "20.16.1-rc.9+18b632a90",
48
+ "@instructure/quiz-i18n": "20.16.1-rc.9+18b632a90",
49
+ "@instructure/quiz-interactions": "20.16.1-rc.9+18b632a90",
50
+ "@instructure/quiz-number-input": "20.16.1-rc.9+18b632a90",
51
+ "@instructure/quiz-rce": "20.16.1-rc.9+18b632a90",
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",
@@ -111,7 +111,7 @@
111
111
  "file-saver": "~2.0.5",
112
112
  "humps": "^2.0.0",
113
113
  "immutable": "^3.8.1",
114
- "instructure-validations": "20.16.1-rc.7+16f4c9eaa",
114
+ "instructure-validations": "20.16.1-rc.9+18b632a90",
115
115
  "ipaddr.js": "^1.5.4",
116
116
  "isomorphic-fetch": "^2.2.0",
117
117
  "isuuid": "^0.1.0",
@@ -163,7 +163,7 @@
163
163
  "jquery": "^2.2.3",
164
164
  "karma-junit-reporter": "^2.0.1",
165
165
  "most-subject": "^5.3.0",
166
- "quiz-presets": "20.16.1-rc.7+16f4c9eaa",
166
+ "quiz-presets": "20.16.1-rc.9+18b632a90",
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": "16f4c9eaacdcb4f53aeb94b4acce383ded3fe00a"
182
+ "gitHead": "18b632a902fb06139b6b080bc39f5c750c984f43"
183
183
  }