@coorpacademy/components 10.7.1 → 10.10.0
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/atom/button-link/index.js +10 -3
- package/es/atom/button-link/index.js.map +1 -1
- package/es/atom/select/test/fixtures.js +4 -0
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/molecule/checkbox-with-title/index.js +51 -0
- package/es/molecule/checkbox-with-title/index.js.map +1 -0
- package/es/molecule/checkbox-with-title/style.css +62 -0
- package/es/molecule/checkbox-with-title/test/fixtures/checked.js +8 -0
- package/es/molecule/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/es/molecule/checkbox-with-title/test/fixtures/unchecked.js +8 -0
- package/es/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +15 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -0
- package/es/molecule/dashboard/review-banner/index.js +79 -0
- package/es/molecule/dashboard/review-banner/index.js.map +1 -0
- package/es/molecule/dashboard/review-banner/style.css +186 -0
- package/es/molecule/dashboard/review-banner/test/fixtures/default.js +11 -0
- package/es/molecule/dashboard/review-banner/test/fixtures/default.js.map +1 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures.js +2 -0
- package/es/molecule/draggable-list/test/fixtures.js.map +1 -1
- package/es/molecule/questions/free-text/test/fixtures.js +4 -2
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/es/molecule/review-correction-popin/index.js +105 -0
- package/es/molecule/review-correction-popin/index.js.map +1 -0
- package/es/molecule/review-correction-popin/style.css +318 -0
- package/es/molecule/review-correction-popin/test/fixtures/right.js +17 -0
- package/es/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures/wrong.js +19 -0
- package/es/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures.js +2 -0
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +2 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +2 -0
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/util/button-icons.js +2 -1
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/button-link/index.js +11 -3
- package/lib/atom/button-link/index.js.map +1 -1
- package/lib/atom/select/test/fixtures.js +6 -0
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/molecule/checkbox-with-title/index.js +66 -0
- package/lib/molecule/checkbox-with-title/index.js.map +1 -0
- package/lib/molecule/checkbox-with-title/style.css +62 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/checked.js +13 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/checked.js.map +1 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/unchecked.js +13 -0
- package/lib/molecule/checkbox-with-title/test/fixtures/unchecked.js.map +1 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +25 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/index.js +94 -0
- package/lib/molecule/dashboard/review-banner/index.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/style.css +186 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures/default.js +16 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures/default.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures.js +3 -0
- package/lib/molecule/draggable-list/test/fixtures.js.map +1 -1
- package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/lib/molecule/review-correction-popin/index.js +118 -0
- package/lib/molecule/review-correction-popin/index.js.map +1 -0
- package/lib/molecule/review-correction-popin/style.css +318 -0
- package/lib/molecule/review-correction-popin/test/fixtures/right.js +22 -0
- package/lib/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures/wrong.js +24 -0
- package/lib/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures.js +3 -0
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +3 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/util/button-icons.js +1 -0
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeDashboardReviewBanner from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
test('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {
|
|
7
|
+
t.pass();
|
|
8
|
+
forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {
|
|
9
|
+
t.not(value, undefined, `PropType for "MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);
|
|
13
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/dashboard/review-banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDashboardReviewBanner","fixtureDefault","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,iFAAD,EAAoFK,CAAC,IAAI;AAC3FA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,6BAA6B,CAACI,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2EAA0EF,GAAI,mEAAvG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,6BAA3G,EAA0IC,cAA1I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeDashboardReviewBanner from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);\n"],"file":"fixtures.js"}
|
|
@@ -2,6 +2,7 @@ import test from 'ava';
|
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import MoleculeDraggableList from '..';
|
|
5
|
+
import fixtureCourseSections from './fixtures/course-sections';
|
|
5
6
|
import fixtureDashboardSections from './fixtures/dashboard-sections';
|
|
6
7
|
test('Molecule › MoleculeDraggableList > should have valid propTypes', t => {
|
|
7
8
|
t.pass();
|
|
@@ -9,5 +10,6 @@ test('Molecule › MoleculeDraggableList > should have valid propTypes', t => {
|
|
|
9
10
|
t.not(value, undefined, `PropType for "Molecule.MoleculeDraggableList.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
11
|
});
|
|
11
12
|
});
|
|
13
|
+
test('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);
|
|
12
14
|
test('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);
|
|
13
15
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDraggableList","fixtureDashboardSections","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,qBAAP,MAAkC,IAAlC;AACA,OAAOC,wBAAP,MAAqC,+BAArC;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDraggableList","fixtureCourseSections","fixtureDashboardSections","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,qBAAP,MAAkC,IAAlC;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,wBAAP,MAAqC,+BAArC;AAEAL,IAAI,CAAC,gEAAD,EAAmEM,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,qBAAqB,CAACK,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,qBAAjG,EAAwHC,qBAAxH,CAAJ;AACAJ,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,qBAApG,EAA2HE,wBAA3H,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureCourseSections from './fixtures/course-sections';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.js"}
|
|
@@ -3,7 +3,8 @@ import forEach from 'lodash/forEach';
|
|
|
3
3
|
import renderComponentMacro from '../../../../test/helpers/render-component';
|
|
4
4
|
import MoleculeQuestionsFreeText from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
|
-
import
|
|
6
|
+
import fixtureWithValueOnChange from './fixtures/with-value-on-change';
|
|
7
|
+
import fixtureWithValue from './fixtures/with-value';
|
|
7
8
|
test('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {
|
|
8
9
|
t.pass();
|
|
9
10
|
forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {
|
|
@@ -11,5 +12,6 @@ test('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTy
|
|
|
11
12
|
});
|
|
12
13
|
});
|
|
13
14
|
test('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);
|
|
14
|
-
test('MoleculeQuestions › MoleculeQuestionsFreeText ›
|
|
15
|
+
test('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);
|
|
16
|
+
test('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);
|
|
15
17
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuestionsFreeText","fixtureDefault","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeQuestionsFreeText","fixtureDefault","fixtureWithValueOnChange","fixtureWithValue","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,yBAAP,MAAsC,IAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,wBAAP,MAAqC,iCAArC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAN,IAAI,CAAC,6EAAD,EAAgFO,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,yBAAyB,CAACM,SAA3B,EAAsC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,yBAAvG,EAAkIC,cAAlI,CAAJ;AACAJ,IAAI,CAAC,wFAAD,EAA2FE,oBAA3F,EAAiHC,yBAAjH,EAA4IE,wBAA5I,CAAJ;AACAL,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,yBAAzG,EAAoIG,gBAApI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeQuestionsFreeText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValueOnChange from './fixtures/with-value-on-change';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeQuestions.MoleculeQuestionsFreeText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import classnames from 'classnames';
|
|
5
|
+
import PropTypes from 'prop-types';
|
|
6
|
+
import { NovaCompositionCoorpacademyCheck as RightIcon, NovaSolidStatusClose as WrongIcon } from '@coorpacademy/nova-icons';
|
|
7
|
+
import ButtonLink from '../../atom/button-link';
|
|
8
|
+
import style from './style.css';
|
|
9
|
+
|
|
10
|
+
const buildKlfButton = klf => {
|
|
11
|
+
const klfButtonProps = _extends(_extends({}, klf), {}, {
|
|
12
|
+
icon: {
|
|
13
|
+
position: 'left',
|
|
14
|
+
type: 'key'
|
|
15
|
+
},
|
|
16
|
+
type: 'primary'
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
20
|
+
className: style.klfContainer
|
|
21
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
22
|
+
className: style.klfButtonContainer
|
|
23
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, _extends({}, klfButtonProps, {
|
|
24
|
+
className: style.klfButton
|
|
25
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
26
|
+
className: style.toolTip
|
|
27
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
28
|
+
className: style.tooltipText
|
|
29
|
+
}, klf.tooltip)));
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const ReviewCorrectionPopin = props => {
|
|
33
|
+
const {
|
|
34
|
+
information,
|
|
35
|
+
resultLabel,
|
|
36
|
+
type,
|
|
37
|
+
klf,
|
|
38
|
+
next
|
|
39
|
+
} = props;
|
|
40
|
+
|
|
41
|
+
const nextQuestionButtonProps = _extends(_extends({}, next), {}, {
|
|
42
|
+
type: 'primary'
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
const cta = type === 'wrong' ? buildKlfButton(klf) : null;
|
|
46
|
+
const ICONS = {
|
|
47
|
+
right: RightIcon,
|
|
48
|
+
wrong: WrongIcon
|
|
49
|
+
};
|
|
50
|
+
const Icon = ICONS[type];
|
|
51
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
52
|
+
className: style.wrapper
|
|
53
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
54
|
+
className: classnames(style.popin, type === 'right' ? style.right : style.wrong)
|
|
55
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: style.correctionSection
|
|
57
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
58
|
+
className: style.iconCircle
|
|
59
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
60
|
+
className: type === 'right' ? style.iconRight : style.iconWrong
|
|
61
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: style.resultLabel,
|
|
63
|
+
"aria-label": "result"
|
|
64
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
65
|
+
"aria-label": resultLabel
|
|
66
|
+
}, resultLabel))), /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
className: style.feedbackSection
|
|
68
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: style.information,
|
|
70
|
+
"aria-label": "answer-information"
|
|
71
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
72
|
+
className: style.labelContainer
|
|
73
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
74
|
+
className: style.label,
|
|
75
|
+
"aria-label": information.label
|
|
76
|
+
}, information.label)), /*#__PURE__*/React.createElement("span", {
|
|
77
|
+
className: style.message,
|
|
78
|
+
"aria-label": information.message
|
|
79
|
+
}, information.message))), /*#__PURE__*/React.createElement("div", {
|
|
80
|
+
className: type === 'right' ? style.actions : style.actionsWrong
|
|
81
|
+
}, cta, /*#__PURE__*/React.createElement("div", {
|
|
82
|
+
className: style.nextQuestionContainer
|
|
83
|
+
}, /*#__PURE__*/React.createElement(ButtonLink, _extends({}, nextQuestionButtonProps, {
|
|
84
|
+
className: style.nextQuestionButton
|
|
85
|
+
}))))));
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
ReviewCorrectionPopin.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
89
|
+
type: PropTypes.oneOf(['right', 'wrong']),
|
|
90
|
+
resultLabel: PropTypes.string,
|
|
91
|
+
information: PropTypes.shape({
|
|
92
|
+
label: PropTypes.string,
|
|
93
|
+
message: PropTypes.string
|
|
94
|
+
}),
|
|
95
|
+
next: PropTypes.shape({
|
|
96
|
+
label: PropTypes.string,
|
|
97
|
+
onClick: PropTypes.func
|
|
98
|
+
}),
|
|
99
|
+
klf: PropTypes.shape({
|
|
100
|
+
label: PropTypes.string,
|
|
101
|
+
onClick: PropTypes.func
|
|
102
|
+
})
|
|
103
|
+
} : {};
|
|
104
|
+
export default ReviewCorrectionPopin;
|
|
105
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/review-correction-popin/index.js"],"names":["React","classnames","PropTypes","NovaCompositionCoorpacademyCheck","RightIcon","NovaSolidStatusClose","WrongIcon","ButtonLink","style","buildKlfButton","klf","klfButtonProps","icon","position","type","klfContainer","klfButtonContainer","klfButton","toolTip","tooltipText","tooltip","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","wrong","Icon","wrapper","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","labelContainer","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton","propTypes","oneOf","string","shape","onClick","func"],"mappings":"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","sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildKlfButton = klf => {\n const klfButtonProps = {\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n };\n\n return (\n <div className={style.klfContainer}>\n <div className={style.klfButtonContainer}>\n <ButtonLink {...klfButtonProps} className={style.klfButton} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{klf.tooltip}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? buildKlfButton(klf) : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper}>\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel} aria-label=\"result\">\n <span aria-label={resultLabel}>{resultLabel}</span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <div className={style.labelContainer}>\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n </div>\n <span className={style.message} aria-label={information.message}>\n {information.message}\n </span>\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer}>\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewCorrectionPopin.propTypes = {\n type: PropTypes.oneOf(['right', 'wrong']),\n resultLabel: PropTypes.string,\n information: PropTypes.shape({\n label: PropTypes.string,\n message: PropTypes.string\n }),\n next: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n klf: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default ReviewCorrectionPopin;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,318 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value breakpoints: "../../variables/breakpoints.css";
|
|
3
|
+
@value tablet from breakpoints;
|
|
4
|
+
@value mobile from breakpoints;
|
|
5
|
+
@value white from colors;
|
|
6
|
+
@value cm_positive_100 from colors;
|
|
7
|
+
@value cm_negative_100 from colors;
|
|
8
|
+
@value cm_primary_blue from colors;
|
|
9
|
+
@value cm_blue_900 from colors;
|
|
10
|
+
|
|
11
|
+
.wrapper {
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: auto;
|
|
14
|
+
font-family: Gilroy;
|
|
15
|
+
color: white;
|
|
16
|
+
display: flex;
|
|
17
|
+
justify-content: center;
|
|
18
|
+
overflow: visible;
|
|
19
|
+
padding: 0px;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.popin {
|
|
23
|
+
width: 100%;
|
|
24
|
+
padding: 40px;
|
|
25
|
+
border-radius: 16px;
|
|
26
|
+
display: flex;
|
|
27
|
+
flex-direction: row;
|
|
28
|
+
align-items: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.right {
|
|
32
|
+
background-color: cm_positive_100;
|
|
33
|
+
box-shadow: 0px 0px 68px rgba(cm_positive_100, 0.4);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.wrong {
|
|
37
|
+
background-color: cm_negative_100;
|
|
38
|
+
box-shadow: 0px 0px 68px rgba(cm_negative_100, 0.4);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.correctionSection {
|
|
42
|
+
flex: 0 1 auto;
|
|
43
|
+
min-width: 187px;
|
|
44
|
+
display: flex;
|
|
45
|
+
align-content: center;
|
|
46
|
+
align-items: center;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.feedbackSection {
|
|
50
|
+
display: flex;
|
|
51
|
+
margin: 0 48px 0 23px;
|
|
52
|
+
flex-direction: row;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: left;
|
|
55
|
+
flex: 1 1 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.iconCircle {
|
|
59
|
+
width: 52px;
|
|
60
|
+
min-width: 52px;
|
|
61
|
+
height: 52px;
|
|
62
|
+
min-height: 52px;
|
|
63
|
+
background: white;
|
|
64
|
+
opacity: 0.7;
|
|
65
|
+
border-radius: 50%;
|
|
66
|
+
box-sizing: border-box;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.icon {
|
|
70
|
+
width: 24px;
|
|
71
|
+
height: 24px;
|
|
72
|
+
padding: 14px 0 0 14px;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.iconRight {
|
|
76
|
+
composes: icon;
|
|
77
|
+
color: cm_positive_100;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.iconWrong {
|
|
81
|
+
composes: icon;
|
|
82
|
+
color: cm_negative_100;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.resultLabel {
|
|
86
|
+
margin-left: 12px;
|
|
87
|
+
font-weight: 600;
|
|
88
|
+
font-size: 24px;
|
|
89
|
+
line-height: 24px;
|
|
90
|
+
hyphens: auto;
|
|
91
|
+
-ms-word-break: break-word;
|
|
92
|
+
word-break: break-word;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.information {
|
|
96
|
+
display: block;
|
|
97
|
+
flex-direction: column;
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.labelContainer {
|
|
102
|
+
width: fit-content;
|
|
103
|
+
height: fit-content;
|
|
104
|
+
padding: 4px 8px;
|
|
105
|
+
background: rgba(255, 255, 255, 0.3);
|
|
106
|
+
border-radius: 56px;
|
|
107
|
+
display: table;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.label {
|
|
111
|
+
font-style: normal;
|
|
112
|
+
font-weight: 900;
|
|
113
|
+
font-size: 14px;
|
|
114
|
+
line-height: 17px;
|
|
115
|
+
hyphens: auto;
|
|
116
|
+
-ms-word-break: break-word;
|
|
117
|
+
word-break: break-word;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.information .message {
|
|
121
|
+
display: block;
|
|
122
|
+
margin-top: 4px;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.actions {
|
|
126
|
+
flex: 0 1 auto;
|
|
127
|
+
min-width: 138px;
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
justify-content: flex-end;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.actionsWrong {
|
|
134
|
+
composes: actions;
|
|
135
|
+
min-width: 345px;
|
|
136
|
+
flex: 0 1 auto;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
.toolTip {
|
|
140
|
+
visibility: hidden;
|
|
141
|
+
opacity: 0;
|
|
142
|
+
transition: opacity 0.8s;
|
|
143
|
+
position: absolute;
|
|
144
|
+
width: 142%;
|
|
145
|
+
border-radius: 15px;
|
|
146
|
+
background-color: white;
|
|
147
|
+
right: 0px;
|
|
148
|
+
bottom: 55px;
|
|
149
|
+
filter: drop-shadow(0px 4px 16px rgba(0, 0, 0, 0.32));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
.toolTip::before {
|
|
153
|
+
content: '';
|
|
154
|
+
display: inline-block;
|
|
155
|
+
visibility: hidden;
|
|
156
|
+
opacity: 0;
|
|
157
|
+
width: 15px;
|
|
158
|
+
height: 15px;
|
|
159
|
+
transform: rotate(-45deg);
|
|
160
|
+
transition: opacity 0.8s;
|
|
161
|
+
background-color: white;
|
|
162
|
+
position: inherit;
|
|
163
|
+
bottom: -7px;
|
|
164
|
+
right: 10%;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.tooltipText {
|
|
168
|
+
display: inline-block;
|
|
169
|
+
margin: 16px;
|
|
170
|
+
border-radius: 3px;
|
|
171
|
+
word-wrap: break-word;
|
|
172
|
+
color: cm_blue_900;
|
|
173
|
+
max-width: 241px;
|
|
174
|
+
overflow: hidden;
|
|
175
|
+
text-align: center;
|
|
176
|
+
font-size: 16px;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.klfContainer {
|
|
180
|
+
overflow: visible;
|
|
181
|
+
width: calc(55% - 16px);
|
|
182
|
+
margin-right: 16px;
|
|
183
|
+
position: relative;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.klfButtonContainer:hover ~ .toolTip {
|
|
187
|
+
visibility: visible;
|
|
188
|
+
opacity: 1;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.klfButtonContainer:hover ~ .toolTip::before {
|
|
192
|
+
visibility: visible;
|
|
193
|
+
opacity: 1;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
.klfButtonContainer {
|
|
197
|
+
width: 100%;
|
|
198
|
+
margin-right: 16px;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.klfButton {
|
|
202
|
+
background: rgba(255, 255, 255, 0.1);
|
|
203
|
+
color: white;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
.klfButton:hover {
|
|
207
|
+
background: linear-gradient(0deg, rgba(0, 0, 0, 0.2), rgba(0, 0, 0, 0.2)), rgba(255, 255, 255, 0.1)
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
.nextQuestionContainer {
|
|
211
|
+
width: 100%;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.actionsWrong .nextQuestionContainer {
|
|
215
|
+
width: 45%;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
.nextQuestionButton {
|
|
219
|
+
background: white;
|
|
220
|
+
color: cm_primary_blue;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.nextQuestionButton:hover {
|
|
224
|
+
background: linear-gradient(0deg, rgba(0, 0, 0, 0.07), rgba(0, 0, 0, 0.07)), #FFFFFF;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
@media tablet {
|
|
228
|
+
.resultLabel {
|
|
229
|
+
display: none;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.correctionSection {
|
|
233
|
+
min-width: 60px;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
.actions {
|
|
237
|
+
width: 25%;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
.actionsWrong {
|
|
241
|
+
width: 47%;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
@media mobile {
|
|
246
|
+
.popin {
|
|
247
|
+
width: 100%;
|
|
248
|
+
min-height: 100px;
|
|
249
|
+
padding: 32px;
|
|
250
|
+
flex-direction: column;
|
|
251
|
+
display: block;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.popin > div {
|
|
255
|
+
min-width: auto;
|
|
256
|
+
width: 100%;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.correctionSection {
|
|
260
|
+
justify-content: center;
|
|
261
|
+
margin-bottom: 32px;
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.resultLabel {
|
|
265
|
+
display: block;
|
|
266
|
+
text-align: left;
|
|
267
|
+
width: calc(100% - 52px);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.feedbackSection {
|
|
271
|
+
margin: 0;
|
|
272
|
+
width: 100%;
|
|
273
|
+
display: block;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.information .message {
|
|
277
|
+
margin: 8px 0 32px 0;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.actions {
|
|
281
|
+
width: 100%;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.actionsWrong {
|
|
285
|
+
width: 100%;
|
|
286
|
+
flex-direction: column;
|
|
287
|
+
align-items: center;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
.actionsWrong .nextQuestionContainer {
|
|
291
|
+
width: 100%;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
.klfContainer {
|
|
295
|
+
width: 100%;
|
|
296
|
+
margin: 0 0 8px 0;
|
|
297
|
+
position: relative;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
.klfButtonContainer {
|
|
301
|
+
margin: 0;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
.toolTip {
|
|
305
|
+
width: 106%;
|
|
306
|
+
right: -3%;
|
|
307
|
+
top: auto;
|
|
308
|
+
bottom: 52px;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
.toolTip::before {
|
|
312
|
+
right: 50%
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
.tooltipText {
|
|
316
|
+
max-width: none;
|
|
317
|
+
}
|
|
318
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
type: 'right',
|
|
4
|
+
resultLabel: 'CORRECT ANSWER',
|
|
5
|
+
information: {
|
|
6
|
+
label: 'Key learning factor',
|
|
7
|
+
message: '17 frustrated software engineers grappling with the complexities of software development.'
|
|
8
|
+
},
|
|
9
|
+
next: {
|
|
10
|
+
label: 'Next Question',
|
|
11
|
+
'aria-label': 'next question button',
|
|
12
|
+
'data-name': 'next-question-button',
|
|
13
|
+
onClick: () => console.log('Next Question')
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=right.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-correction-popin/test/fixtures/right.js"],"names":["props","type","resultLabel","information","label","message","next","onClick","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,OADD;AAELC,IAAAA,WAAW,EAAE,gBAFR;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,qBADI;AAEXC,MAAAA,OAAO,EACL;AAHS,KAHR;AAQLC,IAAAA,IAAI,EAAE;AACJF,MAAAA,KAAK,EAAE,eADH;AAEJ,oBAAc,sBAFV;AAGJ,mBAAa,sBAHT;AAIJG,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAJX;AARD;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'right',\n resultLabel: 'CORRECT ANSWER',\n information: {\n label: 'Key learning factor',\n message:\n '17 frustrated software engineers grappling with the complexities of software development.'\n },\n next: {\n label: 'Next Question',\n 'aria-label': 'next question button',\n 'data-name': 'next-question-button',\n onClick: () => console.log('Next Question')\n }\n }\n};\n"],"file":"right.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
type: 'wrong',
|
|
4
|
+
resultLabel: 'WRONG ANSWER',
|
|
5
|
+
information: {
|
|
6
|
+
label: 'Correct Answer',
|
|
7
|
+
message: 'Corporate lawyers trying to understand software.'
|
|
8
|
+
},
|
|
9
|
+
klf: {
|
|
10
|
+
label: 'Key learning factor',
|
|
11
|
+
tooltip: '17 frustrated software engineers grappling with the complexities of software development.'
|
|
12
|
+
},
|
|
13
|
+
next: {
|
|
14
|
+
label: 'Next Question',
|
|
15
|
+
onClick: () => console.log('Next Question')
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
//# sourceMappingURL=wrong.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/review-correction-popin/test/fixtures/wrong.js"],"names":["props","type","resultLabel","information","label","message","klf","tooltip","next","onClick","console","log"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,OADD;AAELC,IAAAA,WAAW,EAAE,cAFR;AAGLC,IAAAA,WAAW,EAAE;AACXC,MAAAA,KAAK,EAAE,gBADI;AAEXC,MAAAA,OAAO,EAAE;AAFE,KAHR;AAOLC,IAAAA,GAAG,EAAE;AACHF,MAAAA,KAAK,EAAE,qBADJ;AAEHG,MAAAA,OAAO,EACL;AAHC,KAPA;AAYLC,IAAAA,IAAI,EAAE;AACJJ,MAAAA,KAAK,EAAE,eADH;AAEJK,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFX;AAZD;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'wrong',\n resultLabel: 'WRONG ANSWER',\n information: {\n label: 'Correct Answer',\n message: 'Corporate lawyers trying to understand software.'\n },\n klf: {\n label: 'Key learning factor',\n tooltip:\n '17 frustrated software engineers grappling with the complexities of software development.'\n },\n next: {\n label: 'Next Question',\n onClick: () => console.log('Next Question')\n }\n }\n};\n"],"file":"wrong.js"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeReviewCorrectionPopin from '..';
|
|
5
|
+
import fixtureRight from './fixtures/right';
|
|
6
|
+
import fixtureWrong from './fixtures/wrong';
|
|
7
|
+
test('Molecule › MoleculeReviewCorrectionPopin > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeReviewCorrectionPopin.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeReviewCorrectionPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeReviewCorrectionPopin › Right › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureRight);
|
|
14
|
+
test('Molecule › MoleculeReviewCorrectionPopin › Wrong › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureWrong);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/review-correction-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeReviewCorrectionPopin","fixtureRight","fixtureWrong","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AAEAL,IAAI,CAAC,wEAAD,EAA2EM,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,6BAA6B,CAACK,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HC,YAA/H,CAAJ;AACAJ,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HE,YAA/H,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeReviewCorrectionPopin from '..';\nimport fixtureRight from './fixtures/right';\nimport fixtureWrong from './fixtures/wrong';\n\ntest('Molecule › MoleculeReviewCorrectionPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeReviewCorrectionPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeReviewCorrectionPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeReviewCorrectionPopin › Right › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureRight);\ntest('Molecule › MoleculeReviewCorrectionPopin › Wrong › should be rendered', renderComponentMacro, MoleculeReviewCorrectionPopin, fixtureWrong);\n"],"file":"fixtures.js"}
|
|
@@ -4,6 +4,7 @@ import renderComponentMacro from '../../../test/helpers/render-component';
|
|
|
4
4
|
import MoleculeWizardSummary from '..';
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
6
|
import fixtureOneSection from './fixtures/one-section';
|
|
7
|
+
import fixtureOrganizeCourses from './fixtures/organize-courses';
|
|
7
8
|
import fixtureTabletClosed from './fixtures/tablet-closed';
|
|
8
9
|
import fixtureThreeSections from './fixtures/three-sections';
|
|
9
10
|
import fixtureTwoSections from './fixtures/two-sections';
|
|
@@ -15,6 +16,7 @@ test('Molecule › MoleculeWizardSummary > should have valid propTypes', t => {
|
|
|
15
16
|
});
|
|
16
17
|
test('Molecule › MoleculeWizardSummary › Default › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureDefault);
|
|
17
18
|
test('Molecule › MoleculeWizardSummary › OneSection › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOneSection);
|
|
19
|
+
test('Molecule › MoleculeWizardSummary › OrganizeCourses › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOrganizeCourses);
|
|
18
20
|
test('Molecule › MoleculeWizardSummary › TabletClosed › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTabletClosed);
|
|
19
21
|
test('Molecule › MoleculeWizardSummary › ThreeSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureThreeSections);
|
|
20
22
|
test('Molecule › MoleculeWizardSummary › TwoSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTwoSections);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/wizard-summary/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeWizardSummary","fixtureDefault","fixtureOneSection","fixtureTabletClosed","fixtureThreeSections","fixtureTwoSections","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/wizard-summary/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeWizardSummary","fixtureDefault","fixtureOneSection","fixtureOrganizeCourses","fixtureTabletClosed","fixtureThreeSections","fixtureTwoSections","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AAEAT,IAAI,CAAC,gEAAD,EAAmEU,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,qBAAqB,CAACS,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,qBAA1F,EAAiHC,cAAjH,CAAJ;AACAJ,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,qBAA7F,EAAoHE,iBAApH,CAAJ;AACAL,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,qBAAlG,EAAyHG,sBAAzH,CAAJ;AACAN,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,qBAA/F,EAAsHI,mBAAtH,CAAJ;AACAP,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,qBAAhG,EAAuHK,oBAAvH,CAAJ;AACAR,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,qBAA9F,EAAqHM,kBAArH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeWizardSummary from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureOneSection from './fixtures/one-section';\nimport fixtureOrganizeCourses from './fixtures/organize-courses';\nimport fixtureTabletClosed from './fixtures/tablet-closed';\nimport fixtureThreeSections from './fixtures/three-sections';\nimport fixtureTwoSections from './fixtures/two-sections';\n\ntest('Molecule › MoleculeWizardSummary > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeWizardSummary.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeWizardSummary.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeWizardSummary › Default › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureDefault);\ntest('Molecule › MoleculeWizardSummary › OneSection › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOneSection);\ntest('Molecule › MoleculeWizardSummary › OrganizeCourses › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureOrganizeCourses);\ntest('Molecule › MoleculeWizardSummary › TabletClosed › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTabletClosed);\ntest('Molecule › MoleculeWizardSummary › ThreeSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureThreeSections);\ntest('Molecule › MoleculeWizardSummary › TwoSections › should be rendered', renderComponentMacro, MoleculeWizardSummary, fixtureTwoSections);\n"],"file":"fixtures.js"}
|
|
@@ -5,6 +5,7 @@ import OrganismWizardContents from '..';
|
|
|
5
5
|
import fixturePlaylistAddCoursesCreate from './fixtures/playlist-add-courses-create';
|
|
6
6
|
import fixturePlaylistGeneralSettingsCreate from './fixtures/playlist-general-settings-create';
|
|
7
7
|
import fixturePlaylistGeneralSettingsEdit from './fixtures/playlist-general-settings-edit';
|
|
8
|
+
import fixturePlaylistOrganizeCourses from './fixtures/playlist-organize-courses';
|
|
8
9
|
import fixturePlaylistPopulationsCreate from './fixtures/playlist-populations-create';
|
|
9
10
|
import fixturePlaylistTranslateEdit from './fixtures/playlist-translate-edit';
|
|
10
11
|
test('Organism › OrganismWizardContents > should have valid propTypes', t => {
|
|
@@ -16,6 +17,7 @@ test('Organism › OrganismWizardContents > should have valid propTypes', t => {
|
|
|
16
17
|
test('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistAddCoursesCreate);
|
|
17
18
|
test('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsCreate);
|
|
18
19
|
test('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsEdit);
|
|
20
|
+
test('Organism › OrganismWizardContents › PlaylistOrganizeCourses › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistOrganizeCourses);
|
|
19
21
|
test('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);
|
|
20
22
|
test('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);
|
|
21
23
|
//# sourceMappingURL=fixtures.js.map
|