@instructure/quiz-core 18.4.1-rc.4 → 18.4.1-rc.5
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.
|
@@ -106,7 +106,13 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
106
106
|
value: function renderButton() {
|
|
107
107
|
var _this$props2 = this.props,
|
|
108
108
|
displayPosition = _this$props2.displayPosition,
|
|
109
|
-
itemId = _this$props2.itemId
|
|
109
|
+
itemId = _this$props2.itemId,
|
|
110
|
+
isAnswered = _this$props2.isAnswered;
|
|
111
|
+
var screenReaderContent = !isAnswered && isAnswered !== null ? t('Navigate to question at position {displayPosition}, unanswered', {
|
|
112
|
+
displayPosition: displayPosition
|
|
113
|
+
}) : t('Navigate to question at position {displayPosition}', {
|
|
114
|
+
displayPosition: displayPosition
|
|
115
|
+
});
|
|
110
116
|
return /*#__PURE__*/React.createElement(Link, {
|
|
111
117
|
href: "#",
|
|
112
118
|
size: "small",
|
|
@@ -117,9 +123,7 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
117
123
|
"data-automation-item-id": itemId,
|
|
118
124
|
"data-automation": "sdk-sidebar-item-button"
|
|
119
125
|
}, /*#__PURE__*/React.createElement(AccessibleContent, {
|
|
120
|
-
alt:
|
|
121
|
-
displayPosition: displayPosition
|
|
122
|
-
})
|
|
126
|
+
alt: screenReaderContent
|
|
123
127
|
}, this.renderPosition()));
|
|
124
128
|
}
|
|
125
129
|
}, {
|
|
@@ -181,6 +185,7 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
181
185
|
itemBody: PropTypes.string,
|
|
182
186
|
itemName: PropTypes.string.isRequired,
|
|
183
187
|
inStimulus: PropTypes.bool,
|
|
188
|
+
isAnswered: PropTypes.bool,
|
|
184
189
|
position: PropTypes.number.isRequired,
|
|
185
190
|
pointsPossible: PropTypes.number.isRequired,
|
|
186
191
|
preventScrollToItem: PropTypes.bool.isRequired,
|
|
@@ -193,6 +198,7 @@ export var SidebarItem = (_dec = themeable(theme, styles), _dec(_class = (_temp
|
|
|
193
198
|
children: null,
|
|
194
199
|
inStimulus: false,
|
|
195
200
|
itemBody: '',
|
|
196
|
-
quizEntry: null
|
|
201
|
+
quizEntry: null,
|
|
202
|
+
isAnswered: null
|
|
197
203
|
}, _temp)) || _class);
|
|
198
204
|
export default SidebarItem;
|
|
@@ -133,7 +133,13 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
133
133
|
value: function renderButton() {
|
|
134
134
|
var _this$props2 = this.props,
|
|
135
135
|
displayPosition = _this$props2.displayPosition,
|
|
136
|
-
itemId = _this$props2.itemId
|
|
136
|
+
itemId = _this$props2.itemId,
|
|
137
|
+
isAnswered = _this$props2.isAnswered;
|
|
138
|
+
var screenReaderContent = !isAnswered && isAnswered !== null ? (0, _formatMessage.default)('Navigate to question at position {displayPosition}, unanswered', {
|
|
139
|
+
displayPosition: displayPosition
|
|
140
|
+
}) : (0, _formatMessage.default)('Navigate to question at position {displayPosition}', {
|
|
141
|
+
displayPosition: displayPosition
|
|
142
|
+
});
|
|
137
143
|
return /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
|
|
138
144
|
href: "#",
|
|
139
145
|
size: "small",
|
|
@@ -144,9 +150,7 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
144
150
|
"data-automation-item-id": itemId,
|
|
145
151
|
"data-automation": "sdk-sidebar-item-button"
|
|
146
152
|
}, /*#__PURE__*/_react.default.createElement(_uiA11yContent.AccessibleContent, {
|
|
147
|
-
alt:
|
|
148
|
-
displayPosition: displayPosition
|
|
149
|
-
})
|
|
153
|
+
alt: screenReaderContent
|
|
150
154
|
}, this.renderPosition()));
|
|
151
155
|
}
|
|
152
156
|
}, {
|
|
@@ -207,6 +211,7 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
207
211
|
itemBody: _propTypes.default.string,
|
|
208
212
|
itemName: _propTypes.default.string.isRequired,
|
|
209
213
|
inStimulus: _propTypes.default.bool,
|
|
214
|
+
isAnswered: _propTypes.default.bool,
|
|
210
215
|
position: _propTypes.default.number.isRequired,
|
|
211
216
|
pointsPossible: _propTypes.default.number.isRequired,
|
|
212
217
|
preventScrollToItem: _propTypes.default.bool.isRequired,
|
|
@@ -219,7 +224,8 @@ var SidebarItem = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _
|
|
|
219
224
|
children: null,
|
|
220
225
|
inStimulus: false,
|
|
221
226
|
itemBody: '',
|
|
222
|
-
quizEntry: null
|
|
227
|
+
quizEntry: null,
|
|
228
|
+
isAnswered: null
|
|
223
229
|
}, _temp)) || _class);
|
|
224
230
|
exports.SidebarItem = SidebarItem;
|
|
225
231
|
var _default = SidebarItem;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "18.4.1-rc.
|
|
3
|
+
"version": "18.4.1-rc.5+a0a425c5b",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "The Quiz React SDK by Instructure Inc.",
|
|
6
6
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
@@ -43,11 +43,11 @@
|
|
|
43
43
|
"dependencies": {
|
|
44
44
|
"@instructure/grading-utils": "^1.0.0",
|
|
45
45
|
"@instructure/outcomes-ui": "^2.1.9",
|
|
46
|
-
"@instructure/quiz-common": "18.4.1-rc.
|
|
47
|
-
"@instructure/quiz-i18n": "18.4.1-rc.
|
|
48
|
-
"@instructure/quiz-interactions": "18.4.1-rc.
|
|
49
|
-
"@instructure/quiz-number-input": "18.4.1-rc.
|
|
50
|
-
"@instructure/quiz-rce": "18.4.1-rc.
|
|
46
|
+
"@instructure/quiz-common": "18.4.1-rc.5+a0a425c5b",
|
|
47
|
+
"@instructure/quiz-i18n": "18.4.1-rc.5+a0a425c5b",
|
|
48
|
+
"@instructure/quiz-interactions": "18.4.1-rc.5+a0a425c5b",
|
|
49
|
+
"@instructure/quiz-number-input": "18.4.1-rc.5+a0a425c5b",
|
|
50
|
+
"@instructure/quiz-rce": "18.4.1-rc.5+a0a425c5b",
|
|
51
51
|
"@instructure/ui-a11y-content": "^7.22.1",
|
|
52
52
|
"@instructure/ui-alerts": "^7.22.1",
|
|
53
53
|
"@instructure/ui-avatar": "^7.22.1",
|
|
@@ -108,7 +108,7 @@
|
|
|
108
108
|
"eventemitter3": "^3.1.0",
|
|
109
109
|
"humps": "^2.0.0",
|
|
110
110
|
"immutable": "^3.8.1",
|
|
111
|
-
"instructure-validations": "18.4.1-rc.
|
|
111
|
+
"instructure-validations": "18.4.1-rc.5+a0a425c5b",
|
|
112
112
|
"ipaddr.js": "^1.5.4",
|
|
113
113
|
"isomorphic-fetch": "^2.2.0",
|
|
114
114
|
"isuuid": "^0.1.0",
|
|
@@ -159,7 +159,7 @@
|
|
|
159
159
|
"intl": "^1.2.4",
|
|
160
160
|
"jquery": "^2.2.3",
|
|
161
161
|
"most-subject": "^5.3.0",
|
|
162
|
-
"quiz-presets": "18.4.1-rc.
|
|
162
|
+
"quiz-presets": "18.4.1-rc.5+a0a425c5b",
|
|
163
163
|
"react": "^16.8.6",
|
|
164
164
|
"react-addons-test-utils": "^15.6.2",
|
|
165
165
|
"react-dom": "^16.8.6",
|
|
@@ -175,5 +175,5 @@
|
|
|
175
175
|
"publishConfig": {
|
|
176
176
|
"access": "public"
|
|
177
177
|
},
|
|
178
|
-
"gitHead": "
|
|
178
|
+
"gitHead": "a0a425c5bac1436f7c55214617d7a82bd07221e5"
|
|
179
179
|
}
|