@instructure/quiz-core 17.66.2-rc.7 → 17.66.2-rc.9

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.
@@ -12,20 +12,21 @@ import t from '@instructure/quiz-i18n/es/format-message';
12
12
  import { Text } from '@instructure/ui-text';
13
13
  import { Link } from '@instructure/ui-link';
14
14
  import { Flex } from '@instructure/ui-flex';
15
+ import { ScreenReaderContent } from '@instructure/ui-a11y-content';
15
16
  import { themeable } from '@instructure/ui-themeable';
16
17
  import Card from "../../../../../common/components/shared/Card/index.js";
17
18
  var styles = {
18
- componentId: 'dUUqF',
19
+ componentId: 'bLTgQ',
19
20
  template: function template(theme) {
20
- return "\n\n.dUUqF_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', "}\n\n.dUUqF_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.dUUqF_dJIh{height:").concat(theme.cardHeight || 'inherit', "}\n\n.dUUqF_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.dUUqF_blRb{max-width:160px;padding-right:10px}\n\n.dUUqF_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.dUUqF_dKIc{padding-bottom:15px}");
21
+ return "\n\n.bLTgQ_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', ";row-gap:8px}\n\n.bLTgQ_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.bLTgQ_dJIh{height:").concat(theme.cardHeight || 'inherit', "}\n\n.bLTgQ_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.bLTgQ_blRb{max-width:160px;padding-right:10px}\n\n.bLTgQ_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.bLTgQ_dKIc{padding-bottom:15px}\n\n@media only screen and (max-width:25rem){.bLTgQ_dJIh{height:auto}.bLTgQ_PFlN{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}.bLTgQ_bqdH{flex-wrap:wrap}}");
21
22
  },
22
- 'metricsContainer': 'dUUqF_bqdH',
23
- 'reportCard': 'dUUqF_PFlN',
24
- 'emptyReportCard': 'dUUqF_dJIh',
25
- 'emptyCardBodyContainer': 'dUUqF_eWEX',
26
- 'dateContainer': 'dUUqF_blRb',
27
- 'quizAnalysisSummary': 'dUUqF_bxzy',
28
- 'titleContainer': 'dUUqF_dKIc'
23
+ 'metricsContainer': 'bLTgQ_bqdH',
24
+ 'reportCard': 'bLTgQ_PFlN',
25
+ 'emptyReportCard': 'bLTgQ_dJIh',
26
+ 'emptyCardBodyContainer': 'bLTgQ_eWEX',
27
+ 'dateContainer': 'bLTgQ_blRb',
28
+ 'quizAnalysisSummary': 'bLTgQ_bxzy',
29
+ 'titleContainer': 'bLTgQ_dKIc'
29
30
  };
30
31
  import theme from "./theme.js";
31
32
  import classnames from 'classnames';
@@ -96,8 +97,9 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
96
97
  multiline: true
97
98
  })), quizAnalysis && itemAnalyses && /*#__PURE__*/React.createElement(Link, {
98
99
  href: href
99
- }, /*#__PURE__*/React.createElement(Text, {
100
- size: "small"
100
+ }, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('View Quiz and Item Analysis Report')), /*#__PURE__*/React.createElement(Text, {
101
+ size: "small",
102
+ "aria-hidden": "true"
101
103
  }, t('View Report')))));
102
104
  };
103
105
 
@@ -115,6 +117,16 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
115
117
  }))));
116
118
  };
117
119
 
