@instructure/quiz-core 18.4.1-rc.5 → 18.4.1-rc.7

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.
@@ -108,7 +108,7 @@ export var NewItemAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
108
108
 
109
109
  _this.renderInteractionType = function (interactionType) {
110
110
  return /*#__PURE__*/React.createElement(Text, {
111
- size: "small",
111
+ size: "medium",
112
112
  weight: "bold",
113
113
  transform: "capitalize"
114
114
  }, _this.mapInteractionTypeToTranslation(interactionType));
@@ -5,7 +5,6 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
5
5
 
6
6
  var _dec, _class, _class2, _temp;
7
7
 
8
- import { Heading } from '@instructure/ui-heading';
9
8
  import React, { Component } from 'react';
10
9
  var styles = {
11
10
  componentId: 'eHqQt',
@@ -80,21 +79,11 @@ export var NewQuizAnalysis = (_dec = themeable(theme, styles), _dec(_class = (_t
80
79
  _this.renderContent = function () {
81
80
  var quizAnalysis = _this.props.quizAnalysis;
82
81
  var scores = quizAnalysis.scores,
83
- attempts = quizAnalysis.attempts,
84
- metadata = quizAnalysis.metadata;
82
+ attempts = quizAnalysis.attempts;
85
83
  var expanded = _this.state.expanded;
86
84
  return /*#__PURE__*/React.createElement(Card, {
87
85
  className: styles.cardWrapper
88
86
  }, /*#__PURE__*/React.createElement("div", {
89
- className: styles.heading
90
- }, /*#__PURE__*/React.createElement(Heading, {
91
- level: "h2",
92
- theme: {
93
- h2FontWeight: 700
94
- },
95
- margin: "0 x-large 0 0",
96
- color: "primary"
97
- }, t('Quiz summary:'), " ", metadata === null || metadata === void 0 ? void 0 : metadata.quiz_title)), /*#__PURE__*/React.createElement("div", {
98
87
  className: styles.metricGroup
99
88
  }, /*#__PURE__*/React.createElement("div", {
100
89
  className: styles.metricsWrapper
@@ -47,6 +47,9 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
47
47
  var itemAnalyses = _this.props.itemAnalyses || [];
48
48
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Heading, {
49
49
  level: "h2",
50
+ theme: {
51
+ h2FontWeight: 700
52
+ },
50
53
  color: "primary"
51
54
  }, t('Item Analysis')), /*#__PURE__*/React.createElement("div", null, itemAnalyses.map(function (itemAnalysis) {
52
55
  return /*#__PURE__*/React.createElement(NewItemAnalysis, {
@@ -85,6 +88,27 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
85
88
  }, getFailedToFetchReports())));
86
89
  };
87
90
 
91
+ _this.renderHeader = function () {
92
+ var _quizAnalysis$metadat;
93
+
94
+ var quizAnalysis = _this.props.quizAnalysis;
95
+ return /*#__PURE__*/React.createElement(Flex, {
96
+ alignItems: "center",
97
+ width: "auto",
98
+ margin: "auto",
99
+ direction: "column"
100
+ }, /*#__PURE__*/React.createElement(Flex.Item, {
101
+ overflowY: "hidden"
102
+ }, /*#__PURE__*/React.createElement(Heading, {
103
+ level: "h2",
104
+ theme: {
105
+ h2FontWeight: 700
106
+ },
107
+ margin: "0 x-large 0 0",
108
+ color: "primary"
109
+ }, quizAnalysis === null || quizAnalysis === void 0 ? void 0 : (_quizAnalysis$metadat = quizAnalysis.metadata) === null || _quizAnalysis$metadat === void 0 ? void 0 : _quizAnalysis$metadat.quiz_title)));
110
+ };
111
+
88
112
  _this.renderTop = function () {
89
113
  var _this$props = _this.props,
90
114
  analysisError = _this$props.analysisError,
@@ -92,19 +116,28 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
92
116
  quizAnalysis = _this$props.quizAnalysis;
93
117
  var shouldShowError = analysisError && !generationInProgress;
94
118
  return /*#__PURE__*/React.createElement(Flex, {
95
- alignItems: "end",
96
- width: "82.5rem",
119
+ justifyItems: "space-between",
120
+ alignItems: "center",
121
+ wrap: "wrap",
122
+ width: "auto",
97
123
  margin: "auto",
98
- direction: "column"
124
+ direction: "row"
125
+ }, /*#__PURE__*/React.createElement(Flex.Item, null, _this.renderHeader()), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(Flex, {
126
+ alignItems: "center",
127
+ width: "auto",
128
+ margin: "auto",
129
+ direction: "row"
99
130
  }, /*#__PURE__*/React.createElement(Flex.Item, {
131
+ margin: "small"
132
+ }, /*#__PURE__*/React.createElement(AnalysisUpdateDate, {
133
+ date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
134
+ })), /*#__PURE__*/React.createElement(Flex.Item, {
100
135
  overflowY: "visible"
101
136
  }, _this.renderGenerationButton()), /*#__PURE__*/React.createElement(Flex.Item, null, shouldShowError && /*#__PURE__*/React.createElement(Text, {
102
137
  size: "x-small",
103
138
  weight: "bold",
104
139
  color: "danger"
105
- }, analysisError)), /*#__PURE__*/React.createElement(Flex.Item, null, /*#__PURE__*/React.createElement(AnalysisUpdateDate, {
106
- date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
107
- })));
140
+ }, analysisError)))));
108
141
  };
109
142
 
110
143
  _this.renderTopOnFailedFetch = function () {
@@ -148,10 +181,7 @@ export var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component)
148
181
  _this.renderGenerationButton = function () {
149
182
  var generationInProgress = _this.props.generationInProgress;
150
183
  var buttonVariant = generationInProgress ? _this.renderOngoingGenerationButton() : _this.renderStartGenerationButton();
151
- return /*#__PURE__*/React.createElement(Flex.Item, {
152
- align: "end",
153
- padding: "xx-small"
154
- }, buttonVariant);
184
+ return /*#__PURE__*/React.createElement(React.Fragment, null, buttonVariant);
155
185
  };
156
186
 
157
187
  _this.renderBody = function () {
@@ -143,7 +143,7 @@ var NewItemAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
143
143
 
144
144
  _this.renderInteractionType = function (interactionType) {
145
145
  return /*#__PURE__*/_react.default.createElement(_uiText.Text, {
146
- size: "small",
146
+ size: "medium",
147
147
  weight: "bold",
148
148
  transform: "capitalize"
149
149
  }, _this.mapInteractionTypeToTranslation(interactionType));
@@ -17,8 +17,6 @@ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits
17
17
 
18
18
  var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
19
19
 
20
- var _uiHeading = require("@instructure/ui-heading");
21
-
22
20
  var _react = _interopRequireWildcard(require("react"));
23
21
 
24
22
  var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/format-message"));
@@ -109,21 +107,11 @@ var NewQuizAnalysis = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles
109
107
  _this.renderContent = function () {
110
108
  var quizAnalysis = _this.props.quizAnalysis;
111
109
  var scores = quizAnalysis.scores,
112
- attempts = quizAnalysis.attempts,
113
- metadata = quizAnalysis.metadata;
110
+ attempts = quizAnalysis.attempts;
114
111
  var expanded = _this.state.expanded;
115
112
  return /*#__PURE__*/_react.default.createElement(_index2.default, {
116
113
  className: styles.cardWrapper
117
114
  }, /*#__PURE__*/_react.default.createElement("div", {
118
- className: styles.heading
119
- }, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
120
- level: "h2",
121
- theme: {
122
- h2FontWeight: 700
123
- },
124
- margin: "0 x-large 0 0",
125
- color: "primary"
126
- }, (0, _formatMessage.default)('Quiz summary:'), " ", metadata === null || metadata === void 0 ? void 0 : metadata.quiz_title)), /*#__PURE__*/_react.default.createElement("div", {
127
115
  className: styles.metricGroup
128
116
  }, /*#__PURE__*/_react.default.createElement("div", {
129
117
  className: styles.metricsWrapper
@@ -78,6 +78,9 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
78
78
  var itemAnalyses = _this.props.itemAnalyses || [];
79
79
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
80
80
  level: "h2",
81
+ theme: {
82
+ h2FontWeight: 700
83
+ },
81
84
  color: "primary"
82
85
  }, (0, _formatMessage.default)('Item Analysis')), /*#__PURE__*/_react.default.createElement("div", null, itemAnalyses.map(function (itemAnalysis) {
83
86
  return /*#__PURE__*/_react.default.createElement(_index.default, {
@@ -116,6 +119,27 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
116
119
  }, (0, _errorMessages.getFailedToFetchReports)())));
117
120
  };
118
121
 
122
+ _this.renderHeader = function () {
123
+ var _quizAnalysis$metadat;
124
+
125
+ var quizAnalysis = _this.props.quizAnalysis;
126
+ return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
127
+ alignItems: "center",
128
+ width: "auto",
129
+ margin: "auto",
130
+ direction: "column"
131
+ }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
132
+ overflowY: "hidden"
133
+ }, /*#__PURE__*/_react.default.createElement(_uiHeading.Heading, {
134
+ level: "h2",
135
+ theme: {
136
+ h2FontWeight: 700
137
+ },
138
+ margin: "0 x-large 0 0",
139
+ color: "primary"
140
+ }, quizAnalysis === null || quizAnalysis === void 0 ? void 0 : (_quizAnalysis$metadat = quizAnalysis.metadata) === null || _quizAnalysis$metadat === void 0 ? void 0 : _quizAnalysis$metadat.quiz_title)));
141
+ };
142
+
119
143
  _this.renderTop = function () {
120
144
  var _this$props = _this.props,
121
145
  analysisError = _this$props.analysisError,
@@ -123,19 +147,28 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
123
147
  quizAnalysis = _this$props.quizAnalysis;
124
148
  var shouldShowError = analysisError && !generationInProgress;
125
149
  return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
126
- alignItems: "end",
127
- width: "82.5rem",
150
+ justifyItems: "space-between",
151
+ alignItems: "center",
152
+ wrap: "wrap",
153
+ width: "auto",
128
154
  margin: "auto",
129
- direction: "column"
155
+ direction: "row"
156
+ }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, _this.renderHeader()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex, {
157
+ alignItems: "center",
158
+ width: "auto",
159
+ margin: "auto",
160
+ direction: "row"
130
161
  }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
162
+ margin: "small"
163
+ }, /*#__PURE__*/_react.default.createElement(_index3.AnalysisUpdateDate, {
164
+ date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
165
+ })), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
131
166
  overflowY: "visible"
132
167
  }, _this.renderGenerationButton()), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, shouldShowError && /*#__PURE__*/_react.default.createElement(_uiText.Text, {
133
168
  size: "x-small",
134
169
  weight: "bold",
135
170
  color: "danger"
136
- }, analysisError)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, /*#__PURE__*/_react.default.createElement(_index3.AnalysisUpdateDate, {
137
- date: quizAnalysis === null || quizAnalysis === void 0 ? void 0 : quizAnalysis.created_timestamp
138
- })));
171
+ }, analysisError)))));
139
172
  };
