@instructure/quiz-core 18.6.0 → 18.6.1-rc.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,6 +8,7 @@ import PropTypes from 'prop-types';
8
8
  import { matchingTypeAnswerSummaryPropType } from "../../propTypes.js";
9
9
  import MatchingTypeOrderer from "./utils/matchingTypeOrderer.js";
10
10
  import { AfsPartsContainer } from "../shared/AfsPartsContainer/presenter.js";
11
+ import AggregationTable from "../shared/AggregationTable/index.js";
11
12
  export var MatchingType = /*#__PURE__*/function (_Component) {
12
13
  _inherits(MatchingType, _Component);
13
14
 
@@ -42,6 +43,10 @@ export var MatchingType = /*#__PURE__*/function (_Component) {
42
43
  answerSummary: answerSummary,
43
44
  orderedAnswerKeys: orderedAnswerKeys,
44
45
  orderedQuestionKeys: orderedQuestionKeys
46
+ }),
47
+ aggregationTable: /*#__PURE__*/React.createElement(AggregationTable, {
48
+ itemId: itemId,
49
+ answerSummary: answerSummary
45
50
  })
46
51
  }));
47
52
  };
@@ -95,7 +95,7 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
95
95
  return /*#__PURE__*/React.createElement(Flex, {
96
96
  alignItems: "center",
97
97
  width: "auto",
98
- margin: "auto",
98
+ margin: "small auto",
99
99
  direction: "column"
100
100
  }, /*#__PURE__*/React.createElement(Flex.Item, {
101
101
  overflowY: "hidden"
@@ -109,37 +109,50 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
109
109
  }, quizAnalysis === null || quizAnalysis === void 0 ? void 0 : (_quizAnalysis$metadat = quizAnalysis.metadata) === null || _quizAnalysis$metadat === void 0 ? void 0 : _quizAnalysis$metadat.quiz_title)));
110
110
  };
111
111
 
112
- _this.renderTop = function () {
112
+ _this.renderUpdateDateWithError = function () {
113
113
  var _this$props = _this.props,
114
114
  analysisError = _this$props.analysisError,
115
115
  generationInProgress = _this$props.generationInProgress,
116
116
  quizAnalysis = _this$props.quizAnalysis;
117
117
  var shouldShowError = analysisError && !generationInProgress;
118
118
  return /*#__PURE__*/React.createElement(Flex, {
119
- justifyItems: "space-between",
120
- alignItems: "center",
121
- wrap: "wrap",
122
- width: "auto",
123
- margin: "auto",
124
- direction: "row"
125
- }, /*#__PURE__*/React.createElement(Flex.Item, null, _this.renderHeader()), /*#__PURE__*/React.createElement(Flex.Item, {
126
- margin: "0 0 0 auto"
127
- }, /*#__PURE__*/React.createElement(Flex, {
128
- alignItems: "center",
129
- justifyItems: "end",
119
+ alignItems: "end",
130
120
  width: "auto",
131
- direction: "row",
132
- wrap: "wrap-reverse"
121
+ margin: "small auto",
122
+ direction: "column"
133
123
  }, /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(AnalysisUpdateDate, {
134
124
  date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
135
- })), /*#__PURE__*/React.createElement(Flex.Item, {
136
- overflowY: "visible",
137
- margin: "0 0 0 small"
138
- }, _this.renderGenerationButton()), /*#__PURE__*/React.createElement(Flex.Item, null, shouldShowError && /*#__PURE__*/React.createElement(Text, {
125
+ })), /*#__PURE__*/React.createElement(Flex.Item, null, shouldShowError && /*#__PURE__*/React.createElement(Text, {
139
126
  size: "x-small",
140
- weight: "bold",
127
+ weight: "400",
141
128
  color: "danger"
142
- }, analysisError)))));
129
+ }, analysisError)));
130
+ };
131
+
132
+ _this.renderRightSide = function () {
133
+ return /*#__PURE__*/React.createElement(Flex, {
134
+ alignItems: "center",
135
+ justifyItems: "space-between",
136
+ width: "auto",
137
+ direction: "row",
138
+ wrap: "wrap-reverse"
139
+ }, /*#__PURE__*/React.createElement(Flex.Item, {
140
+ padding: "0 small 0 0",
141
+ margin: "0 0 0 auto"
142
+ }, _this.renderUpdateDateWithError()), /*#__PURE__*/React.createElement(Flex.Item, {
143
+ margin: "0 0 0 auto"
144
+ }, _this.renderGenerationButton()));
145
+ };
146
+
147
+ _this.renderTop = function () {
148
+ return /*#__PURE__*/React.createElement(Flex, {
149
+ justifyItems: "space-between",
150
+ alignItems: "center",
151
+ wrap: "wrap",
152
+ width: "auto",
153
+ margin: "0 auto small 0",
154
+ direction: "row"
155
+ }, /*#__PURE__*/React.createElement(Flex.Item, null, _this.renderHeader()), /*#__PURE__*/React.createElement(Flex.Item, null, _this.renderRightSide()));
143
156
  };
