@instructure/quiz-core 20.25.0 → 20.26.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.
@@ -16,25 +16,22 @@ import Bank from "../../../common/records/Bank.js";
16
16
  import BankSelection from "../../../common/components/resources/BankSelection/index.js";
17
17
  import { Spinner } from '@instructure/ui-spinner';
18
18
  import { Text } from '@instructure/ui-text';
19
- import { IconCheckLine, IconNoLine, IconWarningLine } from '@instructure/ui-icons';
19
+ import { IconNoLine, IconWarningLine } from '@instructure/ui-icons';
20
20
  import { View } from '@instructure/ui-view';
21
21
  import { Flex } from '@instructure/ui-flex';
22
22
  import t from '@instructure/quiz-i18n/es/format-message';
23
23
  import { Modal, ModalHeader, ModalBody, ModalFooter, ADD_TO_BANK_MODAL_BANK_SELECTION, XSMALL_SIDE_MARGIN } from '@instructure/quiz-common';
24
24
  import { featureOn } from "../../../common/util/featureCheck.js";
25
- var _ref2 = /*#__PURE__*/React.createElement(IconCheckLine, {
26
- color: "success"
27
- });
28
- var _ref3 = /*#__PURE__*/React.createElement(Flex.Item, {
25
+ var _ref2 = /*#__PURE__*/React.createElement(Flex.Item, {
29
26
  padding: "0 small 0 0"
30
27
  }, /*#__PURE__*/React.createElement(IconNoLine, {
31
28
  color: "error",
32
29
  size: "small"
33
30
  }));
34
- var _ref4 = /*#__PURE__*/React.createElement(IconWarningLine, {
31
+ var _ref3 = /*#__PURE__*/React.createElement(IconWarningLine, {
35
32
  color: "warning"
36
33
  });
37
- var _ref5 = /*#__PURE__*/React.createElement("br", null);
34
+ var _ref4 = /*#__PURE__*/React.createElement("br", null);
38
35
  export var AddToBankModal = /*#__PURE__*/function (_Component) {
39
36
  _inherits(AddToBankModal, _Component);
40
37
  var _super = _createSuper(AddToBankModal);
@@ -211,9 +208,11 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
211
208
  renderTitle: t('Checking content shareability...')
212
209
  }), "\xA0", t('Validating content...'));
213
210
  } else if (this.state.contentShareable === 'true') {
214
- content = /*#__PURE__*/React.createElement(Text, null, _ref2, "\xA0", t('Good to go!'));
211
+ // No message needed. The API call to check shareability is very fast in most cases,
212
+ // so the user may be distracted by a message here.
213
+ content = null;
215
214
  } else if (this.state.contentShareable === 'false') {
216
- content = /*#__PURE__*/React.createElement(Flex, null, _ref3, /*#__PURE__*/React.createElement(Flex.Item, {
215
+ content = /*#__PURE__*/React.createElement(Flex, null, _ref2, /*#__PURE__*/React.createElement(Flex.Item, {
217
216
  shouldShrink: true
218
217
  }, /*#__PURE__*/React.createElement(Text, {
219
218
  color: "danger"
@@ -221,7 +220,7 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
221
220
  } else {
222
221
  content = /*#__PURE__*/React.createElement(Text, {
223
222
  color: "warning"
224
- }, _ref4, "\xA0", t('There was an error attempting to validate shareability.'));
223
+ }, _ref3, "\xA0", t('There was an error attempting to validate shareability.'));
225
224
  }
226
225
  return /*#__PURE__*/React.createElement(View, {
227
226
  as: "div",
@@ -243,7 +242,7 @@ export var AddToBankModal = /*#__PURE__*/function (_Component) {
243
242
  }), /*#__PURE__*/React.createElement(RadioInput, {
244
243
  value: "new",
245
244
  label: t('New item bank')
246
- })), _ref5, this.renderBankTypeContent(), this.renderContentShareabilityMessage());
245
+ })), _ref4, this.renderBankTypeContent(), this.renderContentShareabilityMessage());
247
246
  }
248
247
  }, {
249
248
  key: "render",
@@ -30,19 +30,16 @@ var _uiFlex = require("@instructure/ui-flex");
30
30
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
31
31
  var _quizCommon = require("@instructure/quiz-common");
32
32
  var _featureCheck = require("../../../common/util/featureCheck.js");
33
- var _ref2 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconCheckLine, {
34
- color: "success"
35
- });
36
- var _ref3 = /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
33
+ var _ref2 = /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
37
34
  padding: "0 small 0 0"