120
+ _this.renderGenerateReportButton = function () {
121
+ return /*#__PURE__*/React.createElement(Link, {
122
+ onClick: _this.handleGeneration,
123
+ role: "button"
124
+ }, /*#__PURE__*/React.createElement(ScreenReaderContent, null, t('Generate Quiz and Item Analysis Report')), /*#__PURE__*/React.createElement(Text, {
125
+ size: "small",
126
+ "aria-hidden": "true"
127
+ }, t('Generate Report')));
128
+ };
129
+
118
130
  _this.renderReportCardFooter = function () {
119
131
  var _this$props2 = _this.props,
120
132
  generationInProgress = _this$props2.generationInProgress,
@@ -125,18 +137,15 @@ export var NewQuizAndItemAnalysisReportCardPresenter = (_dec = themeable(theme,
125
137
  direction: "row",
126
138
  justifyItems: "space-between"
127
139
  }, /*#__PURE__*/React.createElement(Flex.Item, {
128
- shouldShrink: true
140
+ shouldShrink: true,
141
+ size: analysisError && !generationInProgress ? '40%' : null
129
142
  }, analysisError && !generationInProgress && /*#__PURE__*/React.createElement(Text, {
130
143
  size: "x-small",
131
- lineHeight: "fit",
132
144
  weight: "bold",
133
145
  color: "danger"
134
- }, analysisError)), /*#__PURE__*/React.createElement(Flex.Item, null, generationInProgress ? _this.renderSpinner(t('Generation In Progress')) : /*#__PURE__*/React.createElement(Link, {
135
- onClick: _this.handleGeneration,
136
- role: "button"
137
- }, /*#__PURE__*/React.createElement(Text, {
138
- size: "small"
139
- }, t('Generate Report'))))));
146
+ }, analysisError)), /*#__PURE__*/React.createElement(Flex.Item, {
147
+ shouldShrink: analysisError && !generationInProgress
148
+ }, generationInProgress ? _this.renderSpinner(t('Generation In Progress')) : _this.renderGenerateReportButton())));
140
149
  };
141
150
 
142
151
  return _this;
@@ -12,12 +12,12 @@ import { Link } from '@instructure/ui-link';
12
12
  import { themeable } from '@instructure/ui-themeable';
13
13
  import Card from "../../../../common/components/shared/Card/index.js";
14
14
  var styles = {
15
- componentId: 'eRzKS',
15
+ componentId: 'cLHes',
16
16
  template: function template(theme) {
17
- return "\n\n.eRzKS_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.eRzKS_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}");
17
+ return "\n\n.cLHes_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.cLHes_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}\n\n@media only screen and (max-width:25rem){.cLHes_fbIL{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}}");
18
18
  },
19
- 'card': 'eRzKS_fbIL',
20
- 'details': 'eRzKS_ebWM'
19
+ 'card': 'cLHes_fbIL',
20
+ 'details': 'cLHes_ebWM'
21
21
  };
22
22
  import theme from "./theme.js";
23
23
  import { Flex } from '@instructure/ui-flex';
@@ -31,6 +31,8 @@ var _uiLink = require("@instructure/ui-link");
31
31
 
32
32
  var _uiFlex = require("@instructure/ui-flex");
33
33
 
34
+ var _uiA11yContent = require("@instructure/ui-a11y-content");
35
+
34
36
  var _uiThemeable = require("@instructure/ui-themeable");
35
37
 
36
38
  var _index = _interopRequireDefault(require("../../../../../common/components/shared/Card/index.js"));
@@ -50,17 +52,17 @@ var _propTypes2 = require("../propTypes.js");
50
52
  var _dec, _class, _class2, _temp;
51
53
 
52
54
  var styles = {
53
- componentId: 'dUUqF',
55
+ componentId: 'bLTgQ',
54
56
  template: function template(theme) {
55
- return "\n\n.dUUqF_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', "}\n\n.dUUqF_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.dUUqF_dJIh{height:").concat(theme.cardHeight || 'inherit', "}\n\n.dUUqF_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.dUUqF_blRb{max-width:160px;padding-right:10px}\n\n.dUUqF_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.dUUqF_dKIc{padding-bottom:15px}");
57
+ return "\n\n.bLTgQ_bqdH{column-gap:5px;display:flex;justify-content:space-between;padding-bottom:".concat(theme.metricsPadding || 'inherit', ";row-gap:8px}\n\n.bLTgQ_PFlN{border-radius:").concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.bLTgQ_dJIh{height:").concat(theme.cardHeight || 'inherit', "}\n\n.bLTgQ_eWEX{align-items:flex-end;align-self:flex-end;display:flex;height:100%;justify-content:flex-end}\n\n.bLTgQ_blRb{max-width:160px;padding-right:10px}\n\n.bLTgQ_bxzy{border-bottom:1px solid ").concat(theme.quizSummaryBorderBottomColor || 'inherit', ";margin-bottom:15px;padding-bottom:15px}\n\n.bLTgQ_dKIc{padding-bottom:15px}\n\n@media only screen and (max-width:25rem){.bLTgQ_dJIh{height:auto}.bLTgQ_PFlN{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}.bLTgQ_bqdH{flex-wrap:wrap}}");
56
58
  },
