@coorpacademy/components 10.13.10 → 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.
Files changed (162) hide show
  1. package/es/atom/button-link-icon-only/test/fixtures.js +2 -0
  2. package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -1
  3. package/es/atom/checkbox-with-title/style.css +2 -4
  4. package/es/molecule/course-section/index.js +19 -16
  5. package/es/molecule/course-section/index.js.map +1 -1
  6. package/es/molecule/course-section/style.css +12 -15
  7. package/es/molecule/course-section/test/fixtures/advanced-level.js +22 -0
  8. package/es/molecule/course-section/test/fixtures/advanced-level.js.map +1 -0
  9. package/es/molecule/course-section/test/fixtures/base-level.js +18 -0
  10. package/es/molecule/course-section/test/fixtures/base-level.js.map +1 -0
  11. package/es/molecule/course-section/test/fixtures/chapter.js +2 -2
  12. package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -1
  13. package/es/molecule/course-section/test/fixtures/coach-level.js +24 -0
  14. package/es/molecule/course-section/test/fixtures/coach-level.js.map +1 -0
  15. package/es/molecule/course-section/test/fixtures/course.js +2 -2
  16. package/es/molecule/course-section/test/fixtures/course.js.map +1 -1
  17. package/es/molecule/course-section/test/fixtures.js +6 -0
  18. package/es/molecule/course-section/test/fixtures.js.map +1 -1
  19. package/es/molecule/course-sections/test/fixtures/default.js +20 -20
  20. package/es/molecule/course-sections/test/fixtures/default.js.map +1 -1
  21. package/es/molecule/drag-and-drop-wrapper/style.css +5 -2
  22. package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js +8 -2
  23. package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
  24. package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +11 -3
  25. package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
  26. package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/index.js +0 -0
  27. package/es/molecule/input-text-with-titled-checkbox/index.js.map +1 -0
  28. package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/style.css +0 -0
  29. package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/checked.js +0 -0
  30. package/es/molecule/input-text-with-titled-checkbox/test/fixtures/checked.js.map +1 -0
  31. package/es/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/unchecked.js +0 -0
  32. package/es/molecule/input-text-with-titled-checkbox/test/fixtures/unchecked.js.map +1 -0
  33. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +15 -0
  34. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
  35. package/es/molecule/list-badges/index.js +38 -0
  36. package/es/molecule/list-badges/index.js.map +1 -0
  37. package/es/molecule/list-badges/style.css +15 -0
  38. package/es/molecule/list-badges/test/fixtures/advanced.js +9 -0
  39. package/es/molecule/list-badges/test/fixtures/advanced.js.map +1 -0
  40. package/es/molecule/list-badges/test/fixtures/base.js +8 -0
  41. package/es/molecule/list-badges/test/fixtures/base.js.map +1 -0
  42. package/es/molecule/list-badges/test/fixtures/coach.js +10 -0
  43. package/es/molecule/list-badges/test/fixtures/coach.js.map +1 -0
  44. package/es/molecule/list-badges/test/fixtures/course.js +8 -0
  45. package/es/molecule/list-badges/test/fixtures/course.js.map +1 -0
  46. package/es/molecule/list-badges/test/fixtures.js +19 -0
  47. package/es/molecule/list-badges/test/fixtures.js.map +1 -0
  48. package/es/organism/review-header/test/fixtures.js +23 -0
  49. package/es/organism/review-header/test/fixtures.js.map +1 -0
  50. package/es/organism/rewards-form/index.js +41 -0
  51. package/es/organism/rewards-form/index.js.map +1 -0
  52. package/es/organism/rewards-form/style.css +12 -0
  53. package/es/organism/rewards-form/test/fixtures/default.js +17 -0
  54. package/es/organism/rewards-form/test/fixtures/default.js.map +1 -0
  55. package/es/organism/rewards-form/test/fixtures/no-rewards.js +6 -0
  56. package/es/organism/rewards-form/test/fixtures/no-rewards.js.map +1 -0
  57. package/es/organism/rewards-form/test/fixtures/one-reward.js +11 -0
  58. package/es/organism/rewards-form/test/fixtures/one-reward.js.map +1 -0
  59. package/es/organism/rewards-form/test/fixtures/two-rewards.js +14 -0
  60. package/es/organism/rewards-form/test/fixtures/two-rewards.js.map +1 -0
  61. package/es/organism/rewards-form/test/fixtures.js +19 -0
  62. package/es/organism/rewards-form/test/fixtures.js.map +1 -0
  63. package/es/organism/wizard-contents/index.js +6 -0
  64. package/es/organism/wizard-contents/index.js.map +1 -1
  65. package/es/organism/wizard-contents/test/fixtures/certification-rewards.js +45 -0
  66. package/es/organism/wizard-contents/test/fixtures/certification-rewards.js.map +1 -0
  67. package/es/organism/wizard-contents/test/fixtures.js +2 -0
  68. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  69. package/es/template/back-office/brand-update/test/fixtures/wizard-rewards-certification.js +22 -0
  70. package/es/template/back-office/brand-update/test/fixtures/wizard-rewards-certification.js.map +1 -0
  71. package/es/template/back-office/brand-update/test/fixtures.js +2 -0
  72. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  73. package/lib/atom/button-link-icon-only/test/fixtures.js +3 -0
  74. package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
  75. package/lib/atom/checkbox-with-title/style.css +2 -4
  76. package/lib/molecule/course-section/index.js +20 -16
  77. package/lib/molecule/course-section/index.js.map +1 -1
  78. package/lib/molecule/course-section/style.css +12 -15
  79. package/lib/molecule/course-section/test/fixtures/advanced-level.js +27 -0
  80. package/lib/molecule/course-section/test/fixtures/advanced-level.js.map +1 -0
  81. package/lib/molecule/course-section/test/fixtures/base-level.js +23 -0
  82. package/lib/molecule/course-section/test/fixtures/base-level.js.map +1 -0
  83. package/lib/molecule/course-section/test/fixtures/chapter.js +2 -2
  84. package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -1
  85. package/lib/molecule/course-section/test/fixtures/coach-level.js +29 -0
  86. package/lib/molecule/course-section/test/fixtures/coach-level.js.map +1 -0
  87. package/lib/molecule/course-section/test/fixtures/course.js +2 -2
  88. package/lib/molecule/course-section/test/fixtures/course.js.map +1 -1
  89. package/lib/molecule/course-section/test/fixtures.js +9 -0
  90. package/lib/molecule/course-section/test/fixtures.js.map +1 -1
  91. package/lib/molecule/course-sections/test/fixtures/default.js +20 -20
  92. package/lib/molecule/course-sections/test/fixtures/default.js.map +1 -1
  93. package/lib/molecule/drag-and-drop-wrapper/style.css +5 -2
  94. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js +8 -2
  95. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
  96. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +11 -3
  97. package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
  98. package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/index.js +0 -0
  99. package/lib/molecule/input-text-with-titled-checkbox/index.js.map +1 -0
  100. package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/style.css +0 -0
  101. package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/checked.js +0 -0
  102. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures/checked.js.map +1 -0
  103. package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures/unchecked.js +0 -0
  104. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures/unchecked.js.map +1 -0
  105. package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures.js +4 -4
  106. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
  107. package/lib/molecule/list-badges/index.js +50 -0
  108. package/lib/molecule/list-badges/index.js.map +1 -0
  109. package/lib/molecule/list-badges/style.css +15 -0
  110. package/lib/molecule/list-badges/test/fixtures/advanced.js +19 -0
  111. package/lib/molecule/list-badges/test/fixtures/advanced.js.map +1 -0
  112. package/lib/molecule/list-badges/test/fixtures/base.js +17 -0
  113. package/lib/molecule/list-badges/test/fixtures/base.js.map +1 -0
  114. package/lib/molecule/list-badges/test/fixtures/coach.js +21 -0
  115. package/lib/molecule/list-badges/test/fixtures/coach.js.map +1 -0
  116. package/lib/molecule/list-badges/test/fixtures/course.js +17 -0
  117. package/lib/molecule/list-badges/test/fixtures/course.js.map +1 -0
  118. package/lib/molecule/list-badges/test/fixtures.js +31 -0
  119. package/lib/molecule/list-badges/test/fixtures.js.map +1 -0
  120. package/lib/organism/review-header/test/fixtures.js +37 -0
  121. package/lib/organism/review-header/test/fixtures.js.map +1 -0
  122. package/lib/organism/rewards-form/index.js +55 -0
  123. package/lib/organism/rewards-form/index.js.map +1 -0
  124. package/lib/organism/rewards-form/style.css +12 -0
  125. package/lib/organism/rewards-form/test/fixtures/default.js +28 -0
  126. package/lib/organism/rewards-form/test/fixtures/default.js.map +1 -0
  127. package/lib/organism/rewards-form/test/fixtures/no-rewards.js +11 -0
  128. package/lib/organism/rewards-form/test/fixtures/no-rewards.js.map +1 -0
  129. package/lib/organism/rewards-form/test/fixtures/one-reward.js +20 -0
  130. package/lib/organism/rewards-form/test/fixtures/one-reward.js.map +1 -0
  131. package/lib/organism/rewards-form/test/fixtures/two-rewards.js +24 -0
  132. package/lib/organism/rewards-form/test/fixtures/two-rewards.js.map +1 -0
  133. package/lib/organism/rewards-form/test/fixtures.js +31 -0
  134. package/lib/organism/rewards-form/test/fixtures.js.map +1 -0
  135. package/lib/organism/wizard-contents/index.js +7 -0
  136. package/lib/organism/wizard-contents/index.js.map +1 -1
  137. package/lib/organism/wizard-contents/test/fixtures/certification-rewards.js +54 -0
  138. package/lib/organism/wizard-contents/test/fixtures/certification-rewards.js.map +1 -0
  139. package/lib/organism/wizard-contents/test/fixtures.js +3 -0
  140. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  141. package/lib/template/back-office/brand-update/test/fixtures/wizard-rewards-certification.js +32 -0
  142. package/lib/template/back-office/brand-update/test/fixtures/wizard-rewards-certification.js.map +1 -0
  143. package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
  144. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  145. package/package.json +2 -2
  146. package/es/molecule/input-text-with-titeled-checkbox/index.js.map +0 -1
  147. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +0 -1
  148. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js.map +0 -1
  149. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -15
  150. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
  151. package/es/molecule/search/test/fixtures.js +0 -15
  152. package/es/molecule/search/test/fixtures.js.map +0 -1
  153. package/es/organism/playlist-translation/test/fixtures.js +0 -15
  154. package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
  155. package/lib/molecule/input-text-with-titeled-checkbox/index.js.map +0 -1
  156. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/checked.js.map +0 -1
  157. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures/unchecked.js.map +0 -1
  158. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
  159. package/lib/molecule/search/test/fixtures.js +0 -25
  160. package/lib/molecule/search/test/fixtures.js.map +0 -1
  161. package/lib/organism/playlist-translation/test/fixtures.js +0 -25
  162. package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
