@coorpacademy/components 10.16.1 → 10.16.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) 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/review-background/test/fixtures.js +13 -0
  4. package/es/atom/review-background/test/fixtures.js.map +1 -0
  5. package/es/atom/review-presentation/test/fixtures.js +13 -0
  6. package/es/atom/review-presentation/test/fixtures.js.map +1 -0
  7. package/es/molecule/brand-form-group/test/fixtures.js +2 -0
  8. package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
  9. package/es/molecule/course-section/test/fixtures.js +6 -0
  10. package/es/molecule/course-section/test/fixtures.js.map +1 -1
  11. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +2 -0
  12. package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -1
  13. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +15 -0
  14. package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
  15. package/es/molecule/list-badges/test/fixtures.js +19 -0
  16. package/es/molecule/list-badges/test/fixtures.js.map +1 -0
  17. package/es/molecule/skill-card/test/fixtures.js +19 -0
  18. package/es/molecule/skill-card/test/fixtures.js.map +1 -0
  19. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js +19 -0
  20. package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +1 -0
  21. package/es/molecule/wizard-summary/index.js +11 -12
  22. package/es/molecule/wizard-summary/index.js.map +1 -1
  23. package/es/molecule/wizard-summary/style.css +0 -5
  24. package/es/molecule/wizard-summary/test/fixtures/default.js +69 -22
  25. package/es/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
  26. package/es/molecule/wizard-summary/test/fixtures/organize-courses.js +40 -20
  27. package/es/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -1
  28. package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js +75 -24
  29. package/es/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
  30. package/es/organism/brand-form/test/fixtures.js +4 -0
  31. package/es/organism/brand-form/test/fixtures.js.map +1 -1
  32. package/es/organism/review-header/test/fixtures.js +23 -0
  33. package/es/organism/review-header/test/fixtures.js.map +1 -0
  34. package/es/organism/review-skills/test/fixtures.js +17 -0
  35. package/es/organism/review-skills/test/fixtures.js.map +1 -0
  36. package/es/organism/rewards-form/test/fixtures.js +19 -0
  37. package/es/organism/rewards-form/test/fixtures.js.map +1 -0
  38. package/es/organism/wizard-contents/test/fixtures.js +4 -0
  39. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  40. package/es/template/back-office/brand-update/test/fixtures.js +2 -0
  41. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  42. package/es/template/external-course/test/fixtures.js +4 -0
  43. package/es/template/external-course/test/fixtures.js.map +1 -1
  44. package/es/template/review-dashboard-skills/test/fixtures.js +17 -0
  45. package/es/template/review-dashboard-skills/test/fixtures.js.map +1 -0
  46. package/lib/atom/button-link-icon-only/test/fixtures.js +3 -0
  47. package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
  48. package/lib/atom/review-background/test/fixtures.js +22 -0
  49. package/lib/atom/review-background/test/fixtures.js.map +1 -0
  50. package/lib/atom/review-presentation/test/fixtures.js +22 -0
  51. package/lib/atom/review-presentation/test/fixtures.js.map +1 -0
  52. package/lib/molecule/brand-form-group/test/fixtures.js +3 -0
  53. package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
  54. package/lib/molecule/course-section/test/fixtures.js +9 -0
  55. package/lib/molecule/course-section/test/fixtures.js.map +1 -1
  56. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +3 -0
  57. package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +1 -1
  58. package/lib/molecule/{input-text-with-titeled-checkbox → input-text-with-titled-checkbox}/test/fixtures.js +4 -4
  59. package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +1 -0
  60. package/lib/molecule/list-badges/test/fixtures.js +31 -0
  61. package/lib/molecule/list-badges/test/fixtures.js.map +1 -0
  62. package/lib/molecule/skill-card/test/fixtures.js +31 -0
  63. package/lib/molecule/skill-card/test/fixtures.js.map +1 -0
  64. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js +31 -0
  65. package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +1 -0
  66. package/lib/molecule/wizard-summary/index.js +12 -12
  67. package/lib/molecule/wizard-summary/index.js.map +1 -1
  68. package/lib/molecule/wizard-summary/style.css +0 -5
  69. package/lib/molecule/wizard-summary/test/fixtures/default.js +69 -22
  70. package/lib/molecule/wizard-summary/test/fixtures/default.js.map +1 -1
  71. package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js +40 -20
  72. package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -1
  73. package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js +75 -24
  74. package/lib/molecule/wizard-summary/test/fixtures/tablet-closed.js.map +1 -1
  75. package/lib/organism/brand-form/test/fixtures.js +6 -0
  76. package/lib/organism/brand-form/test/fixtures.js.map +1 -1
  77. package/lib/organism/review-header/test/fixtures.js +37 -0
  78. package/lib/organism/review-header/test/fixtures.js.map +1 -0
  79. package/lib/organism/review-skills/test/fixtures.js +28 -0
  80. package/lib/organism/review-skills/test/fixtures.js.map +1 -0
  81. package/lib/organism/rewards-form/test/fixtures.js +31 -0
  82. package/lib/organism/rewards-form/test/fixtures.js.map +1 -0
  83. package/lib/organism/wizard-contents/test/fixtures.js +6 -0
  84. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  85. package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
  86. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  87. package/lib/template/external-course/test/fixtures.js +6 -0
  88. package/lib/template/external-course/test/fixtures.js.map +1 -1
  89. package/lib/template/review-dashboard-skills/test/fixtures.js +28 -0
  90. package/lib/template/review-dashboard-skills/test/fixtures.js.map +1 -0
  91. package/package.json +2 -2
  92. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -15
  93. package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
  94. package/es/molecule/search/test/fixtures.js +0 -15
  95. package/es/molecule/search/test/fixtures.js.map +0 -1
  96. package/es/organism/playlist-translation/test/fixtures.js +0 -15
  97. package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
  98. package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
  99. package/lib/molecule/search/test/fixtures.js +0 -25
  100. package/lib/molecule/search/test/fixtures.js.map +0 -1
  101. package/lib/organism/playlist-translation/test/fixtures.js +0 -25
  102. package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
@@ -5,6 +5,7 @@ import AtomButtonLinkIconOnly from '..';
5
5
  import fixtureButtonIconBullet from './fixtures/button-icon-bullet';
6
6
  import fixtureDefault from './fixtures/default';
7
7
  import fixtureNoIcon from './fixtures/no-icon';
8
+ import fixtureReviewHeader from './fixtures/review-header';
8
9
  import fixtureSmallButtonDisabled from './fixtures/small-button-disabled';
9
10
  import fixtureSmallLinkDownload from './fixtures/small-link-download';
10
11
  test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
