@coorpacademy/components 10.7.1 → 10.8.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 (63) hide show
  1. package/es/atom/button-link/index.js +10 -3
  2. package/es/atom/button-link/index.js.map +1 -1
  3. package/es/atom/select/test/fixtures.js +4 -0
  4. package/es/atom/select/test/fixtures.js.map +1 -1
  5. package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
  6. package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  7. package/es/molecule/course-sections/test/fixtures.js +15 -0
  8. package/es/molecule/course-sections/test/fixtures.js.map +1 -0
  9. package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
  10. package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
  11. package/es/molecule/draggable-list/test/fixtures.js +2 -0
  12. package/es/molecule/draggable-list/test/fixtures.js.map +1 -1
  13. package/es/molecule/questions/free-text/test/fixtures.js +4 -2
  14. package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
  15. package/es/molecule/review-correction-popin/index.js +103 -0
  16. package/es/molecule/review-correction-popin/index.js.map +1 -0
  17. package/es/molecule/review-correction-popin/style.css +315 -0
  18. package/es/molecule/review-correction-popin/test/fixtures/right.js +17 -0
  19. package/es/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
  20. package/es/molecule/review-correction-popin/test/fixtures/wrong.js +19 -0
  21. package/es/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
  22. package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
  23. package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
  24. package/es/molecule/wizard-summary/test/fixtures.js +2 -0
  25. package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
  26. package/es/organism/wizard-contents/test/fixtures.js +2 -0
  27. package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
  28. package/es/template/back-office/brand-update/test/fixtures.js +2 -0
  29. package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
  30. package/es/util/button-icons.js +2 -1
  31. package/es/util/button-icons.js.map +1 -1
  32. package/lib/atom/button-link/index.js +11 -3
  33. package/lib/atom/button-link/index.js.map +1 -1
  34. package/lib/atom/select/test/fixtures.js +6 -0
  35. package/lib/atom/select/test/fixtures.js.map +1 -1
  36. package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
  37. package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
  38. package/lib/molecule/course-sections/test/fixtures.js +25 -0
  39. package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
  40. package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
  41. package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
  42. package/lib/molecule/draggable-list/test/fixtures.js +3 -0
  43. package/lib/molecule/draggable-list/test/fixtures.js.map +1 -1
  44. package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
  45. package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
  46. package/lib/molecule/review-correction-popin/index.js +116 -0
  47. package/lib/molecule/review-correction-popin/index.js.map +1 -0
  48. package/lib/molecule/review-correction-popin/style.css +315 -0
  49. package/lib/molecule/review-correction-popin/test/fixtures/right.js +22 -0
  50. package/lib/molecule/review-correction-popin/test/fixtures/right.js.map +1 -0
  51. package/lib/molecule/review-correction-popin/test/fixtures/wrong.js +24 -0
  52. package/lib/molecule/review-correction-popin/test/fixtures/wrong.js.map +1 -0
  53. package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
  54. package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
  55. package/lib/molecule/wizard-summary/test/fixtures.js +3 -0
  56. package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
  57. package/lib/organism/wizard-contents/test/fixtures.js +3 -0
  58. package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
  59. package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
  60. package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
  61. package/lib/util/button-icons.js +1 -0
  62. package/lib/util/button-icons.js.map +1 -1
  63. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/atom/button-link/index.js"],"names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","ariaLabel","link","onClick","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACxC,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA;AAAP,MAAmBH,IAAzB;AACA,QAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,CAAb;;AAEA,MAAI,CAACD,IAAL,EAAW;AACT,wBACE;AAAK,MAAA,SAAS,EAAEE,eAAMC;AAAtB,oBACE;AAAM,MAAA,SAAS,EAAED,eAAML;AAAvB,OAA+BA,KAA/B,CADF,CADF;AAKD;;AAED,sBACE;AAAK,IAAA,SAAS,EAAEK,eAAMC;AAAtB,KACGJ,QAAQ,KAAK,MAAb,gBAAsB,6BAAC,IAAD;AAAM,IAAA,SAAS,EAAEG,eAAMN;AAAvB,IAAtB,GAAwD,IAD3D,eAEE;AAAM,IAAA,SAAS,EAAEM,eAAML;AAAvB,KAA+BA,KAA/B,CAFF,EAGGE,QAAQ,KAAK,OAAb,gBAAuB,6BAAC,IAAD;AAAM,IAAA,SAAS,EAAEG,eAAMN;AAAvB,IAAvB,GAAyD,IAH5D,CADF;AAOD,CAnBD;;AAqBA,MAAMQ,UAAU,GAAGC,KAAK,IAAI;AAC1B,QAAM;AACJP,IAAAA,IADI;AAEJD,IAAAA,KAFI;AAGJS,IAAAA,QAHI;AAIJV,IAAAA,IAAI,GAAG,EAJH;AAKJ,iBAAaW,QALT;AAMJ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,mBAAUE,MAFI;AAGrB,gBAAcF,mBAAUE,MAHH;AAIrB,eAAaF,mBAAUE,MAJF;AAKrB3B,EAAAA,IAAI,EAAEyB,mBAAUG,KAAV,CAAgB;AACpBzB,IAAAA,QAAQ,EAAEsB,mBAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,MAAV,CAAhB,CADU;AAEpBxB,IAAAA,IAAI,EAAEuB,mBAAUC,KAAV,CAAgB,oBAAKrB,kBAAL,CAAhB;AAFc,GAAhB,CALe;AASrBS,EAAAA,OAAO,EAAEW,mBAAUI,IATE;AAUrBhB,EAAAA,IAAI,EAAEY,mBAAUG,KAAV,CAAgB;AACpBE,IAAAA,IAAI,EAAEL,mBAAUE,MADI;AAEpBI,IAAAA,QAAQ,EAAEN,mBAAUO,IAFA;AAGpBC,IAAAA,MAAM,EAAER,mBAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;AAHY,GAAhB,CAVe;AAerBhB,EAAAA,QAAQ,EAAEe,mBAAUO;AAfC,CAAvB;eAkBexB,U","sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n data-name={dataName}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool\n};\n\nexport default ButtonLink;\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../../src/atom/button-link/index.js"],"names":["getButtonContent","icon","label","type","position","Icon","ICONS","style","buttonContent","ButtonLink","props","disabled","dataName","ariaLabel","link","onClick","className","customStyle","contentView","styleButton","button","primary","secondary","tertiary","text","dangerous","handleOnClick","propTypes","PropTypes","oneOf","string","shape","func","href","download","bool","target"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,gBAAgB,GAAG,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACxC,QAAM;AAACC,IAAAA,IAAD;AAAOC,IAAAA;AAAP,MAAmBH,IAAzB;AACA,QAAMI,IAAI,GAAG,qBAAM,IAAN,EAAYF,IAAZ,EAAkBG,kBAAlB,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AA,IAAI,EAAEL,mBAAUE,MADI;AAEpBI,IAAAA,QAAQ,EAAEN,mBAAUO,IAFA;AAGpBC,IAAAA,MAAM,EAAER,mBAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,QAAV,EAAoB,SAApB,EAA+B,MAA/B,CAAhB;AAHY,GAAhB,CAVe;AAerBlB,EAAAA,QAAQ,EAAEiB,mBAAUO,IAfC;AAgBrBnB,EAAAA,SAAS,EAAEY,mBAAUE,MAhBA;AAiBrBb,EAAAA,WAAW,EAAEW,mBAAUG,KAAV,CAAgB,EAAhB;AAjBQ,CAAvB;eAoBetB,U","sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {getOr, keys, noop} from 'lodash/fp';\nimport classnames from 'classnames';\nimport Link from '../link';\nimport {ICONS} from '../../util/button-icons';\nimport style from './style.css';\n\nconst getButtonContent = (icon, label) => {\n const {type, position} = icon;\n const Icon = getOr(null, type, ICONS);\n\n if (!Icon) {\n return (\n <div className={style.buttonContent}>\n <span className={style.label}>{label}</span>\n </div>\n );\n }\n\n return (\n <div className={style.buttonContent}>\n {position === 'left' ? <Icon className={style.icon} /> : null}\n <span className={style.label}>{label}</span>\n {position === 'right' ? <Icon className={style.icon} /> : null}\n </div>\n );\n};\n\nconst ButtonLink = props => {\n const {\n type,\n label,\n disabled,\n icon = {},\n 'data-name': dataName,\n 'aria-label': ariaLabel,\n link,\n onClick = noop,\n className,\n customStyle\n } = props;\n const contentView = getButtonContent(icon, label);\n const styleButton = classnames(\n className,\n style.button,\n type === 'primary' && style.primary,\n type === 'secondary' && style.secondary,\n type === 'tertiary' && style.tertiary,\n type === 'text' && style.text,\n type === 'dangerous' && style.dangerous,\n link && style.link,\n disabled && style.disabled\n );\n\n const handleOnClick = useCallback(() => onClick(), [onClick]);\n\n if (link) {\n return (\n <Link\n {...link}\n style={customStyle}\n className={styleButton}\n data-name={dataName}\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n >\n {contentView}\n </Link>\n );\n }\n\n return (\n <button\n type=\"button\"\n aria-label={ariaLabel || label}\n title={ariaLabel || label}\n data-name={dataName}\n style={customStyle}\n className={styleButton}\n onClick={handleOnClick}\n >\n {contentView}\n </button>\n );\n};\n\nButtonLink.propTypes = {\n type: PropTypes.oneOf(['primary', 'secondary', 'tertiary', 'text', 'dangerous']),\n label: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string,\n icon: PropTypes.shape({\n position: PropTypes.oneOf(['right', 'left']),\n type: PropTypes.oneOf(keys(ICONS))\n }),\n onClick: PropTypes.func,\n link: PropTypes.shape({\n href: PropTypes.string,\n download: PropTypes.bool,\n target: PropTypes.oneOf(['_self', '_blank', '_parent', '_top'])\n }),\n disabled: PropTypes.bool,\n className: PropTypes.string,\n customStyle: PropTypes.shape({})\n};\n\nexport default ButtonLink;\n"],"file":"index.js"}