144
157
 
145
158
  _this.renderTopOnFailedFetch = function () {
@@ -157,7 +170,7 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
157
170
  return /*#__PURE__*/React.createElement(Button, {
158
171
  color: "primary-inverse",
159
172
  interaction: "disabled",
160
- margin: "0 0 x-small 0"
173
+ margin: "auto"
161
174
  }, /*#__PURE__*/React.createElement(QuizzesSpinner, {
162
175
  size: "x-small",
163
176
  color: "brand",
@@ -170,7 +183,7 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
170
183
  _this.renderStartGenerationButton = function () {
171
184
  return /*#__PURE__*/React.createElement(Button, {
172
185
  color: "secondary",
173
- margin: "0 0 x-small 0",
186
+ margin: "auto",
174
187
  onClick: _this.handleGeneration,
175
188
  theme: {
176
189
  lineHeight: '24px'
@@ -29,6 +29,8 @@ var _matchingTypeOrderer = _interopRequireDefault(require("./utils/matchingTypeO
29
29
 
30
30
  var _presenter = require("../shared/AfsPartsContainer/presenter.js");
31
31
 
32
+ var _index3 = _interopRequireDefault(require("../shared/AggregationTable/index.js"));
33
+
32
34
  var MatchingType = /*#__PURE__*/function (_Component) {
33
35
  (0, _inherits2.default)(MatchingType, _Component);
34
36
 
@@ -66,6 +68,10 @@ var MatchingType = /*#__PURE__*/function (_Component) {
66
68
  answerSummary: answerSummary,
67
69
  orderedAnswerKeys: orderedAnswerKeys,
68
70
  orderedQuestionKeys: orderedQuestionKeys
71
+ }),
72
+ aggregationTable: /*#__PURE__*/_react.default.createElement(_index3.default, {
73
+ itemId: itemId,
74
+ answerSummary: answerSummary
69
75
  })
70
76
  }));
71
77
  };
@@ -126,7 +126,7 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
126
126
  return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
127
127
  alignItems: "center",
128
128
  width: "auto",
129
- margin: "auto",
129
+ margin: "small auto",
130
130
  direction: "column"
131
131
  }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
132
132
  overflowY: "hidden"
@@ -140,37 +140,50 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
140
140
  }, quizAnalysis === null || quizAnalysis === void 0 ? void 0 : (_quizAnalysis$metadat = quizAnalysis.metadata) === null || _quizAnalysis$metadat === void 0 ? void 0 : _quizAnalysis$metadat.quiz_title)));
141
141
  };
142
142
 
143
- _this.renderTop = function () {
143
+ _this.renderUpdateDateWithError = function () {
144
144
  var _this$props = _this.props,
145
145
  analysisError = _this$props.analysisError,
146
146
  generationInProgress = _this$props.generationInProgress,
147
147
  quizAnalysis = _this$props.quizAnalysis;
148
148
  var shouldShowError = analysisError && !generationInProgress;
149
149
  return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
150
- justifyItems: "space-between",
151
- alignItems: "center",
152
- wrap: "wrap",
153
- width: "auto",
154
- margin: "auto",
155
- direction: "row"
156
- }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, _this.renderHeader()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
157
- margin: "0 0 0 auto"
158
- }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
159
- alignItems: "center",
160
- justifyItems: "end",
150
+ alignItems: "end",
161
151
  width: "auto",
162
- direction: "row",
163
- wrap: "wrap-reverse"
152
+ margin: "small auto",
153
+ direction: "column"
164
154
  }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_index3.AnalysisUpdateDate, {
165
155
  date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
166
- })), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
167
- overflowY: "visible",
168
- margin: "0 0 0 small"
169
- }, _this.renderGenerationButton()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, shouldShowError && /*#__PURE__*/_react.default.createElement(_uiText.Text, {
156
+ })), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, shouldShowError && /*#__PURE__*/_react.default.createElement(_uiText.Text, {
170
157
  size: "x-small",
171
- weight: "bold",
158
+ weight: "400",
172
159
  color: "danger"
173
- }, analysisError)))));
160
+ }, analysisError)));
161
+ };
162
+
163
+ _this.renderRightSide = function () {
164
+ return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
165
+ alignItems: "center",
166
+ justifyItems: "space-between",
167
+ width: "auto",
168
+ direction: "row",
169
+ wrap: "wrap-reverse"
170
+ }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
171
+ padding: "0 small 0 0",
172
+ margin: "0 0 0 auto"
173
+ }, _this.renderUpdateDateWithError()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
174
+ margin: "0 0 0 auto"
175
+ }, _this.renderGenerationButton()));
176
+ };
177
+
178
+ _this.renderTop = function () {
179
+ return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
180
+ justifyItems: "space-between",
181
+ alignItems: "center",
182
+ wrap: "wrap",
183
+ width: "auto",
184
+ margin: "0 auto small 0",
185
+ direction: "row"
186
+ }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, _this.renderHeader()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, _this.renderRightSide()));
174
187
  };
