@instructure/quiz-core 17.58.2-rc.2 → 17.58.2-rc.4

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.
@@ -9,6 +9,7 @@ import { BuildingButtons as BuildingButtonsPresenter } from "./presenter.js";
9
9
  import { getActiveQuiz } from "../../../../../common/selectors/quizzes.js";
10
10
  import { featureOn } from "../../../../../common/util/featureCheck.js";
11
11
  import { startQuizExportJob } from "../../../../../common/actions/quizExport.js";
12
+ import { addInfo } from "../../../../../common/actions/alerts.js";
12
13
  export function mapStateToProps(state) {
13
14
  var quiz = getActiveQuiz(state);
14
15
  return {
@@ -25,6 +26,7 @@ export function mapStateToProps(state) {
25
26
 
26
27
  var mapDispatchToProps = function mapDispatchToProps(dispatch) {
27
28
  return {
29
+ addInfo: bindActionCreators(addInfo, dispatch),
28
30
  openBanksTray: bindActionCreators(setUI.bind(void 0, BUILD_TRAY_OPEN, true), dispatch),
29
31
  setBanksTrayButtonRef: bindActionCreators(partial(setUI, BUILD_TRAY_BUTTON_REF), dispatch),
30
32
  startExport: bindActionCreators(startQuizExportJob, dispatch),
@@ -41,6 +41,10 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
41
41
 
42
42
  _this = _super.call.apply(_super, [this].concat(args));
43
43
 
44
+ _this.quizExportAlert = function () {
45
+ _this.props.addInfo(t("The export process has been started. This can take a while for larger quizzes.\n You can leave the page and you'll get notified when the export is completed."));
46
+ };
47
+
44
48
  _this.openBanksTray = function () {
45
49
  _this.props.setBanksTrayButtonRef(_this.banksTrayButton);
46
50
 
@@ -62,6 +66,8 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
62
66
  quizzes: [activeQuizId]
63
67
  };
64
68
 
69
+ _this.quizExportAlert();
70
+
65
71
  _this.props.contentExport({
66
72
  contextUuid: contextUuid,
67
73
  exportSettings: exportSettings
@@ -196,6 +202,7 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
196
202
  return BuildingButtons;
197
203
  }(Component), _class2.propTypes = {
198
204
  app: PropTypes.string,
205
+ addInfo: PropTypes.func,
199
206
  activeQuizId: PropTypes.string,
200
207
  canExport: PropTypes.bool.isRequired,
201
208
  canImport: PropTypes.bool.isRequired,
@@ -216,6 +223,7 @@ export var BuildingButtons = (_dec = themeable(theme, styles), _dec(_class = (_t
216
223
  contextUuid: PropTypes.string
217
224
  }, _class2.defaultProps = {
218
225
  activeQuizId: null,
226
+ addInfo: function addInfo() {},
219
227
  app: null,
220
228
  contentExportEnabled: false,
221
229
  contentExport: null,
@@ -32,6 +32,8 @@ var _featureCheck = require("../../../../../common/util/featureCheck.js");
32
32
 
33
33
  var _quizExport = require("../../../../../common/actions/quizExport.js");
34
34
 
35
+ var _alerts = require("../../../../../common/actions/alerts.js");
36
+
35
37
  function mapStateToProps(state) {
36
38
  var quiz = (0, _quizzes.getActiveQuiz)(state);
37
39
  return {
@@ -48,6 +50,7 @@ function mapStateToProps(state) {
48
50
 
49
51
  var mapDispatchToProps = function mapDispatchToProps(dispatch) {
50
52
  return {
53
+ addInfo: (0, _redux.bindActionCreators)(_alerts.addInfo, dispatch),
51
54
  openBanksTray: (0, _redux.bindActionCreators)(_ui.set.bind(void 0, _quizCommon.BUILD_TRAY_OPEN, true), dispatch),
52
55
  setBanksTrayButtonRef: (0, _redux.bindActionCreators)((0, _partial.default)(_ui.set, _quizCommon.BUILD_TRAY_BUTTON_REF), dispatch),
53
56
  startExport: (0, _redux.bindActionCreators)(_quizExport.startQuizExportJob, dispatch),
@@ -66,6 +66,10 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
66
66
 
67
67
  _this = _super.call.apply(_super, [this].concat(args));
68
68
 
69
+ _this.quizExportAlert = function () {
70
+ _this.props.addInfo((0, _formatMessage.default)("The export process has been started. This can take a while for larger quizzes.\n You can leave the page and you'll get notified when the export is completed."));
71
+ };
72
+
69
73
  _this.openBanksTray = function () {
70
74
  _this.props.setBanksTrayButtonRef(_this.banksTrayButton);
71
75
 
@@ -87,6 +91,8 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
87
91
  quizzes: [activeQuizId]
88
92
  };
89
93
 
94
+ _this.quizExportAlert();
95
+
90
96
  _this.props.contentExport({
91
97
  contextUuid: contextUuid,
92
98
  exportSettings: exportSettings
@@ -220,6 +226,7 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
220
226
  return BuildingButtons;
221
227
  }(_react.Component), _class2.propTypes = {
222
228
  app: _propTypes.default.string,
229
+ addInfo: _propTypes.default.func,
223
230
  activeQuizId: _propTypes.default.string,
224
231
  canExport: _propTypes.default.bool.isRequired,
225
232
  canImport: _propTypes.default.bool.isRequired,
@@ -240,6 +247,7 @@ var BuildingButtons = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
240
247
  contextUuid: _propTypes.default.string
241
248
  }, _class2.defaultProps = {
242
249
  activeQuizId: null,
250
+ addInfo: function addInfo() {},
243
251
  app: null,
244
252
  contentExportEnabled: false,
245
253
  contentExport: null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "17.58.2-rc.2+6f8fb6728",
3
+ "version": "17.58.2-rc.4+3406d3463",
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.8",
44
- "@instructure/quiz-common": "17.58.2-rc.2+6f8fb6728",
45
- "@instructure/quiz-i18n": "17.58.2-rc.2+6f8fb6728",
46
- "@instructure/quiz-interactions": "17.58.2-rc.2+6f8fb6728",
47
- "@instructure/quiz-number-input": "17.58.2-rc.2+6f8fb6728",
48
- "@instructure/quiz-rce": "17.58.2-rc.2+6f8fb6728",
44
+ "@instructure/quiz-common": "17.58.2-rc.4+3406d3463",
45
+ "@instructure/quiz-i18n": "17.58.2-rc.4+3406d3463",
46
+ "@instructure/quiz-interactions": "17.58.2-rc.4+3406d3463",
47
+ "@instructure/quiz-number-input": "17.58.2-rc.4+3406d3463",
48
+ "@instructure/quiz-rce": "17.58.2-rc.4+3406d3463",
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.58.2-rc.2+6f8fb6728",
109
+ "instructure-validations": "17.58.2-rc.4+3406d3463",
110
110
  "ipaddr.js": "^1.5.4",
111
111
  "isomorphic-fetch": "^2.2.0",
112
112
  "isuuid": "^0.1.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.58.2-rc.2+6f8fb6728",
159
+ "quiz-presets": "17.58.2-rc.4+3406d3463",
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": "6f8fb67283b864ad86c4591a16a7e38d880918ce"
175
+ "gitHead": "3406d34630c0a9f23754af8eaa00733c7aa9a9fa"
176
176
  }