@coorpacademy/components 10.13.10-alpha.0 → 10.13.11
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-icon-only/test/fixtures.js +2 -0
- package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -1
- package/es/atom/checkbox-with-title/style.css +2 -4
- package/es/atom/drag-and-drop/index.js +4 -4
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +3 -0
- package/es/molecule/course-section/index.js +19 -16
- package/es/molecule/course-section/index.js.map +1 -1
- package/es/molecule/course-section/style.css +12 -15
- package/es/molecule/course-section/test/fixtures/advanced-level.js +22 -0
- package/es/molecule/course-section/test/fixtures/advanced-level.js.map +1 -0
- package/es/molecule/course-section/test/fixtures/base-level.js +18 -0
- package/es/molecule/course-section/test/fixtures/base-level.js.map +1 -0
- package/es/molecule/course-section/test/fixtures/chapter.js +2 -2
- package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -1
- package/es/molecule/course-section/test/fixtures/coach-level.js +24 -0
- package/es/molecule/course-section/test/fixtures/coach-level.js.map +1 -0
- package/es/molecule/course-section/test/fixtures/course.js +2 -2
- package/es/molecule/course-section/test/fixtures/course.js.map +1 -1
- package/es/molecule/course-section/test/fixtures.js +6 -0
- package/es/molecule/course-section/test/fixtures.js.map +1 -1
- package/es/molecule/course-sections/test/fixtures/default.js +20 -20
- package/es/molecule/course-sections/test/fixtures/default.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/style.css +5 -2
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js +8 -2
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +11 -3
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
- package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/index.js +0 -0
- package/es/molecule/input-text-with-titled-checkbox/index.js.map +1 -0
- package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/style.css +0 -0
- package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/checked.js +0 -0
- package/es/molecule/input-text-with-titled-checkbox/test/fixtures/checked.js.map +1 -0
- package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/unchecked.js +0 -0
- package/es/molecule/input-text-with-titled-checkbox/test/fixtures/unchecked.js.map +1 -0
- package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
- package/es/molecule/list-badges/index.js +38 -0
- package/es/molecule/list-badges/index.js.map +1 -0
- package/es/molecule/list-badges/style.css +15 -0
- package/es/molecule/list-badges/test/fixtures/advanced.js +9 -0
- package/es/molecule/list-badges/test/fixtures/advanced.js.map +1 -0
- package/es/molecule/list-badges/test/fixtures/base.js +8 -0
- package/es/molecule/list-badges/test/fixtures/base.js.map +1 -0
- package/es/molecule/list-badges/test/fixtures/coach.js +10 -0
- package/es/molecule/list-badges/test/fixtures/coach.js.map +1 -0
- package/es/molecule/list-badges/test/fixtures/course.js +8 -0
- package/es/molecule/list-badges/test/fixtures/course.js.map +1 -0
- package/es/molecule/list-badges/test/fixtures.js +19 -0
- package/es/molecule/list-badges/test/fixtures.js.map +1 -0
- package/es/organism/review-header/test/fixtures.js +23 -0
- package/es/organism/review-header/test/fixtures.js.map +1 -0
- package/es/organism/rewards-form/index.js +41 -0
- package/es/organism/rewards-form/index.js.map +1 -0
- package/es/organism/rewards-form/style.css +12 -0
- package/es/organism/rewards-form/test/fixtures/default.js +17 -0
- package/es/organism/rewards-form/test/fixtures/default.js.map +1 -0
- package/es/organism/rewards-form/test/fixtures/no-rewards.js +6 -0
- package/es/organism/rewards-form/test/fixtures/no-rewards.js.map +1 -0
- package/es/organism/rewards-form/test/fixtures/one-reward.js +11 -0
- package/es/organism/rewards-form/test/fixtures/one-reward.js.map +1 -0
- package/es/organism/rewards-form/test/fixtures/two-rewards.js +14 -0
- package/es/organism/rewards-form/test/fixtures/two-rewards.js.map +1 -0
- package/es/organism/rewards-form/test/fixtures.js +19 -0
- package/es/organism/rewards-form/test/fixtures.js.map +1 -0
- package/es/organism/wizard-contents/index.js +6 -0
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/certification-rewards.js +45 -0
- package/es/organism/wizard-contents/test/fixtures/certification-rewards.js.map +1 -0
- 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/wizard-rewards-certification.js +22 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-rewards-certification.js.map +1 -0
- 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/lib/atom/button-link-icon-only/test/fixtures.js +3 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
- package/lib/atom/checkbox-with-title/style.css +2 -4
- package/lib/atom/drag-and-drop/index.js +4 -4
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +3 -0
- package/lib/molecule/course-section/index.js +20 -16
- package/lib/molecule/course-section/index.js.map +1 -1
- package/lib/molecule/course-section/style.css +12 -15
- package/lib/molecule/course-section/test/fixtures/advanced-level.js +27 -0
- package/lib/molecule/course-section/test/fixtures/advanced-level.js.map +1 -0
- package/lib/molecule/course-section/test/fixtures/base-level.js +23 -0
- package/lib/molecule/course-section/test/fixtures/base-level.js.map +1 -0
- package/lib/molecule/course-section/test/fixtures/chapter.js +2 -2
- package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -1
- package/lib/molecule/course-section/test/fixtures/coach-level.js +29 -0
- package/lib/molecule/course-section/test/fixtures/coach-level.js.map +1 -0
- package/lib/molecule/course-section/test/fixtures/course.js +2 -2
- package/lib/molecule/course-section/test/fixtures/course.js.map +1 -1
- package/lib/molecule/course-section/test/fixtures.js +9 -0
- package/lib/molecule/course-section/test/fixtures.js.map +1 -1
- package/lib/molecule/course-sections/test/fixtures/default.js +20 -20
- package/lib/molecule/course-sections/test/fixtures/default.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/style.css +5 -2
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js +8 -2
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +11 -3
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
- package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/index.js +0 -0
- package/lib/molecule/input-text-with-titled-checkbox/index.js.map +1 -0
- package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/style.css +0 -0
- package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/checked.js +0 -0
- package/lib/molecule/input-text-with-titled-checkbox/test/fixtures/checked.js.map +1 -0
- package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/unchecked.js +0 -0
- package/lib/molecule/input-text-with-titled-checkbox/test/fixtures/unchecked.js.map +1 -0
- package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures.js +4 -4
- package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
- package/lib/molecule/list-badges/index.js +50 -0
- package/lib/molecule/list-badges/index.js.map +1 -0
- package/lib/molecule/list-badges/style.css +15 -0
- package/lib/molecule/list-badges/test/fixtures/advanced.js +19 -0
- package/lib/molecule/list-badges/test/fixtures/advanced.js.map +1 -0
- package/lib/molecule/list-badges/test/fixtures/base.js +17 -0
- package/lib/molecule/list-badges/test/fixtures/base.js.map +1 -0
- package/lib/molecule/list-badges/test/fixtures/coach.js +21 -0
- package/lib/molecule/list-badges/test/fixtures/coach.js.map +1 -0
- package/lib/molecule/list-badges/test/fixtures/course.js +17 -0
- package/lib/molecule/list-badges/test/fixtures/course.js.map +1 -0
- package/lib/molecule/list-badges/test/fixtures.js +31 -0
- package/lib/molecule/list-badges/test/fixtures.js.map +1 -0
- package/lib/organism/review-header/test/fixtures.js +37 -0
- package/lib/organism/review-header/test/fixtures.js.map +1 -0
- package/lib/organism/rewards-form/index.js +55 -0
- package/lib/organism/rewards-form/index.js.map +1 -0
- package/lib/organism/rewards-form/style.css +12 -0
- package/lib/organism/rewards-form/test/fixtures/default.js +28 -0
- package/lib/organism/rewards-form/test/fixtures/default.js.map +1 -0
- package/lib/organism/rewards-form/test/fixtures/no-rewards.js +11 -0
- package/lib/organism/rewards-form/test/fixtures/no-rewards.js.map +1 -0
- package/lib/organism/rewards-form/test/fixtures/one-reward.js +20 -0
- package/lib/organism/rewards-form/test/fixtures/one-reward.js.map +1 -0
- package/lib/organism/rewards-form/test/fixtures/two-rewards.js +24 -0
- package/lib/organism/rewards-form/test/fixtures/two-rewards.js.map +1 -0
- package/lib/organism/rewards-form/test/fixtures.js +31 -0
- package/lib/organism/rewards-form/test/fixtures.js.map +1 -0
- package/lib/organism/wizard-contents/index.js +7 -0
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/certification-rewards.js +54 -0
- package/lib/organism/wizard-contents/test/fixtures/certification-rewards.js.map +1 -0
- 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/wizard-rewards-certification.js +32 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-rewards-certification.js.map +1 -0
- 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/package.json +2 -2
- package/es/molecule/input-text-with-titeled-checkbox/index.js.map +0 -1
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +0 -1
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js.map +0 -1
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -15
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
- package/es/molecule/search/test/fixtures.js +0 -15
- package/es/molecule/search/test/fixtures.js.map +0 -1
- package/es/organism/playlist-translation/test/fixtures.js +0 -15
- package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
- package/lib/molecule/input-text-with-titeled-checkbox/index.js.map +0 -1
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +0 -1
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js.map +0 -1
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
- package/lib/molecule/search/test/fixtures.js +0 -25
- package/lib/molecule/search/test/fixtures.js.map +0 -1
- package/lib/organism/playlist-translation/test/fixtures.js +0 -25
- package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/course-sections/test/fixtures/default.js"],"names":["props","sections","title","author","image","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-sections/test/fixtures/default.js"],"names":["props","sections","title","author","image","badgeList","label","category","position","id","isLoading","onDrop","console","log"],"mappings":"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","sourcesContent":["export default {\n props: {\n sections: [\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title:\n 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',\n author: 'Author',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: 'course',\n category: 'course'\n }\n ],\n position: 1,\n id: 'disc_1'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social networks',\n author: 'Author',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n position: 2,\n id: 'chap_1'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Other title',\n author: 'Author 2',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: 'course',\n category: 'course'\n }\n ],\n position: 3,\n id: 'disc_2'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social others',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n position: 4,\n id: 'chap_2'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social others others',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n position: 5,\n id: 'chap_3'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Something about empowerment',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: 'course',\n category: 'course'\n }\n ],\n position: 6,\n id: 'disc_3'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Be a better human being',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n position: 7,\n id: 'chap_4'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Stronger faster better',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: 'course',\n category: 'course'\n }\n ],\n position: 8,\n id: 'disc_4'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Relativity beyond time',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: 'course',\n category: 'course'\n }\n ],\n position: 9,\n id: 'disc_5'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Are you awake?',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n badgeList: [\n {\n label: \"5' learning\",\n category: 'chapter'\n }\n ],\n position: 10,\n id: 'chap_5'\n }\n ],\n isLoading: false,\n onDrop: () => console.log('on drop'),\n title: 'Organize courses'\n }\n};\n"],"file":"default.js"}
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
margin-bottom: 18px;
|
|
3
3
|
}
|
|
4
4
|
.group {
|
|
5
|
+
list-style-type: none;
|
|
6
|
+
padding: 0;
|
|
7
|
+
margin-left: 31px;
|
|
5
8
|
display: flex;
|
|
6
9
|
overflow-y: inherit;
|
|
7
10
|
align-content: flex-start;
|
|
8
11
|
flex-wrap: wrap;
|
|
9
|
-
margin-left: 31px;
|
|
10
|
-
list-style-type: none;
|
|
11
12
|
}
|
|
12
13
|
|
|
13
14
|
.dragAndDrop {
|
|
14
15
|
margin-right: 16px;
|
|
16
|
+
width: 202px;
|
|
17
|
+
height: 183px;
|
|
15
18
|
}
|
|
@@ -1,9 +1,15 @@
|
|
|
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
|
+
|
|
1
3
|
import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';
|
|
2
4
|
import checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';
|
|
3
5
|
export default {
|
|
4
6
|
props: {
|
|
5
|
-
checkBoxTitle: checkBoxTitle.props,
|
|
6
|
-
|
|
7
|
+
checkBoxTitle: _extends(_extends({}, checkBoxTitle.props), {}, {
|
|
8
|
+
title: 'Create badge'
|
|
9
|
+
}),
|
|
10
|
+
list: [_extends(_extends({}, firstdDragAndDrop.props), {}, {
|
|
11
|
+
title: 'Add a badge'
|
|
12
|
+
})]
|
|
7
13
|
}
|
|
8
14
|
};
|
|
9
15
|
//# sourceMappingURL=default.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/default.js"],"names":["firstdDragAndDrop","checkBoxTitle","props","list"],"mappings":"AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/default.js"],"names":["firstdDragAndDrop","checkBoxTitle","props","title","list"],"mappings":";;AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,wBAAMA,aAAa,CAACC,KAApB;AAA2BC,MAAAA,KAAK,EAAE;AAAlC,MADR;AAELC,IAAAA,IAAI,EAAE,uBAAKJ,iBAAiB,CAACE,KAAvB;AAA8BC,MAAAA,KAAK,EAAE;AAArC;AAFD;AADM,CAAf","sourcesContent":["import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';\nimport checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\n\nexport default {\n props: {\n checkBoxTitle: {...checkBoxTitle.props, title: 'Create badge'},\n list: [{...firstdDragAndDrop.props, title: 'Add a badge'}]\n }\n};\n"],"file":"default.js"}
|
|
@@ -1,10 +1,18 @@
|
|
|
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
|
+
|
|
1
3
|
import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';
|
|
2
|
-
import secondDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/
|
|
4
|
+
import secondDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/clean-and-modified';
|
|
3
5
|
import checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';
|
|
4
6
|
export default {
|
|
5
7
|
props: {
|
|
6
|
-
checkBoxTitle: checkBoxTitle.props,
|
|
7
|
-
|
|
8
|
+
checkBoxTitle: _extends(_extends({}, checkBoxTitle.props), {}, {
|
|
9
|
+
title: 'Create diploma'
|
|
10
|
+
}),
|
|
11
|
+
list: [_extends(_extends({}, firstdDragAndDrop.props), {}, {
|
|
12
|
+
title: 'Upload Company logo'
|
|
13
|
+
}), _extends(_extends({}, secondDragAndDrop.props), {}, {
|
|
14
|
+
title: 'Upload digital signature'
|
|
15
|
+
})]
|
|
8
16
|
}
|
|
9
17
|
};
|
|
10
18
|
//# sourceMappingURL=two-drag-and-drops.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js"],"names":["firstdDragAndDrop","secondDragAndDrop","checkBoxTitle","props","list"],"mappings":"AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,iBAAP,MAA8B,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js"],"names":["firstdDragAndDrop","secondDragAndDrop","checkBoxTitle","props","title","list"],"mappings":";;AAAA,OAAOA,iBAAP,MAA8B,sDAA9B;AACA,OAAOC,iBAAP,MAA8B,iEAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,wBAAMA,aAAa,CAACC,KAApB;AAA2BC,MAAAA,KAAK,EAAE;AAAlC,MADR;AAELC,IAAAA,IAAI,EAAE,uBACAL,iBAAiB,CAACG,KADlB;AACyBC,MAAAA,KAAK,EAAE;AADhC,8BAEAH,iBAAiB,CAACE,KAFlB;AAEyBC,MAAAA,KAAK,EAAE;AAFhC;AAFD;AADM,CAAf","sourcesContent":["import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';\nimport secondDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/clean-and-modified';\nimport checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\n\nexport default {\n props: {\n checkBoxTitle: {...checkBoxTitle.props, title: 'Create diploma'},\n list: [\n {...firstdDragAndDrop.props, title: 'Upload Company logo'},\n {...secondDragAndDrop.props, title: 'Upload digital signature'}\n ]\n }\n};\n"],"file":"two-drag-and-drops.js"}
|
package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/index.js
RENAMED
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/input-text-with-titled-checkbox/index.js"],"names":["React","PropTypes","InputText","CheckboxWithTitle","style","InputTextWithTiteledCheckbox","props","title","name","checked","checkBoxOnChange","ariaLabel","inputTextTitle","inputTextValue","inputTextPlaceholder","inputTextDescription","inputTextDisabled","inputTextModified","inputTextOnChange","checkbox","inputText","input","propTypes","string","bool","func","shape"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,SAAP,MAAsB,uBAAtB;AACA,OAAOC,iBAAP,MAA8B,gCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,4BAA4B,GAAGC,KAAK,IAAI;AAC5C,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,IAFI;AAGJC,IAAAA,OAHI;AAIJC,IAAAA,gBAJI;AAKJ,kBAAcC,SALV;AAMJC,IAAAA,cANI;AAOJC,IAAAA,cAPI;AAQJC,IAAAA,oBARI;AASJC,IAAAA,oBATI;AAUJC,IAAAA,iBAVI;AAWJC,IAAAA,iBAXI;AAYJC,IAAAA;AAZI,MAaFZ,KAbJ;AAeA,sBACE,8CACE,oBAAC,iBAAD;AACE,IAAA,KAAK,EAAEC,KADT;AAEE,IAAA,IAAI,EAAEC,IAFR;AAGE,IAAA,OAAO,EAAEC,OAHX;AAIE,IAAA,QAAQ,EAAEC,gBAJZ;AAKE,iBAAU,WALZ;AAME,kBAAYC,SAAS,CAACQ;AANxB,IADF,eASE;AAAK,IAAA,SAAS,EAAEf,KAAK,CAACgB;AAAtB,kBACE,oBAAC,SAAD;AACE,IAAA,KAAK,EAAER,cADT;AAEE,IAAA,KAAK,EAAEC,cAFT;AAGE,IAAA,WAAW,EAAEC,oBAHf;AAIE,IAAA,KAAK,EAAC,cAJR;AAKE,IAAA,WAAW,EAAEC,oBALf;AAME,IAAA,QAAQ,EAAEC,iBANZ;AAOE,IAAA,QAAQ,EAAEC,iBAPZ;AAQE,IAAA,QAAQ,EAAEC,iBARZ;AASE,iBAAU,YATZ;AAUE,kBAAYP,SAAS,CAACU;AAVxB,IADF,CATF,CADF;AA0BD,CA1CD;;AA4CAhB,4BAA4B,CAACiB,SAA7B,2CAAyC;AACvCf,EAAAA,KAAK,EAAEN,SAAS,CAACsB,MADsB;AAEvCf,EAAAA,IAAI,EAAEP,SAAS,CAACsB,MAFuB;AAGvCd,EAAAA,OAAO,EAAER,SAAS,CAACuB,IAHoB;AAIvCd,EAAAA,gBAAgB,EAAET,SAAS,CAACwB,IAJW;AAKvC,gBAAcxB,SAAS,CAACyB,KAAV,CAAgB;AAC5BL,IAAAA,KAAK,EAAEpB,SAAS,CAACsB,MADW;AAE5BJ,IAAAA,QAAQ,EAAElB,SAAS,CAACsB;AAFQ,GAAhB,CALyB;AASvCX,EAAAA,cAAc,EAAEX,SAAS,CAACsB,MATa;AAUvCV,EAAAA,cAAc,EAAEZ,SAAS,CAACsB,MAVa;AAWvCT,EAAAA,oBAAoB,EAAEb,SAAS,CAACsB,MAXO;AAYvCR,EAAAA,oBAAoB,EAAEd,SAAS,CAACsB,MAZO;AAavCP,EAAAA,iBAAiB,EAAEf,SAAS,CAACuB,IAbU;AAcvCP,EAAAA,iBAAiB,EAAEhB,SAAS,CAACuB,IAdU;AAevCN,EAAAA,iBAAiB,EAAEjB,SAAS,CAACwB;AAfU,CAAzC;AAiBA,eAAepB,4BAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputText from '../../atom/input-text';\nimport CheckboxWithTitle from '../../atom/checkbox-with-title';\nimport style from './style.css';\n\nconst InputTextWithTiteledCheckbox = props => {\n const {\n title,\n name,\n checked,\n checkBoxOnChange,\n 'aria-label': ariaLabel,\n inputTextTitle,\n inputTextValue,\n inputTextPlaceholder,\n inputTextDescription,\n inputTextDisabled,\n inputTextModified,\n inputTextOnChange\n } = props;\n\n return (\n <div>\n <CheckboxWithTitle\n title={title}\n name={name}\n checked={checked}\n onChange={checkBoxOnChange}\n data-name=\"check-box\"\n aria-label={ariaLabel.checkbox}\n />\n <div className={style.inputText}>\n <InputText\n title={inputTextTitle}\n value={inputTextValue}\n placeholder={inputTextPlaceholder}\n theme=\"coorpmanager\"\n description={inputTextDescription}\n disabled={inputTextDisabled}\n modified={inputTextModified}\n onChange={inputTextOnChange}\n data-name=\"input-text\"\n aria-label={ariaLabel.input}\n />\n </div>\n </div>\n );\n};\n\nInputTextWithTiteledCheckbox.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n checked: PropTypes.bool,\n checkBoxOnChange: PropTypes.func,\n 'aria-label': PropTypes.shape({\n input: PropTypes.string,\n checkbox: PropTypes.string\n }),\n inputTextTitle: PropTypes.string,\n inputTextValue: PropTypes.string,\n inputTextPlaceholder: PropTypes.string,\n inputTextDescription: PropTypes.string,\n inputTextDisabled: PropTypes.bool,\n inputTextModified: PropTypes.bool,\n inputTextOnChange: PropTypes.func\n};\nexport default InputTextWithTiteledCheckbox;\n"],"file":"index.js"}
|
package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/style.css
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/input-text-with-titled-checkbox/test/fixtures/checked.js"],"names":["props","title","checked","checkBoxOnChange","value","console","log","inputTextTitle","inputTextValue","inputTextDescription","inputTextOnChange","checkbox","input"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,WADF;AAELC,IAAAA,OAAO,EAAE,IAFJ;AAGLC,IAAAA,gBAAgB,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAHtB;AAILG,IAAAA,cAAc,EAAE,cAJX;AAKLC,IAAAA,cAAc,EAAE,KALX;AAMLC,IAAAA,oBAAoB,EAAE,0BANjB;AAOLC,IAAAA,iBAAiB,EAAEN,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAPvB;AAQL,kBAAc;AAACO,MAAAA,QAAQ,EAAE,WAAX;AAAwBC,MAAAA,KAAK,EAAE;AAA/B;AART;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Add stars',\n checked: true,\n checkBoxOnChange: value => console.log(value),\n inputTextTitle: 'Stars amount',\n inputTextValue: '250',\n inputTextDescription: 'This is the tooltip text',\n inputTextOnChange: value => console.log(value),\n 'aria-label': {checkbox: 'check box', input: 'input text'}\n }\n};\n"],"file":"checked.js"}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/input-text-with-titled-checkbox/test/fixtures/unchecked.js"],"names":["props","title","checked","onChange","value","console","log","checkBoxOnChange","inputTextTitle","inputTextValue","inputTextDescription","inputTextDisabled","inputTextOnChange","checkbox","input"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,cADF;AAELC,IAAAA,OAAO,EAAE,KAFJ;AAGLC,IAAAA,QAAQ,EAAEC,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAHd;AAILG,IAAAA,gBAAgB,EAAEH,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CAJtB;AAKLI,IAAAA,cAAc,EAAE,cALX;AAMLC,IAAAA,cAAc,EAAE,KANX;AAOLC,IAAAA,oBAAoB,EAAE,0BAPjB;AAQLC,IAAAA,iBAAiB,EAAE,IARd;AASLC,IAAAA,iBAAiB,EAAER,KAAK,IAAIC,OAAO,CAACC,GAAR,CAAYF,KAAZ,CATvB;AAUL,kBAAc;AAACS,MAAAA,QAAQ,EAAE,WAAX;AAAwBC,MAAAA,KAAK,EAAE;AAA/B;AAVT;AADM,CAAf","sourcesContent":["export default {\n props: {\n title: 'Create badge',\n checked: false,\n onChange: value => console.log(value),\n checkBoxOnChange: value => console.log(value),\n inputTextTitle: 'Stars amount',\n inputTextValue: '250',\n inputTextDescription: 'This is the tooltip text',\n inputTextDisabled: true,\n inputTextOnChange: value => console.log(value),\n 'aria-label': {checkbox: 'check box', input: 'input text'}\n }\n};\n"],"file":"unchecked.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 MoleculeInputTextWithTitledCheckbox from '..';
|
|
5
|
+
import fixtureChecked from './fixtures/checked';
|
|
6
|
+
import fixtureUnchecked from './fixtures/unchecked';
|
|
7
|
+
test('Molecule › MoleculeInputTextWithTitledCheckbox > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeInputTextWithTitledCheckbox.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeInputTextWithTitledCheckbox.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeInputTextWithTitledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTitledCheckbox, fixtureChecked);
|
|
14
|
+
test('Molecule › MoleculeInputTextWithTitledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTitledCheckbox, fixtureUnchecked);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/input-text-with-titled-checkbox/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeInputTextWithTitledCheckbox","fixtureChecked","fixtureUnchecked","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,mCAAP,MAAgD,IAAhD;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AAEAL,IAAI,CAAC,8EAAD,EAAiFM,CAAC,IAAI;AACxFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,mCAAmC,CAACK,SAArC,EAAgD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACrEJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,wEAAuEF,GAAI,mEAApG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,+EAAD,EAAkFE,oBAAlF,EAAwGC,mCAAxG,EAA6IC,cAA7I,CAAJ;AACAJ,IAAI,CAAC,iFAAD,EAAoFE,oBAApF,EAA0GC,mCAA1G,EAA+IE,gBAA/I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeInputTextWithTitledCheckbox from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Molecule › MoleculeInputTextWithTitledCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeInputTextWithTitledCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeInputTextWithTitledCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeInputTextWithTitledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTitledCheckbox, fixtureChecked);\ntest('Molecule › MoleculeInputTextWithTitledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTitledCheckbox, fixtureUnchecked);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import map from 'lodash/fp/map';
|
|
4
|
+
import ContentBadge from '../../atom/content-badge';
|
|
5
|
+
import style from './style.css';
|
|
6
|
+
|
|
7
|
+
const ListBadges = ({
|
|
8
|
+
items,
|
|
9
|
+
'aria-label': ariaLabel
|
|
10
|
+
}) => {
|
|
11
|
+
const itemsView = map(({
|
|
12
|
+
category,
|
|
13
|
+
label
|
|
14
|
+
}) => {
|
|
15
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
16
|
+
className: style.item,
|
|
17
|
+
key: `badge-${category}`,
|
|
18
|
+
"data-name": `badge-${category}`,
|
|
19
|
+
"aria-label": label
|
|
20
|
+
}, /*#__PURE__*/React.createElement(ContentBadge, {
|
|
21
|
+
className: style.contentBadge,
|
|
22
|
+
category: category,
|
|
23
|
+
label: label
|
|
24
|
+
}));
|
|
25
|
+
}, items);
|
|
26
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
27
|
+
className: style.list,
|
|
28
|
+
"aria-label": ariaLabel,
|
|
29
|
+
"data-name": "badges-list"
|
|
30
|
+
}, itemsView);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
ListBadges.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
34
|
+
'aria-label': PropTypes.string,
|
|
35
|
+
items: PropTypes.arrayOf(PropTypes.shape(ContentBadge.propTypes))
|
|
36
|
+
} : {};
|
|
37
|
+
export default ListBadges;
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/list-badges/index.js"],"names":["React","PropTypes","map","ContentBadge","style","ListBadges","items","ariaLabel","itemsView","category","label","item","contentBadge","list","propTypes","string","arrayOf","shape"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,UAAU,GAAG,CAAC;AAACC,EAAAA,KAAD;AAAQ,gBAAcC;AAAtB,CAAD,KAAsC;AACvD,QAAMC,SAAS,GAAGN,GAAG,CAAC,CAAC;AAACO,IAAAA,QAAD;AAAWC,IAAAA;AAAX,GAAD,KAAuB;AAC3C,wBACE;AACE,MAAA,SAAS,EAAEN,KAAK,CAACO,IADnB;AAEE,MAAA,GAAG,EAAG,SAAQF,QAAS,EAFzB;AAGE,mBAAY,SAAQA,QAAS,EAH/B;AAIE,oBAAYC;AAJd,oBAME,oBAAC,YAAD;AAAc,MAAA,SAAS,EAAEN,KAAK,CAACQ,YAA/B;AAA6C,MAAA,QAAQ,EAAEH,QAAvD;AAAiE,MAAA,KAAK,EAAEC;AAAxE,MANF,CADF;AAUD,GAXoB,EAWlBJ,KAXkB,CAArB;AAaA,sBACE;AAAI,IAAA,SAAS,EAAEF,KAAK,CAACS,IAArB;AAA2B,kBAAYN,SAAvC;AAAkD,iBAAU;AAA5D,KACGC,SADH,CADF;AAKD,CAnBD;;AAqBAH,UAAU,CAACS,SAAX,2CAAuB;AACrB,gBAAcb,SAAS,CAACc,MADH;AAErBT,EAAAA,KAAK,EAAEL,SAAS,CAACe,OAAV,CAAkBf,SAAS,CAACgB,KAAV,CAAgBd,YAAY,CAACW,SAA7B,CAAlB;AAFc,CAAvB;AAKA,eAAeT,UAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport map from 'lodash/fp/map';\nimport ContentBadge from '../../atom/content-badge';\nimport style from './style.css';\n\nconst ListBadges = ({items, 'aria-label': ariaLabel}) => {\n const itemsView = map(({category, label}) => {\n return (\n <li\n className={style.item}\n key={`badge-${category}`}\n data-name={`badge-${category}`}\n aria-label={label}\n >\n <ContentBadge className={style.contentBadge} category={category} label={label} />\n </li>\n );\n }, items);\n\n return (\n <ul className={style.list} aria-label={ariaLabel} data-name=\"badges-list\">\n {itemsView}\n </ul>\n );\n};\n\nListBadges.propTypes = {\n 'aria-label': PropTypes.string,\n items: PropTypes.arrayOf(PropTypes.shape(ContentBadge.propTypes))\n};\n\nexport default ListBadges;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import advanced from '../../../../atom/content-badge/test/fixtures/advanced';
|
|
2
|
+
import base from '../../../../atom/content-badge/test/fixtures/default';
|
|
3
|
+
export default {
|
|
4
|
+
props: {
|
|
5
|
+
'aria-label': 'aria list',
|
|
6
|
+
items: [base.props, advanced.props]
|
|
7
|
+
}
|
|
8
|
+
};
|
|
9
|
+
//# sourceMappingURL=advanced.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/list-badges/test/fixtures/advanced.js"],"names":["advanced","base","props","items"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,uDAArB;AACA,OAAOC,IAAP,MAAiB,sDAAjB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACL,kBAAc,WADT;AAELC,IAAAA,KAAK,EAAE,CAACF,IAAI,CAACC,KAAN,EAAaF,QAAQ,CAACE,KAAtB;AAFF;AADM,CAAf","sourcesContent":["import advanced from '../../../../atom/content-badge/test/fixtures/advanced';\nimport base from '../../../../atom/content-badge/test/fixtures/default';\n\nexport default {\n props: {\n 'aria-label': 'aria list',\n items: [base.props, advanced.props]\n }\n};\n"],"file":"advanced.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/list-badges/test/fixtures/base.js"],"names":["base","props","items"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,sDAAjB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACL,kBAAc,WADT;AAELC,IAAAA,KAAK,EAAE,CAACF,IAAI,CAACC,KAAN;AAFF;AADM,CAAf","sourcesContent":["import base from '../../../../atom/content-badge/test/fixtures/default';\n\nexport default {\n props: {\n 'aria-label': 'aria list',\n items: [base.props]\n }\n};\n"],"file":"base.js"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import advanced from '../../../../atom/content-badge/test/fixtures/advanced';
|
|
2
|
+
import coach from '../../../../atom/content-badge/test/fixtures/coach';
|
|
3
|
+
import base from '../../../../atom/content-badge/test/fixtures/default';
|
|
4
|
+
export default {
|
|
5
|
+
props: {
|
|
6
|
+
'aria-label': 'aria list',
|
|
7
|
+
items: [base.props, advanced.props, coach.props]
|
|
8
|
+
}
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=coach.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/list-badges/test/fixtures/coach.js"],"names":["advanced","coach","base","props","items"],"mappings":"AAAA,OAAOA,QAAP,MAAqB,uDAArB;AACA,OAAOC,KAAP,MAAkB,oDAAlB;AACA,OAAOC,IAAP,MAAiB,sDAAjB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACL,kBAAc,WADT;AAELC,IAAAA,KAAK,EAAE,CAACF,IAAI,CAACC,KAAN,EAAaH,QAAQ,CAACG,KAAtB,EAA6BF,KAAK,CAACE,KAAnC;AAFF;AADM,CAAf","sourcesContent":["import advanced from '../../../../atom/content-badge/test/fixtures/advanced';\nimport coach from '../../../../atom/content-badge/test/fixtures/coach';\nimport base from '../../../../atom/content-badge/test/fixtures/default';\n\nexport default {\n props: {\n 'aria-label': 'aria list',\n items: [base.props, advanced.props, coach.props]\n }\n};\n"],"file":"coach.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/list-badges/test/fixtures/course.js"],"names":["course","props","items"],"mappings":"AAAA,OAAOA,MAAP,MAAmB,qDAAnB;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACL,kBAAc,WADT;AAELC,IAAAA,KAAK,EAAE,CAACF,MAAM,CAACC,KAAR;AAFF;AADM,CAAf","sourcesContent":["import course from '../../../../atom/content-badge/test/fixtures/course';\n\nexport default {\n props: {\n 'aria-label': 'aria list',\n items: [course.props]\n }\n};\n"],"file":"course.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeListBadges from '..';
|
|
5
|
+
import fixtureAdvanced from './fixtures/advanced';
|
|
6
|
+
import fixtureBase from './fixtures/base';
|
|
7
|
+
import fixtureCoach from './fixtures/coach';
|
|
8
|
+
import fixtureCourse from './fixtures/course';
|
|
9
|
+
test('Molecule › MoleculeListBadges > should have valid propTypes', t => {
|
|
10
|
+
t.pass();
|
|
11
|
+
forEach(MoleculeListBadges.propTypes, (value, key) => {
|
|
12
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeListBadges.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
test('Molecule › MoleculeListBadges › Advanced › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureAdvanced);
|
|
16
|
+
test('Molecule › MoleculeListBadges › Base › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureBase);
|
|
17
|
+
test('Molecule › MoleculeListBadges › Coach › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureCoach);
|
|
18
|
+
test('Molecule › MoleculeListBadges › Course › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureCourse);
|
|
19
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/list-badges/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeListBadges","fixtureAdvanced","fixtureBase","fixtureCoach","fixtureCourse","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,kBAAP,MAA+B,IAA/B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AAEAP,IAAI,CAAC,6DAAD,EAAgEQ,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,kBAAkB,CAACO,SAApB,EAA+B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACpDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,kBAAxF,EAA4GC,eAA5G,CAAJ;AACAJ,IAAI,CAAC,2DAAD,EAA8DE,oBAA9D,EAAoFC,kBAApF,EAAwGE,WAAxG,CAAJ;AACAL,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,kBAArF,EAAyGG,YAAzG,CAAJ;AACAN,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,kBAAtF,EAA0GI,aAA1G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeListBadges from '..';\nimport fixtureAdvanced from './fixtures/advanced';\nimport fixtureBase from './fixtures/base';\nimport fixtureCoach from './fixtures/coach';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeListBadges > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeListBadges.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeListBadges.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeListBadges › Advanced › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureAdvanced);\ntest('Molecule › MoleculeListBadges › Base › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureBase);\ntest('Molecule › MoleculeListBadges › Coach › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureCoach);\ntest('Molecule › MoleculeListBadges › Course › should be rendered', renderComponentMacro, MoleculeListBadges, fixtureCourse);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import OrganismReviewHeader from '..';
|
|
5
|
+
import fixtureAllQuestionsOk from './fixtures/all-questions-ok';
|
|
6
|
+
import fixtureCurrentQuestionNoAnswered from './fixtures/current-question-no-answered';
|
|
7
|
+
import fixtureCurrentQuestionWrong from './fixtures/current-question-wrong';
|
|
8
|
+
import fixtureFirstQuestionCurrentRight from './fixtures/first-question-current-right';
|
|
9
|
+
import fixtureNoAnsweredQuestion from './fixtures/no-answered-question';
|
|
10
|
+
import fixtureQuestionToRepeat from './fixtures/question-to-repeat';
|
|
11
|
+
test('Organism › OrganismReviewHeader > should have valid propTypes', t => {
|
|
12
|
+
t.pass();
|
|
13
|
+
forEach(OrganismReviewHeader.propTypes, (value, key) => {
|
|
14
|
+
t.not(value, undefined, `PropType for "Organism.OrganismReviewHeader.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
test('Organism › OrganismReviewHeader › AllQuestionsOk › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureAllQuestionsOk);
|
|
18
|
+
test('Organism › OrganismReviewHeader › CurrentQuestionNoAnswered › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureCurrentQuestionNoAnswered);
|
|
19
|
+
test('Organism › OrganismReviewHeader › CurrentQuestionWrong › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureCurrentQuestionWrong);
|
|
20
|
+
test('Organism › OrganismReviewHeader › FirstQuestionCurrentRight › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureFirstQuestionCurrentRight);
|
|
21
|
+
test('Organism › OrganismReviewHeader › NoAnsweredQuestion › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureNoAnsweredQuestion);
|
|
22
|
+
test('Organism › OrganismReviewHeader › QuestionToRepeat › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureQuestionToRepeat);
|
|
23
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/review-header/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismReviewHeader","fixtureAllQuestionsOk","fixtureCurrentQuestionNoAnswered","fixtureCurrentQuestionWrong","fixtureFirstQuestionCurrentRight","fixtureNoAnsweredQuestion","fixtureQuestionToRepeat","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,oBAAP,MAAiC,IAAjC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,gCAAP,MAA6C,yCAA7C;AACA,OAAOC,2BAAP,MAAwC,mCAAxC;AACA,OAAOC,gCAAP,MAA6C,yCAA7C;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AAEAT,IAAI,CAAC,+DAAD,EAAkEU,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,oBAAoB,CAACS,SAAtB,EAAiC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,oBAAhG,EAAsHC,qBAAtH,CAAJ;AACAJ,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,oBAA3G,EAAiIE,gCAAjI,CAAJ;AACAL,IAAI,CAAC,6EAAD,EAAgFE,oBAAhF,EAAsGC,oBAAtG,EAA4HG,2BAA5H,CAAJ;AACAN,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,oBAA3G,EAAiII,gCAAjI,CAAJ;AACAP,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,oBAApG,EAA0HK,yBAA1H,CAAJ;AACAR,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,oBAAlG,EAAwHM,uBAAxH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismReviewHeader from '..';\nimport fixtureAllQuestionsOk from './fixtures/all-questions-ok';\nimport fixtureCurrentQuestionNoAnswered from './fixtures/current-question-no-answered';\nimport fixtureCurrentQuestionWrong from './fixtures/current-question-wrong';\nimport fixtureFirstQuestionCurrentRight from './fixtures/first-question-current-right';\nimport fixtureNoAnsweredQuestion from './fixtures/no-answered-question';\nimport fixtureQuestionToRepeat from './fixtures/question-to-repeat';\n\ntest('Organism › OrganismReviewHeader > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismReviewHeader.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismReviewHeader.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismReviewHeader › AllQuestionsOk › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureAllQuestionsOk);\ntest('Organism › OrganismReviewHeader › CurrentQuestionNoAnswered › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureCurrentQuestionNoAnswered);\ntest('Organism › OrganismReviewHeader › CurrentQuestionWrong › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureCurrentQuestionWrong);\ntest('Organism › OrganismReviewHeader › FirstQuestionCurrentRight › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureFirstQuestionCurrentRight);\ntest('Organism › OrganismReviewHeader › NoAnsweredQuestion › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureNoAnsweredQuestion);\ntest('Organism › OrganismReviewHeader › QuestionToRepeat › should be rendered', renderComponentMacro, OrganismReviewHeader, fixtureQuestionToRepeat);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
4
|
+
|
|
5
|
+
import React from 'react';
|
|
6
|
+
import PropTypes from 'prop-types';
|
|
7
|
+
import classnames from 'classnames';
|
|
8
|
+
import InputTextWithTitledCheckbox from '../../molecule/input-text-with-titled-checkbox';
|
|
9
|
+
import DragAndDropWrapper from '../../molecule/drag-and-drop-wrapper';
|
|
10
|
+
import style from './style.css';
|
|
11
|
+
const ITEM = {
|
|
12
|
+
'input-text': InputTextWithTitledCheckbox,
|
|
13
|
+
'drag-and-drop': DragAndDropWrapper
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
const RewardsForm = ({
|
|
17
|
+
items
|
|
18
|
+
}) => {
|
|
19
|
+
const itemsView = items.map((_ref, index) => {
|
|
20
|
+
let {
|
|
21
|
+
type
|
|
22
|
+
} = _ref,
|
|
23
|
+
item = _objectWithoutPropertiesLoose(_ref, ["type"]);
|
|
24
|
+
|
|
25
|
+
const Component = ITEM[type];
|
|
26
|
+
return /*#__PURE__*/React.createElement("li", {
|
|
27
|
+
key: index,
|
|
28
|
+
className: classnames(style.item, type === 'input-text' && style.inputText),
|
|
29
|
+
"data-name": `reward-${index}`
|
|
30
|
+
}, /*#__PURE__*/React.createElement(Component, item));
|
|
31
|
+
});
|
|
32
|
+
return /*#__PURE__*/React.createElement("ul", {
|
|
33
|
+
className: style.list
|
|
34
|
+
}, itemsView);
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
RewardsForm.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
38
|
+
items: PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.shape(_extends({}, InputTextWithTitledCheckbox.propTypes)), PropTypes.shape(_extends({}, DragAndDropWrapper.propTypes))]))
|
|
39
|
+
} : {};
|
|
40
|
+
export default RewardsForm;
|
|
41
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/rewards-form/index.js"],"names":["React","PropTypes","classnames","InputTextWithTitledCheckbox","DragAndDropWrapper","style","ITEM","RewardsForm","items","itemsView","map","index","type","item","Component","inputText","list","propTypes","arrayOf","oneOfType","shape"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,2BAAP,MAAwC,gDAAxC;AACA,OAAOC,kBAAP,MAA+B,sCAA/B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,IAAI,GAAG;AACX,gBAAcH,2BADH;AAEX,mBAAiBC;AAFN,CAAb;;AAKA,MAAMG,WAAW,GAAG,CAAC;AAACC,EAAAA;AAAD,CAAD,KAAa;AAC/B,QAAMC,SAAS,GAAGD,KAAK,CAACE,GAAN,CAAU,OAAkBC,KAAlB,KAA4B;AAAA,QAA3B;AAACC,MAAAA;AAAD,KAA2B;AAAA,QAAjBC,IAAiB;;AACtD,UAAMC,SAAS,GAAGR,IAAI,CAACM,IAAD,CAAtB;AACA,wBACE;AACE,MAAA,GAAG,EAAED,KADP;AAEE,MAAA,SAAS,EAAET,UAAU,CAACG,KAAK,CAACQ,IAAP,EAAaD,IAAI,KAAK,YAAT,IAAyBP,KAAK,CAACU,SAA5C,CAFvB;AAGE,mBAAY,UAASJ,KAAM;AAH7B,oBAKE,oBAAC,SAAD,EAAeE,IAAf,CALF,CADF;AASD,GAXiB,CAAlB;AAYA,sBAAO;AAAI,IAAA,SAAS,EAAER,KAAK,CAACW;AAArB,KAA4BP,SAA5B,CAAP;AACD,CAdD;;AAgBAF,WAAW,CAACU,SAAZ,2CAAwB;AACtBT,EAAAA,KAAK,EAAEP,SAAS,CAACiB,OAAV,CACLjB,SAAS,CAACkB,SAAV,CAAoB,CAClBlB,SAAS,CAACmB,KAAV,cAAoBjB,2BAA2B,CAACc,SAAhD,EADkB,EAElBhB,SAAS,CAACmB,KAAV,cAAoBhB,kBAAkB,CAACa,SAAvC,EAFkB,CAApB,CADK;AADe,CAAxB;AASA,eAAeV,WAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport InputTextWithTitledCheckbox from '../../molecule/input-text-with-titled-checkbox';\nimport DragAndDropWrapper from '../../molecule/drag-and-drop-wrapper';\nimport style from './style.css';\n\nconst ITEM = {\n 'input-text': InputTextWithTitledCheckbox,\n 'drag-and-drop': DragAndDropWrapper\n};\n\nconst RewardsForm = ({items}) => {\n const itemsView = items.map(({type, ...item}, index) => {\n const Component = ITEM[type];\n return (\n <li\n key={index}\n className={classnames(style.item, type === 'input-text' && style.inputText)}\n data-name={`reward-${index}`}\n >\n <Component {...item} />\n </li>\n );\n });\n return <ul className={style.list}>{itemsView}</ul>;\n};\n\nRewardsForm.propTypes = {\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({...InputTextWithTitledCheckbox.propTypes}),\n PropTypes.shape({...DragAndDropWrapper.propTypes})\n ])\n )\n};\n\nexport default RewardsForm;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
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 checkedInputText from '../../../../molecule/input-text-with-titled-checkbox/test/fixtures/checked';
|
|
4
|
+
import singleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/default';
|
|
5
|
+
import doubleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops';
|
|
6
|
+
export default {
|
|
7
|
+
props: {
|
|
8
|
+
items: [_extends(_extends({}, checkedInputText.props), {}, {
|
|
9
|
+
type: 'input-text'
|
|
10
|
+
}), _extends(_extends({}, singleDragAndDrop.props), {}, {
|
|
11
|
+
type: 'drag-and-drop'
|
|
12
|
+
}), _extends(_extends({}, doubleDragAndDrop.props), {}, {
|
|
13
|
+
type: 'drag-and-drop'
|
|
14
|
+
})]
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/rewards-form/test/fixtures/default.js"],"names":["checkedInputText","singleDragAndDrop","doubleDragAndDrop","props","items","type"],"mappings":";;AAAA,OAAOA,gBAAP,MAA6B,4EAA7B;AACA,OAAOC,iBAAP,MAA8B,kEAA9B;AACA,OAAOC,iBAAP,MAA8B,6EAA9B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBACDJ,gBAAgB,CAACG,KADhB;AACuBE,MAAAA,IAAI,EAAE;AAD7B,8BAEDJ,iBAAiB,CAACE,KAFjB;AAEwBE,MAAAA,IAAI,EAAE;AAF9B,8BAGDH,iBAAiB,CAACC,KAHjB;AAGwBE,MAAAA,IAAI,EAAE;AAH9B;AADF;AADM,CAAf","sourcesContent":["import checkedInputText from '../../../../molecule/input-text-with-titled-checkbox/test/fixtures/checked';\nimport singleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/default';\nimport doubleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops';\n\nexport default {\n props: {\n items: [\n {...checkedInputText.props, type: 'input-text'},\n {...singleDragAndDrop.props, type: 'drag-and-drop'},\n {...doubleDragAndDrop.props, type: 'drag-and-drop'}\n ]\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/rewards-form/test/fixtures/no-rewards.js"],"names":["props","items"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE;AADF;AADM,CAAf","sourcesContent":["export default {\n props: {\n items: []\n }\n};\n"],"file":"no-rewards.js"}
|
|
@@ -0,0 +1,11 @@
|
|
|
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 singleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/default';
|
|
4
|
+
export default {
|
|
5
|
+
props: {
|
|
6
|
+
items: [_extends(_extends({}, singleDragAndDrop.props), {}, {
|
|
7
|
+
type: 'drag-and-drop'
|
|
8
|
+
})]
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=one-reward.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/rewards-form/test/fixtures/one-reward.js"],"names":["singleDragAndDrop","props","items","type"],"mappings":";;AAAA,OAAOA,iBAAP,MAA8B,kEAA9B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBAAKF,iBAAiB,CAACC,KAAvB;AAA8BE,MAAAA,IAAI,EAAE;AAApC;AADF;AADM,CAAf","sourcesContent":["import singleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/default';\n\nexport default {\n props: {\n items: [{...singleDragAndDrop.props, type: 'drag-and-drop'}]\n }\n};\n"],"file":"one-reward.js"}
|
|
@@ -0,0 +1,14 @@
|
|
|
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 checkedInputText from '../../../../molecule/input-text-with-titled-checkbox/test/fixtures/checked';
|
|
4
|
+
import doubleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops';
|
|
5
|
+
export default {
|
|
6
|
+
props: {
|
|
7
|
+
items: [_extends(_extends({}, checkedInputText.props), {}, {
|
|
8
|
+
type: 'input-text'
|
|
9
|
+
}), _extends(_extends({}, doubleDragAndDrop.props), {}, {
|
|
10
|
+
type: 'drag-and-drop'
|
|
11
|
+
})]
|
|
12
|
+
}
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=two-rewards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/rewards-form/test/fixtures/two-rewards.js"],"names":["checkedInputText","doubleDragAndDrop","props","items","type"],"mappings":";;AAAA,OAAOA,gBAAP,MAA6B,4EAA7B;AACA,OAAOC,iBAAP,MAA8B,6EAA9B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,uBACDH,gBAAgB,CAACE,KADhB;AACuBE,MAAAA,IAAI,EAAE;AAD7B,8BAEDH,iBAAiB,CAACC,KAFjB;AAEwBE,MAAAA,IAAI,EAAE;AAF9B;AADF;AADM,CAAf","sourcesContent":["import checkedInputText from '../../../../molecule/input-text-with-titled-checkbox/test/fixtures/checked';\nimport doubleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops';\n\nexport default {\n props: {\n items: [\n {...checkedInputText.props, type: 'input-text'},\n {...doubleDragAndDrop.props, type: 'drag-and-drop'}\n ]\n }\n};\n"],"file":"two-rewards.js"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import OrganismRewardsForm from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureNoRewards from './fixtures/no-rewards';
|
|
7
|
+
import fixtureOneReward from './fixtures/one-reward';
|
|
8
|
+
import fixtureTwoRewards from './fixtures/two-rewards';
|
|
9
|
+
test('Organism › OrganismRewardsForm > should have valid propTypes', t => {
|
|
10
|
+
t.pass();
|
|
11
|
+
forEach(OrganismRewardsForm.propTypes, (value, key) => {
|
|
12
|
+
t.not(value, undefined, `PropType for "Organism.OrganismRewardsForm.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
13
|
+
});
|
|
14
|
+
});
|
|
15
|
+
test('Organism › OrganismRewardsForm › Default › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureDefault);
|
|
16
|
+
test('Organism › OrganismRewardsForm › NoRewards › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureNoRewards);
|
|
17
|
+
test('Organism › OrganismRewardsForm › OneReward › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureOneReward);
|
|
18
|
+
test('Organism › OrganismRewardsForm › TwoRewards › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureTwoRewards);
|
|
19
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/rewards-form/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismRewardsForm","fixtureDefault","fixtureNoRewards","fixtureOneReward","fixtureTwoRewards","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,mBAAP,MAAgC,IAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AAEAP,IAAI,CAAC,8DAAD,EAAiEQ,CAAC,IAAI;AACxEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,mBAAmB,CAACO,SAArB,EAAgC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACrDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,wDAAuDF,GAAI,mEAApF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,+DAAD,EAAkEE,oBAAlE,EAAwFC,mBAAxF,EAA6GC,cAA7G,CAAJ;AACAJ,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,mBAA1F,EAA+GE,gBAA/G,CAAJ;AACAL,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,mBAA1F,EAA+GG,gBAA/G,CAAJ;AACAN,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,mBAA3F,EAAgHI,iBAAhH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismRewardsForm from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoRewards from './fixtures/no-rewards';\nimport fixtureOneReward from './fixtures/one-reward';\nimport fixtureTwoRewards from './fixtures/two-rewards';\n\ntest('Organism › OrganismRewardsForm > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismRewardsForm.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismRewardsForm.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismRewardsForm › Default › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureDefault);\ntest('Organism › OrganismRewardsForm › NoRewards › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureNoRewards);\ntest('Organism › OrganismRewardsForm › OneReward › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureOneReward);\ntest('Organism › OrganismRewardsForm › TwoRewards › should be rendered', renderComponentMacro, OrganismRewardsForm, fixtureTwoRewards);\n"],"file":"fixtures.js"}
|
|
@@ -12,6 +12,7 @@ import ContentTranslate from '../content-translation';
|
|
|
12
12
|
import OrganismSearchAndChipsResults from '../search-and-chips-results';
|
|
13
13
|
import CourseSelection from '../course-selection';
|
|
14
14
|
import CourseSections from '../../molecule/course-sections';
|
|
15
|
+
import RewardsForm from '../rewards-form';
|
|
15
16
|
import style from './style.css';
|
|
16
17
|
|
|
17
18
|
const buildHeader = (wizardHeader, steps) => {
|
|
@@ -56,6 +57,9 @@ const buildForm = content => {
|
|
|
56
57
|
|
|
57
58
|
case 'organize-courses':
|
|
58
59
|
return /*#__PURE__*/React.createElement(CourseSections, content);
|
|
60
|
+
|
|
61
|
+
case 'rewards':
|
|
62
|
+
return /*#__PURE__*/React.createElement(RewardsForm, content);
|
|
59
63
|
}
|
|
60
64
|
};
|
|
61
65
|
|
|
@@ -165,6 +169,8 @@ WizardContents.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
165
169
|
type: PropTypes.oneOf(['courses'])
|
|
166
170
|
})), PropTypes.shape(_extends(_extends({}, CourseSections.propTypes), {}, {
|
|
167
171
|
type: PropTypes.oneOf(['organize-courses'])
|
|
172
|
+
})), PropTypes.shape(_extends(_extends({}, RewardsForm.propTypes), {}, {
|
|
173
|
+
type: PropTypes.oneOf(['rewards'])
|
|
168
174
|
}))]),
|
|
169
175
|
previousStep: PropTypes.shape({
|
|
170
176
|
label: PropTypes.string,
|