38
35
  }, /*#__PURE__*/_react.default.createElement(_uiIcons.IconNoLine, {
39
36
  color: "error",
40
37
  size: "small"
41
38
  }));
42
- var _ref4 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconWarningLine, {
39
+ var _ref3 = /*#__PURE__*/_react.default.createElement(_uiIcons.IconWarningLine, {
43
40
  color: "warning"
44
41
  });
45
- var _ref5 = /*#__PURE__*/_react.default.createElement("br", null);
42
+ var _ref4 = /*#__PURE__*/_react.default.createElement("br", null);
46
43
  var AddToBankModal = /*#__PURE__*/function (_Component) {
47
44
  (0, _inherits2.default)(AddToBankModal, _Component);
48
45
  var _super = (0, _createSuper2.default)(AddToBankModal);
@@ -219,9 +216,11 @@ var AddToBankModal = /*#__PURE__*/function (_Component) {
219
216
  renderTitle: (0, _formatMessage.default)('Checking content shareability...')
220
217
  }), "\xA0", (0, _formatMessage.default)('Validating content...'));
221
218
  } else if (this.state.contentShareable === 'true') {
222
- content = /*#__PURE__*/_react.default.createElement(_uiText.Text, null, _ref2, "\xA0", (0, _formatMessage.default)('Good to go!'));
219
+ // No message needed. The API call to check shareability is very fast in most cases,
220
+ // so the user may be distracted by a message here.
221
+ content = null;
223
222
  } else if (this.state.contentShareable === 'false') {
224
- content = /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, null, _ref3, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
223
+ content = /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, null, _ref2, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
225
224
  shouldShrink: true
226
225
  }, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
227
226
  color: "danger"
@@ -229,7 +228,7 @@ var AddToBankModal = /*#__PURE__*/function (_Component) {
229
228
  } else {
230
229
  content = /*#__PURE__*/_react.default.createElement(_uiText.Text, {
231
230
  color: "warning"
232
- }, _ref4, "\xA0", (0, _formatMessage.default)('There was an error attempting to validate shareability.'));
231
+ }, _ref3, "\xA0", (0, _formatMessage.default)('There was an error attempting to validate shareability.'));
233
232
  }
234
233
  return /*#__PURE__*/_react.default.createElement(_uiView.View, {
235
234
  as: "div",
@@ -251,7 +250,7 @@ var AddToBankModal = /*#__PURE__*/function (_Component) {
251
250
  }), /*#__PURE__*/_react.default.createElement(_uiRadioInput.RadioInput, {
252
251
  value: "new",
253
252
  label: (0, _formatMessage.default)('New item bank')
254
- })), _ref5, this.renderBankTypeContent(), this.renderContentShareabilityMessage());
253
+ })), _ref4, this.renderBankTypeContent(), this.renderContentShareabilityMessage());
255
254
  }
256
255
  }, {
257
256
  key: "render",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "20.25.0",
3
+ "version": "20.26.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.2.2",
47
- "@instructure/quiz-common": "^20.25.0",
48
- "@instructure/quiz-i18n": "^20.25.0",
49
- "@instructure/quiz-interactions": "^20.25.0",
50
- "@instructure/quiz-number-input": "^20.25.0",
51
- "@instructure/quiz-rce": "^20.25.0",
47
+ "@instructure/quiz-common": "^20.26.0",
48
+ "@instructure/quiz-i18n": "^20.26.0",
49
+ "@instructure/quiz-interactions": "^20.26.0",
50
+ "@instructure/quiz-number-input": "^20.26.0",
51
+ "@instructure/quiz-rce": "^20.26.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.25.0",
115
+ "instructure-validations": "^20.26.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.25.0",
146
+ "@instructure/quiz-scripts": "^20.26.0",
147
147
  "@instructure/ui-axe-check": "^8.51.0",
148
148
  "@instructure/ui-babel-preset": "^7.22.1",
149
149
  "@instructure/ui-test-utils": "^7.22.1",
@@ -161,7 +161,7 @@
161
161
  "jquery": "^2.2.3",
162
162
  "karma-junit-reporter": "^2.0.1",
163
163
  "most-subject": "^5.3.0",
164
- "quiz-presets": "^20.25.0",
164
+ "quiz-presets": "^20.26.0",
165
165
  "react": "^16.8.6",
166
166
  "react-addons-test-utils": "^15.6.2",
167
167
  "react-dom": "^16.8.6",