@@ -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,EAAEA,aAAa,CAACC,KADxB;AAELC,IAAAA,IAAI,EAAE,CAACH,iBAAiB,CAACE,KAAnB;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,\n list: [firstdDragAndDrop.props]\n }\n};\n"],"file":"default.js"}
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/with-children';
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
- list: [firstdDragAndDrop.props, secondDragAndDrop.props]
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,4DAA9B;AACA,OAAOC,aAAP,MAA0B,4DAA1B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLD,IAAAA,aAAa,EAAEA,aAAa,CAACC,KADxB;AAELC,IAAAA,IAAI,EAAE,CAACJ,iBAAiB,CAACG,KAAnB,EAA0BF,iBAAiB,CAACE,KAA5C;AAFD;AADM,CAAf","sourcesContent":["import firstdDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/default';\nimport secondDragAndDrop from '../../../../atom/drag-and-drop/test/fixtures/with-children';\nimport checkBoxTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\n\nexport default {\n props: {\n checkBoxTitle: checkBoxTitle.props,\n list: [firstdDragAndDrop.props, secondDragAndDrop.props]\n }\n};\n"],"file":"two-drag-and-drops.js"}
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"}
@@ -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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,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"}
@@ -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"}
@@ -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,15 @@
1
+ .item {
2
+ margin-right: 8px;
3
+ }
4
+
5
+ .list {
6
+ display: flex;
7
+ align-items: center;
8
+ list-style-type: none;
9
+ }
10
+
11
+ .contentBadge {
12
+ font-size: 8px;
13
+ font-weight: bold;
14
+ line-height: 10px;;
15
+ }
@@ -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,8 @@
1
+ import base from '../../../../atom/content-badge/test/fixtures/default';
2
+ export default {
3
+ props: {
4
+ 'aria-label': 'aria list',
5
+ items: [base.props]
6
+ }
7
+ };
8
+ //# sourceMappingURL=base.js.map
@@ -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,8 @@
1
+ import course from '../../../../atom/content-badge/test/fixtures/course';
2
+ export default {
3
+ props: {
4
+ 'aria-label': 'aria list',
5
+ items: [course.props]
6
+ }
7
+ };
8
+ //# sourceMappingURL=course.js.map
@@ -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,12 @@
1
+ .item {
2
+ margin-bottom: 34px;
3
+ }
4
+ .inputText {
5
+ width: 175px;
6
+ }
7
+
8
+ .list {
9
+ list-style-type: none;
10
+ margin: 0;
11
+ padding: 0;
12
+ }
@@ -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,6 @@
1
+ export default {
2
+ props: {
3
+ items: []
4
+ }
5
+ };
6
+ //# sourceMappingURL=no-rewards.js.map
@@ -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,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;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uBACKrD,eAAe,CAACmD,SADrB;AAEEpC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,SAAD,CAAhB;AAFR,KAb2B,EAiB3BlE,SAAS,CAAC6D,KAAV,uBACKpD,cAAc,CAACkD,SADpB;AAEEpC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,kBAAD,CAAhB;AAFR,KAjB2B,CAApB,CAVgB;AAgCzB/B,EAAAA,YAAY,EAAEnC,SAAS,CAAC6D,KAAV,CAAgB;AAC5B7B,IAAAA,KAAK,EAAEhC,SAAS,CAAC8D,MADW;AAE5B/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAFS,GAAhB,CAhCW;AAoCzB3B,EAAAA,QAAQ,EAAEpC,SAAS,CAAC6D,KAAV,CAAgB;AACxBtC,IAAAA,IAAI,EAAEvB,SAAS,CAACkE,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;AAExBlC,IAAAA,KAAK,EAAEhC,SAAS,CAAC8D,MAFO;AAGxB/C,IAAAA,OAAO,EAAEf,SAAS,CAAC+D;AAHK,GAAhB;AApCe,CAA3B;AA2CA,eAAerB,cAAf","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"content-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["React","getOr","PropTypes","ButtonLink","ButtonLinkIconOnly","WizardSteps","WizardSummary","BrandForm","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections","RewardsForm","style","buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","bool","shape","string","func","isRequired","oneOfType","oneOf"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,aAAP,MAA0B,+BAA1B;AACA,OAAOC,SAAP,MAAsB,eAAtB;AACA,OAAOC,gBAAP,MAA6B,wBAA7B;AACA,OAAOC,6BAAP,MAA0C,6BAA1C;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,gCAA3B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,CAACC,YAAD,EAAeC,KAAf,KAAyB;AAC3C,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA;AAAR,MAAmBH,YAAzB;AAEA,QAAMI,eAAe,GAAG;AACtBC,IAAAA,IAAI,EAAE,OADgB;AAEtB,iBAAa,cAFS;AAGtB,kBAAc,cAHQ;AAItBC,IAAAA,IAAI,EAAE,OAJgB;AAKtBH,IAAAA;AALsB,GAAxB;AAQA,sBACE,8CACE;AAAK,IAAA,SAAS,EAAEL,KAAK,CAACS;AAAtB,kBACE,oBAAC,kBAAD,EAAwBH,eAAxB,CADF,eAEE;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACU,WAAtB;AAAmC,iBAAW;AAA9C,KACGN,KADH,CAFF,CADF,eAOE,oBAAC,WAAD;AAAa,IAAA,KAAK,EAAED;AAApB,IAPF,CADF;AAWD,CAtBD;;AAwBA,MAAMQ,SAAS,GAAGC,OAAO,IAAI;AAC3B,QAAM;AAACC,IAAAA;AAAD,MAASD,OAAf;;AACA,UAAQC,IAAR;AACE,SAAK,MAAL;AACE,0B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hB,SAAS,CAACgE;AAHK,GAAhB;AAxCe,CAA3B;AA+CA,eAAerB,cAAf","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport RewardsForm from '../rewards-form';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'content-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n case 'rewards':\n return <RewardsForm {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"content-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n }),\n PropTypes.shape({\n ...RewardsForm.propTypes,\n type: PropTypes.oneOf(['rewards'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
@@ -0,0 +1,45 @@
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
+ /* eslint-disable no-console */
4
+ import wizardSummary from '../../../../molecule/wizard-summary/test/fixtures/three-sections';
5
+ import rewardsForm from '../../../rewards-form/test/fixtures/default';
6
+ export default {
7
+ props: {
8
+ isLoading: false,
9
+ wizardHeader: {
10
+ title: 'Create a new certification',
11
+ onClick: () => console.log('Close')
12
+ },
13
+ steps: [{
14
+ title: 'General Informations',
15
+ done: true
16
+ }, {
17
+ title: 'Translations',
18
+ done: true
19
+ }, {
20
+ title: 'Assign populations',
21
+ done: true
22
+ }, {
23
+ title: 'Courses settings',
24
+ done: true
25
+ }, {
26
+ title: 'Rewards',
27
+ done: false,
28
+ current: true
29
+ }],
30
+ summary: wizardSummary.props,
31
+ content: _extends(_extends({}, rewardsForm.props), {}, {
32
+ type: 'rewards'
33
+ }),
34
+ previousStep: {
35
+ label: 'Previous Step',
36
+ onClick: () => console.log('Previous Step')
37
+ },
38
+ nextStep: {
39
+ type: 'publish',
40
+ label: 'Publish',
41
+ onClick: () => console.log('Next Step')
42
+ }
43
+ }
44
+ };
45
+ //# sourceMappingURL=certification-rewards.js.map