175
188
 
176
189
  _this.renderTopOnFailedFetch = function () {
@@ -188,7 +201,7 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
188
201
  return /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
189
202
  color: "primary-inverse",
190
203
  interaction: "disabled",
191
- margin: "0 0 x-small 0"
204
+ margin: "auto"
192
205
  }, /*#__PURE__*/_react.default.createElement(_Spinner.QuizzesSpinner, {
193
206
  size: "x-small",
194
207
  color: "brand",
@@ -201,7 +214,7 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
201
214
  _this.renderStartGenerationButton = function () {
202
215
  return /*#__PURE__*/_react.default.createElement(_uiButtons.Button, {
203
216
  color: "secondary",
204
- margin: "0 0 x-small 0",
217
+ margin: "auto",
205
218
  onClick: _this.handleGeneration,
206
219
  theme: {
207
220
  lineHeight: '24px'
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "18.6.0",
3
+ "version": "18.6.1-rc.1+dc5d4d2c0",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -43,11 +43,11 @@
43
43
  "dependencies": {
44
44
  "@instructure/grading-utils": "^1.0.0",
45
45
  "@instructure/outcomes-ui": "^2.1.9",
46
- "@instructure/quiz-common": "^18.6.0",
47
- "@instructure/quiz-i18n": "^18.6.0",
48
- "@instructure/quiz-interactions": "^18.6.0",
49
- "@instructure/quiz-number-input": "^18.6.0",
50
- "@instructure/quiz-rce": "^18.6.0",
46
+ "@instructure/quiz-common": "18.6.1-rc.1+dc5d4d2c0",
47
+ "@instructure/quiz-i18n": "18.6.1-rc.1+dc5d4d2c0",
48
+ "@instructure/quiz-interactions": "18.6.1-rc.1+dc5d4d2c0",
49
+ "@instructure/quiz-number-input": "18.6.1-rc.1+dc5d4d2c0",
50
+ "@instructure/quiz-rce": "18.6.1-rc.1+dc5d4d2c0",
51
51
  "@instructure/ui-a11y-content": "^7.22.1",
52
52
  "@instructure/ui-alerts": "^7.22.1",
53
53
  "@instructure/ui-avatar": "^7.22.1",
@@ -109,7 +109,7 @@
109
109
  "file-saver": "~2.0.5",
110
110
  "humps": "^2.0.0",
111
111
  "immutable": "^3.8.1",
112
- "instructure-validations": "^18.6.0",
112
+ "instructure-validations": "18.6.1-rc.1+dc5d4d2c0",
113
113
  "ipaddr.js": "^1.5.4",
114
114
  "isomorphic-fetch": "^2.2.0",
115
115
  "isuuid": "^0.1.0",
@@ -141,7 +141,7 @@
141
141
  "uuid": "^3.2.1"
142
142
  },
143
143
  "devDependencies": {
144
- "@instructure/quiz-scripts": "^18.6.0",
144
+ "@instructure/quiz-scripts": "18.6.0",
145
145
  "@instructure/ui-axe-check": "^7.22.1",
146
146
  "@instructure/ui-babel-preset": "^7.22.1",
147
147
  "@instructure/ui-karma-config": "^7.22.1",
@@ -160,7 +160,7 @@
160
160
  "intl": "^1.2.4",
161
161
  "jquery": "^2.2.3",
162
162
  "most-subject": "^5.3.0",
163
- "quiz-presets": "^18.6.0",
163
+ "quiz-presets": "18.6.1-rc.1+dc5d4d2c0",
164
164
  "react": "^16.8.6",
165
165
  "react-addons-test-utils": "^15.6.2",
166
166
  "react-dom": "^16.8.6",
@@ -176,5 +176,5 @@
176
176
  "publishConfig": {
177
177
  "access": "public"
178
178
  },
179
- "gitHead": "dddcaa8802c8344705537cacfbc0b9638c25be4c"
179
+ "gitHead": "dc5d4d2c0e6ae7225236cbb8a9826620f07b8441"
180
180
  }