@micromag/screen-survey 0.3.643 → 0.3.647
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/index.js +18 -2
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -41,6 +41,7 @@ var propTypes = {
|
|
|
41
41
|
header: PropTypes$1.header,
|
|
42
42
|
footer: PropTypes$1.footer,
|
|
43
43
|
background: PropTypes$1.backgroundElement,
|
|
44
|
+
showCount: PropTypes.bool,
|
|
44
45
|
withoutPercentage: PropTypes.bool,
|
|
45
46
|
withoutBar: PropTypes.bool,
|
|
46
47
|
current: PropTypes.bool,
|
|
@@ -63,6 +64,7 @@ var defaultProps = {
|
|
|
63
64
|
header: null,
|
|
64
65
|
footer: null,
|
|
65
66
|
background: null,
|
|
67
|
+
showCount: false,
|
|
66
68
|
withoutPercentage: false,
|
|
67
69
|
withoutBar: false,
|
|
68
70
|
current: true,
|
|
@@ -85,6 +87,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
85
87
|
header = _ref.header,
|
|
86
88
|
footer = _ref.footer,
|
|
87
89
|
background = _ref.background,
|
|
90
|
+
showCount = _ref.showCount,
|
|
88
91
|
withoutPercentage = _ref.withoutPercentage,
|
|
89
92
|
withoutBar = _ref.withoutBar,
|
|
90
93
|
current = _ref.current,
|
|
@@ -322,7 +325,9 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
322
325
|
body = _ref14$body === undefined ? null : _ref14$body;
|
|
323
326
|
var _ref15 = body !== null ? quizAnswersComputed[body] || {} : {},
|
|
324
327
|
_ref15$percent = _ref15.percent,
|
|
325
|
-
percent = _ref15$percent === undefined ? 0 : _ref15$percent
|
|
328
|
+
percent = _ref15$percent === undefined ? 0 : _ref15$percent,
|
|
329
|
+
_ref15$count = _ref15.count,
|
|
330
|
+
count = _ref15$count === undefined ? 0 : _ref15$count;
|
|
326
331
|
var _ref16 = label || {},
|
|
327
332
|
_ref16$textStyle = _ref16.textStyle,
|
|
328
333
|
textStyle = _ref16$textStyle === undefined ? null : _ref16$textStyle;
|
|
@@ -391,7 +396,7 @@ var SurveyScreen = function SurveyScreen(_ref) {
|
|
|
391
396
|
textStyle: _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, textStyle), buttonsTextStyle), answerButtonTextStyle), resultsTextColor), resultsPercentageTextStyle), answerResultTextColor), answerResultPercentageTextStyle),
|
|
392
397
|
inline: true,
|
|
393
398
|
className: styles.resultText,
|
|
394
|
-
body: "".concat(percent, "%")
|
|
399
|
+
body: showCount ? count : "".concat(percent, "%")
|
|
395
400
|
}))) : null, !withoutBar ? /*#__PURE__*/React.createElement("div", {
|
|
396
401
|
className: styles.resultBar,
|
|
397
402
|
style: _objectSpread(_objectSpread({
|
|
@@ -534,6 +539,17 @@ var definition = {
|
|
|
534
539
|
}]
|
|
535
540
|
}),
|
|
536
541
|
fields: [{
|
|
542
|
+
name: 'showCount',
|
|
543
|
+
type: 'toggle',
|
|
544
|
+
defaultValue: false,
|
|
545
|
+
label: defineMessage({
|
|
546
|
+
id: "ppGXAR",
|
|
547
|
+
defaultMessage: [{
|
|
548
|
+
"type": 0,
|
|
549
|
+
"value": "Show the answer count"
|
|
550
|
+
}]
|
|
551
|
+
})
|
|
552
|
+
}, {
|
|
537
553
|
name: 'withoutPercentage',
|
|
538
554
|
type: 'toggle',
|
|
539
555
|
defaultValue: false,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/screen-survey",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.647",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "",
|
|
6
6
|
"keywords": [
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"@micromag/element-header": "^0.3.637",
|
|
70
70
|
"@micromag/element-heading": "^0.3.637",
|
|
71
71
|
"@micromag/element-layout": "^0.3.637",
|
|
72
|
-
"@micromag/element-scroll": "^0.3.
|
|
72
|
+
"@micromag/element-scroll": "^0.3.646",
|
|
73
73
|
"@micromag/element-text": "^0.3.637",
|
|
74
74
|
"@micromag/transforms": "^0.3.637",
|
|
75
75
|
"classnames": "^2.2.6",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"access": "public",
|
|
83
83
|
"registry": "https://registry.npmjs.org/"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "e6fba3fbff05d9a7d4deb27687a042e19a766c7d"
|
|
86
86
|
}
|