@instructure/quiz-core 17.44.1-rc.0 → 17.44.1-rc.10

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.
@@ -166,7 +166,7 @@ export var QuizInstructions = (_dec = themeable(theme, styles), _dec(_class = (_
166
166
  instructions: this.props.quiz.instructions,
167
167
  switchOnEditing: this.props.switchOnEditing,
168
168
  contentLocked: this.isContentLocked(),
169
- scrollKey: contentLocked ? this.props.scrollKey : null
169
+ scrollKey: contentLocked ? this.props.scrollKey : void 0
170
170
  });
171
171
  }
172
172
  }, {
@@ -150,7 +150,7 @@ export var QuizTitlePresenter = (_dec = themeable(theme, styles), _dec(_class =
150
150
  switchOnEditing: this.props.switchOnEditing,
151
151
  defaultTitle: this.workingTitle(),
152
152
  contentLocked: this.isContentLocked(),
153
- scrollKey: this.isContentLocked() ? this.props.scrollKey : null
153
+ scrollKey: this.isContentLocked() ? this.props.scrollKey : void 0
154
154
  });
155
155
  }
156
156
  }, {
@@ -78,7 +78,8 @@ export var AddContentButton = (_dec = themeable(theme, styles), _dec(_class = (_
78
78
  ref: this.storeButtonElemRef,
79
79
  onClick: this.props.onClick,
80
80
  className: buttonClasses,
81
- "data-automation": "sdk-add-content-button"
81
+ "data-automation": "sdk-add-content-button",
82
+ "aria-expanded": this.props.isEditing
82
83
  }, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Add Content')), /*#__PURE__*/React.createElement(PresentationContent, null, /*#__PURE__*/React.createElement(IconPlusLine, {
83
84
  title: t('Add Content')
84
85
  }))));
