@instructure/quiz-core 17.50.1 → 17.50.2-rc.1
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.
|
@@ -10,7 +10,7 @@ import PropTypes from 'prop-types';
|
|
|
10
10
|
import { Button } from '@instructure/ui-buttons';
|
|
11
11
|
import { Menu } from '@instructure/ui-menu';
|
|
12
12
|
import { ScreenReaderContent } from '@instructure/ui-a11y-content';
|
|
13
|
-
import { IconMoreSolid, IconImportLine, IconBankLine, IconPrinterLine } from '@instructure/ui-icons';
|
|
13
|
+
import { IconMoreSolid, IconImportLine, IconBankLine, IconPrinterLine, IconSpeedGraderLine } from '@instructure/ui-icons';
|
|
14
14
|
import PrintTrigger from "../../../../../common/components/shared/PrintTrigger/index.js";
|
|
15
15
|
import { PRINT_CURRENT_PAGE, PRINT_BLANK } from '@instructure/quiz-common';
|
|
16
16
|
import { themeable } from '@instructure/ui-themeable';
|
|
@@ -47,6 +47,10 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
47
47
|
_this.props.openBanksTray();
|
|
48
48
|
};
|
|
49
49
|
|
|
50
|
+
_this.openSpeedgraderLink = function () {
|
|
51
|
+
window.open(_this.props.speedgraderLink, '_blank');
|
|
52
|
+
};
|
|
53
|
+
|
|
50
54
|
return _this;
|
|
51
55
|
}
|
|
52
56
|
|
|
@@ -69,6 +73,16 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
69
73
|
value: function renderMenu(handlePrint) {
|
|
70
74
|
if (!this.isBuildingPage()) return;
|
|
71
75
|
var menuItems = [];
|
|
76
|
+
|
|
77
|
+
if (this.props.speedgraderLink) {
|
|
78
|
+
menuItems.push( /*#__PURE__*/React.createElement(Menu.Item, {
|
|
79
|
+
key: "speedgrader",
|
|
80
|
+
onSelect: this.openSpeedgraderLink
|
|
81
|
+
}, /*#__PURE__*/React.createElement(IconSpeedGraderLine, {
|
|
82
|
+
className: styles.menuIcon
|
|
83
|
+
}), t('Speedgrader')));
|
|
84
|
+
}
|
|
85
|
+
|
|
72
86
|
menuItems.push( /*#__PURE__*/React.createElement(Menu.Item, {
|
|
73
87
|
key: "import",
|
|
74
88
|
disabled: !this.props.canImport,
|
|
@@ -160,10 +174,12 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
160
174
|
openModal: PropTypes.func.isRequired,
|
|
161
175
|
printingEnabled: PropTypes.bool.isRequired,
|
|
162
176
|
quizSaving: PropTypes.bool,
|
|
163
|
-
setBanksTrayButtonRef: PropTypes.func.isRequired
|
|
177
|
+
setBanksTrayButtonRef: PropTypes.func.isRequired,
|
|
178
|
+
speedgraderLink: PropTypes.string
|
|
164
179
|
}, _class2.defaultProps = {
|
|
165
|
-
quizSaving: false,
|
|
166
180
|
app: null,
|
|
167
|
-
enableItemBanking: true
|
|
181
|
+
enableItemBanking: true,
|
|
182
|
+
quizSaving: false,
|
|
183
|
+
speedgraderLink: null
|
|
168
184
|
}, _temp)) || _class);
|
|
169
185
|
export default BuildingButtons;
|
|
@@ -72,6 +72,10 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
72
72
|
_this.props.openBanksTray();
|
|
73
73
|
};
|
|
74
74
|
|
|
75
|
+
_this.openSpeedgraderLink = function () {
|
|
76
|
+
window.open(_this.props.speedgraderLink, '_blank');
|
|
77
|
+
};
|
|
78
|
+
|
|
75
79
|
return _this;
|
|
76
80
|
}
|
|
77
81
|
|
|
@@ -94,6 +98,16 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
94
98
|
value: function renderMenu(handlePrint) {
|
|
95
99
|
if (!this.isBuildingPage()) return;
|
|
96
100
|
var menuItems = [];
|
|
101
|
+
|
|
102
|
+
if (this.props.speedgraderLink) {
|
|
103
|
+
menuItems.push( /*#__PURE__*/_react.default.createElement(_uiMenu.Menu.Item, {
|
|
104
|
+
key: "speedgrader",
|
|
105
|
+
onSelect: this.openSpeedgraderLink
|
|
106
|
+
}, /*#__PURE__*/_react.default.createElement(_uiIcons.IconSpeedGraderLine, {
|
|
107
|
+
className: styles.menuIcon
|
|
108
|
+
}), (0, _formatMessage.default)('Speedgrader')));
|
|
109
|
+
}
|
|
110
|
+
|
|
97
111
|
menuItems.push( /*#__PURE__*/_react.default.createElement(_uiMenu.Menu.Item, {
|
|
98
112
|
key: "import",
|
|
99
113
|
disabled: !this.props.canImport,
|
|
@@ -184,11 +198,13 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
|
|
|
184
198
|
openModal: _propTypes.default.func.isRequired,
|
|
185
199
|
printingEnabled: _propTypes.default.bool.isRequired,
|
|
186
200
|
quizSaving: _propTypes.default.bool,
|
|
187
|
-
setBanksTrayButtonRef: _propTypes.default.func.isRequired
|
|
201
|
+
setBanksTrayButtonRef: _propTypes.default.func.isRequired,
|
|
202
|
+
speedgraderLink: _propTypes.default.string
|
|
188
203
|
}, _class2.defaultProps = {
|
|
189
|
-
quizSaving: false,
|
|
190
204
|
app: null,
|
|
191
|
-
enableItemBanking: true
|
|
205
|
+
enableItemBanking: true,
|
|
206
|
+
quizSaving: false,
|
|
207
|
+
speedgraderLink: null
|
|
192
208
|
}, _temp)) || _class);
|
|
193
209
|
exports.BuildingButtons = BuildingButtons;
|
|
194
210
|
var _default = BuildingButtons;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/quiz-core",
|
|
3
|
-
"version": "17.50.1",
|
|
3
|
+
"version": "17.50.2-rc.1+61f4ca70c",
|
|
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": "
|
|
45
|
-
"@instructure/quiz-i18n": "
|
|
46
|
-
"@instructure/quiz-interactions": "
|
|
47
|
-
"@instructure/quiz-number-input": "
|
|
48
|
-
"@instructure/quiz-rce": "
|
|
44
|
+
"@instructure/quiz-common": "17.50.2-rc.1+61f4ca70c",
|
|
45
|
+
"@instructure/quiz-i18n": "17.50.2-rc.1+61f4ca70c",
|
|
46
|
+
"@instructure/quiz-interactions": "17.50.2-rc.1+61f4ca70c",
|
|
47
|
+
"@instructure/quiz-number-input": "17.50.2-rc.1+61f4ca70c",
|
|
48
|
+
"@instructure/quiz-rce": "17.50.2-rc.1+61f4ca70c",
|
|
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": "
|
|
109
|
+
"instructure-validations": "17.50.2-rc.1+61f4ca70c",
|
|
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": "
|
|
140
|
+
"@instructure/quiz-scripts": "17.50.1",
|
|
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": "
|
|
159
|
+
"quiz-presets": "17.50.2-rc.1+61f4ca70c",
|
|
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": "61f4ca70cb17108d806d1f4b318fa18f3159b615"
|
|
176
176
|
}
|