@instructure/quiz-core 20.11.2 → 20.11.3-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.
- package/es/common/components/layout/navbar/presenter.js +24 -18
- package/es/common/components/layout/navbar/styles.js +8 -0
- package/es/common/components/layout/navbar/theme.js +10 -0
- package/es/moderating/components/resources/ModerateTable/presenter.js +44 -46
- package/es/moderating/components/resources/ModerateTable/styles.js +23 -0
- package/es/moderating/components/resources/ModerateTable/theme.js +4 -2
- package/es/moderating/components/resources/ModerateTableRow/presenter.js +63 -68
- package/es/moderating/components/resources/ModerateTableRow/styles.js +25 -0
- package/es/moderating/components/resources/ModerateTableRow/theme.js +4 -2
- package/es/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +1 -1
- package/es/reporting/components/quizAnalysis/QuizAnalysisOverview.js +34 -41
- package/es/reporting/components/quizAnalysis/styles.js +27 -0
- package/es/reporting/components/quizAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +33 -27
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +14 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +1 -1
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +80 -79
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +75 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +4 -2
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +47 -49
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +14 -0
- package/es/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +4 -2
- package/lib/common/components/layout/navbar/presenter.js +26 -22
- package/lib/common/components/layout/navbar/styles.js +16 -0
- package/lib/common/components/layout/navbar/theme.js +18 -0
- package/lib/moderating/components/resources/ModerateTable/presenter.js +43 -50
- package/lib/moderating/components/resources/ModerateTable/styles.js +33 -0
- package/lib/moderating/components/resources/ModerateTable/theme.js +6 -3
- package/lib/moderating/components/resources/ModerateTableRow/presenter.js +61 -70
- package/lib/moderating/components/resources/ModerateTableRow/styles.js +33 -0
- package/lib/moderating/components/resources/ModerateTableRow/theme.js +6 -3
- package/lib/reporting/components/itemAnalysis/AnswerFrequencySummary/index.js +1 -1
- package/lib/reporting/components/quizAnalysis/QuizAnalysisOverview.js +33 -43
- package/lib/reporting/components/quizAnalysis/styles.js +37 -0
- package/lib/reporting/components/quizAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/LegacyChoiceType/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/ScoreDistributionType/Table/index.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/presenter.js +29 -27
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/styles.js +24 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AfsPartsContainer/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/AggregationTable/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/AnswerFrequencySummary/shared/ChoiceTypeTable/presenter.js +1 -1
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/presenter.js +82 -84
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/styles.js +85 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/NewItemAnalysis/theme.js +6 -3
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/presenter.js +43 -48
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/styles.js +22 -0
- package/lib/reporting/components/resources/NewQuizAndItemAnalysis/theme.js +6 -3
- package/package.json +10 -10
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
2
|
+
return {
|
|
3
|
+
moderateButton: {
|
|
4
|
+
float: 'right'
|
|
5
|
+
},
|
|
6
|
+
avatarRow: {
|
|
7
|
+
display: 'flex',
|
|
8
|
+
alignItems: 'center'
|
|
9
|
+
},
|
|
10
|
+
avatarName: {
|
|
11
|
+
marginLeft: componentTheme.avatarNameMargin,
|
|
12
|
+
overflow: 'hidden',
|
|
13
|
+
textOverflow: 'ellipsis',
|
|
14
|
+
whiteSpace: 'nowrap',
|
|
15
|
+
fontWeight: 'initial'
|
|
16
|
+
},
|
|
17
|
+
tableDataItem: {
|
|
18
|
+
':not(:first-child)': {
|
|
19
|
+
paddingTop: componentTheme.tableDataItemPadding
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export default generateStyle;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing;
|
|
3
3
|
return {
|
|
4
4
|
avatarNameMargin: spacing.xSmall,
|
|
5
5
|
tableDataItemPadding: spacing.xxSmall
|
|
6
6
|
};
|
|
7
|
-
}
|
|
7
|
+
};
|
|
8
|
+
|
|
9
|
+
export default generateComponentTheme;
|
|
@@ -149,7 +149,7 @@ export var AnswerFrequencySummary = (_dec = themeable(theme, styles), _dec(_clas
|
|
|
149
149
|
}, t('Respondents')), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
150
150
|
id: "answer-frequency-summary-answer-ratio",
|
|
151
151
|
className: styles.answerRatio
|
|
152
|
-
}, t('
|
|
152
|
+
}, t('Percentage')))), /*#__PURE__*/React.createElement(Table.Body, null, choiceInfo.toArray().map(this.renderAnswerTableRow), this.renderAnswerTableRow(this.unansweredChoiceInfo, choiceInfo.size))));
|
|
153
153
|
}
|
|
154
154
|
}]);
|
|
155
155
|
|
|
@@ -5,36 +5,28 @@ import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
+
/** @jsx jsx */
|
|
8
9
|
import React, { Component } from 'react';
|
|
9
10
|
import PropTypes from 'prop-types';
|
|
10
11
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
11
12
|
import { Heading } from '@instructure/ui-heading';
|
|
12
13
|
import { MetricGroup } from '@instructure/ui-metric';
|
|
13
14
|
import { Text } from '@instructure/ui-text';
|
|
14
|
-
import {
|
|
15
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
15
16
|
import FormattedDuration from "../../../common/components/shared/FormattedDuration/index.js";
|
|
16
17
|
import t from '@instructure/quiz-i18n/es/format-message';
|
|
17
18
|
import Card from "../../../common/components/shared/Card/index.js";
|
|
18
19
|
import Spinner from "../../../common/components/shared/spinner/Spinner.js";
|
|
19
20
|
import CentileDistribution from "../charts/CentileDistribution/index.js";
|
|
20
21
|
import MetricsListItem from "../MetricsListItem/index.js";
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
template: function template(theme) {
|
|
24
|
-
return "\n\n.fOAfX_bGBk{padding:".concat(theme.rootPadding || 'inherit', "}\n\n.fOAfX_CIyo{padding-bottom:").concat(theme.metricWrapperPadding || 'inherit', "}\n\n.fOAfX_CIyo,.fOAfX_gasz{margin-top:").concat(theme.wrapperMargin || 'inherit', "}\n\n@media screen and (--tabletBreakPoint){.fOAfX_eiMu{flex-basis:33.3%}}\n\n@media screen and (--phoneBreakPoint){.fOAfX_eiMu{flex-basis:50%}}");
|
|
25
|
-
},
|
|
26
|
-
'root': 'fOAfX_bGBk',
|
|
27
|
-
'metricWrapper': 'fOAfX_CIyo',
|
|
28
|
-
'wrapper': 'fOAfX_gasz',
|
|
29
|
-
'metric': 'fOAfX_eiMu'
|
|
30
|
-
};
|
|
31
|
-
import theme from "./theme.js";
|
|
22
|
+
import generateStyle from "./styles.js";
|
|
23
|
+
import generateComponentTheme from "./theme.js";
|
|
32
24
|
|
|
33
|
-
var _ref =
|
|
25
|
+
var _ref = jsx("br", null);
|
|
34
26
|
|
|
35
|
-
var _ref2 =
|
|
27
|
+
var _ref2 = jsx(Spinner, null);
|
|
36
28
|
|
|
37
|
-
export var QuizAnalysisOverview = (_dec =
|
|
29
|
+
export var QuizAnalysisOverview = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
38
30
|
_inherits(QuizAnalysisOverview, _Component);
|
|
39
31
|
|
|
40
32
|
var _super = _createSuper(QuizAnalysisOverview);
|
|
@@ -53,10 +45,10 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
53
45
|
_this.renderBatchTimestamp = function () {
|
|
54
46
|
if (_this.props.quizAnalysis.batchTimestamp) {
|
|
55
47
|
var timestamp = Date.parse(_this.props.quizAnalysis.batchTimestamp);
|
|
56
|
-
return
|
|
48
|
+
return jsx(Text, {
|
|
57
49
|
color: "secondary",
|
|
58
50
|
size: "x-small"
|
|
59
|
-
}, _ref,
|
|
51
|
+
}, _ref, jsx("b", null, t('Data Last Updated:')), "\xA0", t.date(timestamp, 'medium'));
|
|
60
52
|
}
|
|
61
53
|
};
|
|
62
54
|
|
|
@@ -67,47 +59,47 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
67
59
|
key: "defaulMetrics",
|
|
68
60
|
value: function defaulMetrics() {
|
|
69
61
|
var quizAnalysis = this.props.quizAnalysis;
|
|
70
|
-
var formattedElapsedTime =
|
|
62
|
+
var formattedElapsedTime = jsx(FormattedDuration, {
|
|
71
63
|
fontSize: "x-large",
|
|
72
64
|
seconds: quizAnalysis.meanElapsedTime()
|
|
73
65
|
});
|
|
74
|
-
return
|
|
66
|
+
return jsx(MetricGroup, null, jsx(MetricsListItem, {
|
|
75
67
|
key: "highScore",
|
|
76
68
|
renderLabel: t('High Score'),
|
|
77
69
|
renderValue: quizAnalysis.highScore(),
|
|
78
|
-
|
|
70
|
+
css: this.props.styles.metric,
|
|
79
71
|
isGroupChild: true
|
|
80
|
-
}),
|
|
72
|
+
}), jsx(MetricsListItem, {
|
|
81
73
|
key: "lowScore",
|
|
82
74
|
renderLabel: t('Low Score'),
|
|
83
75
|
renderValue: quizAnalysis.lowScore(),
|
|
84
|
-
|
|
76
|
+
css: this.props.styles.metric,
|
|
85
77
|
isGroupChild: true
|
|
86
|
-
}),
|
|
78
|
+
}), jsx(MetricsListItem, {
|
|
87
79
|
key: "meanScore",
|
|
88
80
|
renderLabel: t('Mean Score'),
|
|
89
81
|
renderValue: quizAnalysis.meanScore(),
|
|
90
|
-
|
|
82
|
+
css: this.props.styles.metric,
|
|
91
83
|
isGroupChild: true
|
|
92
|
-
}),
|
|
84
|
+
}), jsx(MetricsListItem, {
|
|
93
85
|
key: "standardDeviation",
|
|
94
86
|
renderLabel: t('Standard Deviation'),
|
|
95
87
|
renderValue: quizAnalysis.standardDeviation(),
|
|
96
|
-
|
|
88
|
+
css: this.props.styles.metric,
|
|
97
89
|
isGroupChild: true
|
|
98
|
-
}),
|
|
90
|
+
}), jsx(MetricsListItem, {
|
|
99
91
|
key: "meanElapsedTime",
|
|
100
92
|
renderLabel: t('Mean Elapsed Time'),
|
|
101
|
-
renderValue:
|
|
93
|
+
renderValue: jsx(Text, {
|
|
102
94
|
size: "x-large"
|
|
103
95
|
}, formattedElapsedTime),
|
|
104
|
-
|
|
96
|
+
css: this.props.styles.metric,
|
|
105
97
|
isGroupChild: true
|
|
106
|
-
}),
|
|
98
|
+
}), jsx(MetricsListItem, {
|
|
107
99
|
key: "cronbachsAlpha",
|
|
108
100
|
renderLabel: t('Cronbach\'s Alpha'),
|
|
109
101
|
renderValue: quizAnalysis.cronbachsAlpha(),
|
|
110
|
-
|
|
102
|
+
css: this.props.styles.metric,
|
|
111
103
|
isGroupChild: true
|
|
112
104
|
}));
|
|
113
105
|
}
|
|
@@ -120,18 +112,18 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
120
112
|
quizAnalysis = _this$props.quizAnalysis,
|
|
121
113
|
quizTitle = _this$props.quizTitle;
|
|
122
114
|
if (!quizAnalysis.isLoaded()) return _ref2;
|
|
123
|
-
var list = React.Children.count(this.props.children) === 0 ? this.defaulMetrics() :
|
|
124
|
-
return
|
|
125
|
-
|
|
126
|
-
},
|
|
115
|
+
var list = React.Children.count(this.props.children) === 0 ? this.defaulMetrics() : jsx(MetricGroup, null, this.props.children);
|
|
116
|
+
return jsx(Card, {
|
|
117
|
+
css: this.props.styles.root
|
|
118
|
+
}, jsx(Heading, {
|
|
127
119
|
level: "h4",
|
|
128
120
|
as: "h2",
|
|
129
121
|
color: "primary"
|
|
130
|
-
}, quizTitle),
|
|
131
|
-
|
|
132
|
-
}, list),
|
|
133
|
-
|
|
134
|
-
},
|
|
122
|
+
}, quizTitle), jsx("div", {
|
|
123
|
+
css: this.props.styles.metricWrapper
|
|
124
|
+
}, list), jsx("div", {
|
|
125
|
+
css: this.props.styles.wrapper
|
|
126
|
+
}, jsx(CentileDistribution, {
|
|
135
127
|
animateDelay: animateDelay,
|
|
136
128
|
animateDuration: animateDuration,
|
|
137
129
|
summaryDistribution: quizAnalysis.decileDistribution(),
|
|
@@ -147,7 +139,8 @@ export var QuizAnalysisOverview = (_dec = themeable(theme, styles), _dec(_class
|
|
|
147
139
|
animateDuration: PropTypes.number,
|
|
148
140
|
quizAnalysis: ImmutablePropTypes.record.isRequired,
|
|
149
141
|
quizTitle: PropTypes.string.isRequired,
|
|
150
|
-
children: PropTypes.arrayOf(PropTypes.node)
|
|
142
|
+
children: PropTypes.arrayOf(PropTypes.node),
|
|
143
|
+
styles: PropTypes.object
|
|
151
144
|
}, _class2.defaultProps = {
|
|
152
145
|
animateDelay: void 0,
|
|
153
146
|
animateDuration: void 0,
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme) {
|
|
4
|
+
var _metric;
|
|
5
|
+
|
|
6
|
+
var tabletBreakPoint = "@media screen and (".concat(componentTheme.tabletBreakPoint, ")");
|
|
7
|
+
var phoneBreakPoint = "@media screen and (".concat(componentTheme.phoneBreakPoint, ")");
|
|
8
|
+
return {
|
|
9
|
+
root: {
|
|
10
|
+
padding: componentTheme.rootPadding
|
|
11
|
+
},
|
|
12
|
+
metricWrapper: {
|
|
13
|
+
marginTop: componentTheme.wrapperMargin,
|
|
14
|
+
paddingBottom: componentTheme.metricWrapperPadding
|
|
15
|
+
},
|
|
16
|
+
wrapper: {
|
|
17
|
+
marginTop: componentTheme.wrapperMargin
|
|
18
|
+
},
|
|
19
|
+
metric: (_metric = {}, _defineProperty(_metric, tabletBreakPoint, {
|
|
20
|
+
flexBasis: '33.3%'
|
|
21
|
+
}), _defineProperty(_metric, phoneBreakPoint, {
|
|
22
|
+
flexBasis: '50%'
|
|
23
|
+
}), _metric)
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export default generateStyle;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
var generateComponentTheme = function generateComponentTheme(_ref) {
|
|
2
2
|
var spacing = _ref.spacing,
|
|
3
3
|
typography = _ref.typography,
|
|
4
4
|
colors = _ref.colors,
|
|
@@ -10,4 +10,6 @@ export default function generator(_ref) {
|
|
|
10
10
|
phoneBreakPoint: "max-width: ".concat(breakpoints.medium),
|
|
11
11
|
tabletBreakPoint: "max-width: ".concat(breakpoints.large)
|
|
12
12
|
};
|
|
13
|
-
}
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export default generateComponentTheme;
|
|
@@ -95,7 +95,7 @@ export var LegacyChoiceType = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
95
95
|
id: percentageHeaderId,
|
|
96
96
|
height: "47px",
|
|
97
97
|
textAlign: "center"
|
|
98
|
-
}, t('
|
|
98
|
+
}, t('Percentage')))), /*#__PURE__*/React.createElement(Table.Body, null, choices.map(this.renderRow), this.renderNoAnswer(noAnswer, numberOfChoices)))));
|
|
99
99
|
}
|
|
100
100
|
}]);
|
|
101
101
|
|
|
@@ -103,7 +103,7 @@ export var ScoreDistributionTypeTable = (_dec = withStyle(generateStyle, generat
|
|
|
103
103
|
id: percentageHeaderId,
|
|
104
104
|
height: "47px",
|
|
105
105
|
textAlign: "center"
|
|
106
|
-
}, t('
|
|
106
|
+
}, t('Percentage')))), jsx(Table.Body, null, scores.map(this.renderRow))));
|
|
107
107
|
}
|
|
108
108
|
}]);
|
|
109
109
|
|
|
@@ -1,24 +1,19 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
1
|
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
2
|
+
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
3
3
|
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
4
4
|
import _createSuper from "@babel/runtime/helpers/esm/createSuper";
|
|
5
5
|
|
|
6
6
|
var _dec, _class, _class2, _temp;
|
|
7
7
|
|
|
8
|
+
/** @jsx jsx */
|
|
9
|
+
|
|
10
|
+
/* eslint-disable-next-line no-unused-vars */
|
|
8
11
|
import React, { Component } from 'react';
|
|
9
12
|
import PropTypes from 'prop-types';
|
|
10
|
-
import {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
return "\n\n.DjkQc_SVtU{max-width:100%;width:calc(25% + 350px)}\n\n.DjkQc_ellB{margin-top:".concat(theme.marginOfTables || 'inherit', "}");
|
|
15
|
-
},
|
|
16
|
-
'tableContainer': 'DjkQc_SVtU',
|
|
17
|
-
'aggregateContainer': 'DjkQc_ellB'
|
|
18
|
-
};
|
|
19
|
-
import classNames from 'classnames';
|
|
20
|
-
import theme from "./theme.js";
|
|
21
|
-
export var AfsPartsContainer = (_dec = themeable(theme, styles), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
13
|
+
import { withStyle, jsx } from '@instructure/emotion';
|
|
14
|
+
import generateStyle from "./styles.js";
|
|
15
|
+
import generateComponentTheme from "./theme.js";
|
|
16
|
+
export var AfsPartsContainer = (_dec = withStyle(generateStyle, generateComponentTheme), _dec(_class = (_temp = _class2 = /*#__PURE__*/function (_Component) {
|
|
22
17
|
_inherits(AfsPartsContainer, _Component);
|
|
23
18
|
|
|
24
19
|
var _super = _createSuper(AfsPartsContainer);
|
|
@@ -35,34 +30,45 @@ export var AfsPartsContainer = (_dec = themeable(theme, styles), _dec(_class = (
|
|
|
35
30
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
36
31
|
|
|
37
32
|
_this.renderAggregationTable = function () {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
42
|
-
className: classNames(styles.tableContainer, _defineProperty({}, styles.aggregateContainer, afsTable))
|
|
43
|
-
}, aggregationTable);
|
|
33
|
+
return jsx("div", {
|
|
34
|
+
css: _this.props.styles.tableContainer
|
|
35
|
+
}, _this.props.aggregationTable);
|
|
44
36
|
};
|
|
45
37
|
|
|
46
38
|
_this.renderAfsTable = function () {
|
|
47
39
|
var afsTable = _this.props.afsTable;
|
|
48
|
-
return
|
|
40
|
+
return jsx("div", null, afsTable);
|
|
49
41
|
};
|
|
50
42
|
|
|
51
43
|
_this.render = function () {
|
|
52
|
-
var _this$
|
|
53
|
-
afsTable = _this$
|
|
54
|
-
aggregationTable = _this$
|
|
55
|
-
return
|
|
44
|
+
var _this$props = _this.props,
|
|
45
|
+
afsTable = _this$props.afsTable,
|
|
46
|
+
aggregationTable = _this$props.aggregationTable;
|
|
47
|
+
return jsx(React.Fragment, null, afsTable && _this.renderAfsTable(), aggregationTable && _this.renderAggregationTable());
|
|
56
48
|
};
|
|
57
49
|
|
|
58
50
|
return _this;
|
|
59
51
|
}
|
|
60
52
|
|
|
53
|
+
_createClass(AfsPartsContainer, [{
|
|
54
|
+
key: "componentDidMount",
|
|
55
|
+
value: function componentDidMount() {
|
|
56
|
+
this.props.makeStyles();
|
|
57
|
+
}
|
|
58
|
+
}, {
|
|
59
|
+
key: "componentDidUpdate",
|
|
60
|
+
value: function componentDidUpdate() {
|
|
61
|
+
this.props.makeStyles();
|
|
62
|
+
}
|
|
63
|
+
}]);
|
|
64
|
+
|
|
61
65
|
return AfsPartsContainer;
|
|
62
66
|
}(Component), _class2.propTypes = {
|
|
63
|
-
afsTable: PropTypes.node,
|
|
64
|
-
aggregationTable: PropTypes.node
|
|
65
|
-
|
|
67
|
+
afsTable: PropTypes.node.isRequired,
|
|
68
|
+
aggregationTable: PropTypes.node.isRequired,
|
|
69
|
+
styles: PropTypes.object,
|
|
70
|
+
makeStyles: PropTypes.func
|
|
71
|
+
}, _class2.defaultProps = {
|
|
66
72
|
afsTable: null,
|
|
67
73
|
aggregationTable: null
|
|
68
74
|
}, _temp)) || _class);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
|
|
3
|
+
var generateStyle = function generateStyle(componentTheme, props) {
|
|
4
|
+
return {
|
|
5
|
+
tableContainer: _objectSpread({
|
|
6
|
+
width: 'calc(25% + 350px)',
|
|
7
|
+
maxWidth: '100%'
|
|
8
|
+
}, props.afsTable && {
|
|
9
|
+
marginTop: componentTheme.marginOfTables
|
|
10
|
+
})
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export default generateStyle;
|
|
@@ -80,7 +80,7 @@ export var AggregationTable = (_dec = themeable(theme, styles), _dec(_class = (_
|
|
|
80
80
|
}, t('Respondents')), /*#__PURE__*/React.createElement(Table.ColHeader, {
|
|
81
81
|
id: percentageHeaderId,
|
|
82
82
|
textAlign: "center"
|
|
83
|
-
}, t('
|
|
83
|
+
}, t('Percentage'))));
|
|
84
84
|
};
|
|
85
85
|
|
|
86
86
|
_this.renderRow = function (key, icon, label, count, percentage) {
|
|
@@ -197,7 +197,7 @@ export var ChoiceTypeTable = (_dec = themeable(theme, styles), _dec(_class = (_t
|
|
|
197
197
|
id: percentageHeaderId,
|
|
198
198
|
height: "47px",
|
|
199
199
|
textAlign: "center"
|
|
200
|
-
}, t('
|
|
200
|
+
}, t('Percentage')))), /*#__PURE__*/React.createElement(Table.Body, null, choices.map(_this.renderRow))));
|
|
201
201
|
};
|
|
202
202
|
|
|
203
203
|
return _this;
|