@@ -8,6 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
8
8
 
9
9
  var _ = _interopRequireDefault(require(".."));
10
10
 
11
+ var _coorpmanager = _interopRequireDefault(require("./fixtures/coorpmanager"));
12
+
11
13
  var _default = _interopRequireDefault(require("./fixtures/default"));
12
14
 
13
15
  var _disabled = _interopRequireDefault(require("./fixtures/disabled"));
@@ -26,6 +28,8 @@ var _multipleSelected = _interopRequireDefault(require("./fixtures/multiple-sele
26
28
 
27
29
  var _multiple = _interopRequireDefault(require("./fixtures/multiple"));
28
30
 
31
+ var _player = _interopRequireDefault(require("./fixtures/player"));
32
+
29
33
  var _question = _interopRequireDefault(require("./fixtures/question"));
30
34
 
31
35
  var _requiredWithTitle = _interopRequireDefault(require("./fixtures/required-with-title"));
@@ -48,6 +52,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
48
52
  t.not(value, undefined, `PropType for "Atom.AtomSelect.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
49
53
  });
50
54
  });
55
+ (0, _ava.default)('Atom › AtomSelect › Coorpmanager › should be rendered', _renderComponent.default, _.default, _coorpmanager.default);
51
56
  (0, _ava.default)('Atom › AtomSelect › Default › should be rendered', _renderComponent.default, _.default, _default.default);
52
57
  (0, _ava.default)('Atom › AtomSelect › Disabled › should be rendered', _renderComponent.default, _.default, _disabled.default);
53
58
  (0, _ava.default)('Atom › AtomSelect › Error › should be rendered', _renderComponent.default, _.default, _error.default);
@@ -57,6 +62,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
57
62
  (0, _ava.default)('Atom › AtomSelect › Mooc › should be rendered', _renderComponent.default, _.default, _mooc.default);
58
63
  (0, _ava.default)('Atom › AtomSelect › MultipleSelected › should be rendered', _renderComponent.default, _.default, _multipleSelected.default);
59
64
  (0, _ava.default)('Atom › AtomSelect › Multiple › should be rendered', _renderComponent.default, _.default, _multiple.default);
65
+ (0, _ava.default)('Atom › AtomSelect › Player › should be rendered', _renderComponent.default, _.default, _player.default);
60
66
  (0, _ava.default)('Atom › AtomSelect › Question › should be rendered', _renderComponent.default, _.default, _question.default);
61
67
  (0, _ava.default)('Atom › AtomSelect › RequiredWithTitle › should be rendered', _renderComponent.default, _.default, _requiredWithTitle.default);
62
68
  (0, _ava.default)('Atom › AtomSelect › Required › should be rendered', _renderComponent.default, _.default, _required.default);
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["t","pass","AtomSelect","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iDAAL,EAAwDA,CAAC,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AvF,EAAmGqB,wBAAnG;AACA,kBAAK,sDAAL,EAA6Df,wBAA7D,EAAmFN,SAAnF,EAA+FsB,oBAA/F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomSelect from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureFilter from './fixtures/filter';\nimport fixtureInvalid from './fixtures/invalid';\nimport fixtureModified from './fixtures/modified';\nimport fixtureMooc from './fixtures/mooc';\nimport fixtureMultipleSelected from './fixtures/multiple-selected';\nimport fixtureMultiple from './fixtures/multiple';\nimport fixtureQuestion from './fixtures/question';\nimport fixtureRequiredWithTitle from './fixtures/required-with-title';\nimport fixtureRequired from './fixtures/required';\nimport fixtureSort from './fixtures/sort';\nimport fixtureTemplate from './fixtures/template';\nimport fixtureThematiquesLong from './fixtures/thematiques-long';\nimport fixtureThematiques from './fixtures/thematiques';\n\ntest('Atom › AtomSelect > should have valid propTypes', t => {\n t.pass();\n forEach(AtomSelect.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomSelect.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);\ntest('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);\ntest('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);\ntest('Atom › AtomSelect › Filter › should be rendered', renderComponentMacro, AtomSelect, fixtureFilter);\ntest('Atom › AtomSelect › Invalid › should be rendered', renderComponentMacro, AtomSelect, fixtureInvalid);\ntest('Atom › AtomSelect › Modified › should be rendered', renderComponentMacro, AtomSelect, fixtureModified);\ntest('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);\ntest('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);\ntest('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);\ntest('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);\ntest('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);\ntest('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);\ntest('Atom › AtomSelect › Sort › should be rendered', renderComponentMacro, AtomSelect, fixtureSort);\ntest('Atom › AtomSelect › Template › should be rendered', renderComponentMacro, AtomSelect, fixtureTemplate);\ntest('Atom › AtomSelect › ThematiquesLong › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiquesLong);\ntest('Atom › AtomSelect › Thematiques › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiques);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["t","pass","AtomSelect","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixturePlayer","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iDAAL,EAAwDA,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAWC,SAAnB,EAA8B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mE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A7D,EAAmFN,SAAnF,EAA+FwB,oBAA/F","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomSelect from '..';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureError from './fixtures/error';\nimport fixtureFilter from './fixtures/filter';\nimport fixtureInvalid from './fixtures/invalid';\nimport fixtureModified from './fixtures/modified';\nimport fixtureMooc from './fixtures/mooc';\nimport fixtureMultipleSelected from './fixtures/multiple-selected';\nimport fixtureMultiple from './fixtures/multiple';\nimport fixturePlayer from './fixtures/player';\nimport fixtureQuestion from './fixtures/question';\nimport fixtureRequiredWithTitle from './fixtures/required-with-title';\nimport fixtureRequired from './fixtures/required';\nimport fixtureSort from './fixtures/sort';\nimport fixtureTemplate from './fixtures/template';\nimport fixtureThematiquesLong from './fixtures/thematiques-long';\nimport fixtureThematiques from './fixtures/thematiques';\n\ntest('Atom › AtomSelect > should have valid propTypes', t => {\n t.pass();\n forEach(AtomSelect.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomSelect.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomSelect › Coorpmanager › should be rendered', renderComponentMacro, AtomSelect, fixtureCoorpmanager);\ntest('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);\ntest('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);\ntest('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);\ntest('Atom › AtomSelect › Filter › should be rendered', renderComponentMacro, AtomSelect, fixtureFilter);\ntest('Atom › AtomSelect › Invalid › should be rendered', renderComponentMacro, AtomSelect, fixtureInvalid);\ntest('Atom › AtomSelect › Modified › should be rendered', renderComponentMacro, AtomSelect, fixtureModified);\ntest('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);\ntest('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);\ntest('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);\ntest('Atom › AtomSelect › Player › should be rendered', renderComponentMacro, AtomSelect, fixturePlayer);\ntest('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);\ntest('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);\ntest('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);\ntest('Atom › AtomSelect › Sort › should be rendered', renderComponentMacro, AtomSelect, fixtureSort);\ntest('Atom › AtomSelect › Template › should be rendered', renderComponentMacro, AtomSelect, fixtureTemplate);\ntest('Atom › AtomSelect › ThematiquesLong › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiquesLong);\ntest('Atom › AtomSelect › Thematiques › should be rendered', renderComponentMacro, AtomSelect, fixtureThematiques);\n"],"file":"fixtures.js"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ var _loading = _interopRequireDefault(require("./fixtures/loading"));
14
+
15
+ var _videoTranslate = _interopRequireDefault(require("./fixtures/video-translate"));
16
+
17
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
18
+
19
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {
20
+ t.pass();
21
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
22
+ t.not(value, undefined, `PropType for "Molecule.MoleculeCockpitPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
23
+ });
24
+ });
25
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Default › should be rendered', _renderComponent.default, _.default, _default.default);
26
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
27
+ (0, _ava.default)('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', _renderComponent.default, _.default, _videoTranslate.default);
28
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/cockpit-popin/test/fixtures.js"],"names":["t","pass","MoleculeCockpitPopin","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureVideoTranslate"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqBC,SAA7B,EAAwC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAmHO,gBAAnH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAmHQ,gBAAnH;AACA,kBAAK,uEAAL,EAA8EF,wBAA9E,EAAoGN,SAApG,EAA0HS,uBAA1H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCockpitPopin from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureVideoTranslate from './fixtures/video-translate';\n\ntest('Molecule › MoleculeCockpitPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCockpitPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCockpitPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCockpitPopin › Default › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureDefault);\ntest('Molecule › MoleculeCockpitPopin › Loading › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureLoading);\ntest('Molecule › MoleculeCockpitPopin › VideoTranslate › should be rendered', renderComponentMacro, MoleculeCockpitPopin, fixtureVideoTranslate);\n"],"file":"fixtures.js"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ var _loading = _interopRequireDefault(require("./fixtures/loading"));
14
+
15
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
+
17
+ (0, _ava.default)('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
18
+ t.pass();
19
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
20
+ t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSections.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
21
+ });
22
+ });
23
+ (0, _ava.default)('Molecule › MoleculeCourseSections › Default › should be rendered', _renderComponent.default, _.default, _default.default);
24
+ (0, _ava.default)('Molecule › MoleculeCourseSections › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
25
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\n"],"file":"fixtures.js"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ var _ava = _interopRequireDefault(require("ava"));
4
+
5
+ var _forEach = _interopRequireDefault(require("lodash/forEach"));
6
+
7
+ var _renderComponent = _interopRequireDefault(require("../../../../test/helpers/render-component"));
8
+
9
+ var _ = _interopRequireDefault(require(".."));
10
+
11
+ var _default = _interopRequireDefault(require("./fixtures/default"));
12
+
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+
15
+ (0, _ava.default)('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {
16
+ t.pass();
17
+ (0, _forEach.default)(_.default.propTypes, (value, key) => {
18
+ t.not(value, undefined, `PropType for "MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
19
+ });
20
+ });
21
+ (0, _ava.default)('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', _renderComponent.default, _.default, _default.default);
22
+ //# sourceMappingURL=fixtures.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../../src/molecule/dashboard/review-banner/test/fixtures.js"],"names":["t","pass","MoleculeDashboardReviewBanner","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iFAAL,EAAwFA,CAAC,IAAI;AAC3FA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA8BC,SAAtC,EAAiD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2EAA0EF,GAAI,mEAAvG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kFAAL,EAAyFG,wBAAzF,EAA+GN,SAA/G,EAA8IO,gBAA9I","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeDashboardReviewBanner from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDashboardReviewBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeDashboard.MoleculeDashboardReviewBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeDashboard › MoleculeDashboardReviewBanner › Default › should be rendered', renderComponentMacro, MoleculeDashboardReviewBanner, fixtureDefault);\n"],"file":"fixtures.js"}
@@ -8,6 +8,8 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
8
8
 
9
9
  var _ = _interopRequireDefault(require(".."));
10
10
 
11
+ var _courseSections = _interopRequireDefault(require("./fixtures/course-sections"));
12
+
11
13
  var _dashboardSections = _interopRequireDefault(require("./fixtures/dashboard-sections"));
12
14
 
13
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
@@ -18,5 +20,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
18
20
  t.not(value, undefined, `PropType for "Molecule.MoleculeDraggableList.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
19
21
  });
20
22
  });
23
+ (0, _ava.default)('Molecule › MoleculeDraggableList › CourseSections › should be rendered', _renderComponent.default, _.default, _courseSections.default);
21
24
  (0, _ava.default)('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', _renderComponent.default, _.default, _dashboardSections.default);
22
25
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["t","pass","MoleculeDraggableList","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDashboardSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,2EAAL,EAAkFG,wBAAlF,EAAwGN,SAAxG,EAA+HO,0BAA/H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../src/molecule/draggable-list/test/fixtures.js"],"names":["t","pass","MoleculeDraggableList","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCourseSections","fixtureDashboardSections"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,wEAAL,EAA+EG,wBAA/E,EAAqGN,SAArG,EAA4HO,uBAA5H;AACA,kBAAK,2EAAL,EAAkFD,wBAAlF,EAAwGN,SAAxG,EAA+HQ,0BAA/H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeDraggableList from '..';\nimport fixtureCourseSections from './fixtures/course-sections';\nimport fixtureDashboardSections from './fixtures/dashboard-sections';\n\ntest('Molecule › MoleculeDraggableList > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeDraggableList.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeDraggableList.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeDraggableList › CourseSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureCourseSections);\ntest('Molecule › MoleculeDraggableList › DashboardSections › should be rendered', renderComponentMacro, MoleculeDraggableList, fixtureDashboardSections);\n"],"file":"fixtures.js"}
@@ -10,7 +10,9 @@ var _ = _interopRequireDefault(require(".."));
10
10
 
11
11
  var _default = _interopRequireDefault(require("./fixtures/default"));
12
12
 
13
- var _withDefaultValue = _interopRequireDefault(require("./fixtures/with-default-value"));
13
+ var _withValueOnChange = _interopRequireDefault(require("./fixtures/with-value-on-change"));
14
+
15
+ var _withValue = _interopRequireDefault(require("./fixtures/with-value"));
14
16
 
15
17
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
18
 
@@ -21,5 +23,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
21
23
  });
22
24
  });
