@instructure/quiz-core 22.13.2 → 22.14.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.
@@ -8,7 +8,7 @@ import { handleQuizResponse } from '../../common/api/callHandlers';
8
8
  import { getUploadUrl, sendFileToS3 } from '../../common/api/fileUpload';
9
9
  import { interactionTypeFetch } from '../../common/api/interactionTypes';
10
10
  import { getExistingQuizAndItems, quizFetchHandler } from '../../common/api/quizzes';
11
- var config = require('../../config');
11
+ import config from '../../config';
12
12
  var quizApiEndpoint = '/api/quizzes';
13
13
 
14
14
  // ==== CALLBACKS ====
@@ -25,7 +25,7 @@ import PropTypes from 'prop-types';
25
25
  import ImmutablePropTypes from 'react-immutable-proptypes';
26
26
  import partial from 'lodash/partial';
27
27
  import { DragSource } from 'react-dnd';
28
- import { IconAiLine, IconBankLine } from '@instructure/ui-icons';
28
+ import { IconAiColoredSolid, IconBankLine } from '@instructure/ui-icons';
29
29
  import { ScreenReaderContent } from '@instructure/ui-a11y-content';
30
30
  import { jsx } from '@instructure/emotion';
31
31
  import { FillBlankInteractionType } from '@instructure/quiz-interactions';
@@ -40,6 +40,8 @@ import PositionBox from '../../../../../common/components/resources/positionBox/
40
40
  import DragAndDropZone from '../../../../../common/components/shared/drag_and_drop/DragAndDropZone';
41
41
  import generateStyle from './styles';
42
42
  import generateComponentTheme from './theme';
