@instructure/quiz-core 20.38.0 → 21.0.1-rc.2

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.
Files changed (67) hide show
  1. package/es/banks/components/BankEntry/presenter.js +2 -2
  2. package/es/banks/components/BanksList/presenter.js +1 -1
  3. package/es/banks/components/CreateBankModal/presenter.js +22 -24
  4. package/es/banks/components/EditBankModal/presenter.js +24 -22
  5. package/es/banks/components/SharingModal/presenter.js +2 -6
  6. package/es/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +2 -2
  7. package/es/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +2 -2
  8. package/es/common/components/ConfirmationModal/presenter.js +10 -7
  9. package/es/common/components/PrintFontSizeModal/presenter.js +2 -2
  10. package/es/common/components/SDKApp/index.js +4 -4
  11. package/es/common/components/layout/navbar/SecondaryNavBarButton/index.js +13 -32
  12. package/es/common/components/layout/navbar/index.js +0 -3
  13. package/es/common/components/resources/entry/EntrySave/presenter.js +2 -2
  14. package/es/common/components/resources/item/ItemEdit/presenter.js +0 -5
  15. package/es/common/components/resources/quiz/AddContent/Popover/presenter.js +0 -4
  16. package/es/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +1 -1
  17. package/es/common/components/resources/stimulus/Stimulus/presenter.js +11 -5
  18. package/es/common/components/resources/stimulus/StimulusEdit/presenter.js +17 -9
  19. package/es/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -1
  20. package/es/common/components/resources/stimulus/StimulusShowInfo/index.js +7 -5
  21. package/es/common/components/shared/PaginatedCollection/presenter.js +2 -2
  22. package/es/common/components/shared/PrintTrigger/presenter.js +0 -5
  23. package/es/common/components/shared/TimeUnitsInput/index.js +2 -2
  24. package/es/common/components/shared/functionality/makeEditable.js +2 -2
  25. package/es/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +2 -2
  26. package/es/reporting/components/resources/OutcomeAnalysis/presenter.js +1 -11
  27. package/es/reporting/components/resources/QuizAndItemAnalysis/presenter.js +2 -2
  28. package/lib/banks/components/BankEntry/presenter.js +2 -2
  29. package/lib/banks/components/BanksList/presenter.js +1 -1
  30. package/lib/banks/components/CreateBankModal/presenter.js +23 -24
  31. package/lib/banks/components/EditBankModal/presenter.js +25 -22
  32. package/lib/banks/components/SharingModal/presenter.js +2 -6
  33. package/lib/building/components/resources/quizEntry/QuizEntryEdit/Footer/presenter.js +2 -2
  34. package/lib/building/components/resources/quizEntry/QuizEntryEdit/presenter.js +2 -2
  35. package/lib/common/components/ConfirmationModal/presenter.js +10 -7
  36. package/lib/common/components/PrintFontSizeModal/presenter.js +2 -2
  37. package/lib/common/components/SDKApp/index.js +4 -4
  38. package/lib/common/components/layout/navbar/SecondaryNavBarButton/index.js +13 -32
  39. package/lib/common/components/layout/navbar/index.js +0 -3
  40. package/lib/common/components/resources/entry/EntrySave/presenter.js +2 -2
  41. package/lib/common/components/resources/item/ItemEdit/presenter.js +0 -5
  42. package/lib/common/components/resources/quiz/AddContent/Popover/presenter.js +0 -4
  43. package/lib/common/components/resources/sessionItemResult/SessionItemResult/presenter.js +1 -1
  44. package/lib/common/components/resources/stimulus/Stimulus/presenter.js +11 -5
  45. package/lib/common/components/resources/stimulus/StimulusEdit/presenter.js +17 -9
  46. package/lib/common/components/resources/stimulus/StimulusEditInfo/presenter.js +2 -1
  47. package/lib/common/components/resources/stimulus/StimulusShowInfo/index.js +7 -5
  48. package/lib/common/components/shared/PaginatedCollection/presenter.js +2 -2
  49. package/lib/common/components/shared/PrintTrigger/presenter.js +0 -5
  50. package/lib/common/components/shared/TimeUnitsInput/index.js +2 -2
  51. package/lib/common/components/shared/functionality/makeEditable.js +2 -2
  52. package/lib/moderating/components/resources/AccommodationsModal/ExtraTimeMultiplier/index.js +2 -2
  53. package/lib/reporting/components/resources/OutcomeAnalysis/presenter.js +1 -11
  54. package/lib/reporting/components/resources/QuizAndItemAnalysis/presenter.js +2 -2
  55. package/package.json +78 -78
  56. package/es/banks/components/CreateBankModal/styles.js +0 -15
  57. package/es/banks/components/CreateBankModal/theme.js +0 -10
  58. package/es/banks/components/EditBankModal/styles.js +0 -12
  59. package/es/banks/components/EditBankModal/theme.js +0 -9
  60. package/es/common/components/layout/navbar/SecondaryNavBarButton/styles.js +0 -9
  61. package/es/common/components/layout/navbar/SecondaryNavBarButton/theme.js +0 -10
  62. package/lib/banks/components/CreateBankModal/styles.js +0 -22
  63. package/lib/banks/components/CreateBankModal/theme.js +0 -17
  64. package/lib/banks/components/EditBankModal/styles.js +0 -19
  65. package/lib/banks/components/EditBankModal/theme.js +0 -16
  66. package/lib/common/components/layout/navbar/SecondaryNavBarButton/styles.js +0 -16
  67. package/lib/common/components/layout/navbar/SecondaryNavBarButton/theme.js +0 -17