23
25
  (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', _renderComponent.default, _.default, _default.default);
24
- (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithDefaultValue › should be rendered', _renderComponent.default, _.default, _withDefaultValue.default);
26
+ (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', _renderComponent.default, _.default, _withValueOnChange.default);
27
+ (0, _ava.default)('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
25
28
  //# sourceMappingURL=fixtures.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["t","pass","MoleculeQuestionsFreeText","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithDefaultValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6EAAL,EAAoFA,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,EAAqFG,wBAArF,EAA2GN,SAA3G,EAAsIO,gBAAtI;AACA,kBAAK,uFAAL,EAA8FD,wBAA9F,EAAoHN,SAApH,EAA+IQ,yBAA/I","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeQuestionsFreeText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithDefaultValue from './fixtures/with-default-value';\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeQuestions.MoleculeQuestionsFreeText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithDefaultValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithDefaultValue);\n"],"file":"fixtures.js"}
1
+ {"version":3,"sources":["../../../../../src/molecule/questions/free-text/test/fixtures.js"],"names":["t","pass","MoleculeQuestionsFreeText","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithValueOnChange","fixtureWithValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6EAAL,EAAoFA,CAAC,IAAI;AACvFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,uEAAsEF,GAAI,mEAAnG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,8EAAL,EAAqFG,wBAArF,EAA2GN,SAA3G,EAAsIO,gBAAtI;AACA,kBAAK,wFAAL,EAA+FD,wBAA/F,EAAqHN,SAArH,EAAgJQ,0BAAhJ;AACA,kBAAK,gFAAL,EAAuFF,wBAAvF,EAA6GN,SAA7G,EAAwIS,kBAAxI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport MoleculeQuestionsFreeText from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValueOnChange from './fixtures/with-value-on-change';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeQuestionsFreeText.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"MoleculeQuestions.MoleculeQuestionsFreeText.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › Default › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureDefault);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValueOnChange › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValueOnChange);\ntest('MoleculeQuestions › MoleculeQuestionsFreeText › WithValue › should be rendered', renderComponentMacro, MoleculeQuestionsFreeText, fixtureWithValue);\n"],"file":"fixtures.js"}
@@ -0,0 +1,116 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+ exports.default = void 0;
5
+
6
+ var _react = _interopRequireDefault(require("react"));
7
+
8
+ var _classnames = _interopRequireDefault(require("classnames"));
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _novaIcons = require("@coorpacademy/nova-icons");
13
+
14
+ var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
15
+
16
+ var _style = _interopRequireDefault(require("./style.css"));
17
+
18
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
+
20
+ 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); }
21
+
22
+ const buildKlfButton = klf => {
23
+ const klfButtonProps = _extends(_extends({}, klf), {}, {
24
+ icon: {
25
+ position: 'left',
26
+ type: 'key'
27
+ },
28
+ type: 'primary'
29
+ });
30
+
31
+ return /*#__PURE__*/_react.default.createElement("div", {
32
+ className: _style.default.klfContainer
33
+ }, /*#__PURE__*/_react.default.createElement("div", {
34
+ className: _style.default.klfButtonContainer
35
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, klfButtonProps, {
36
+ className: _style.default.klfButton
37
+ }))), /*#__PURE__*/_react.default.createElement("div", {
38
+ className: _style.default.toolTip
39
+ }, /*#__PURE__*/_react.default.createElement("div", {
40
+ className: _style.default.tooltipText
41
+ }, klf.tooltip)));
42
+ };
43
+
44
+ const ReviewCorrectionPopin = props => {
45
+ const {
46
+ information,
47
+ resultLabel,
48
+ type,
49
+ klf,
50
+ next
51
+ } = props;
52
+
53
+ const nextQuestionButtonProps = _extends(_extends({}, next), {}, {
54
+ type: 'primary'
55
+ });
56
+
57
+ const cta = type === 'wrong' ? buildKlfButton(klf) : null;
58
+ const ICONS = {
59
+ right: _novaIcons.NovaCompositionCoorpacademyCheck,
60
+ wrong: _novaIcons.NovaSolidStatusClose
61
+ };
62
+ const Icon = ICONS[type];
63
+ return /*#__PURE__*/_react.default.createElement("div", {
64
+ className: _style.default.wrapper
65
+ }, /*#__PURE__*/_react.default.createElement("div", {
66
+ className: (0, _classnames.default)(_style.default.popin, type === 'right' ? _style.default.right : _style.default.wrong)
67
+ }, /*#__PURE__*/_react.default.createElement("div", {
68
+ className: _style.default.correctionSection
69
+ }, /*#__PURE__*/_react.default.createElement("div", {
70
+ className: _style.default.iconCircle
71
+ }, /*#__PURE__*/_react.default.createElement(Icon, {
72
+ className: type === 'right' ? _style.default.iconRight : _style.default.iconWrong
73
+ })), /*#__PURE__*/_react.default.createElement("div", {
74
+ className: _style.default.resultLabel,
75
+ "aria-label": "result"
76
+ }, /*#__PURE__*/_react.default.createElement("span", {
77
+ "aria-label": resultLabel
78
+ }, resultLabel))), /*#__PURE__*/_react.default.createElement("div", {
79
+ className: _style.default.feedbackSection
80
+ }, /*#__PURE__*/_react.default.createElement("div", {
81
+ className: _style.default.information,
82
+ "aria-label": "answer-information"
83
+ }, /*#__PURE__*/_react.default.createElement("span", {
84
+ className: _style.default.label,
85
+ "aria-label": information.label
86
+ }, information.label), /*#__PURE__*/_react.default.createElement("span", {
87
+ className: _style.default.message,
88
+ "aria-label": information.message
89
+ }, information.message))), /*#__PURE__*/_react.default.createElement("div", {
90
+ className: type === 'right' ? _style.default.actions : _style.default.actionsWrong
91
+ }, cta, /*#__PURE__*/_react.default.createElement("div", {
92
+ className: _style.default.nextQuestionContainer
93
+ }, /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, nextQuestionButtonProps, {
94
+ className: _style.default.nextQuestionButton
95
+ }))))));
96
+ };
97
+
98
+ ReviewCorrectionPopin.propTypes = process.env.NODE_ENV !== "production" ? {
99
+ type: _propTypes.default.oneOf(['right', 'wrong']),
100
+ resultLabel: _propTypes.default.string,
101
+ information: _propTypes.default.shape({
102
+ label: _propTypes.default.string,
103
+ message: _propTypes.default.string
104
+ }),
105
+ next: _propTypes.default.shape({
106
+ label: _propTypes.default.string,
107
+ onClick: _propTypes.default.func
108
+ }),
109
+ klf: _propTypes.default.shape({
110
+ label: _propTypes.default.string,
111
+ onClick: _propTypes.default.func
112
+ })
113
+ } : {};
114
+ var _default = ReviewCorrectionPopin;
115
+ exports.default = _default;
116
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/molecule/review-correction-popin/index.js"],"names":["buildKlfButton","klf","klfButtonProps","icon","position","type","style","klfContainer","klfButtonContainer","klfButton","toolTip","tooltipText","tooltip","ReviewCorrectionPopin","props","information","resultLabel","next","nextQuestionButtonProps","cta","ICONS","right","RightIcon","wrong","WrongIcon","Icon","wrapper","popin","correctionSection","iconCircle","iconRight","iconWrong","feedbackSection","label","message","actions","actionsWrong","nextQuestionContainer","nextQuestionButton","propTypes","PropTypes","oneOf","string","shape","onClick","func"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AAIA;;AACA;;;;;;AAEA,MAAMA,cAAc,GAAGC,GAAG,IAAI;AAC5B,QAAMC,cAAc,yBACfD,GADe;AAElBE,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,MADN;AAEJC,MAAAA,IAAI,EAAE;AAFF,KAFY;AAMlBA,IAAAA,IAAI,EAAE;AANY,IAApB;;AASA,sBACE;AAAK,IAAA,SAAS,EAAEC,eAAMC;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAED,eAAME;AAAtB,kBACE,6BAAC,mBAAD,eAAgBN,cAAhB;AAAgC,IAAA,SAAS,EAAEI,eAAMG;AAAjD,KADF,CADF,eAIE;AAAK,IAAA,SAAS,EAAEH,eAAMI;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEJ,eAAMK;AAAtB,KAAoCV,GAAG,CAACW,OAAxC,CADF,CAJF,CADF;AAUD,CApBD;;AAsBA,MAAMC,qBAAqB,GAAGC,KAAK,IAAI;AACrC,QAAM;AAACC,IAAAA,WAAD;AAAcC,IAAAA,WAAd;AAA2BX,IAAAA,IAA3B;AAAiCJ,IAAAA,GAAjC;AAAsCgB,IAAAA;AAAtC,MAA8CH,KAApD;;AAEA,QAAMI,uBAAuB,yBACxBD,IADwB;AAE3BZ,IAAAA,IAAI,EAAE;AAFqB,IAA7B;;AAKA,QAAMc,GAAG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AAAK,IAAA,SAAS,EAAEb,eAAM+B;AAAtB,kBACE,6BAAC,mBAAD,eAAgBnB,uBAAhB;AAAyC,IAAA,SAAS,EAAEZ,eAAMgC;AAA1D,KADF,CAFF,CAnBF,CADF,CADF;AA8BD,CA9CD;;AAgDAzB,qBAAqB,CAAC0B,SAAtB,2CAAkC;AAChClC,EAAAA,IAAI,EAAEmC,mBAAUC,KAAV,CAAgB,CAAC,OAAD,EAAU,OAAV,CAAhB,CAD0B;AAEhCzB,EAAAA,WAAW,EAAEwB,mBAAUE,MAFS;AAGhC3B,EAAAA,WAAW,EAAEyB,mBAAUG,KAAV,CAAgB;AAC3BV,IAAAA,KAAK,EAAEO,mBAAUE,MADU;AAE3BR,IAAAA,OAAO,EAAEM,mBAAUE;AAFQ,GAAhB,CAHmB;AAOhCzB,EAAAA,IAAI,EAAEuB,mBAAUG,KAAV,CAAgB;AACpBV,IAAAA,KAAK,EAAEO,mBAAUE,MADG;AAEpBE,IAAAA,OAAO,EAAEJ,mBAAUK;AAFC,GAAhB,CAP0B;AAWhC5C,EAAAA,GAAG,EAAEuC,mBAAUG,KAAV,CAAgB;AACnBV,IAAAA,KAAK,EAAEO,mBAAUE,MADE;AAEnBE,IAAAA,OAAO,EAAEJ,mBAAUK;AAFA,GAAhB;AAX2B,CAAlC;eAiBehC,qB","sourcesContent":["import React from 'react';\nimport classnames from 'classnames';\nimport PropTypes from 'prop-types';\nimport {\n NovaCompositionCoorpacademyCheck as RightIcon,\n NovaSolidStatusClose as WrongIcon\n} from '@coorpacademy/nova-icons';\nimport ButtonLink from '../../atom/button-link';\nimport style from './style.css';\n\nconst buildKlfButton = klf => {\n const klfButtonProps = {\n ...klf,\n icon: {\n position: 'left',\n type: 'key'\n },\n type: 'primary'\n };\n\n return (\n <div className={style.klfContainer}>\n <div className={style.klfButtonContainer}>\n <ButtonLink {...klfButtonProps} className={style.klfButton} />\n </div>\n <div className={style.toolTip}>\n <div className={style.tooltipText}>{klf.tooltip}</div>\n </div>\n </div>\n );\n};\n\nconst ReviewCorrectionPopin = props => {\n const {information, resultLabel, type, klf, next} = props;\n\n const nextQuestionButtonProps = {\n ...next,\n type: 'primary'\n };\n\n const cta = type === 'wrong' ? buildKlfButton(klf) : null;\n\n const ICONS = {\n right: RightIcon,\n wrong: WrongIcon\n };\n const Icon = ICONS[type];\n\n return (\n <div className={style.wrapper}>\n <div className={classnames(style.popin, type === 'right' ? style.right : style.wrong)}>\n <div className={style.correctionSection}>\n <div className={style.iconCircle}>\n <Icon className={type === 'right' ? style.iconRight : style.iconWrong} />\n </div>\n <div className={style.resultLabel} aria-label=\"result\">\n <span aria-label={resultLabel}>{resultLabel}</span>\n </div>\n </div>\n <div className={style.feedbackSection}>\n <div className={style.information} aria-label=\"answer-information\">\n <span className={style.label} aria-label={information.label}>\n {information.label}\n </span>\n <span className={style.message} aria-label={information.message}>\n {information.message}\n </span>\n </div>\n </div>\n <div className={type === 'right' ? style.actions : style.actionsWrong}>\n {cta}\n <div className={style.nextQuestionContainer}>\n <ButtonLink {...nextQuestionButtonProps} className={style.nextQuestionButton} />\n </div>\n </div>\n </div>\n </div>\n );\n};\n\nReviewCorrectionPopin.propTypes = {\n type: PropTypes.oneOf(['right', 'wrong']),\n resultLabel: PropTypes.string,\n information: PropTypes.shape({\n label: PropTypes.string,\n message: PropTypes.string\n }),\n next: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n klf: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default ReviewCorrectionPopin;\n"],"file":"index.js"}