57
- 'metricsContainer': 'dUUqF_bqdH',
58
- 'reportCard': 'dUUqF_PFlN',
59
- 'emptyReportCard': 'dUUqF_dJIh',
60
- 'emptyCardBodyContainer': 'dUUqF_eWEX',
61
- 'dateContainer': 'dUUqF_blRb',
62
- 'quizAnalysisSummary': 'dUUqF_bxzy',
63
- 'titleContainer': 'dUUqF_dKIc'
59
+ 'metricsContainer': 'bLTgQ_bqdH',
60
+ 'reportCard': 'bLTgQ_PFlN',
61
+ 'emptyReportCard': 'bLTgQ_dJIh',
62
+ 'emptyCardBodyContainer': 'bLTgQ_eWEX',
63
+ 'dateContainer': 'bLTgQ_blRb',
64
+ 'quizAnalysisSummary': 'bLTgQ_bxzy',
65
+ 'titleContainer': 'bLTgQ_dKIc'
64
66
  };
65
67
  var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
66
68
  (0, _inherits2.default)(NewQuizAndItemAnalysisReportCardPresenter, _Component);
@@ -125,8 +127,9 @@ var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeab
125
127
  multiline: true
126
128
  })), quizAnalysis && itemAnalyses && /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
127
129
  href: href
128
- }, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
129
- size: "small"
130
+ }, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('View Quiz and Item Analysis Report')), /*#__PURE__*/_react.default.createElement(_uiText.Text, {
131
+ size: "small",
132
+ "aria-hidden": "true"
130
133
  }, (0, _formatMessage.default)('View Report')))));
131
134
  };
132
135
 
@@ -144,6 +147,16 @@ var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeab
144
147
  }))));
145
148
  };
146
149
 
150
+ _this.renderGenerateReportButton = function () {
151
+ return /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
152
+ onClick: _this.handleGeneration,
153
+ role: "button"
154
+ }, /*#__PURE__*/_react.default.createElement(_uiA11yContent.ScreenReaderContent, null, (0, _formatMessage.default)('Generate Quiz and Item Analysis Report')), /*#__PURE__*/_react.default.createElement(_uiText.Text, {
155
+ size: "small",
156
+ "aria-hidden": "true"
157
+ }, (0, _formatMessage.default)('Generate Report')));
158
+ };
159
+
147
160
  _this.renderReportCardFooter = function () {
148
161
  var _this$props2 = _this.props,
149
162
  generationInProgress = _this$props2.generationInProgress,
@@ -154,18 +167,15 @@ var NewQuizAndItemAnalysisReportCardPresenter = (_dec = (0, _uiThemeable.themeab
154
167
  direction: "row",
155
168
  justifyItems: "space-between"
156
169
  }, /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
157
- shouldShrink: true
170
+ shouldShrink: true,
171
+ size: analysisError && !generationInProgress ? '40%' : null
158
172
  }, analysisError && !generationInProgress && /*#__PURE__*/_react.default.createElement(_uiText.Text, {
159
173
  size: "x-small",
160
- lineHeight: "fit",
161
174
  weight: "bold",
162
175
  color: "danger"
163
- }, analysisError)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, null, generationInProgress ? _this.renderSpinner((0, _formatMessage.default)('Generation In Progress')) : /*#__PURE__*/_react.default.createElement(_uiLink.Link, {
164
- onClick: _this.handleGeneration,
165
- role: "button"
166
- }, /*#__PURE__*/_react.default.createElement(_uiText.Text, {
167
- size: "small"
168
- }, (0, _formatMessage.default)('Generate Report'))))));
176
+ }, analysisError)), /*#__PURE__*/_react.default.createElement(_uiFlex.Flex.Item, {
177
+ shouldShrink: analysisError && !generationInProgress
178
+ }, generationInProgress ? _this.renderSpinner((0, _formatMessage.default)('Generation In Progress')) : _this.renderGenerateReportButton())));
169
179
  };
170
180
 
171
181
  return _this;