@@ -72,8 +72,8 @@ var SDKApp = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, null),
72
72
  return (0, _ui.set)('appContainer', selectors);
73
73
  }
74
74
  }, {
75
- key: "componentWillMount",
76
- value: function componentWillMount() {
75
+ key: "UNSAFE_componentWillMount",
76
+ value: function UNSAFE_componentWillMount() {
77
77
  var _this$props$rceConfig;
78
78
  this.store.dispatch([(0, _config.setAPIEndpoint)(this.props.apiEndpoint), (0, _config.setCanvasOrigin)((_this$props$rceConfig = this.props.rceConfig) === null || _this$props$rceConfig === void 0 ? void 0 : _this$props$rceConfig.canvasOrigin), this.setAppContainer(this.props.appContainer), (0, _config.setUserToken)(this.props.userToken), (0, _outcomes.setOutcomesEndpoint)(this.props.outcomesEndpoint), (0, _outcomes.setOutcomesToken)(this.props.outcomesToken), (0, _outcomes.setContextUuid)(this.props.contextUuid), (0, _outcomes.setExternalAccountUuid)(this.props.externalAccountUuid)]);
79
79
  if (this.props.itemBankSharingEnabled) {
@@ -91,8 +91,8 @@ var SDKApp = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, null),
91
91
  !this.props.disableAlertLiveRegion && (0, _renderAlerts.renderAlerts)(this.store);
92
92
  }
93
93
  }, {
94
- key: "componentWillReceiveProps",
95
- value: function componentWillReceiveProps(newProps) {
94
+ key: "UNSAFE_componentWillReceiveProps",
95
+ value: function UNSAFE_componentWillReceiveProps(newProps) {
96
96
  var _newProps$rceConfig, _this$props$rceConfig2;
97
97
  if (newProps.apiEndpoint !== this.props.apiEndpoint) {
98
98
  this.store.dispatch((0, _config.setAPIEndpoint)(newProps.apiEndpoint));
@@ -14,12 +14,9 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _uiTopNavBar = require("@instructure/ui-top-nav-bar");
15
15
  var _emotion = require("@instructure/emotion");
16
16
  var _uiReactUtils = require("@instructure/ui-react-utils");
17
- var _styles = _interopRequireDefault(require("./styles.js"));
18
- var _theme = _interopRequireDefault(require("./theme.js"));
19
- var _quizCommon = require("@instructure/quiz-common");
20
- var _dec, _class, _SecondaryNavBarButton;
17
+ var _SecondaryNavBarButton;
21
18
  /** @jsx jsx */
22
- var SecondaryNavBarButton = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _theme.default), _dec(_class = (_SecondaryNavBarButton = /*#__PURE__*/function (_Component) {
19
+ var SecondaryNavBarButton = /*#__PURE__*/function (_Component) {
23
20
  (0, _inherits2.default)(SecondaryNavBarButton, _Component);
24
21
  var _super = (0, _createSuper2.default)(SecondaryNavBarButton);
25
22
  function SecondaryNavBarButton() {
@@ -27,39 +24,23 @@ var SecondaryNavBarButton = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.
27
24
  return _super.apply(this, arguments);
28
25
  }
29
26
  (0, _createClass2.default)(SecondaryNavBarButton, [{
30
- key: "componentDidMount",
31
- value: function componentDidMount() {
32
- this.props.makeStyles();
33
- }
34
- }, {
35
- key: "componentDidUpdate",
36
- value: function componentDidUpdate() {
37
- this.props.makeStyles();
38
- }
39
- }, {
40
27
  key: "render",
41
28
  value: function render() {
42
- return (0, _emotion.jsx)(_emotion.InstUISettingsProvider, {
43
- theme: {
44
- componentOverrides: {
45
- BaseButton: {
46
- primaryColor: this.props.styles.textColor,
47
- primaryBackground: this.props.styles.backgroundColor,
48
- primaryHoverBackground: this.props.styles.backgroundHoverColor,
49
- primaryBorderColor: this.props.styles.borderColor
50
- }
51
- }
52
- }
53
- }, (0, _emotion.jsx)(_uiTopNavBar.TopNavBar.Item, (0, _uiReactUtils.omitProps)(this.props, this.constructor.propTypes), this.props.children));
29
+ return (0, _emotion.jsx)(_uiTopNavBar.TopNavBar.Item, Object.assign({
30
+ color: "secondary"
31
+ }, (0, _uiReactUtils.omitProps)(this.props, this.constructor.propTypes)), this.props.children);
54
32
  }
55
33
  }]);
56
34
  SecondaryNavBarButton.displayName = "SecondaryNavBarButton";
57
35
  return SecondaryNavBarButton;
58
- }(_react.Component), _SecondaryNavBarButton.displayName = 'TopNavBarItem', _SecondaryNavBarButton.componentId = "Quizzes".concat(_SecondaryNavBarButton.displayName), _SecondaryNavBarButton.propTypes = {
59
- children: _propTypes.default.string.isRequired,
60
- styles: _propTypes.default.object,
61
- makeStyles: _propTypes.default.func
62
- }, _SecondaryNavBarButton)) || _class);
36
+ }(_react.Component);
63
37
  exports.SecondaryNavBarButton = SecondaryNavBarButton;
38
+ _SecondaryNavBarButton = SecondaryNavBarButton;
39
+ SecondaryNavBarButton.displayName = 'TopNavBarItem';
40
+ SecondaryNavBarButton.componentId = "Quizzes".concat(_SecondaryNavBarButton.displayName);
41
+ SecondaryNavBarButton.propTypes = {
42
+ children: _propTypes.default.string.isRequired,
43
+ styles: _propTypes.default.object
44
+ };
64
45
  var _default = SecondaryNavBarButton;
65
46
  exports.default = _default;
@@ -100,9 +100,6 @@ var NavBar = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _theme
100
100
  desktopBottomBorderInverse: false
101
101
  } : {}),
102
102
  navLabel: (0, _formatMessage.default)('Quizzes navigation bar'),
103
- desktopConfig: {
104
- hideActionsUserSeparator: true
105
- },
106
103
  smallViewportConfig: {
107
104
  dropdownMenuToggleButtonLabel: (0, _formatMessage.default)('Toggle Menu'),
108
105
  dropdownMenuLabel: (0, _formatMessage.default)('Main Menu')
@@ -93,8 +93,8 @@ var EntrySave = /*#__PURE__*/function (_Component) {
93
93
  return _this;
94
94
  }
95
95
  (0, _createClass2.default)(EntrySave, [{
96
- key: "componentWillMount",
97
- value: function componentWillMount() {
96
+ key: "UNSAFE_componentWillMount",
97
+ value: function UNSAFE_componentWillMount() {
98
98
  this.props.switchOnEditing(this.props.initialFocusId);
99
99
  }
100
100
  }, {
@@ -21,7 +21,6 @@ var _componentForItem = _interopRequireDefault(require("../../../../util/compone
21
21
  var _quizCommon = require("@instructure/quiz-common");
22
22
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
23
23
  var _interactionTypePropsHelper = require("../../../../util/interactionTypePropsHelper.js");
24
- var _ElementsForSelectors = _interopRequireDefault(require("../../../../../common/util/ElementsForSelectors.js"));
25
24
  var _instUIMessages = require("../../../../util/instUIMessages.js");
26
25
  var ItemEdit = /*#__PURE__*/function (_Component) {
27
26
  (0, _inherits2.default)(ItemEdit, _Component);
@@ -40,9 +39,6 @@ var ItemEdit = /*#__PURE__*/function (_Component) {
40
39
  }
41
40
  return null;
42
41
  };
43
- _this.applicationElement = function () {
44
- return (0, _ElementsForSelectors.default)(_this.props.appContainer);
45
- };
46
42
  _this.onModalOpen = function () {
47
43
  _this.props.occludeQuizEntries(true);
48
44
  };
@@ -105,7 +101,6 @@ var ItemEdit = /*#__PURE__*/function (_Component) {
105
101
  component: /*#__PURE__*/_react.default.createElement(_OutcomeAlignments.default, Object.assign({
106
102
  artifactType: "quizEntry",
107
103
  artifactId: itemId,
108
- applicationElement: this.applicationElement,
109
104
  alignmentSetId: outcomeAlignmentSetGuid,
110
105
  contextUuid: this.props.contextUuid
111
106
  }, launchContexts.length > 0 && {
@@ -14,7 +14,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
14
14
  var _uiPopover = require("@instructure/ui-popover");
15
15
  var _emotion = require("@instructure/emotion");
16
16
  var _CustomPropTypes = _interopRequireDefault(require("../../../../../util/CustomPropTypes.js"));
17
- var _ElementsForSelectors = _interopRequireDefault(require("../../../../../util/ElementsForSelectors.js"));
18
17
  var _windowChecks = require("../../../../../util/windowChecks.js");
19
18
  var _index = _interopRequireDefault(require("../Button/index.js"));
20
19
  var _index2 = _interopRequireDefault(require("../Body/index.js"));
@@ -33,9 +32,6 @@ var AddContentPopover = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.defa
33
32
  args[_key] = arguments[_key];
34
33
  }
35
34
  _this = _super.call.apply(_super, [this].concat(args));
36
- _this.applicationElement = function () {
37
- return (0, _ElementsForSelectors.default)(_this.props.appContainer);
38
- };
39
35
  _this.showContent = function () {
40
36
  _this.props.switchOnEditing();
41
37
  };
@@ -115,7 +115,7 @@ var SessionItemResult = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.defa
115
115
  size: "small",
116
116
  margin: "small"
117
117
  }, (0, _emotion.jsx)(_uiText.Text, {
118
- color: "warning"
118
+ color: "alert"
119
119
  }, (0, _formatMessage.default)("Regrade score { possible, plural,\n one {{points, number} / # point}\n other {{points, number} / # points}\n }", {
120
120
  points: this.props.sessionItemResult.regradeInfo.get('newScore') || 0,
121
121
  possible: this.props.sessionItemResult.regradeInfo.get('newPointsPossible')
@@ -74,6 +74,11 @@ var Stimulus = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _the
74
74
  lockBlueprintContentEnabled = _this$props2.lockBlueprintContentEnabled;
75
75
  return lockBlueprintContentEnabled && isContentLockedByBlueprint;
76
76
  }
77
+ }, {
78
+ key: "isPassage",
79
+ value: function isPassage() {
80
+ return this.props.stimulus.passage;
81
+ }
77
82
  }, {
78
83
  key: "renderChildQuizEntries",
79
84
  value: function renderChildQuizEntries() {
@@ -101,9 +106,10 @@ var Stimulus = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _the
101
106
  key: "renderStimulusPanel",
102
107
  value: function renderStimulusPanel() {
103
108
  var StimulusComponent = this.props.isEditing ? _index2.default : _index3.default;
109
+ var automationPrefix = this.isPassage() ? 'passage' : 'stimulus';
104
110
  var connectDragPreview = this.props.connectDragPreview;
105
111
  return connectDragPreview((0, _emotion.jsx)("div", {
106
- "data-automation": "sdk-stimulus-LeftPanelShow"
112
+ "data-automation": "sdk-".concat(automationPrefix, "-LeftPanelShow")
107
113
  }, (0, _emotion.jsx)(StimulusComponent, {
108
114
  bankEntryWarningWrapperProps: this.props.bankEntryWarningWrapperProps,
109
115
  connectDragSource: this.props.connectDragSource,
@@ -128,18 +134,18 @@ var Stimulus = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default, _the
128
134
  }, {
129
135
  key: "renderPanels",
130
136
  value: function renderPanels(propsForDnDZone) {
131
- var isPassage = this.props.stimulus.passage;
137
+ var automationPrefix = this.isPassage() ? 'passage' : 'stimulus';
132
138
  return (0, _emotion.jsx)("div", {
133
139
  css: this.props.styles.stimulus,
134
140
  ref: this.props.dndRef,
135
- "data-automation": "sdk-stimulus"
141
+ "data-automation": "sdk-".concat(automationPrefix)
136
142
  }, (0, _emotion.jsx)("div", {
137
143
  css: this.props.styles.leftPanel
138
144
  }, this.renderStimulusPanel()), (0, _emotion.jsx)("div", {
139
145
  css: this.props.styles.itemPanel
140
- }, (0, _emotion.jsx)("div", null), this.renderChildQuizEntries(), !isPassage && (0, _emotion.jsx)(_index4.default, Object.assign({}, propsForDnDZone, {
146
+ }, (0, _emotion.jsx)("div", null), this.renderChildQuizEntries(), !this.isPassage() && (0, _emotion.jsx)(_index4.default, Object.assign({}, propsForDnDZone, {
141
147
  location: "in"
142
- })), this.props.childEntries.size === 0 && !this.isQuizContentLocked() && !isPassage && (0, _emotion.jsx)(_index.default, {
148
+ })), this.props.childEntries.size === 0 && !this.isQuizContentLocked() && !this.isPassage() && (0, _emotion.jsx)(_index.default, {
143
149
  allowStimulusCreation: false,
144
150
  stimulusId: this.props.stimulus.id,
145
151
  parentEntryId: this.props.quizEntry.id,
@@ -65,6 +65,7 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
65
65
  _this.props.setUi(_quizCommon.SHOULD_CLONE_ITEM, false);
66
66
  };
67
67
  _this.handleDeleteTemporary = function () {
68
+ var isPassage = _this.isPassage();
68
69
  _this.props.withConfirm(function () {
69
70
  _this.onCancel();
70
71
  _this.props.setUi(_quizCommon.DELETED_QUIZ_ENTRY, {
@@ -72,10 +73,11 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
72
73
  inStimulus: false
73
74
  });
74
75
  }, {
75
- title: (0, _formatMessage.default)('Confirm Stimulus Removal'),
76
- text: (0, _formatMessage.default)('Are you sure you want to remove this stimulus?'),
77
- continueText: (0, _formatMessage.default)('Remove Stimulus'),
78
- cancelText: (0, _formatMessage.default)('Keep Stimulus')
76
+ title: isPassage ? (0, _formatMessage.default)('Confirm Passage Removal') : (0, _formatMessage.default)('Confirm Stimulus Removal'),
77
+ text: isPassage ? (0, _formatMessage.default)('Are you sure you want to remove this passage?') : (0, _formatMessage.default)('Are you sure you want to remove this stimulus?'),
78
+ continueText: isPassage ? (0, _formatMessage.default)('Remove Passage') : (0, _formatMessage.default)('Remove Stimulus'),
79
+ cancelText: isPassage ? (0, _formatMessage.default)('Keep Passage ') : (0, _formatMessage.default)('Keep Stimulus'),
80
+ automationPrefix: isPassage ? 'passage' : 'stimulus'
79
81
  });
80
82
  };
81
83
  _this.handleDeleteStimulus = function () {
@@ -300,6 +302,12 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
300
302
  outsideApp = _checkClickedNode.outsideApp;
301
303
  return outsideApp || !isEndEditingTrigger;
302
304
  }
305
+ }, {
306
+ key: "isPassage",
307
+ value: function isPassage() {
308
+ var _this$props$stimulus;
309
+ return (_this$props$stimulus = this.props.stimulus) === null || _this$props$stimulus === void 0 ? void 0 : _this$props$stimulus.passage;
310
+ }
303
311
  }, {
304
312
  key: "afterSubmit",
305
313
  value: function afterSubmit() {
@@ -327,8 +335,7 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
327
335
  }, {
328
336
  key: "renderAddToBankOptions",
329
337
  value: function renderAddToBankOptions() {
330
- var _this$props$stimulus;
331
- var paddingTopStyle = ((_this$props$stimulus = this.props.stimulus) === null || _this$props$stimulus === void 0 ? void 0 : _this$props$stimulus.passage) ? {
338
+ var paddingTopStyle = this.isPassage() ? {
332
339
  padding: 'small 0 0'
333
340
  } : {};
334
341
  return (0, _emotion.jsx)(_uiView.View, Object.assign({
@@ -353,7 +360,8 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
353
360
  }, {
354
361
  key: "renderStimulusEdit",
355
362
  value: function renderStimulusEdit() {
356
- var stimulusLabel = this.props.stimulus.passage ? (0, _formatMessage.default)('Passage') : (0, _formatMessage.default)('Stimulus');
363
+ var stimulusLabel = this.isPassage() ? (0, _formatMessage.default)('Passage') : (0, _formatMessage.default)('Stimulus');
364
+ var automationPrefix = this.isPassage() ? 'passage' : 'stimulus';
357
365
  return (0, _emotion.jsx)("div", null, (0, _emotion.jsx)("div", {
358
366
  css: this.props.styles.stimulus,
359
367
  ref: this.handleRef
@@ -387,7 +395,7 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
387
395
  }, (0, _emotion.jsx)(_uiButtons.Button, {
388
396
  type: "button",
389
397
  onClick: this.onCancel,
390
- "data-automation": "sdk-stimulus-discardButton"
398
+ "data-automation": "sdk-".concat(automationPrefix, "-discardButton")
391
399
  }, (0, _formatMessage.default)('Cancel'))), (0, _emotion.jsx)("div", {
392
400
  className: "submitButtonWrapper",
393
401
  css: this.props.styles.buttonWrapper
@@ -396,7 +404,7 @@ var StimulusEdit = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.default,
396
404
  color: "primary",
397
405
  disabled: !this.state.canSubmit,
398
406
  onClick: this.onSubmit,
399
- "data-automation": "sdk-stimulus-done-button"
407
+ "data-automation": "sdk-".concat(automationPrefix, "-done-button")
400
408
  }, (0, _formatMessage.default)('Done')))));
401
409
  }
402
410
  }, {
@@ -146,6 +146,7 @@ var StimulusEditInfo = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.defau
146
146
  var stimulus = this.props.workingStimulus;
147
147
  var textAreaId = "stimulusBodyEdit_".concat(stimulus.id, "_").concat(this.props.isBankedContent);
148
148
  var stimulusBodyId = "stimulusBodyEdit_".concat(stimulus.id, "_body");
149
+ var automationPrefix = stimulus.passage ? 'passage' : 'stimulus';
149
150
  return (0, _emotion.jsx)(_quizCommon.FormFieldGroup, {
150
151
  messages: this.inputErrors('onSelf'),
151
152
  description: (0, _emotion.jsx)(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Edit Stimulus'))
@@ -161,7 +162,7 @@ var StimulusEditInfo = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.defau
161
162
  ref: this.props.setTitleRef,
162
163
  onChange: this.onTextInputChange('title'),
163
164
  value: stimulus.get('title'),
164
- "data-automation": "sdk-stimulus-title-input"
165
+ "data-automation": "sdk-".concat(automationPrefix, "-title-input")
165
166
  })), this.renderInstructions(stimulus), (0, _emotion.jsx)("div", {
166
167
  css: this.props.styles.section
167
168
  }, (0, _emotion.jsx)(_quizCommon.FormField, {
@@ -27,7 +27,9 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
27
27
  (0, _createClass2.default)(StimulusShowInfo, [{
28
28
  key: "render",
29
29
  value: function render() {
30
- var instructions = this.props.stimulus.instructions && /*#__PURE__*/_react.default.createElement(_uiView.View, {
30
+ var stimulus = this.props.stimulus;
31
+ var automationPrefix = stimulus.passage ? 'passage' : 'stimulus';
32
+ var instructions = stimulus.instructions && /*#__PURE__*/_react.default.createElement(_uiView.View, {
31
33
  as: "div",
32
34
  padding: "small",
33
35
  margin: "x-small 0 0 0",
@@ -46,10 +48,10 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
46
48
  color: "primary",
47
49
  size: "small",
48
50
  weight: "bold"
49
- }, this.props.stimulus.instructions))));
51
+ }, stimulus.instructions))));
50
52
  return /*#__PURE__*/_react.default.createElement(_uiView.View, {
51
53
  as: "div"
52
- }, this.props.stimulus.title && /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
54
+ }, stimulus.title && /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
53
55
  level: "h3",
54
56
  as: "h2",
55
57
  color: "primary",
@@ -57,8 +59,8 @@ var StimulusShowInfo = /*#__PURE__*/function (_Component) {
57
59
  themeOverride: {
58
60
  h2FontWeight: '700'
59
61
  }
60
- }, this.props.stimulus.title), instructions, /*#__PURE__*/_react.default.createElement("div", {
61
- "data-automation": "sdk-stimulus-LeftPanelShow-content"
62
+ }, stimulus.title), instructions, /*#__PURE__*/_react.default.createElement("div", {
63
+ "data-automation": "sdk-".concat(automationPrefix, "-LeftPanelShow-content")
62
64
  }, /*#__PURE__*/_react.default.createElement(_quizRce.RichContentRenderer, {
63
65
  content: this.props.stimulus.body
64
66
  })));
@@ -62,8 +62,8 @@ var PaginatedCollection = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.de
62
62
  this.getPage(this.props.stateKey, this.props.currentPage, this.props.params);
63
63
  }
64
64
  }, {
65
- key: "componentWillReceiveProps",
66
- value: function componentWillReceiveProps(_ref) {
65
+ key: "UNSAFE_componentWillReceiveProps",
66
+ value: function UNSAFE_componentWillReceiveProps(_ref) {
67
67
  var merge = _ref.merge,
68
68
  params = _ref.params,
69
69
  set = _ref.set,
@@ -16,7 +16,6 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
16
16
  var _uiOverlays = require("@instructure/ui-overlays");
17
17
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
18
18
  var _Spinner = require("../spinner/Spinner.js");
19
- var _ElementsForSelectors = _interopRequireDefault(require("../../../util/ElementsForSelectors.js"));
20
19
  var _CustomPropTypes = _interopRequireDefault(require("../../../util/CustomPropTypes.js"));
21
20
  var _printUtils = require("../../../util/printUtils.js");
22
21
  var _index = _interopRequireDefault(require("../../PrintFontSizeModal/index.js"));
@@ -82,9 +81,6 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
82
81
  });
83
82
  _this.props.openPrintFontSizeModal();
84
83
  };
85
- _this.applicationElement = function () {
86
- return (0, _ElementsForSelectors.default)(_this.props.appContainer);
87
- };
88
84
  _this.onExited = function () {};
89
85
  _this.fontSize = '';
90
86
  return _this;
@@ -93,7 +89,6 @@ var PrintTrigger = /*#__PURE__*/function (_Component) {
93
89
  key: "render",
94
90
  value: function render() {
95
91
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_uiOverlays.Overlay, {
96
- applicationElement: this.applicationElement,
97
92
  open: this.state.waitingForPrintingToBeReady,
98
93
  shouldContainFocus: true,
99
94
  transition: "fade",
@@ -185,8 +185,8 @@ var TimeUnitsInput = /*#__PURE__*/function (_Component) {
185
185
  return _this;
186
186
  }
187
187
  (0, _createClass2.default)(TimeUnitsInput, [{
188
- key: "componentWillMount",
189
- value: function componentWillMount() {
188
+ key: "UNSAFE_componentWillMount",
189
+ value: function UNSAFE_componentWillMount() {
190
190
  var _breakdownSeconds5 = (0, _index.breakdownSeconds)(this.props.timeInSeconds, this.props.includeDays),
191
191
  days = _breakdownSeconds5.days,
192
192
  hours = _breakdownSeconds5.hours,
@@ -68,8 +68,8 @@ var giveEditProps = function giveEditProps(ComposedComponent) {
68
68
  return _this;
69
69
  }
70
70
  (0, _createClass2.default)(_Class, [{
71
- key: "componentWillMount",
72
- value: function componentWillMount() {
71
+ key: "UNSAFE_componentWillMount",
72
+ value: function UNSAFE_componentWillMount() {
73
73
  this._uniqId = (0, _uniqueId.default)("".concat(ComposedComponent.displayName, "_"));
74
74
  }
75
75
  }, {
@@ -91,8 +91,8 @@ var ExtraTimeMultiplier = /*#__PURE__*/function (_withI18nSupport) {
91
91
  return _this;
92
92
  }
93
93
  (0, _createClass2.default)(ExtraTimeMultiplier, [{
94
- key: "componentWillMount",
95
- value: function componentWillMount() {
94
+ key: "UNSAFE_componentWillMount",
95
+ value: function UNSAFE_componentWillMount() {
96
96
  var multiplierValue = Math.max(this.props.timerMultiplierValue, this.props.minMultiplier);
97
97
  var multiplierValueString = this.formatDecimal2FractionDigits(multiplierValue);
98
98
  this.setState({
@@ -15,21 +15,12 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
15
15
  var _OutcomesPerStudentReport = _interopRequireDefault(require("@instructure/outcomes-ui/es/containers/OutcomesPerStudentReport"));
16
16
  var _quizCommon = require("@instructure/quiz-common");
17
17
  var _CustomPropTypes = _interopRequireDefault(require("../../../../common/util/CustomPropTypes.js"));
18
- var _ElementsForSelectors = _interopRequireDefault(require("../../../../common/util/ElementsForSelectors.js"));
19
18
  var OutcomeAnalysis = /*#__PURE__*/function (_Component) {
20
19
  (0, _inherits2.default)(OutcomeAnalysis, _Component);
21
20
  var _super = (0, _createSuper2.default)(OutcomeAnalysis);
22
21
  function OutcomeAnalysis() {
23
- var _this;
24
22
  (0, _classCallCheck2.default)(this, OutcomeAnalysis);
25
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
26
- args[_key] = arguments[_key];
27
- }
28
- _this = _super.call.apply(_super, [this].concat(args));
29
- _this.applicationElement = function () {
30
- return (0, _ElementsForSelectors.default)(_this.props.appContainer);
31
- };
32
- return _this;
23
+ return _super.apply(this, arguments);
33
24
  }
34
25
  (0, _createClass2.default)(OutcomeAnalysis, [{
35
26
  key: "render",
@@ -42,7 +33,6 @@ var OutcomeAnalysis = /*#__PURE__*/function (_Component) {
42
33
  loadUsersOverride = _this$props.loadUsersOverride,
43
34
  showRollups = _this$props.showRollups;
44
35
  return /*#__PURE__*/_react.default.createElement(_OutcomesPerStudentReport.default, {
45
- applicationElement: this.applicationElement,
46
36
  artifactType: "quizzes.quiz",
47
37
  artifactId: quizId,
48
38
  contextUuid: contextUuid,
@@ -47,8 +47,8 @@ var QuizAndItemAnalysis = (_dec = (0, _quizCommon.withStyleOverrides)(_styles.de
47
47
  this.getAnalyses(this.props.activeQuizId);
48
48
  }
49
49
  }, {
50
- key: "componentWillUpdate",
51
- value: function componentWillUpdate(nextProps) {
50
+ key: "UNSAFE_componentWillUpdate",
51
+ value: function UNSAFE_componentWillUpdate(nextProps) {
52
52
  if (this.props.activeQuizId !== nextProps.activeQuizId) {
53
53
  this.getAnalyses(nextProps.activeQuizId);
54
54
  }