@@ -16,6 +17,7 @@ test('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {
16
17
  test('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);
17
18
  test('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);
18
19
  test('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);
20
+ test('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);
19
21
  test('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);
20
22
  test('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);
21
23
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLinkIconOnly","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureSmallButtonDisabled","fixtureSmallLinkDownload","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AAEAR,IAAI,CAAC,6DAAD,EAAgES,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,sBAAsB,CAACQ,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,sBAAhG,EAAwHC,uBAAxH,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,sBAAtF,EAA8GG,aAA9G,CAAJ;AACAN,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,sBAAnG,EAA2HI,0BAA3H,CAAJ;AACAP,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,sBAAjG,EAAyHK,wBAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomButtonLinkIconOnly","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureReviewHeader","fixtureSmallButtonDisabled","fixtureSmallLinkDownload","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,oBAA1B;AACA,OAAOC,mBAAP,MAAgC,0BAAhC;AACA,OAAOC,0BAAP,MAAuC,kCAAvC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AAEAT,IAAI,CAAC,6DAAD,EAAgEU,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,sBAAsB,CAACS,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,sBAAhG,EAAwHC,uBAAxH,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GE,cAA/G,CAAJ;AACAL,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,sBAAtF,EAA8GG,aAA9G,CAAJ;AACAN,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,sBAA5F,EAAoHI,mBAApH,CAAJ;AACAP,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,sBAAnG,EAA2HK,0BAA3H,CAAJ;AACAR,IAAI,CAAC,wEAAD,EAA2EE,oBAA3E,EAAiGC,sBAAjG,EAAyHM,wBAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureReviewHeader from './fixtures/review-header';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureReviewHeader);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
@@ -0,0 +1,13 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomReviewBackground from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ test('Atom › AtomReviewBackground > should have valid propTypes', t => {
7
+ t.pass();
8
+ forEach(AtomReviewBackground.propTypes, (value, key) => {
9
+ t.not(value, undefined, `PropType for "Atom.AtomReviewBackground.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
10
+ });
11
+ });
12
+ test('Atom › AtomReviewBackground › Default › should be rendered', renderComponentMacro, AtomReviewBackground, fixtureDefault);
13
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/review-background/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomReviewBackground","fixtureDefault","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,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,2DAAD,EAA8DK,CAAC,IAAI;AACrEA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,oBAAoB,CAACI,SAAtB,EAAiC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,qDAAoDF,GAAI,mEAAjF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,oBAArF,EAA2GC,cAA3G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomReviewBackground from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomReviewBackground > should have valid propTypes', t => {\n t.pass();\n forEach(AtomReviewBackground.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomReviewBackground.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomReviewBackground › Default › should be rendered', renderComponentMacro, AtomReviewBackground, fixtureDefault);\n"],"file":"fixtures.js"}
@@ -0,0 +1,13 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import AtomReviewPresentation from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ test('Atom › AtomReviewPresentation > should have valid propTypes', t => {
7
+ t.pass();
8
+ forEach(AtomReviewPresentation.propTypes, (value, key) => {
9
+ t.not(value, undefined, `PropType for "Atom.AtomReviewPresentation.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
10
+ });
11
+ });
12
+ test('Atom › AtomReviewPresentation › Default › should be rendered', renderComponentMacro, AtomReviewPresentation, fixtureDefault);
13
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/atom/review-presentation/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomReviewPresentation","fixtureDefault","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,6DAAD,EAAgEK,CAAC,IAAI;AACvEA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,sBAAsB,CAACI,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uDAAsDF,GAAI,mEAAnF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GC,cAA/G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomReviewPresentation from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomReviewPresentation > should have valid propTypes', t => {\n t.pass();\n forEach(AtomReviewPresentation.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomReviewPresentation.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomReviewPresentation › Default › should be rendered', renderComponentMacro, AtomReviewPresentation, fixtureDefault);\n"],"file":"fixtures.js"}
@@ -14,6 +14,7 @@ import fixtureLookandfeel from './fixtures/lookandfeel';
14
14
  import fixtureRoles from './fixtures/roles';
15
15
  import fixtureSlider from './fixtures/slider';
16
16
  import fixtureSso from './fixtures/sso';
17
+ import fixtureTitleAndCheckboxWrapper from './fixtures/title-and-checkbox-wrapper';
17
18
  test('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {
18
19
  t.pass();
19
20
  forEach(MoleculeBrandFormGroup.propTypes, (value, key) => {
@@ -32,4 +33,5 @@ test('Molecule › MoleculeBrandFormGroup › Lookandfeel › should be rendered
32
33
  test('Molecule › MoleculeBrandFormGroup › Roles › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureRoles);
33
34
  test('Molecule › MoleculeBrandFormGroup › Slider › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSlider);
34
35
  test('Molecule › MoleculeBrandFormGroup › Sso › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSso);
36
+ test('Molecule › MoleculeBrandFormGroup › TitleAndCheckboxWrapper › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureTitleAndCheckboxWrapper);
35
37
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/brand-form-group/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBrandFormGroup","fixtureAnalytics","fixtureAnimations","fixtureCmDefault","fixtureCohort","fixtureDashboard","fixtureDefault","fixtureDoublefield","fixtureImages","fixtureLookandfeel","fixtureRoles","fixtureSlider","fixtureSso","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AAEAf,IAAI,CAAC,iEAAD,EAAoEgB,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAhB,EAAAA,OAAO,CAACE,sBAAsB,CAACe,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOApB,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,sBAA7F,EAAqHC,gBAArH,CAAJ;AACAJ,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,sBAA9F,EAAsHE,iBAAtH,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,sBAA7F,EAAqHG,gBAArH,CAAJ;AACAN,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,sBAA1F,EAAkHI,aAAlH,CAAJ;AACAP,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,sBAA7F,EAAqHK,gBAArH,CAAJ;AACAR,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHM,cAAnH,CAAJ;AACAT,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,sBAA/F,EAAuHO,kBAAvH,CAAJ;AACAV,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,sBAA1F,EAAkHQ,aAAlH,CAAJ;AACAX,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,sBAA/F,EAAuHS,kBAAvH,CAAJ;AACAZ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,sBAAzF,EAAiHU,YAAjH,CAAJ;AACAb,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,sBAA1F,EAAkHW,aAAlH,CAAJ;AACAd,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GY,UAA/G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBrandFormGroup from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCmDefault from './fixtures/cm-default';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDoublefield from './fixtures/doublefield';\nimport fixtureImages from './fixtures/images';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureRoles from './fixtures/roles';\nimport fixtureSlider from './fixtures/slider';\nimport fixtureSso from './fixtures/sso';\n\ntest('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBrandFormGroup.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBrandFormGroup.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBrandFormGroup › Analytics › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnalytics);\ntest('Molecule › MoleculeBrandFormGroup › Animations › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnimations);\ntest('Molecule › MoleculeBrandFormGroup › CmDefault › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCmDefault);\ntest('Molecule › MoleculeBrandFormGroup › Cohort › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCohort);\ntest('Molecule › MoleculeBrandFormGroup › Dashboard › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDashboard);\ntest('Molecule › MoleculeBrandFormGroup › Default › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDefault);\ntest('Molecule › MoleculeBrandFormGroup › Doublefield › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDoublefield);\ntest('Molecule › MoleculeBrandFormGroup › Images › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureImages);\ntest('Molecule › MoleculeBrandFormGroup › Lookandfeel › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureLookandfeel);\ntest('Molecule › MoleculeBrandFormGroup › Roles › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureRoles);\ntest('Molecule › MoleculeBrandFormGroup › Slider › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSlider);\ntest('Molecule › MoleculeBrandFormGroup › Sso › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSso);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/brand-form-group/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBrandFormGroup","fixtureAnalytics","fixtureAnimations","fixtureCmDefault","fixtureCohort","fixtureDashboard","fixtureDefault","fixtureDoublefield","fixtureImages","fixtureLookandfeel","fixtureRoles","fixtureSlider","fixtureSso","fixtureTitleAndCheckboxWrapper","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,sBAAP,MAAmC,IAAnC;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,8BAAP,MAA2C,uCAA3C;AAEAhB,IAAI,CAAC,iEAAD,EAAoEiB,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAjB,EAAAA,OAAO,CAACE,sBAAsB,CAACgB,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOArB,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,sBAA7F,EAAqHC,gBAArH,CAAJ;AACAJ,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,sBAA9F,EAAsHE,iBAAtH,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,sBAA7F,EAAqHG,gBAArH,CAAJ;AACAN,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,sBAA1F,EAAkHI,aAAlH,CAAJ;AACAP,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,sBAA7F,EAAqHK,gBAArH,CAAJ;AACAR,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,sBAA3F,EAAmHM,cAAnH,CAAJ;AACAT,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,sBAA/F,EAAuHO,kBAAvH,CAAJ;AACAV,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,sBAA1F,EAAkHQ,aAAlH,CAAJ;AACAX,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,sBAA/F,EAAuHS,kBAAvH,CAAJ;AACAZ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,sBAAzF,EAAiHU,YAAjH,CAAJ;AACAb,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,sBAA1F,EAAkHW,aAAlH,CAAJ;AACAd,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,sBAAvF,EAA+GY,UAA/G,CAAJ;AACAf,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,sBAA3G,EAAmIa,8BAAnI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBrandFormGroup from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCmDefault from './fixtures/cm-default';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDoublefield from './fixtures/doublefield';\nimport fixtureImages from './fixtures/images';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureRoles from './fixtures/roles';\nimport fixtureSlider from './fixtures/slider';\nimport fixtureSso from './fixtures/sso';\nimport fixtureTitleAndCheckboxWrapper from './fixtures/title-and-checkbox-wrapper';\n\ntest('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBrandFormGroup.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBrandFormGroup.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBrandFormGroup › Analytics › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnalytics);\ntest('Molecule › MoleculeBrandFormGroup › Animations › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnimations);\ntest('Molecule › MoleculeBrandFormGroup › CmDefault › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCmDefault);\ntest('Molecule › MoleculeBrandFormGroup › Cohort › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCohort);\ntest('Molecule › MoleculeBrandFormGroup › Dashboard › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDashboard);\ntest('Molecule › MoleculeBrandFormGroup › Default › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDefault);\ntest('Molecule › MoleculeBrandFormGroup › Doublefield › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDoublefield);\ntest('Molecule › MoleculeBrandFormGroup › Images › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureImages);\ntest('Molecule › MoleculeBrandFormGroup › Lookandfeel › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureLookandfeel);\ntest('Molecule › MoleculeBrandFormGroup › Roles › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureRoles);\ntest('Molecule › MoleculeBrandFormGroup › Slider › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSlider);\ntest('Molecule › MoleculeBrandFormGroup › Sso › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureSso);\ntest('Molecule › MoleculeBrandFormGroup › TitleAndCheckboxWrapper › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureTitleAndCheckboxWrapper);\n"],"file":"fixtures.js"}
@@ -2,7 +2,10 @@ import test from 'ava';
2
2
  import forEach from 'lodash/forEach';
3
3
  import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import MoleculeCourseSection from '..';
5
+ import fixtureAdvancedLevel from './fixtures/advanced-level';
6
+ import fixtureBaseLevel from './fixtures/base-level';
5
7
  import fixtureChapter from './fixtures/chapter';
8
+ import fixtureCoachLevel from './fixtures/coach-level';
6
9
  import fixtureCourse from './fixtures/course';
7
10
  test('Molecule › MoleculeCourseSection > should have valid propTypes', t => {
8
11
  t.pass();
@@ -10,6 +13,9 @@ test('Molecule › MoleculeCourseSection > should have valid propTypes', t => {
10
13
  t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSection.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
11
14
  });
12
15
  });
16
+ test('Molecule › MoleculeCourseSection › AdvancedLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureAdvancedLevel);
17
+ test('Molecule › MoleculeCourseSection › BaseLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureBaseLevel);
13
18
  test('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);
19
+ test('Molecule › MoleculeCourseSection › CoachLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCoachLevel);
14
20
  test('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);
15
21
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/course-section/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCourseSection","fixtureChapter","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,qBAAP,MAAkC,IAAlC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AAEAL,IAAI,CAAC,gEAAD,EAAmEM,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,qBAAqB,CAACK,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,qBAA1F,EAAiHC,cAAjH,CAAJ;AACAJ,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,qBAAzF,EAAgHE,aAAhH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSection from '..';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeCourseSection > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);\ntest('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/course-section/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCourseSection","fixtureAdvancedLevel","fixtureBaseLevel","fixtureChapter","fixtureCoachLevel","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,qBAAP,MAAkC,IAAlC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,iBAAP,MAA8B,wBAA9B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AAEAR,IAAI,CAAC,gEAAD,EAAmES,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,qBAAqB,CAACQ,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,qBAAhG,EAAuHC,oBAAvH,CAAJ;AACAJ,IAAI,CAAC,mEAAD,EAAsEE,oBAAtE,EAA4FC,qBAA5F,EAAmHE,gBAAnH,CAAJ;AACAL,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,qBAA1F,EAAiHG,cAAjH,CAAJ;AACAN,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,qBAA7F,EAAoHI,iBAApH,CAAJ;AACAP,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,qBAAzF,EAAgHK,aAAhH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSection from '..';\nimport fixtureAdvancedLevel from './fixtures/advanced-level';\nimport fixtureBaseLevel from './fixtures/base-level';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCoachLevel from './fixtures/coach-level';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeCourseSection > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSection › AdvancedLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureAdvancedLevel);\ntest('Molecule › MoleculeCourseSection › BaseLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureBaseLevel);\ntest('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);\ntest('Molecule › MoleculeCourseSection › CoachLevel › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCoachLevel);\ntest('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);\n"],"file":"fixtures.js"}
@@ -4,6 +4,7 @@ import renderComponentMacro from '../../../test/helpers/render-component';
4
4
  import MoleculeDragAndDropWrapper from '..';
5
5
  import fixtureDefault from './fixtures/default';
6
6
  import fixtureTwoDragAndDrops from './fixtures/two-drag-and-drops';
7
+ import fixtureWithoutCheckbox from './fixtures/without-checkbox';
7
8
  test('Molecule › MoleculeDragAndDropWrapper > should have valid propTypes', t => {
8
9
  t.pass();
9
10
  forEach(MoleculeDragAndDropWrapper.propTypes, (value, key) => {
@@ -12,4 +13,5 @@ test('Molecule › MoleculeDragAndDropWrapper > should have valid propTypes', t
12
13
  });
13
14
  test('Molecule › MoleculeDragAndDropWrapper › Default › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureDefault);
14
15
  test('Molecule › MoleculeDragAndDropWrapper › TwoDragAndDrops › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureTwoDragAndDrops);
16
+ test('Molecule › MoleculeDragAndDropWrapper › WithoutCheckbox › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureWithoutCheckbox);
15
17
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/drag-and-drop-wrapper/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDragAndDropWrapper","fixtureDefault","fixtureTwoDragAndDrops","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,0BAAP,MAAuC,IAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,+BAAnC;AAEAL,IAAI,CAAC,qEAAD,EAAwEM,CAAC,IAAI;AAC/EA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,0BAA0B,CAACK,SAA5B,EAAuC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+DAA8DF,GAAI,mEAA3F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,0BAA/F,EAA2HC,cAA3H,CAAJ;AACAJ,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,0BAAvG,EAAmIE,sBAAnI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDragAndDropWrapper from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureTwoDragAndDrops from './fixtures/two-drag-and-drops';\n\ntest('Molecule › MoleculeDragAndDropWrapper > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDragAndDropWrapper.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDragAndDropWrapper.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDragAndDropWrapper › Default › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureDefault);\ntest('Molecule › MoleculeDragAndDropWrapper › TwoDragAndDrops › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureTwoDragAndDrops);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/drag-and-drop-wrapper/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeDragAndDropWrapper","fixtureDefault","fixtureTwoDragAndDrops","fixtureWithoutCheckbox","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,0BAAP,MAAuC,IAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,+BAAnC;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AAEAN,IAAI,CAAC,qEAAD,EAAwEO,CAAC,IAAI;AAC/EA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,0BAA0B,CAACM,SAA5B,EAAuC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,+DAA8DF,GAAI,mEAA3F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,sEAAD,EAAyEE,oBAAzE,EAA+FC,0BAA/F,EAA2HC,cAA3H,CAAJ;AACAJ,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,0BAAvG,EAAmIE,sBAAnI,CAAJ;AACAL,IAAI,CAAC,8EAAD,EAAiFE,oBAAjF,EAAuGC,0BAAvG,EAAmIG,sBAAnI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDragAndDropWrapper from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureTwoDragAndDrops from './fixtures/two-drag-and-drops';\nimport fixtureWithoutCheckbox from './fixtures/without-checkbox';\n\ntest('Molecule › MoleculeDragAndDropWrapper > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDragAndDropWrapper.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDragAndDropWrapper.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDragAndDropWrapper › Default › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureDefault);\ntest('Molecule › MoleculeDragAndDropWrapper › TwoDragAndDrops › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureTwoDragAndDrops);\ntest('Molecule › MoleculeDragAndDropWrapper › WithoutCheckbox › should be rendered', renderComponentMacro, MoleculeDragAndDropWrapper, fixtureWithoutCheckbox);\n"],"file":"fixtures.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,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,19 @@
1
+ import test from 'ava';
2
+ import forEach from 'lodash/forEach';
3
+ import renderComponentMacro from '../../../test/helpers/render-component';
4
+ import MoleculeSkillCard from '..';
5
+ import fixtureCustomSkill from './fixtures/custom-skill';
6
+ import fixtureDefault from './fixtures/default';
7
+ import fixtureNoAriaLabels from './fixtures/no-aria-labels';
8
+ import fixtureShortSkillTitle from './fixtures/short-skill-title';
9
+ test('Molecule › MoleculeSkillCard > should have valid propTypes', t => {
10
+ t.pass();
11
+ forEach(MoleculeSkillCard.propTypes, (value, key) => {
12
+ t.not(value, undefined, `PropType for "Molecule.MoleculeSkillCard.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
13
+ });
14
+ });
15
+ test('Molecule › MoleculeSkillCard › CustomSkill › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureCustomSkill);
16
+ test('Molecule › MoleculeSkillCard › Default › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureDefault);
17
+ test('Molecule › MoleculeSkillCard › NoAriaLabels › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureNoAriaLabels);
18
+ test('Molecule › MoleculeSkillCard › ShortSkillTitle › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureShortSkillTitle);
19
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/skill-card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSkillCard","fixtureCustomSkill","fixtureDefault","fixtureNoAriaLabels","fixtureShortSkillTitle","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,iBAAP,MAA8B,IAA9B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,mBAAP,MAAgC,2BAAhC;AACA,OAAOC,sBAAP,MAAmC,8BAAnC;AAEAP,IAAI,CAAC,4DAAD,EAA+DQ,CAAC,IAAI;AACtEA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,iBAAiB,CAACO,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACnDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,sDAAqDF,GAAI,mEAAlF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,iEAAD,EAAoEE,oBAApE,EAA0FC,iBAA1F,EAA6GC,kBAA7G,CAAJ;AACAJ,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,iBAAtF,EAAyGE,cAAzG,CAAJ;AACAL,IAAI,CAAC,kEAAD,EAAqEE,oBAArE,EAA2FC,iBAA3F,EAA8GG,mBAA9G,CAAJ;AACAN,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,iBAA9F,EAAiHI,sBAAjH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSkillCard from '..';\nimport fixtureCustomSkill from './fixtures/custom-skill';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoAriaLabels from './fixtures/no-aria-labels';\nimport fixtureShortSkillTitle from './fixtures/short-skill-title';\n\ntest('Molecule › MoleculeSkillCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSkillCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSkillCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSkillCard › CustomSkill › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureCustomSkill);\ntest('Molecule › MoleculeSkillCard › Default › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureDefault);\ntest('Molecule › MoleculeSkillCard › NoAriaLabels › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureNoAriaLabels);\ntest('Molecule › MoleculeSkillCard › ShortSkillTitle › should be rendered', renderComponentMacro, MoleculeSkillCard, fixtureShortSkillTitle);\n"],"file":"fixtures.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 MoleculeTitleAndCheckboxWrapper from '..';
5
+ import fixtureDefault from './fixtures/default';
6
+ import fixtureDragDropCheckbox from './fixtures/drag-drop-checkbox';
7
+ import fixtureDragDropWithoutTitle from './fixtures/drag-drop-without-title';
8
+ import fixtureInputTextTitle from './fixtures/input-text-title';
9
+ test('Molecule › MoleculeTitleAndCheckboxWrapper > should have valid propTypes', t => {
10
+ t.pass();
11
+ forEach(MoleculeTitleAndCheckboxWrapper.propTypes, (value, key) => {
12
+ t.not(value, undefined, `PropType for "Molecule.MoleculeTitleAndCheckboxWrapper.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
13
+ });
14
+ });
15
+ test('Molecule › MoleculeTitleAndCheckboxWrapper › Default › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureDefault);
16
+ test('Molecule › MoleculeTitleAndCheckboxWrapper › DragDropCheckbox › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureDragDropCheckbox);
17
+ test('Molecule › MoleculeTitleAndCheckboxWrapper › DragDropWithoutTitle › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureDragDropWithoutTitle);
18
+ test('Molecule › MoleculeTitleAndCheckboxWrapper › InputTextTitle › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureInputTextTitle);
19
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/title-and-checkbox-wrapper/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeTitleAndCheckboxWrapper","fixtureDefault","fixtureDragDropCheckbox","fixtureDragDropWithoutTitle","fixtureInputTextTitle","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,+BAAP,MAA4C,IAA5C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AACA,OAAOC,2BAAP,MAAwC,oCAAxC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AAEAP,IAAI,CAAC,0EAAD,EAA6EQ,CAAC,IAAI;AACpFA,EAAAA,CAAC,CAACC,IAAF;AACAR,EAAAA,OAAO,CAACE,+BAA+B,CAACO,SAAjC,EAA4C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjEJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,oEAAmEF,GAAI,mEAAhG;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAZ,IAAI,CAAC,2EAAD,EAA8EE,oBAA9E,EAAoGC,+BAApG,EAAqIC,cAArI,CAAJ;AACAJ,IAAI,CAAC,oFAAD,EAAuFE,oBAAvF,EAA6GC,+BAA7G,EAA8IE,uBAA9I,CAAJ;AACAL,IAAI,CAAC,wFAAD,EAA2FE,oBAA3F,EAAiHC,+BAAjH,EAAkJG,2BAAlJ,CAAJ;AACAN,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,+BAA3G,EAA4II,qBAA5I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeTitleAndCheckboxWrapper from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDragDropCheckbox from './fixtures/drag-drop-checkbox';\nimport fixtureDragDropWithoutTitle from './fixtures/drag-drop-without-title';\nimport fixtureInputTextTitle from './fixtures/input-text-title';\n\ntest('Molecule › MoleculeTitleAndCheckboxWrapper > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeTitleAndCheckboxWrapper.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeTitleAndCheckboxWrapper.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeTitleAndCheckboxWrapper › Default › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureDefault);\ntest('Molecule › MoleculeTitleAndCheckboxWrapper › DragDropCheckbox › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureDragDropCheckbox);\ntest('Molecule › MoleculeTitleAndCheckboxWrapper › DragDropWithoutTitle › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureDragDropWithoutTitle);\ntest('Molecule › MoleculeTitleAndCheckboxWrapper › InputTextTitle › should be rendered', renderComponentMacro, MoleculeTitleAndCheckboxWrapper, fixtureInputTextTitle);\n"],"file":"fixtures.js"}
@@ -3,8 +3,9 @@ import React, { useMemo, useState, useCallback, useRef } from 'react';
3
3
  import PropTypes from 'prop-types';
4
4
  import classnames from 'classnames';
5
5
  import { NovaCompositionNavigationArrowDown as ArrowDownIcon } from '@coorpacademy/nova-icons';
6
- import ContentBadge from '../../atom/content-badge';
6
+ import ListBadges from '../list-badges';
7
7
  import ButtonLink from '../../atom/button-link';
8
+ import ContentBadge from '../../atom/content-badge';
8
9
  import style from './style.css';
9
10
 
10
11
  const buildItemsOfSection = items => {
@@ -27,8 +28,8 @@ const buildItemsOfSection = items => {
27
28
  case 'content':
28
29
  {
29
30
  const {
30
- category,
31
- label,
31
+ badgeList,
32
+ badgeAriaLabel,
32
33
  title,
33
34
  author,
34
35
  unsaved = false
@@ -41,19 +42,17 @@ const buildItemsOfSection = items => {
41
42
  className: style.contentCounter
42
43
  }, index + 1), /*#__PURE__*/React.createElement("div", {
43
44
  className: style.contentItem
44
- }, /*#__PURE__*/React.createElement("div", {
45
- className: style.content
46
- }, /*#__PURE__*/React.createElement(ContentBadge, {
47
- category: category,
48
- label: label
49
- }), /*#__PURE__*/React.createElement("span", {
45
+ }, /*#__PURE__*/React.createElement(ListBadges, {
46
+ "aria-label": badgeAriaLabel,
47
+ items: badgeList
48
+ }), /*#__PURE__*/React.createElement("div", {
50
49
  className: classnames(style.contentTitle, unsaved && style.unsaved),
51
50
  title: title // eslint-disable-next-line react/no-danger
52
51
  ,
53
52
  dangerouslySetInnerHTML: {
54
53
  __html: title
55
54
  }
56
- })), author ? /*#__PURE__*/React.createElement("span", {
55
+ }), author ? /*#__PURE__*/React.createElement("span", {
57
56
  className: style.author
58
57
  }, author) : null));
59
58
  }
@@ -235,9 +234,9 @@ WizardSummary.propTypes = process.env.NODE_ENV !== "production" ? {
235
234
  unsaved: PropTypes.bool
236
235
  }), PropTypes.shape({
237
236
  type: PropTypes.string,
238
- category: PropTypes.oneOf(['base', 'advanced', 'coach', 'chapter', 'scorm', 'video', 'article', 'podcast', 'course']),
237
+ badgeList: PropTypes.arrayOf(PropTypes.shape(ContentBadge.propTypes)),
238
+ badgeAriaLabel: PropTypes.string,
239
239
  title: PropTypes.string,
240
- label: PropTypes.string,
241
240
  author: PropTypes.string,
242
241
  unsaved: PropTypes.bool
243
242
  })])),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/molecule/wizard-summary/index.js"],"names":["React","useMemo","useState","useCallback","useRef","PropTypes","classnames","NovaCompositionNavigationArrowDown","ArrowDownIcon","ContentBadge","ButtonLink","style","buildItemsOfSection","items","map","item","index","type","title","value","category","label","author","unsaved","contentWrapper","contentCounter","contentItem","content","contentTitle","__html","text","valueSimpleText","buildSectionHeader","section","counterText","sectionHeader","buildSections","sections","itemsView","sectionWrapper","BuildAction","action","side","onClick","disabled","icon","ariaLabel","handleClick","buttonProps","position","button","checkOnClose","checked","summaryElement","onCloseSummary","clickEvent","current","contains","target","WizardSummary","props","sectionsView","idSwitch","setChecked","handleOnChange","document","addEventListener","removeEventListener","container","desktopSummaryTitle","checkbox","summary","tabletSummaryHeader","tabletSummaryTitle","tabletSummaryIcon","summarySections","actionZone","propTypes","shape","string","bool","func","arrayOf","oneOfType","oneOf"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,QAAxB,EAAkCC,WAAlC,EAA+CC,MAA/C,QAA4D,OAA5D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SAAQC,kCAAkC,IAAIC,aAA9C,QAAkE,0BAAlE;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,mBAAmB,GAAGC,KAAK,IAAI;AACnC,SAAOA,KAAK,CAACC,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AAChC,UAAM;AAACC,MAAAA;AAAD,QAASF,IAAf;;AACA,YAAQE,IAAR;AACE,WAAK,aAAL;AACE,4BACE;AAAI,UAAA,GAAG,EAAG,GAAEF,IAAI,CAACG,KAAM,IAAGF,KAAM,EAAhC;AAAmC,uBAAWD,IAAI,CAACG;AAAnD,wBACE;AAAM,UAAA,SAAS,EAAEP,KAAK,CAACO;AAAvB,WAA+BH,IAAI,CAACG,KAApC,CADF,eAEE;AAAM,UAAA,SAAS,EAAEP,KAAK,CAACQ;AAAvB,WAA+BJ,IAAI,CAACI,KAApC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hB,CADQ,CAHc;AAyCxBtC,EAAAA,MAAM,EAAED,WAAW,CAACqC,SAAZ,CAAsBpC;AAzCN,CAA1B;AA4CA,eAAekB,aAAf","sourcesContent":["import React, {useMemo, useState, useCallback, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {uniqueId} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDownIcon} from '@coorpacademy/nova-icons';\nimport ContentBadge from '../../atom/content-badge';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildItemsOfSection = items => {\n return items.map((item, index) => {\n const {type} = item;\n switch (type) {\n case 'mainElement':\n return (\n <li key={`${item.title}-${index}`} data-name={item.title}>\n <span className={style.title}>{item.title}</span>\n <span className={style.value}>{item.value}</span>\n </li>\n );\n case 'content': {\n const {category, label, title, author, unsaved = false} = item;\n return (\n <li className={style.contentWrapper} key={`${title}-${index}`} data-name={item.title}>\n <span className={style.contentCounter}>{index + 1}</span>\n <div className={style.contentItem}>\n <div className={style.content}>\n <ContentBadge category={category} label={label} />\n <span\n className={classnames(style.contentTitle, unsaved && style.unsaved)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n </div>\n {author ? <span className={style.author}>{author}</span> : null}\n </div>\n </li>\n );\n }\n case 'text':\n default: {\n const {text, unsaved = false} = item;\n return (\n <li key={`${item.text}-${index}`} data-name={item.title}>\n <span className={classnames(style.valueSimpleText, unsaved && style.unsaved)}>\n {text}\n </span>\n </li>\n );\n }\n }\n });\n};\n\nconst buildSectionHeader = section => {\n const {title, counterText} = section;\n if (!title) {\n return null;\n }\n return (\n <div className={style.sectionHeader}>\n <span className={style.title}>{title}</span>\n {counterText ? <span className={style.counterText}>{counterText}</span> : null}\n </div>\n );\n};\n\nconst buildSections = sections => {\n return sections.map((section, index) => {\n const sectionHeader = buildSectionHeader(section);\n const itemsView = buildItemsOfSection(section.items);\n return (\n <div\n key={`summary-section-${index}`}\n data-step={index}\n data-name={`summary-section-${index}`}\n className={style.sectionWrapper}\n >\n {sectionHeader}\n <ul>{itemsView}</ul>\n </div>\n );\n });\n};\n\nconst BuildAction = ({action, side}) => {\n const {onClick, text, disabled = false, icon, 'aria-label': ariaLabel} = action;\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n if (!action) return null;\n\n const buttonProps = {\n type: 'text',\n label: text,\n disabled,\n 'aria-label': ariaLabel,\n 'data-name': `${icon}-button-${side}`,\n onClick: handleClick,\n icon: {\n position: 'left',\n type: icon\n }\n };\n\n return (\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n );\n};\n\nconst checkOnClose = (checked, summaryElement, onCloseSummary, clickEvent) => {\n if (checked) {\n if (\n summaryElement &&\n summaryElement.current &&\n !summaryElement.current.contains(clickEvent.target)\n ) {\n onCloseSummary();\n }\n }\n};\n\nconst WizardSummary = props => {\n const {title, sections, action, side} = props;\n const sectionsView = buildSections(sections);\n const idSwitch = uniqueId('open-summary-wizard');\n const summaryElement = useRef(null);\n const [checked, setChecked] = useState(false);\n\n const onCloseSummary = () => setChecked(false);\n const handleOnChange = useCallback(() => {\n if (!checked) {\n document.addEventListener('click', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n document.addEventListener('touchstart', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n } else {\n document.removeEventListener('click', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n document.removeEventListener('touchstart', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n }\n setChecked(!checked);\n }, [checked]);\n\n return (\n <div className={style.container} ref={summaryElement}>\n <span className={style.desktopSummaryTitle} data-name={`summary-title-${side}`}>\n {title}\n </span>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name=\"toogle\"\n title={idSwitch}\n className={style.checkbox}\n data-name={`summary-checkbox-${side}`}\n checked={checked}\n onChange={handleOnChange}\n />\n <div className={style.summary}>\n <div className={style.tabletSummaryHeader}>\n <label htmlFor={idSwitch}>\n <span className={style.tabletSummaryTitle}>{title}</span>\n <ArrowDownIcon className={style.tabletSummaryIcon} />\n </label>\n </div>\n <div className={style.summarySections} data-name={`summary-section-${side}`}>\n {sectionsView}\n </div>\n </div>\n <div className={style.actionZone} data-name={`summary-actions-${side}`}>\n <BuildAction action={action} side={side} />\n </div>\n </div>\n );\n};\n\nBuildAction.propTypes = {\n action: PropTypes.shape({\n icon: PropTypes.string,\n disabled: PropTypes.bool,\n text: PropTypes.string,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n }),\n side: PropTypes.string\n};\n\nWizardSummary.propTypes = {\n title: PropTypes.string,\n side: PropTypes.string,\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.string,\n title: PropTypes.string,\n value: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n text: PropTypes.string,\n unsaved: PropTypes.bool\n }),\n PropTypes.shape({\n type: PropTypes.string,\n category: PropTypes.oneOf([\n 'base',\n 'advanced',\n 'coach',\n 'chapter',\n 'scorm',\n 'video',\n 'article',\n 'podcast',\n 'course'\n ]),\n title: PropTypes.string,\n label: PropTypes.string,\n author: PropTypes.string,\n unsaved: PropTypes.bool\n })\n ])\n ),\n counterText: PropTypes.string\n })\n ),\n action: BuildAction.propTypes.action\n};\n\nexport default WizardSummary;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/molecule/wizard-summary/index.js"],"names":["React","useMemo","useState","useCallback","useRef","PropTypes","classnames","NovaCompositionNavigationArrowDown","ArrowDownIcon","ListBadges","ButtonLink","ContentBadge","style","buildItemsOfSection","items","map","item","index","type","title","value","badgeList","badgeAriaLabel","author","unsaved","contentWrapper","contentCounter","contentItem","contentTitle","__html","text","valueSimpleText","buildSectionHeader","section","counterText","sectionHeader","buildSections","sections","itemsView","sectionWrapper","BuildAction","action","side","onClick","disabled","icon","ariaLabel","handleClick","buttonProps","label","position","button","checkOnClose","checked","summaryElement","onCloseSummary","clickEvent","current","contains","target","WizardSummary","props","sectionsView","idSwitch","setChecked","handleOnChange","document","addEventListener","removeEventListener","container","desktopSummaryTitle","checkbox","summary","tabletSummaryHeader","tabletSummaryTitle","tabletSummaryIcon","summarySections","actionZone","propTypes","shape","string","bool","func","arrayOf","oneOfType"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,OAAf,EAAwBC,QAAxB,EAAkCC,WAAlC,EAA+CC,MAA/C,QAA4D,OAA5D;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,SAAQC,kCAAkC,IAAIC,aAA9C,QAAkE,0BAAlE;AACA,OAAOC,UAAP,MAAuB,gBAAvB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,YAAP,MAAyB,0BAAzB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,mBAAmB,GAAGC,KAAK,IAAI;AACnC,SAAOA,KAAK,CAACC,GAAN,CAAU,CAACC,IAAD,EAAOC,KAAP,KAAiB;AAChC,UAAM;AAACC,MAAAA;AAAD,QAASF,IAAf;;AACA,YAAQE,IAAR;AACE,WAAK,aAAL;AACE,4BACE;AAAI,UAAA,GAAG,EAAG,GAAEF,IAAI,CAACG,KAAM,IAAGF,KAAM,EAAhC;AAAmC,uBAAWD,IAAI,CAACG;AAAnD,wBACE;AAAM,UAAA,SAAS,EAAEP,KAAK,CAACO;AAAvB,WAA+BH,IAAI,CAACG,KAApC,CADF,eAEE;AAAM,UAAA,SAAS,EAAEP,KAAK,CAACQ;AAAvB,WAA+BJ,IAAI,CAACI,KAApC,CAFF,CADF;;AAMF,WAAK,SAAL;AAAgB;AACd,gBAAM;AAACC,YAAAA,SAAD;AAAYC,YAAAA,cAAZ;AAA4BH,YAAAA,KAA5B;AAAmCI,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AAEdlE,IAAAA,KAAK,EAAET,SAAS,CAAC8E,OAAV,CACL9E,SAAS,CAAC+E,SAAV,CAAoB,CAClB/E,SAAS,CAAC0E,KAAV,CAAgB;AACd7D,MAAAA,IAAI,EAAEb,SAAS,CAAC2E,MADF;AAEd7D,MAAAA,KAAK,EAAEd,SAAS,CAAC2E,MAFH;AAGd5D,MAAAA,KAAK,EAAEf,SAAS,CAAC2E;AAHH,KAAhB,CADkB,EAMlB3E,SAAS,CAAC0E,KAAV,CAAgB;AACd7D,MAAAA,IAAI,EAAEb,SAAS,CAAC2E,MADF;AAEdlD,MAAAA,IAAI,EAAEzB,SAAS,CAAC2E,MAFF;AAGdxD,MAAAA,OAAO,EAAEnB,SAAS,CAAC4E;AAHL,KAAhB,CANkB,EAWlB5E,SAAS,CAAC0E,KAAV,CAAgB;AACd7D,MAAAA,IAAI,EAAEb,SAAS,CAAC2E,MADF;AAEd3D,MAAAA,SAAS,EAAEhB,SAAS,CAAC8E,OAAV,CAAkB9E,SAAS,CAAC0E,KAAV,CAAgBpE,YAAY,CAACmE,SAA7B,CAAlB,CAFG;AAGdxD,MAAAA,cAAc,EAAEjB,SAAS,CAAC2E,MAHZ;AAId7D,MAAAA,KAAK,EAAEd,SAAS,CAAC2E,MAJH;AAKdzD,MAAAA,MAAM,EAAElB,SAAS,CAAC2E,MALJ;AAMdxD,MAAAA,OAAO,EAAEnB,SAAS,CAAC4E;AANL,KAAhB,CAXkB,CAApB,CADK,CAFO;AAwBd/C,IAAAA,WAAW,EAAE7B,SAAS,CAAC2E;AAxBT,GAAhB,CADQ,CAHc;AA+BxBvC,EAAAA,MAAM,EAAED,WAAW,CAACsC,SAAZ,CAAsBrC;AA/BN,CAA1B;AAkCA,eAAemB,aAAf","sourcesContent":["import React, {useMemo, useState, useCallback, useRef} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {uniqueId} from 'lodash/fp';\nimport {NovaCompositionNavigationArrowDown as ArrowDownIcon} from '@coorpacademy/nova-icons';\nimport ListBadges from '../list-badges';\nimport ButtonLink from '../../atom/button-link';\nimport ContentBadge from '../../atom/content-badge';\nimport style from './style.css';\n\nconst buildItemsOfSection = items => {\n return items.map((item, index) => {\n const {type} = item;\n switch (type) {\n case 'mainElement':\n return (\n <li key={`${item.title}-${index}`} data-name={item.title}>\n <span className={style.title}>{item.title}</span>\n <span className={style.value}>{item.value}</span>\n </li>\n );\n case 'content': {\n const {badgeList, badgeAriaLabel, title, author, unsaved = false} = item;\n return (\n <li className={style.contentWrapper} key={`${title}-${index}`} data-name={item.title}>\n <span className={style.contentCounter}>{index + 1}</span>\n <div className={style.contentItem}>\n <ListBadges aria-label={badgeAriaLabel} items={badgeList} />\n <div\n className={classnames(style.contentTitle, unsaved && style.unsaved)}\n title={title}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n {author ? <span className={style.author}>{author}</span> : null}\n </div>\n </li>\n );\n }\n case 'text':\n default: {\n const {text, unsaved = false} = item;\n return (\n <li key={`${item.text}-${index}`} data-name={item.title}>\n <span className={classnames(style.valueSimpleText, unsaved && style.unsaved)}>\n {text}\n </span>\n </li>\n );\n }\n }\n });\n};\n\nconst buildSectionHeader = section => {\n const {title, counterText} = section;\n if (!title) {\n return null;\n }\n return (\n <div className={style.sectionHeader}>\n <span className={style.title}>{title}</span>\n {counterText ? <span className={style.counterText}>{counterText}</span> : null}\n </div>\n );\n};\n\nconst buildSections = sections => {\n return sections.map((section, index) => {\n const sectionHeader = buildSectionHeader(section);\n const itemsView = buildItemsOfSection(section.items);\n return (\n <div\n key={`summary-section-${index}`}\n data-step={index}\n data-name={`summary-section-${index}`}\n className={style.sectionWrapper}\n >\n {sectionHeader}\n <ul>{itemsView}</ul>\n </div>\n );\n });\n};\n\nconst BuildAction = ({action, side}) => {\n const {onClick, text, disabled = false, icon, 'aria-label': ariaLabel} = action;\n const handleClick = useMemo(() => () => onClick(), [onClick]);\n\n if (!action) return null;\n\n const buttonProps = {\n type: 'text',\n label: text,\n disabled,\n 'aria-label': ariaLabel,\n 'data-name': `${icon}-button-${side}`,\n onClick: handleClick,\n icon: {\n position: 'left',\n type: icon\n }\n };\n\n return (\n <div className={style.button}>\n <ButtonLink {...buttonProps} />\n </div>\n );\n};\n\nconst checkOnClose = (checked, summaryElement, onCloseSummary, clickEvent) => {\n if (checked) {\n if (\n summaryElement &&\n summaryElement.current &&\n !summaryElement.current.contains(clickEvent.target)\n ) {\n onCloseSummary();\n }\n }\n};\n\nconst WizardSummary = props => {\n const {title, sections, action, side} = props;\n const sectionsView = buildSections(sections);\n const idSwitch = uniqueId('open-summary-wizard');\n const summaryElement = useRef(null);\n const [checked, setChecked] = useState(false);\n\n const onCloseSummary = () => setChecked(false);\n const handleOnChange = useCallback(() => {\n if (!checked) {\n document.addEventListener('click', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n document.addEventListener('touchstart', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n } else {\n document.removeEventListener('click', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n document.removeEventListener('touchstart', clickEvent =>\n checkOnClose(!checked, summaryElement, onCloseSummary, clickEvent)\n );\n }\n setChecked(!checked);\n }, [checked]);\n\n return (\n <div className={style.container} ref={summaryElement}>\n <span className={style.desktopSummaryTitle} data-name={`summary-title-${side}`}>\n {title}\n </span>\n <input\n type=\"checkbox\"\n id={idSwitch}\n name=\"toogle\"\n title={idSwitch}\n className={style.checkbox}\n data-name={`summary-checkbox-${side}`}\n checked={checked}\n onChange={handleOnChange}\n />\n <div className={style.summary}>\n <div className={style.tabletSummaryHeader}>\n <label htmlFor={idSwitch}>\n <span className={style.tabletSummaryTitle}>{title}</span>\n <ArrowDownIcon className={style.tabletSummaryIcon} />\n </label>\n </div>\n <div className={style.summarySections} data-name={`summary-section-${side}`}>\n {sectionsView}\n </div>\n </div>\n <div className={style.actionZone} data-name={`summary-actions-${side}`}>\n <BuildAction action={action} side={side} />\n </div>\n </div>\n );\n};\n\nBuildAction.propTypes = {\n action: PropTypes.shape({\n icon: PropTypes.string,\n disabled: PropTypes.bool,\n text: PropTypes.string,\n onClick: PropTypes.func,\n 'aria-label': PropTypes.string\n }),\n side: PropTypes.string\n};\n\nWizardSummary.propTypes = {\n title: PropTypes.string,\n side: PropTypes.string,\n sections: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n items: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n type: PropTypes.string,\n title: PropTypes.string,\n value: PropTypes.string\n }),\n PropTypes.shape({\n type: PropTypes.string,\n text: PropTypes.string,\n unsaved: PropTypes.bool\n }),\n PropTypes.shape({\n type: PropTypes.string,\n badgeList: PropTypes.arrayOf(PropTypes.shape(ContentBadge.propTypes)),\n badgeAriaLabel: PropTypes.string,\n title: PropTypes.string,\n author: PropTypes.string,\n unsaved: PropTypes.bool\n })\n ])\n ),\n counterText: PropTypes.string\n })\n ),\n action: BuildAction.propTypes.action\n};\n\nexport default WizardSummary;\n"],"file":"index.js"}
@@ -120,11 +120,6 @@
120
120
  max-width: calc(100% -25px);
121
121
  }
122
122
 
123
- .content {
124
- display: flex;
125
- align-items: center;
126
- }
127
-
128
123
  .contentCounter {
129
124
  margin-right: 8px;
130
125
  color: cm_grey_400;
@@ -40,75 +40,122 @@ export default {
40
40
  items: [{
41
41
  type: 'content',
42
42
  title: 'Learn Everywhere #10 : Inclusion, Diversité, et autre élements importants',
43
- category: 'video',
44
- label: 'Video',
43
+ badgeList: [{
44
+ category: 'video',
45
+ label: 'Video'
46
+ }],
45
47
  author: 'Coorpacademy, Faurecia University'
46
48
  }, {
47
49
  type: 'content',
48
50
  title: 'Markteting and online advertising',
49
- category: 'base',
50
- label: 'Base',
51
+ badgeList: [{
52
+ category: 'base',
53
+ label: 'Base'
54
+ }],
51
55
  author: 'Coorpacademy',
52
56
  unsaved: true
53
57
  }, {
54
58
  type: 'content',
55
59
  title: 'Faire une offre',
56
- category: 'chapter',
57
- label: "5' learning",
60
+ badgeList: [{
61
+ category: 'chapter',
62
+ label: "5' learning"
63
+ }],
58
64
  author: 'Global Exam'
59
65
  }, {
60
66
  type: 'content',
61
67
  title: 'Cluedo: Meurtre sur Skill Island',
62
- category: 'advanced',
63
- label: 'Advanced',
68
+ badgeList: [{
69
+ category: 'advanced',
70
+ label: 'Advanced'
71
+ }],
64
72
  author: 'Coorpacademy'
65
73
  }, {
66
74
  type: 'content',
67
75
  title: 'Learn <b>Everywhere #10</b> : <u>Inclusion, Diversité</u>, et autre élements importants',
68
- category: 'video',
69
- label: 'Video',
76
+ badgeList: [{
77
+ category: 'video',
78
+ label: 'Video'
79
+ }],
70
80
  author: 'Coorpacademy, Faurecia University'
71
81
  }, {
72
82
  type: 'content',
73
83
  title: 'Mesurer la satisfaction client',
74
- category: 'coach',
75
- label: 'Coach',
84
+ badgeList: [{
85
+ category: 'base',
86
+ label: 'Base'
87
+ }, {
88
+ category: 'advanced',
89
+ label: 'Advenced'
90
+ }, {
91
+ category: 'coach',
92
+ label: 'Coach'
93
+ }],
76
94
  author: 'Dunod Formation'
77
95
  }, {
78
96
  type: 'content',
79
97
  title: 'Cluedo: Meurtre sur Skill Island',
80
- category: 'advanced',
81
- label: 'Advanced',
98
+ badgeList: [{
99
+ category: 'base',
100
+ label: 'Base'
101
+ }, {
102
+ category: 'advanced',
103
+ label: 'Advenced'
104
+ }],
82
105
  author: 'Coorpacademy'
83
106
  }, {
84
107
  type: 'content',
85
108
  title: 'Suspects - épisode 1',
109
+ badgeList: [{
110
+ category: 'scorm',
111
+ label: 'Interactive slides'
112
+ }],
86
113
  category: 'scorm',
87
114
  label: 'Interactive slides',
88
115
  author: 'Coorpacademy'
89
116
  }, {
90
117
  type: 'content',
91
118
  title: '<p align="right"> وضع النصوص بالتصاميم سواء كانت تصاميم مطبوعه</p>',
92
- category: 'coach',
93
- label: 'Coach',
119
+ badgeList: [{
120
+ category: 'base',
121
+ label: 'Base'
122
+ }, {
123
+ category: 'advanced',
124
+ label: 'Advenced'
125
+ }, {
126
+ category: 'coach',
127
+ label: 'Coach'
128
+ }],
94
129
  author: 'Dunod Formation'
95
130
  }, {
96
131
  type: 'content',
97
132
  title: 'Cluedo: Meurtre sur Skill Island',
98
- category: 'course',
99
- label: 'Course',
133
+ badgeList: [{
134
+ category: 'course',
135
+ label: 'Course'
136
+ }],
100
137
  author: 'Coorpacademy'
101
138
  }, {
102
139
  type: 'content',
103
140
  title: 'Suspects - épisode 1',
104
- category: 'scorm',
105
- label: 'Interactive slides',
141
+ badgeList: [{
142
+ category: 'scorm',
143
+ label: 'Interactive slides'
144
+ }],
106
145
  author: 'Coorpacademy'
107
146
  }, {
108
147
  type: 'content',
109
148
  title: 'Mesurer la satisfaction client',
110
- category: 'coach',
111
- label: 'Coach',
149
+ badgeList: [{
150
+ category: 'base',
151
+ label: 'Base'
152
+ }, {
153
+ category: 'advanced',
154
+ label: 'Advenced'
155
+ }, {
156
+ category: 'coach',
157
+ label: 'Coach'
158
+ }],
112
159
  author: 'Dunod Formation'
113
160
  }],
114
161
  counterText: '12 courses'