@@ -38,12 +38,12 @@ var _formatMessage = _interopRequireDefault(require("@instructure/quiz-i18n/es/f
38
38
  var _dec, _class, _class2, _temp;
39
39
 
40
40
  var styles = {
41
- componentId: 'eRzKS',
41
+ componentId: 'cLHes',
42
42
  template: function template(theme) {
43
- return "\n\n.eRzKS_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.eRzKS_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}");
43
+ return "\n\n.cLHes_fbIL{border-radius:".concat(theme.cardBorderRadius || 'inherit', ";box-shadow:").concat(theme.cardBoxShadow || 'inherit', ";display:inline-flex;flex-direction:column;height:").concat(theme.cardHeight || 'inherit', ";margin:").concat(theme.cardMargin || 'inherit', ";padding:").concat(theme.cardPadding || 'inherit', ";width:").concat(theme.cardWidth || 'inherit', "}\n\n.cLHes_ebWM{padding-top:").concat(theme.detailPadding || 'inherit', "}\n\n@media only screen and (max-width:25rem){.cLHes_fbIL{max-width:").concat(theme.cardWidth || 'inherit', ";width:auto}}");
44
44
  },
45
- 'card': 'eRzKS_fbIL',
46
- 'details': 'eRzKS_ebWM'
45
+ 'card': 'cLHes_fbIL',
46
+ 'details': 'cLHes_ebWM'
47
47
  };
48
48
  var ReportCard = (_dec = (0, _uiThemeable.themeable)(_theme.default, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
49
49
  (0, _inherits2.default)(ReportCard, _Component);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instructure/quiz-core",
3
- "version": "17.66.2-rc.7+a7d0e14f3",
3
+ "version": "17.66.2-rc.9+bc778cc52",
4
4
  "license": "MIT",
5
5
  "description": "The Quiz React SDK by Instructure Inc.",
6
6
  "author": "Instructure, Inc. Engineering and Product Design",
@@ -42,11 +42,11 @@
42
42
  "dependencies": {
43
43
  "@instructure/grading-utils": "^1.0.0",
44
44
  "@instructure/outcomes-ui": "^2.1.9",
45
- "@instructure/quiz-common": "17.66.2-rc.7+a7d0e14f3",
46
- "@instructure/quiz-i18n": "17.66.2-rc.7+a7d0e14f3",
47
- "@instructure/quiz-interactions": "17.66.2-rc.7+a7d0e14f3",
48
- "@instructure/quiz-number-input": "17.66.2-rc.7+a7d0e14f3",
49
- "@instructure/quiz-rce": "17.66.2-rc.7+a7d0e14f3",
45
+ "@instructure/quiz-common": "17.66.2-rc.9+bc778cc52",
46
+ "@instructure/quiz-i18n": "17.66.2-rc.9+bc778cc52",
47
+ "@instructure/quiz-interactions": "17.66.2-rc.9+bc778cc52",
48
+ "@instructure/quiz-number-input": "17.66.2-rc.9+bc778cc52",
49
+ "@instructure/quiz-rce": "17.66.2-rc.9+bc778cc52",
50
50
  "@instructure/ui-a11y-content": "^7.20.0",
51
51
  "@instructure/ui-alerts": "^7.20.0",
52
52
  "@instructure/ui-avatar": "^7.20.0",
@@ -107,7 +107,7 @@
107
107
  "eventemitter3": "^3.1.0",
108
108
  "humps": "^2.0.0",
109
109
  "immutable": "^3.8.1",
110
- "instructure-validations": "17.66.2-rc.7+a7d0e14f3",
110
+ "instructure-validations": "17.66.2-rc.9+bc778cc52",
111
111
  "ipaddr.js": "^1.5.4",
112
112
  "isomorphic-fetch": "^2.2.0",
113
113
  "isuuid": "^0.1.0",
@@ -158,7 +158,7 @@
158
158
  "intl": "^1.2.4",
159
159
  "jquery": "^2.2.3",
160
160
  "most-subject": "^5.3.0",
161
- "quiz-presets": "17.66.2-rc.7+a7d0e14f3",
161
+ "quiz-presets": "17.66.2-rc.9+bc778cc52",
162
162
  "react": "^16.8.6",
163
163
  "react-addons-test-utils": "^15.6.2",
164
164
  "react-dom": "^16.8.6",
@@ -174,5 +174,5 @@
174
174
  "publishConfig": {
175
175
  "access": "public"
176
176
  },
177
- "gitHead": "a7d0e14f3ffee5f0fc19771ed42fd1d4eeac2e53"
177
+ "gitHead": "bc778cc52a3014879810e06942393d6772f0ccb7"
178
178
  }