140
173
 
141
174
  _this.renderTopOnFailedFetch = function () {
@@ -179,10 +212,7 @@ var NewQuizAndItemAnalysisPresenter = /*#__PURE__*/function (_Component) {
179
212
  _this.renderGenerationButton = function () {
180
213
  var generationInProgress = _this.props.generationInProgress;
181
214
  var buttonVariant = generationInProgress ? _this.renderOngoingGenerationButton() : _this.renderStartGenerationButton();
182
- return /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
183
- align: "end",
184
- padding: "xx-small"
185
- }, buttonVariant);
215
+ return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, buttonVariant);
186
216
  };
187
217
 
188
218
  _this.renderBody = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "18.4.1-rc.5+a0a425c5b",
3
+ "version": "18.4.1-rc.7+6b09e0af2",
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.4.1-rc.5+a0a425c5b",
47
- "@instructure/quiz-i18n": "18.4.1-rc.5+a0a425c5b",
48
- "@instructure/quiz-interactions": "18.4.1-rc.5+a0a425c5b",
49
- "@instructure/quiz-number-input": "18.4.1-rc.5+a0a425c5b",
50
- "@instructure/quiz-rce": "18.4.1-rc.5+a0a425c5b",
46
+ "@instructure/quiz-common": "18.4.1-rc.7+6b09e0af2",
47
+ "@instructure/quiz-i18n": "18.4.1-rc.7+6b09e0af2",
48
+ "@instructure/quiz-interactions": "18.4.1-rc.7+6b09e0af2",
49
+ "@instructure/quiz-number-input": "18.4.1-rc.7+6b09e0af2",
50
+ "@instructure/quiz-rce": "18.4.1-rc.7+6b09e0af2",
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",
@@ -108,7 +108,7 @@
108
108
  "eventemitter3": "^3.1.0",
109
109
  "humps": "^2.0.0",
110
110
  "immutable": "^3.8.1",
111
- "instructure-validations": "18.4.1-rc.5+a0a425c5b",
111
+ "instructure-validations": "18.4.1-rc.7+6b09e0af2",
112
112
  "ipaddr.js": "^1.5.4",
113
113
  "isomorphic-fetch": "^2.2.0",
114
114
  "isuuid": "^0.1.0",
@@ -159,7 +159,7 @@
159
159
  "intl": "^1.2.4",
160
160
  "jquery": "^2.2.3",
161
161
  "most-subject": "^5.3.0",
162
- "quiz-presets": "18.4.1-rc.5+a0a425c5b",
162
+ "quiz-presets": "18.4.1-rc.7+6b09e0af2",
163
163
  "react": "^16.8.6",
164
164
  "react-addons-test-utils": "^15.6.2",
165
165
  "react-dom": "^16.8.6",
@@ -175,5 +175,5 @@
175
175
  "publishConfig": {
176
176
  "access": "public"
177
177
  },
178
- "gitHead": "a0a425c5bac1436f7c55214617d7a82bd07221e5"
178
+ "gitHead": "6b09e0af249330b582c2a65b3a9f3f8926e53bd8"
179
179
  }