43
+ import { Tooltip } from '@instructure/ui-tooltip';
44
+ import { View } from '@instructure/ui-view';
43
45
  var QuizEntryShow = (_dec = withStyleOverrides(generateStyle, generateComponentTheme), _dec(_class = (_QuizEntryShow = /*#__PURE__*/function (_Component) {
44
46
  function QuizEntryShow() {
45
47
  var _this2;
@@ -210,11 +212,19 @@ var QuizEntryShow = (_dec = withStyleOverrides(generateStyle, generateComponentT
210
212
  }, {
211
213
  key: "renderAiGeneratedContent",
212
214
  value: function renderAiGeneratedContent() {
213
- if (this.props.quizEntry.isAiGenerated) {
214
- return jsx(IconAiLine, {
215
- title: t('AI generated')
216
- });
215
+ if (!this.props.quizEntry.isAiGenerated) {
216
+ return null;
217
217
  }
218
+ return jsx(View, {
219
+ stacking: "topmost"
220
+ }, jsx(Tooltip, {
221
+ renderTip: t('This question was generated using AI'),
222
+ placement: "top center",
223
+ on: ['hover', 'focus']
224
+ }, jsx(IconAiColoredSolid, {
225
+ color: "primary",
226
+ "aria-label": t('This question was generated using AI')
227
+ })));
218
228
  }
219
229
  }, {
220
230
  key: "renderLeftHeader",
package/es/index.js CHANGED
@@ -27,6 +27,7 @@ export { BuildingButtons } from './building/components/layout/header/BuildingBut
27
27
  export { AccommodationModal } from './moderating/components/resources/AccommodationsModal';
28
28
  export { ExtraAttemptSettings } from './moderating/components/resources/AccommodationsModal/ExtraAttemptSettings';
29
29
  export { ExtraTimeSettings } from './moderating/components/resources/AccommodationsModal/ExtraTimeSettings';
30
+ export { ReduceAnswerChoicesSettings } from './moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings';
30
31
  export { PreviewFrame } from './common/components/PreviewFrame';
31
32
  export { SDKHeaderCalculator } from './common/components/SDKHeaderCalculator';
32
33
  export { QuizzesSpinner } from './common/components/shared/spinner/Spinner';
@@ -106,7 +107,7 @@ export { toErrors } from './common/util/instUIMessages';
106
107
  export { elementsForSelectors } from './common/util/ElementsForSelectors';
107
108
  export { formatTime } from './common/util/formatTimespan';
108
109
  export { connect } from './common/react-redux';
109
- export { breakdownSeconds, HOUR_IN_SECONDS } from './common/components/shared/FormattedDuration';
110
+ export { breakdownSeconds, HOUR_IN_SECONDS, MINUTE_IN_SECONDS } from './common/components/shared/FormattedDuration';
110
111
  export { sessionStore } from './common/util/sessionStore';
111
112
  export { printWithCss, ensureImagesLoaded } from './common/util/printUtils';
112
113
  export { ensureRCEContentIsLoaded } from './common/util/rceChecker';
@@ -40,7 +40,7 @@ var _callHandlers = require("../../common/api/callHandlers");
40
40
  var _fileUpload = require("../../common/api/fileUpload");
41
41
  var _interactionTypes = require("../../common/api/interactionTypes");
42
42
  var _quizzes = require("../../common/api/quizzes");
43
- var config = require('../../config');
43
+ var _config = _interopRequireDefault(require("../../config"));
44
44
  var quizApiEndpoint = '/api/quizzes';
45
45
 
46
46
  // ==== CALLBACKS ====
@@ -122,7 +122,7 @@ function startNewQuiz(contextId) {
122
122
  return function (dispatch, getState) {
123
123
  var newQuizData = JSON.stringify({
124
124
  title: 'Add Title...',
125
- context_id: contextId || config.defaultContextId
125
+ context_id: contextId || _config["default"].defaultContextId
126
126
  });
127
127
  var params = {
128
128
  body: newQuizData
@@ -31,6 +31,8 @@ var _PositionBox = _interopRequireDefault(require("../../../../../common/compone
31
31
  var _DragAndDropZone = _interopRequireDefault(require("../../../../../common/components/shared/drag_and_drop/DragAndDropZone"));
32
32
  var _styles = _interopRequireDefault(require("./styles"));
33
33
  var _theme = _interopRequireDefault(require("./theme"));
34
+ var _uiTooltip = require("@instructure/ui-tooltip");
35
+ var _uiView = require("@instructure/ui-view");
34
36
  var _dec, _class, _QuizEntryShow;
35
37
  /** @jsx jsx */
36
38
  function _callSuper(_this, derived, args) {
@@ -217,11 +219,19 @@ var QuizEntryShow = (_dec = (0, _quizCommon.withStyleOverrides)(_styles["default
217
219
  }, {
218
220
  key: "renderAiGeneratedContent",
219
221
  value: function renderAiGeneratedContent() {
220
- if (this.props.quizEntry.isAiGenerated) {
221
- return (0, _emotion.jsx)(_uiIcons.IconAiLine, {
222
- title: (0, _formatMessage["default"])('AI generated')
223
- });
222
+ if (!this.props.quizEntry.isAiGenerated) {
223
+ return null;
224
224
  }
225
+ return (0, _emotion.jsx)(_uiView.View, {
226
+ stacking: "topmost"
227
+ }, (0, _emotion.jsx)(_uiTooltip.Tooltip, {
228
+ renderTip: (0, _formatMessage["default"])('This question was generated using AI'),
229
+ placement: "top center",
230
+ on: ['hover', 'focus']
231
+ }, (0, _emotion.jsx)(_uiIcons.IconAiColoredSolid, {
232
+ color: "primary",
233
+ "aria-label": (0, _formatMessage["default"])('This question was generated using AI')
234
+ })));
225
235
  }
226
236
  }, {
227
237
  key: "renderLeftHeader",
package/lib/index.js CHANGED
@@ -23,6 +23,7 @@ var _exportNames = {
23
23
  AccommodationModal: true,
24
24
  ExtraAttemptSettings: true,
25
25
  ExtraTimeSettings: true,
26
+ ReduceAnswerChoicesSettings: true,
26
27
  PreviewFrame: true,
27
28
  SDKHeaderCalculator: true,
28
29
  QuizzesSpinner: true,
@@ -77,6 +78,7 @@ var _exportNames = {
77
78
  FormattedTimer: true,
78
79
  breakdownSeconds: true,
79
80
  HOUR_IN_SECONDS: true,
81
+ MINUTE_IN_SECONDS: true,
80
82
  TagWrapper: true,
81
83
  RetryGradePassbackButton: true,
82
84
  GenericAsyncSearch: true,
@@ -417,6 +419,12 @@ Object.defineProperty(exports, "LocalStoreService", {
417
419
  return _localStoreService.LocalStoreService;
418
420
  }
419
421
  });
422
+ Object.defineProperty(exports, "MINUTE_IN_SECONDS", {
423
+ enumerable: true,
424
+ get: function get() {
425
+ return _FormattedDuration.MINUTE_IN_SECONDS;
426
+ }
427
+ });
420
428
  Object.defineProperty(exports, "MaskedTextInput", {
421
429
  enumerable: true,
422
430
  get: function get() {
@@ -555,6 +563,12 @@ Object.defineProperty(exports, "QuizzesSpinner", {
555
563
  return _Spinner.QuizzesSpinner;
556
564
  }
557
565
  });
566
+ Object.defineProperty(exports, "ReduceAnswerChoicesSettings", {
567
+ enumerable: true,
568
+ get: function get() {
569
+ return _ReduceAnswerChoicesSettings.ReduceAnswerChoicesSettings;
570
+ }
571
+ });
558
572
  Object.defineProperty(exports, "ReportCard", {
559
573
  enumerable: true,
560
574
  get: function get() {
@@ -1541,6 +1555,7 @@ var _BuildingButtons = require("./building/components/layout/header/BuildingButt
1541
1555
  var _AccommodationsModal = require("./moderating/components/resources/AccommodationsModal");
1542
1556
  var _ExtraAttemptSettings = require("./moderating/components/resources/AccommodationsModal/ExtraAttemptSettings");
1543
1557
  var _ExtraTimeSettings = require("./moderating/components/resources/AccommodationsModal/ExtraTimeSettings");
1558
+ var _ReduceAnswerChoicesSettings = require("./moderating/components/resources/AccommodationsModal/ReduceAnswerChoicesSettings");
1544
1559
  var _PreviewFrame = require("./common/components/PreviewFrame");
1545
1560
  var _SDKHeaderCalculator = require("./common/components/SDKHeaderCalculator");
1546
1561
  var _Spinner = require("./common/components/shared/spinner/Spinner");
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "22.13.2",
3
+ "version": "22.14.1",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
7
- "main": "lib/index.js",
8
- "module": "es/index.js",
7
+ "main": "./lib/index.js",
8
+ "module": "./es/index.js",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./es/index.js",
12
+ "require": "./lib/index.js"
13
+ }
14
+ },
9
15
  "repository": {
10
16
  "type": "git",
11
17
  "url": "https://gerrit.instructure.com/quizzes-ui.git"
@@ -111,12 +117,12 @@
111
117
  "store": "^1.3.20",
112
118
  "striptags": "^2.0.0",
113
119
  "uuid": "^3.2.1",
114
- "@instructure/quiz-common": "22.13.2",
115
- "@instructure/quiz-i18n": "22.13.2",
116
- "@instructure/quiz-interactions": "22.13.2",
117
- "@instructure/quiz-number-input": "22.13.2",
118
- "@instructure/quiz-rce": "22.13.2",
119
- "instructure-validations": "22.13.2"
120
+ "@instructure/quiz-common": "22.14.1",
121
+ "@instructure/quiz-interactions": "22.14.1",
122
+ "@instructure/quiz-i18n": "22.14.1",
123
+ "@instructure/quiz-number-input": "22.14.1",
124
+ "@instructure/quiz-rce": "22.14.1",
125
+ "instructure-validations": "22.14.1"
120
126
  },
121
127
  "devDependencies": {
122
128
  "@instructure/ui-axe-check": "10.17.0",
@@ -145,7 +151,7 @@
145
151
  "sinon": "^6.1.3",
146
152
  "sinon-chai": "^3.3.0",
147
153
  "@instructure/quiz-scripts": "21.0.0",
148
- "quiz-presets": "22.13.2"
154
+ "quiz-presets": "22.14.1"
149
155
  },
150
156
  "peerDependencies": {
151
157
  "react": "^15 || ^16"