@@ -64,7 +64,7 @@ export var AddContentPopover = (_dec = themeable(theme, styles), _dec(_class = (
64
64
  show: _this.props.isEditing,
65
65
  shouldCloseOnEscape: true,
66
66
  shouldContainFocus: true
67
- }, /*#__PURE__*/React.createElement(Popover.Trigger, null, /*#__PURE__*/React.createElement("div", null, _this.renderAddContentButton())), /*#__PURE__*/React.createElement(Popover.Content, null, /*#__PURE__*/React.createElement(AddContentBody, {
67
+ }, /*#__PURE__*/React.createElement(Popover.Trigger, null, _this.renderAddContentButton()), /*#__PURE__*/React.createElement(Popover.Content, null, /*#__PURE__*/React.createElement(AddContentBody, {
68
68
  allowStimulusCreation: _this.props.allowStimulusCreation,
69
69
  onOpenBankTray: _this.props.switchOffEditing,
70
70
  onAddItem: _this.props.switchOffEditing,
@@ -63,14 +63,16 @@ export var StimulusEdit = (_dec = themeable(theme, styles), _dec(_class = (_temp
63
63
 
64
64
  _this.clearModifications = function () {
65
65
  _this.props.clearModifications('stimuli', _this.props.stimulus.id);
66
- };
67
66
 
68
- _this.onCancel = function (e) {
69
- _this.props.hideError(_this.props.guid);
67
+ _this.props.clearModifications('quizEntries', _this.props.quizEntry.id);
70
68
 
71
69
  if (_this.props.stimulus.isTemporary()) {
72
70
  _this.props.clearTemporaryStimulus(_this.props.quizId);
73
71
  }
72
+ };
73
+
74
+ _this.onCancel = function (e) {
75
+ _this.props.hideError(_this.props.guid);
74
76
 
75
77
  _this.props.switchOffEditing();
76
78
 
@@ -90,7 +90,7 @@ var unconnectedMakeScrollable = function unconnectedMakeScrollable(ComposedCompo
90
90
  scrollKey = _this$props.scrollKey,
91
91
  scrollingActions = _this$props.scrollingActions;
92
92
 
93
- if (prevProps.scrolledComponentKey !== scrolledComponentKey && scrolledComponentKey === scrollKey) {
93
+ if (prevProps.scrolledComponentKey !== scrolledComponentKey && scrolledComponentKey && scrollKey && scrolledComponentKey === scrollKey) {
94
94
  this.scrollIntoView(scrollingFocus);
95
95
  scrollingActions.clearsScrolledComponentKey();
96
96
  }
@@ -190,7 +190,7 @@ var QuizInstructions = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
190
190
  instructions: this.props.quiz.instructions,
191
191
  switchOnEditing: this.props.switchOnEditing,
192
192
  contentLocked: this.isContentLocked(),
193
- scrollKey: contentLocked ? this.props.scrollKey : null
193
+ scrollKey: contentLocked ? this.props.scrollKey : void 0
194
194
  });
195
195
  }
196
196
  }, {
@@ -175,7 +175,7 @@ var QuizTitlePresenter = (_dec = (0, _uiThemeable.themeable)(_theme.default, sty
175
175
  switchOnEditing: this.props.switchOnEditing,
176
176
  defaultTitle: this.workingTitle(),
177
177
  contentLocked: this.isContentLocked(),
178
- scrollKey: this.isContentLocked() ? this.props.scrollKey : null
178
+ scrollKey: this.isContentLocked() ? this.props.scrollKey : void 0
179
179
  });
180
180
  }
181
181
  }, {
@@ -102,7 +102,8 @@ var AddContentButton = (_dec = (0, _uiThemeable.themeable)(_theme.default, style
102
102
  ref: this.storeButtonElemRef,
103
103
  onClick: this.props.onClick,
104
104
  className: buttonClasses,
105
- "data-automation": "sdk-add-content-button"
105
+ "data-automation": "sdk-add-content-button",
106
+ "aria-expanded": this.props.isEditing
106
107
  }, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Add Content')), /*#__PURE__*/_react.default.createElement(_uiA11yContent.PresentationContent, null, /*#__PURE__*/_react.default.createElement(_uiIcons.IconPlusLine, {
107
108
  title: (0, _formatMessage.default)('Add Content')
108
109
  }))));
@@ -89,7 +89,7 @@ var AddContentPopover = (_dec = (0, _uiThemeable.themeable)(_theme.default, styl
89
89
  show: _this.props.isEditing,
90
90
  shouldCloseOnEscape: true,
91
91
  shouldContainFocus: true
92
- }, /*#__PURE__*/_react.default.createElement(_uiPopover.Popover.Trigger, null, /*#__PURE__*/_react.default.createElement("div", null, _this.renderAddContentButton())), /*#__PURE__*/_react.default.createElement(_uiPopover.Popover.Content, null, /*#__PURE__*/_react.default.createElement(_index2.default, {
92
+ }, /*#__PURE__*/_react.default.createElement(_uiPopover.Popover.Trigger, null, _this.renderAddContentButton()), /*#__PURE__*/_react.default.createElement(_uiPopover.Popover.Content, null, /*#__PURE__*/_react.default.createElement(_index2.default, {
93
93
  allowStimulusCreation: _this.props.allowStimulusCreation,
94
94
  onOpenBankTray: _this.props.switchOffEditing,
95
95
  onAddItem: _this.props.switchOffEditing,
@@ -100,14 +100,16 @@ var StimulusEdit = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles),
100
100
 
101
101
  _this.clearModifications = function () {
102
102
  _this.props.clearModifications('stimuli', _this.props.stimulus.id);
103
- };
104
103
 
105
- _this.onCancel = function (e) {
106
- _this.props.hideError(_this.props.guid);
104
+ _this.props.clearModifications('quizEntries', _this.props.quizEntry.id);
107
105
 
108
106
  if (_this.props.stimulus.isTemporary()) {
109
107
  _this.props.clearTemporaryStimulus(_this.props.quizId);
110
108
  }
109
+ };
110
+
111
+ _this.onCancel = function (e) {
112
+ _this.props.hideError(_this.props.guid);
111
113
 
112
114
  _this.props.switchOffEditing();
113
115
 
@@ -115,7 +115,7 @@ var unconnectedMakeScrollable = function unconnectedMakeScrollable(ComposedCompo
115
115
  scrollKey = _this$props.scrollKey,
116
116
  scrollingActions = _this$props.scrollingActions;
117
117
 
118
- if (prevProps.scrolledComponentKey !== scrolledComponentKey && scrolledComponentKey === scrollKey) {
118
+ if (prevProps.scrolledComponentKey !== scrolledComponentKey && scrolledComponentKey && scrollKey && scrolledComponentKey === scrollKey) {
119
119
  this.scrollIntoView(scrollingFocus);
120
120
  scrollingActions.clearsScrolledComponentKey();
121
121
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "17.44.1-rc.0+edf76eaac",
3
+ "version": "17.44.1-rc.10+b5b9a01f9",
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": "17.44.1-rc.0+edf76eaac",
45
- "@instructure/quiz-i18n": "17.44.1-rc.0+edf76eaac",
46
- "@instructure/quiz-interactions": "17.44.1-rc.0+edf76eaac",
47
- "@instructure/quiz-number-input": "17.44.1-rc.0+edf76eaac",
48
- "@instructure/quiz-rce": "17.44.1-rc.0+edf76eaac",
44
+ "@instructure/quiz-common": "17.44.1-rc.10+b5b9a01f9",
45
+ "@instructure/quiz-i18n": "17.44.1-rc.10+b5b9a01f9",
46
+ "@instructure/quiz-interactions": "17.44.1-rc.10+b5b9a01f9",
47
+ "@instructure/quiz-number-input": "17.44.1-rc.10+b5b9a01f9",
48
+ "@instructure/quiz-rce": "17.44.1-rc.10+b5b9a01f9",
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.44.1-rc.0+edf76eaac",
109
+ "instructure-validations": "17.44.1-rc.10+b5b9a01f9",
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.44.1-rc.0+edf76eaac",
159
+ "quiz-presets": "17.44.1-rc.10+b5b9a01f9",
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": "edf76eaac48020606f90bce614ea501a76e61c6c"
175
+ "gitHead": "b5b9a01f9e14fa6818c8024c78800f4ca7fe4094"
176
176
  }