@coorpacademy/components 10.13.1 → 10.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link/test/fixtures.js +31 -0
- package/es/atom/button-link/test/fixtures.js.map +1 -0
- package/es/atom/button-link-icon-only/test/fixtures.js +21 -0
- package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -0
- package/es/atom/button-menu/test/fixtures.js +15 -0
- package/es/atom/button-menu/test/fixtures.js.map +1 -0
- package/es/atom/card-image-preview/test/fixtures.js +15 -0
- package/es/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
- package/es/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/es/atom/chips/test/fixtures.js +17 -0
- package/es/atom/chips/test/fixtures.js.map +1 -0
- package/es/atom/content-badge/test/fixtures.js +29 -0
- package/es/atom/content-badge/test/fixtures.js.map +1 -0
- package/es/atom/empty-search-result/test/fixtures.js +13 -0
- package/es/atom/empty-search-result/test/fixtures.js.map +1 -0
- package/es/atom/input-checkbox/test/fixtures.js +2 -0
- package/es/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/es/atom/input-search/test/fixtures.js +19 -0
- package/es/atom/input-search/test/fixtures.js.map +1 -0
- package/es/atom/input-switch/test/fixtures.js +10 -0
- package/es/atom/input-switch/test/fixtures.js.map +1 -1
- package/es/atom/input-text/test/fixtures.js +2 -0
- package/es/atom/input-text/test/fixtures.js.map +1 -1
- package/es/atom/input-text-with-title/index.js +37 -0
- package/es/atom/input-text-with-title/index.js.map +1 -0
- package/es/atom/input-text-with-title/style.css +28 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js +12 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js +14 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures.js +15 -0
- package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/es/atom/input-textarea/test/fixtures.js +4 -0
- package/es/atom/input-textarea/test/fixtures.js.map +1 -1
- package/es/atom/loader/test/fixtures.js +2 -0
- package/es/atom/loader/test/fixtures.js.map +1 -1
- package/es/atom/select/index.js +4 -1
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/test/fixtures.js +4 -0
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/atom/tag/test/fixtures.js +21 -0
- package/es/atom/tag/test/fixtures.js.map +1 -0
- package/es/atom/title/test/fixtures.js +6 -2
- package/es/atom/title/test/fixtures.js.map +1 -1
- package/es/atom/wizard-steps/test/fixtures.js +17 -0
- package/es/atom/wizard-steps/test/fixtures.js.map +1 -0
- package/es/molecule/banner/test/fixtures.js +23 -0
- package/es/molecule/banner/test/fixtures.js.map +1 -0
- package/es/molecule/brand-form-group/test/fixtures.js +2 -0
- package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
- package/es/molecule/bullet-point-menu-button/test/fixtures.js +15 -0
- package/es/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/es/molecule/card/test/fixtures.js +6 -0
- package/es/molecule/card/test/fixtures.js.map +1 -1
- package/es/molecule/cm-popin/test/fixtures.js +17 -0
- package/es/molecule/cm-popin/test/fixtures.js.map +1 -0
- package/es/molecule/coorp-manager-roles/test/fixtures.js +13 -0
- package/es/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
- package/es/molecule/course-section/test/fixtures.js +15 -0
- package/es/molecule/course-section/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/index.js +16 -3
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +4 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +11 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +17 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js +13 -0
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/es/molecule/draggable/test/fixtures.js +13 -0
- package/es/molecule/draggable/test/fixtures.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures.js +15 -0
- package/es/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/es/molecule/popin/test/fixtures.js +21 -0
- package/es/molecule/popin/test/fixtures.js.map +1 -0
- package/es/molecule/questions/free-text/test/fixtures.js +4 -2
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/es/molecule/quick-access-card/test/fixtures.js +21 -0
- package/es/molecule/quick-access-card/test/fixtures.js.map +1 -0
- package/es/molecule/quick-access-cards-group/test/fixtures.js +21 -0
- package/es/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
- package/es/molecule/review-correction-popin/test/fixtures.js +15 -0
- package/es/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/es/molecule/select-multiple/test/fixtures.js +8 -0
- package/es/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/es/molecule/vertical-tabs/test/fixtures.js +17 -0
- package/es/molecule/vertical-tabs/test/fixtures.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures.js +23 -0
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js +4 -0
- package/es/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/es/organism/brand-analytics/test/fixtures.js +23 -0
- package/es/organism/brand-analytics/test/fixtures.js.map +1 -0
- package/es/organism/brand-dashboard/test/fixtures.js +2 -10
- package/es/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures.js +2 -0
- package/es/organism/brand-form/test/fixtures.js.map +1 -1
- package/es/organism/content-translation/test/fixtures.js +15 -0
- package/es/organism/content-translation/test/fixtures.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +23 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -0
- package/es/organism/list-item/test/fixtures.js +19 -0
- package/es/organism/list-item/test/fixtures.js.map +1 -0
- package/es/organism/list-items/test/fixtures.js +17 -0
- package/es/organism/list-items/test/fixtures.js.map +1 -0
- package/es/organism/playlist-translation/test/fixtures.js +15 -0
- package/es/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures.js +21 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +23 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/es/template/app-player/popin-end/test/fixtures.js +2 -0
- package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +24 -2
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/atom/button-link/test/fixtures.js +49 -0
- package/lib/atom/button-link/test/fixtures.js.map +1 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js +34 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -0
- package/lib/atom/button-menu/test/fixtures.js +25 -0
- package/lib/atom/button-menu/test/fixtures.js.map +1 -0
- package/lib/atom/card-image-preview/test/fixtures.js +25 -0
- package/lib/atom/card-image-preview/test/fixtures.js.map +1 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js +25 -0
- package/lib/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/chips/test/fixtures.js +28 -0
- package/lib/atom/chips/test/fixtures.js.map +1 -0
- package/lib/atom/content-badge/test/fixtures.js +46 -0
- package/lib/atom/content-badge/test/fixtures.js.map +1 -0
- package/lib/atom/empty-search-result/test/fixtures.js +22 -0
- package/lib/atom/empty-search-result/test/fixtures.js.map +1 -0
- package/lib/atom/input-checkbox/test/fixtures.js +3 -0
- package/lib/atom/input-checkbox/test/fixtures.js.map +1 -1
- package/lib/atom/input-search/test/fixtures.js +31 -0
- package/lib/atom/input-search/test/fixtures.js.map +1 -0
- package/lib/atom/input-switch/test/fixtures.js +15 -0
- package/lib/atom/input-switch/test/fixtures.js.map +1 -1
- package/lib/atom/input-text/test/fixtures.js +3 -0
- package/lib/atom/input-text/test/fixtures.js.map +1 -1
- package/lib/atom/input-text-with-title/index.js +48 -0
- package/lib/atom/input-text-with-title/index.js.map +1 -0
- package/lib/atom/input-text-with-title/style.css +28 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js +21 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js +23 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
- package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/input-textarea/test/fixtures.js +6 -0
- package/lib/atom/input-textarea/test/fixtures.js.map +1 -1
- package/lib/atom/loader/test/fixtures.js +3 -0
- package/lib/atom/loader/test/fixtures.js.map +1 -1
- package/lib/atom/select/index.js +4 -1
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/test/fixtures.js +6 -0
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/atom/tag/test/fixtures.js +34 -0
- package/lib/atom/tag/test/fixtures.js.map +1 -0
- package/lib/atom/title/test/fixtures.js +8 -2
- package/lib/atom/title/test/fixtures.js.map +1 -1
- package/lib/atom/wizard-steps/test/fixtures.js +28 -0
- package/lib/atom/wizard-steps/test/fixtures.js.map +1 -0
- package/lib/molecule/banner/test/fixtures.js +37 -0
- package/lib/molecule/banner/test/fixtures.js.map +1 -0
- package/lib/molecule/brand-form-group/test/fixtures.js +3 -0
- package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
- package/lib/molecule/bullet-point-menu-button/test/fixtures.js +25 -0
- package/lib/molecule/bullet-point-menu-button/test/fixtures.js.map +1 -0
- package/lib/molecule/card/test/fixtures.js +9 -0
- package/lib/molecule/card/test/fixtures.js.map +1 -1
- package/lib/molecule/cm-popin/test/fixtures.js +28 -0
- package/lib/molecule/cm-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/coorp-manager-roles/test/fixtures.js +22 -0
- package/lib/molecule/coorp-manager-roles/test/fixtures.js.map +1 -0
- package/lib/molecule/course-section/test/fixtures.js +25 -0
- package/lib/molecule/course-section/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/index.js +17 -3
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +4 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +21 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +28 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +22 -0
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable/test/fixtures.js +22 -0
- package/lib/molecule/draggable/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures.js +25 -0
- package/lib/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/lib/molecule/popin/test/fixtures.js +34 -0
- package/lib/molecule/popin/test/fixtures.js.map +1 -0
- package/lib/molecule/questions/free-text/test/fixtures.js +5 -2
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/lib/molecule/quick-access-card/test/fixtures.js +34 -0
- package/lib/molecule/quick-access-card/test/fixtures.js.map +1 -0
- package/lib/molecule/quick-access-cards-group/test/fixtures.js +34 -0
- package/lib/molecule/quick-access-cards-group/test/fixtures.js.map +1 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js +25 -0
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/select-multiple/test/fixtures.js +12 -0
- package/lib/molecule/select-multiple/test/fixtures.js.map +1 -1
- package/lib/molecule/vertical-tabs/test/fixtures.js +28 -0
- package/lib/molecule/vertical-tabs/test/fixtures.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures.js +37 -0
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js +6 -0
- package/lib/organism/accordion/coorp-manager/part/test/fixtures.js.map +1 -1
- package/lib/organism/brand-analytics/test/fixtures.js +37 -0
- package/lib/organism/brand-analytics/test/fixtures.js.map +1 -0
- package/lib/organism/brand-dashboard/test/fixtures.js +2 -14
- package/lib/organism/brand-dashboard/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures.js +3 -0
- package/lib/organism/brand-form/test/fixtures.js.map +1 -1
- package/lib/organism/content-translation/test/fixtures.js +25 -0
- package/lib/organism/content-translation/test/fixtures.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +37 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -0
- package/lib/organism/list-item/test/fixtures.js +31 -0
- package/lib/organism/list-item/test/fixtures.js.map +1 -0
- package/lib/organism/list-items/test/fixtures.js +28 -0
- package/lib/organism/list-items/test/fixtures.js.map +1 -0
- package/lib/organism/playlist-translation/test/fixtures.js +25 -0
- package/lib/organism/playlist-translation/test/fixtures.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js +34 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +2 -2
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +37 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -0
- package/lib/template/app-player/popin-end/test/fixtures.js +3 -0
- package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +35 -2
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/package.json +2 -2
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomLoader","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,UAAP,MAAuB,IAAvB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/loader/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomLoader","fixtureCoorpmanager","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,UAAP,MAAuB,IAAvB;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAL,IAAI,CAAC,iDAAD,EAAoDM,CAAC,IAAI;AAC3DA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,UAAU,CAACK,SAAZ,EAAuB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC5CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2CAA0CF,GAAI,mEAAvE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,UAAhF,EAA4FC,mBAA5F,CAAJ;AACAJ,IAAI,CAAC,kDAAD,EAAqDE,oBAArD,EAA2EC,UAA3E,EAAuFE,cAAvF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomLoader from '..';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\n\ntest('Atom › AtomLoader > should have valid propTypes', t => {\n t.pass();\n forEach(AtomLoader.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomLoader.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomLoader › Coorpmanager › should be rendered', renderComponentMacro, AtomLoader, fixtureCoorpmanager);\ntest('Atom › AtomLoader › Default › should be rendered', renderComponentMacro, AtomLoader, fixtureDefault);\n"],"file":"fixtures.js"}
|
package/es/atom/select/index.js
CHANGED
|
@@ -99,7 +99,10 @@ const Select = (props, context) => {
|
|
|
99
99
|
className: style.selectWrapper
|
|
100
100
|
}, titleView, /*#__PURE__*/React.createElement("span", {
|
|
101
101
|
"data-name": "select-span",
|
|
102
|
-
className: classnames(style.selectSpan, includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? style.noLabelCommon : null, borderClassName, isLongLabel ? style.longLabel : null)
|
|
102
|
+
className: classnames(style.selectSpan, includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template']) ? style.noLabelCommon : null, borderClassName, isLongLabel ? style.longLabel : null),
|
|
103
|
+
style: _extends({}, shouldUseSkinFontColor && {
|
|
104
|
+
color
|
|
105
|
+
})
|
|
103
106
|
}, selectedLabel), arrowView, /*#__PURE__*/React.createElement("select", {
|
|
104
107
|
"data-name": "native-select",
|
|
105
108
|
className: style.selectBox,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/select/index.js"],"names":["React","useMemo","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","Provider","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","context","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBb,EAAAA,MAAM,EAAEY,KAAK,CAACZ,MADG;AAEjBc,EAAAA,OAAO,EAA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S,CAACiF,IALH;AAMjBhD,EAAAA,QAAQ,EAAEjC,SAAS,CAACiF,IANH;AAOjB7C,EAAAA,WAAW,EAAEpC,SAAS,CAAC6E,MAPN;AAQjB1C,EAAAA,QAAQ,EAAEnC,SAAS,CAACiF,IARH;AASjBjD,EAAAA,QAAQ,EAAEhC,SAAS,CAACqF,IATH;AAUjBhD,EAAAA,KAAK,EAAErC,SAAS,CAACsF,KAAV,CAAgB/E,IAAI,CAACQ,UAAD,CAApB,CAVU;AAWjBc,EAAAA,OAAO,EAAE7B,SAAS,CAACuF,OAAV,CAAkBvF,SAAS,CAACwF,KAAV,CAAgBZ,qBAAhB,CAAlB,CAXQ;AAYjBtC,EAAAA,QAAQ,EAAEtC,SAAS,CAACiF,IAZH;AAajB1C,EAAAA,KAAK,EAAEvC,SAAS,CAACiF;AAbA,CAAnB;AAgBA,eAAexD,MAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, context) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle\n } = props;\n\n const {skin} = context;\n\n const title = useMemo(() => (propTitle ? `${propTitle}${required ? '*' : ''}` : null), [\n propTitle,\n required\n ]);\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n />\n ) : null;\n const behaviourClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool\n};\n\nexport default Select;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/select/index.js"],"names":["React","useMemo","PropTypes","classnames","filter","find","get","getOr","includes","keys","map","size","NovaCompositionNavigationArrowDown","ArrowDown","Provider","getClassState","style","themeStyle","invalid","header","mooc","question","sort","thematiques","player","template","coorpmanager","Select","props","context","name","options","className","borderClassName","onChange","multiple","disabled","required","description","theme","modified","error","title","propTitle","skin","optionList","option","index","value","selectOption","titleView","selected","selectedLabel","isSelectedInValidOption","validOption","handleChange","e","target","selectedOptions","black","color","shouldUseSkinFontColor","arrowColor","undefined","arrowView","selectedArrow","arrow","behaviourClassName","default","composedClassName","unselected","labelSize","isLongLabel","selectWrapper","selectSpan","noLabelCommon","longLabel","selectBox","SelectOptionPropTypes","string","isRequired","oneOfType","number","bool","contextTypes","childContextTypes","propTypes","func","oneOf","arrayOf","shape"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,OAAf,QAA6B,OAA7B;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,OAAOC,MAAP,MAAmB,kBAAnB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,QAAP,MAAqB,oBAArB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,IAAP,MAAiB,gBAAjB;AACA,SAAQC,kCAAkC,IAAIC,SAA9C,QAA8D,0BAA9D;AACA,OAAOC,QAAP,MAAqB,aAArB;AACA,OAAOC,aAAP,MAA0B,4BAA1B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,UAAU,GAAG;AACjBb,EAAAA,MAAM,EAAEY,KAAK,CAACZ,MADG;AAEjBc,EAAAA,OAAO,EAAEF,KAAK,CAACE,OAFE;AAGjBC,EAAAA,MAAM,EAAEH,KAAK,CAACG,MAHG;AAIjBC,EAAAA,IAAI,EAAEJ,KAAK,CAACI,IAJK;AAKjBC,EAAAA,QAAQ,EAAEL,KAAK,CAACK,QALC;AAMjBC,EAAAA,IAAI,EAAEN,KAAK,CAACM,IANK;AAOjBC,EAAAA,WAAW,EAAEP,KAAK,CAACO,WAPF;AAQjBC,EAAAA,MAAM,EAAER,KAAK,CAACQ,MARG;AASjBC,EAAAA,QAAQ,EAAET,KAAK,CAACS,QATC;AAUjBC,EAAAA,YAAY,EAAE;AAVG,CAAnB;;AAaA,MAAMC,MAAM,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAo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AS,CAACwF,KAAV,CAAgBZ,qBAAhB,CAAlB,CAXQ;AAYjBtC,EAAAA,QAAQ,EAAEtC,SAAS,CAACiF,IAZH;AAajB1C,EAAAA,KAAK,EAAEvC,SAAS,CAACiF;AAbA,CAAnB;AAgBA,eAAexD,MAAf","sourcesContent":["import React, {useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport filter from 'lodash/fp/filter';\nimport find from 'lodash/fp/find';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport includes from 'lodash/fp/includes';\nimport keys from 'lodash/fp/keys';\nimport map from 'lodash/fp/map';\nimport size from 'lodash/fp/size';\nimport {NovaCompositionNavigationArrowDown as ArrowDown} from '@coorpacademy/nova-icons';\nimport Provider from '../provider';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst themeStyle = {\n filter: style.filter,\n invalid: style.invalid,\n header: style.header,\n mooc: style.mooc,\n question: style.question,\n sort: style.sort,\n thematiques: style.thematiques,\n player: style.player,\n template: style.template,\n coorpmanager: null\n};\n\nconst Select = (props, context) => {\n const {\n name,\n options = [],\n className,\n borderClassName,\n onChange,\n multiple = false,\n disabled,\n required,\n description,\n theme,\n modified = false,\n error = false,\n title: propTitle\n } = props;\n\n const {skin} = context;\n\n const title = useMemo(() => (propTitle ? `${propTitle}${required ? '*' : ''}` : null), [\n propTitle,\n required\n ]);\n\n const optionList =\n options &&\n options.map((option, index) => {\n return (\n <option key={index} value={option.value} className={style.selectOption}>\n {option.name}\n </option>\n );\n });\n\n const titleView = title ? <span className={style.title}>{title} </span> : null;\n\n const selected = useMemo(\n () =>\n multiple\n ? map(get('value'), filter({selected: true}, options))\n : get('value', find({selected: true}, options)),\n [multiple, options]\n );\n const selectedLabel = useMemo(\n () =>\n multiple\n ? map(get('name'), filter({selected: true}, options))\n : get('name', find({selected: true}, options)),\n [multiple, options]\n );\n\n const isSelectedInValidOption = useMemo(\n () =>\n theme === 'player' &&\n getOr(false, 'name', find({validOption: false, selected: true}, options)),\n [options, theme]\n );\n\n const handleChange = useMemo(\n () =>\n multiple\n ? e => {\n onChange(map(get('value'), e.target.selectedOptions));\n }\n : e => {\n onChange(e.target.value);\n },\n [onChange, multiple]\n );\n\n const black = useMemo(() => getOr('#14171A', 'common.black', skin), [skin]);\n const color = useMemo(() => getOr('#00B0FF', 'common.primary', skin), [skin]);\n const shouldUseSkinFontColor = useMemo(\n () =>\n !isSelectedInValidOption && selected && includes(theme, ['question', 'template', 'player']),\n [isSelectedInValidOption, selected, theme]\n );\n const arrowColor = selected ? color : undefined;\n\n const arrowView = !multiple ? (\n <ArrowDown\n color={includes(theme, ['question', 'template', 'player']) ? arrowColor : black}\n className={shouldUseSkinFontColor ? style.selectedArrow : style.arrow}\n />\n ) : null;\n const behaviourClassName = useMemo(\n () => getClassState(style.default, style.modified, style.error, modified, error),\n [error, modified]\n );\n const composedClassName = useMemo(\n () =>\n classnames(\n theme && theme !== 'coorpmanager' ? themeStyle[theme] : behaviourClassName,\n selected ? style.selected : style.unselected,\n className\n ),\n [behaviourClassName, className, selected, theme]\n );\n\n const labelSize = useMemo(() => size(selectedLabel), [selectedLabel]);\n\n const isLongLabel = useMemo(() => labelSize >= 65, [labelSize]);\n\n return (\n <div\n className={classnames(\n composedClassName,\n theme === 'coorpmanager' ? style.coorpmanager : null\n )}\n >\n <label\n data-name=\"select-wrapper\"\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n className={style.selectWrapper}\n >\n {titleView}\n <span\n data-name=\"select-span\"\n className={classnames(\n style.selectSpan,\n includes(theme, ['player', 'invalid', 'question', 'thematiques', 'template'])\n ? style.noLabelCommon\n : null,\n borderClassName,\n isLongLabel ? style.longLabel : null\n )}\n style={{\n ...(shouldUseSkinFontColor && {\n color\n })\n }}\n >\n {selectedLabel}\n </span>\n {arrowView}\n <select\n data-name=\"native-select\"\n className={style.selectBox}\n title={selectedLabel}\n name={name}\n onChange={handleChange}\n value={selected}\n multiple={multiple}\n disabled={disabled}\n >\n {optionList}\n </select>\n </label>\n <div className={style.description}>{description}</div>\n </div>\n );\n};\n\nexport const SelectOptionPropTypes = {\n name: PropTypes.string.isRequired,\n value: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n selected: PropTypes.bool,\n validOption: PropTypes.bool\n};\n\nSelect.contextTypes = {\n skin: Provider.childContextTypes.skin\n};\n\nSelect.propTypes = {\n title: PropTypes.string,\n name: PropTypes.string,\n className: PropTypes.string,\n borderClassName: PropTypes.string,\n disabled: PropTypes.bool,\n multiple: PropTypes.bool,\n description: PropTypes.string,\n required: PropTypes.bool,\n onChange: PropTypes.func,\n theme: PropTypes.oneOf(keys(themeStyle)),\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes)),\n modified: PropTypes.bool,\n error: PropTypes.bool\n};\n\nexport default Select;\n"],"file":"index.js"}
|
|
@@ -2,6 +2,7 @@ import test from 'ava';
|
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import AtomSelect from '..';
|
|
5
|
+
import fixtureCoorpmanager from './fixtures/coorpmanager';
|
|
5
6
|
import fixtureDefault from './fixtures/default';
|
|
6
7
|
import fixtureDisabled from './fixtures/disabled';
|
|
7
8
|
import fixtureError from './fixtures/error';
|
|
@@ -11,6 +12,7 @@ import fixtureModified from './fixtures/modified';
|
|
|
11
12
|
import fixtureMooc from './fixtures/mooc';
|
|
12
13
|
import fixtureMultipleSelected from './fixtures/multiple-selected';
|
|
13
14
|
import fixtureMultiple from './fixtures/multiple';
|
|
15
|
+
import fixturePlayer from './fixtures/player';
|
|
14
16
|
import fixtureQuestion from './fixtures/question';
|
|
15
17
|
import fixtureRequiredWithTitle from './fixtures/required-with-title';
|
|
16
18
|
import fixtureRequired from './fixtures/required';
|
|
@@ -24,6 +26,7 @@ test('Atom › AtomSelect > should have valid propTypes', t => {
|
|
|
24
26
|
t.not(value, undefined, `PropType for "Atom.AtomSelect.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
25
27
|
});
|
|
26
28
|
});
|
|
29
|
+
test('Atom › AtomSelect › Coorpmanager › should be rendered', renderComponentMacro, AtomSelect, fixtureCoorpmanager);
|
|
27
30
|
test('Atom › AtomSelect › Default › should be rendered', renderComponentMacro, AtomSelect, fixtureDefault);
|
|
28
31
|
test('Atom › AtomSelect › Disabled › should be rendered', renderComponentMacro, AtomSelect, fixtureDisabled);
|
|
29
32
|
test('Atom › AtomSelect › Error › should be rendered', renderComponentMacro, AtomSelect, fixtureError);
|
|
@@ -33,6 +36,7 @@ test('Atom › AtomSelect › Modified › should be rendered', renderComponentM
|
|
|
33
36
|
test('Atom › AtomSelect › Mooc › should be rendered', renderComponentMacro, AtomSelect, fixtureMooc);
|
|
34
37
|
test('Atom › AtomSelect › MultipleSelected › should be rendered', renderComponentMacro, AtomSelect, fixtureMultipleSelected);
|
|
35
38
|
test('Atom › AtomSelect › Multiple › should be rendered', renderComponentMacro, AtomSelect, fixtureMultiple);
|
|
39
|
+
test('Atom › AtomSelect › Player › should be rendered', renderComponentMacro, AtomSelect, fixturePlayer);
|
|
36
40
|
test('Atom › AtomSelect › Question › should be rendered', renderComponentMacro, AtomSelect, fixtureQuestion);
|
|
37
41
|
test('Atom › AtomSelect › RequiredWithTitle › should be rendered', renderComponentMacro, AtomSelect, fixtureRequiredWithTitle);
|
|
38
42
|
test('Atom › AtomSelect › Required › should be rendered', renderComponentMacro, AtomSelect, fixtureRequired);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomSelect","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques","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,UAAP,MAAuB,IAAvB;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,kBAAP,MAA+B,wBAA/B;
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/select/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomSelect","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureError","fixtureFilter","fixtureInvalid","fixtureModified","fixtureMooc","fixtureMultipleSelected","fixtureMultiple","fixturePlayer","fixtureQuestion","fixtureRequiredWithTitle","fixtureRequired","fixtureSort","fixtureTemplate","fixtureThematiquesLong","fixtureThematiques","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,UAAP,MAAuB,IAAvB;AACA,OAAOC,mBAAP,MAAgC,yBAAhC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,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C,kDAAD,EAAqDE,oBAArD,EAA2EC,UAA3E,EAAuFM,cAAvF,CAAJ;AACAT,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,UAA5E,EAAwFO,eAAxF,CAAJ;AACAV,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,UAAxE,EAAoFQ,WAApF,CAAJ;AACAX,IAAI,CAAC,2DAAD,EAA8DE,oBAA9D,EAAoFC,UAApF,EAAgGS,uBAAhG,CAAJ;AACAZ,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,UAA5E,EAAwFU,eAAxF,CAAJ;AACAb,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,UAA1E,EAAsFW,aAAtF,CAAJ;AACAd,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,UAA5E,EAAwFY,eAAxF,CAAJ;AACAf,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,UAArF,EAAiGa,wBAAjG,CAAJ;AACAhB,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,UAA5E,EAAwFc,eAAxF,CAAJ;AACAjB,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,UAAxE,EAAoFe,WAApF,CAAJ;AACAlB,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,UAA5E,EAAwFgB,eAAxF,CAAJ;AACAnB,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,UAAnF,EAA+FiB,sBAA/F,CAAJ;AACApB,IAAI,CAAC,sDAAD,EAAyDE,oBAAzD,EAA+EC,UAA/E,EAA2FkB,kBAA3F,CAAJ","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,21 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import AtomTag from '..';
|
|
5
|
+
import fixtureArchived from './fixtures/archived';
|
|
6
|
+
import fixtureDefault from './fixtures/default';
|
|
7
|
+
import fixtureDraft from './fixtures/draft';
|
|
8
|
+
import fixturePublished from './fixtures/published';
|
|
9
|
+
import fixtureRevised from './fixtures/revised';
|
|
10
|
+
test('Atom › AtomTag > should have valid propTypes', t => {
|
|
11
|
+
t.pass();
|
|
12
|
+
forEach(AtomTag.propTypes, (value, key) => {
|
|
13
|
+
t.not(value, undefined, `PropType for "Atom.AtomTag.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
14
|
+
});
|
|
15
|
+
});
|
|
16
|
+
test('Atom › AtomTag › Archived › should be rendered', renderComponentMacro, AtomTag, fixtureArchived);
|
|
17
|
+
test('Atom › AtomTag › Default › should be rendered', renderComponentMacro, AtomTag, fixtureDefault);
|
|
18
|
+
test('Atom › AtomTag › Draft › should be rendered', renderComponentMacro, AtomTag, fixtureDraft);
|
|
19
|
+
test('Atom › AtomTag › Published › should be rendered', renderComponentMacro, AtomTag, fixturePublished);
|
|
20
|
+
test('Atom › AtomTag › Revised › should be rendered', renderComponentMacro, AtomTag, fixtureRevised);
|
|
21
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/tag/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTag","fixtureArchived","fixtureDefault","fixtureDraft","fixturePublished","fixtureRevised","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,OAAP,MAAoB,IAApB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAR,IAAI,CAAC,8CAAD,EAAiDS,CAAC,IAAI;AACxDA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,OAAO,CAACQ,SAAT,EAAoB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzCJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,wCAAuCF,GAAI,mEAApE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,gDAAD,EAAmDE,oBAAnD,EAAyEC,OAAzE,EAAkFC,eAAlF,CAAJ;AACAJ,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,OAAxE,EAAiFE,cAAjF,CAAJ;AACAL,IAAI,CAAC,6CAAD,EAAgDE,oBAAhD,EAAsEC,OAAtE,EAA+EG,YAA/E,CAAJ;AACAN,IAAI,CAAC,iDAAD,EAAoDE,oBAApD,EAA0EC,OAA1E,EAAmFI,gBAAnF,CAAJ;AACAP,IAAI,CAAC,+CAAD,EAAkDE,oBAAlD,EAAwEC,OAAxE,EAAiFK,cAAjF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomTag from '..';\nimport fixtureArchived from './fixtures/archived';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDraft from './fixtures/draft';\nimport fixturePublished from './fixtures/published';\nimport fixtureRevised from './fixtures/revised';\n\ntest('Atom › AtomTag > should have valid propTypes', t => {\n t.pass();\n forEach(AtomTag.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomTag.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomTag › Archived › should be rendered', renderComponentMacro, AtomTag, fixtureArchived);\ntest('Atom › AtomTag › Default › should be rendered', renderComponentMacro, AtomTag, fixtureDefault);\ntest('Atom › AtomTag › Draft › should be rendered', renderComponentMacro, AtomTag, fixtureDraft);\ntest('Atom › AtomTag › Published › should be rendered', renderComponentMacro, AtomTag, fixturePublished);\ntest('Atom › AtomTag › Revised › should be rendered', renderComponentMacro, AtomTag, fixtureRevised);\n"],"file":"fixtures.js"}
|
|
@@ -2,12 +2,16 @@ import test from 'ava';
|
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import AtomTitle from '..';
|
|
5
|
-
import
|
|
5
|
+
import fixtureFormGroupTitleWithoutSubtitle from './fixtures/form-group-title-without-subtitle';
|
|
6
|
+
import fixtureFormGroupTitle from './fixtures/form-group-title';
|
|
7
|
+
import fixturePageTitle from './fixtures/page-title';
|
|
6
8
|
test('Atom › AtomTitle > should have valid propTypes', t => {
|
|
7
9
|
t.pass();
|
|
8
10
|
forEach(AtomTitle.propTypes, (value, key) => {
|
|
9
11
|
t.not(value, undefined, `PropType for "Atom.AtomTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
12
|
});
|
|
11
13
|
});
|
|
12
|
-
test('Atom › AtomTitle ›
|
|
14
|
+
test('Atom › AtomTitle › FormGroupTitleWithoutSubtitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitleWithoutSubtitle);
|
|
15
|
+
test('Atom › AtomTitle › FormGroupTitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitle);
|
|
16
|
+
test('Atom › AtomTitle › PageTitle › should be rendered', renderComponentMacro, AtomTitle, fixturePageTitle);
|
|
13
17
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTitle","
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/title/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomTitle","fixtureFormGroupTitleWithoutSubtitle","fixtureFormGroupTitle","fixturePageTitle","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,SAAP,MAAsB,IAAtB;AACA,OAAOC,oCAAP,MAAiD,8CAAjD;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AAEAN,IAAI,CAAC,gDAAD,EAAmDO,CAAC,IAAI;AAC1DA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,SAAS,CAACM,SAAX,EAAsB,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3CJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0CAAyCF,GAAI,mEAAtE;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,SAAhG,EAA2GC,oCAA3G,CAAJ;AACAJ,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,SAAjF,EAA4FE,qBAA5F,CAAJ;AACAL,IAAI,CAAC,mDAAD,EAAsDE,oBAAtD,EAA4EC,SAA5E,EAAuFG,gBAAvF,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomTitle from '..';\nimport fixtureFormGroupTitleWithoutSubtitle from './fixtures/form-group-title-without-subtitle';\nimport fixtureFormGroupTitle from './fixtures/form-group-title';\nimport fixturePageTitle from './fixtures/page-title';\n\ntest('Atom › AtomTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomTitle › FormGroupTitleWithoutSubtitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitleWithoutSubtitle);\ntest('Atom › AtomTitle › FormGroupTitle › should be rendered', renderComponentMacro, AtomTitle, fixtureFormGroupTitle);\ntest('Atom › AtomTitle › PageTitle › should be rendered', renderComponentMacro, AtomTitle, fixturePageTitle);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import AtomWizardSteps from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureFirstStep from './fixtures/first-step';
|
|
7
|
+
import fixtureLastStep from './fixtures/last-step';
|
|
8
|
+
test('Atom › AtomWizardSteps > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(AtomWizardSteps.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Atom.AtomWizardSteps.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Atom › AtomWizardSteps › Default › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureDefault);
|
|
15
|
+
test('Atom › AtomWizardSteps › FirstStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureFirstStep);
|
|
16
|
+
test('Atom › AtomWizardSteps › LastStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureLastStep);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/wizard-steps/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","AtomWizardSteps","fixtureDefault","fixtureFirstStep","fixtureLastStep","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,eAAP,MAA4B,IAA5B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,gBAAP,MAA6B,uBAA7B;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AAEAN,IAAI,CAAC,sDAAD,EAAyDO,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,eAAe,CAACM,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,uDAAD,EAA0DE,oBAA1D,EAAgFC,eAAhF,EAAiGC,cAAjG,CAAJ;AACAJ,IAAI,CAAC,yDAAD,EAA4DE,oBAA5D,EAAkFC,eAAlF,EAAmGE,gBAAnG,CAAJ;AACAL,IAAI,CAAC,wDAAD,EAA2DE,oBAA3D,EAAiFC,eAAjF,EAAkGG,eAAlG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomWizardSteps from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureFirstStep from './fixtures/first-step';\nimport fixtureLastStep from './fixtures/last-step';\n\ntest('Atom › AtomWizardSteps > should have valid propTypes', t => {\n t.pass();\n forEach(AtomWizardSteps.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomWizardSteps.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomWizardSteps › Default › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureDefault);\ntest('Atom › AtomWizardSteps › FirstStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureFirstStep);\ntest('Atom › AtomWizardSteps › LastStep › should be rendered', renderComponentMacro, AtomWizardSteps, fixtureLastStep);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeBanner from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureErrorBanner from './fixtures/error-banner';
|
|
7
|
+
import fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';
|
|
8
|
+
import fixtureSuccessBanner from './fixtures/success-banner';
|
|
9
|
+
import fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';
|
|
10
|
+
import fixtureWarningTemporaryBanner from './fixtures/warning-temporary-banner';
|
|
11
|
+
test('Molecule › MoleculeBanner > should have valid propTypes', t => {
|
|
12
|
+
t.pass();
|
|
13
|
+
forEach(MoleculeBanner.propTypes, (value, key) => {
|
|
14
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeBanner.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
test('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);
|
|
18
|
+
test('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);
|
|
19
|
+
test('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);
|
|
20
|
+
test('Molecule › MoleculeBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessBanner);
|
|
21
|
+
test('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);
|
|
22
|
+
test('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureWarningTemporaryBanner);
|
|
23
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/banner/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBanner","fixtureDefault","fixtureErrorBanner","fixtureErrorTemporaryBanner","fixtureSuccessBanner","fixtureSuccessTemporaryBanner","fixtureWarningTemporaryBanner","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,cAAP,MAA2B,IAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,2BAAP,MAAwC,mCAAxC;AACA,OAAOC,oBAAP,MAAiC,2BAAjC;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AAEAT,IAAI,CAAC,yDAAD,EAA4DU,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAV,EAAAA,OAAO,CAACE,cAAc,CAACS,SAAhB,EAA2B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAd,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,8DAAD,EAAiEE,oBAAjE,EAAuFC,cAAvF,EAAuGE,kBAAvG,CAAJ;AACAL,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,cAAhG,EAAgHG,2BAAhH,CAAJ;AACAN,IAAI,CAAC,gEAAD,EAAmEE,oBAAnE,EAAyFC,cAAzF,EAAyGI,oBAAzG,CAAJ;AACAP,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,cAAlG,EAAkHK,6BAAlH,CAAJ;AACAR,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,cAAlG,EAAkHM,6BAAlH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBanner from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureErrorBanner from './fixtures/error-banner';\nimport fixtureErrorTemporaryBanner from './fixtures/error-temporary-banner';\nimport fixtureSuccessBanner from './fixtures/success-banner';\nimport fixtureSuccessTemporaryBanner from './fixtures/success-temporary-banner';\nimport fixtureWarningTemporaryBanner from './fixtures/warning-temporary-banner';\n\ntest('Molecule › MoleculeBanner > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBanner.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBanner.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBanner › Default › should be rendered', renderComponentMacro, MoleculeBanner, fixtureDefault);\ntest('Molecule › MoleculeBanner › ErrorBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorBanner);\ntest('Molecule › MoleculeBanner › ErrorTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureErrorTemporaryBanner);\ntest('Molecule › MoleculeBanner › SuccessBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessBanner);\ntest('Molecule › MoleculeBanner › SuccessTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureSuccessTemporaryBanner);\ntest('Molecule › MoleculeBanner › WarningTemporaryBanner › should be rendered', renderComponentMacro, MoleculeBanner, fixtureWarningTemporaryBanner);\n"],"file":"fixtures.js"}
|
|
@@ -4,6 +4,7 @@ import renderComponentMacro from '../../../test/helpers/render-component';
|
|
|
4
4
|
import MoleculeBrandFormGroup from '..';
|
|
5
5
|
import fixtureAnalytics from './fixtures/analytics';
|
|
6
6
|
import fixtureAnimations from './fixtures/animations';
|
|
7
|
+
import fixtureCmDefault from './fixtures/cm-default';
|
|
7
8
|
import fixtureCohort from './fixtures/cohort';
|
|
8
9
|
import fixtureDashboard from './fixtures/dashboard';
|
|
9
10
|
import fixtureDefault from './fixtures/default';
|
|
@@ -21,6 +22,7 @@ test('Molecule › MoleculeBrandFormGroup > should have valid propTypes', t => {
|
|
|
21
22
|
});
|
|
22
23
|
test('Molecule › MoleculeBrandFormGroup › Analytics › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnalytics);
|
|
23
24
|
test('Molecule › MoleculeBrandFormGroup › Animations › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureAnimations);
|
|
25
|
+
test('Molecule › MoleculeBrandFormGroup › CmDefault › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCmDefault);
|
|
24
26
|
test('Molecule › MoleculeBrandFormGroup › Cohort › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureCohort);
|
|
25
27
|
test('Molecule › MoleculeBrandFormGroup › Dashboard › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDashboard);
|
|
26
28
|
test('Molecule › MoleculeBrandFormGroup › Default › should be rendered', renderComponentMacro, MoleculeBrandFormGroup, fixtureDefault);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/brand-form-group/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBrandFormGroup","fixtureAnalytics","fixtureAnimations","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,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;
|
|
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":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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"}
|
|
@@ -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 MoleculeBulletPointMenuButton from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
import fixtureMultipleButtons from './fixtures/multiple-buttons';
|
|
7
|
+
test('Molecule › MoleculeBulletPointMenuButton > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeBulletPointMenuButton.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeBulletPointMenuButton.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeBulletPointMenuButton › Default › should be rendered', renderComponentMacro, MoleculeBulletPointMenuButton, fixtureDefault);
|
|
14
|
+
test('Molecule › MoleculeBulletPointMenuButton › MultipleButtons › should be rendered', renderComponentMacro, MoleculeBulletPointMenuButton, fixtureMultipleButtons);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/bullet-point-menu-button/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeBulletPointMenuButton","fixtureDefault","fixtureMultipleButtons","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AAEAL,IAAI,CAAC,wEAAD,EAA2EM,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,6BAA6B,CAACK,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAV,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,6BAAlG,EAAiIC,cAAjI,CAAJ;AACAJ,IAAI,CAAC,iFAAD,EAAoFE,oBAApF,EAA0GC,6BAA1G,EAAyIE,sBAAzI,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeBulletPointMenuButton from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureMultipleButtons from './fixtures/multiple-buttons';\n\ntest('Molecule › MoleculeBulletPointMenuButton > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeBulletPointMenuButton.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeBulletPointMenuButton.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeBulletPointMenuButton › Default › should be rendered', renderComponentMacro, MoleculeBulletPointMenuButton, fixtureDefault);\ntest('Molecule › MoleculeBulletPointMenuButton › MultipleButtons › should be rendered', renderComponentMacro, MoleculeBulletPointMenuButton, fixtureMultipleButtons);\n"],"file":"fixtures.js"}
|
|
@@ -6,6 +6,7 @@ import fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';
|
|
|
6
6
|
import fixtureAdaptiv from './fixtures/adaptiv';
|
|
7
7
|
import fixtureArabic from './fixtures/arabic';
|
|
8
8
|
import fixtureArticle from './fixtures/article';
|
|
9
|
+
import fixtureCoorpmanager from './fixtures/coorpmanager';
|
|
9
10
|
import fixtureDefault from './fixtures/default';
|
|
10
11
|
import fixtureDisabled from './fixtures/disabled';
|
|
11
12
|
import fixtureEmpty from './fixtures/empty';
|
|
@@ -15,6 +16,8 @@ import fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';
|
|
|
15
16
|
import fixtureFreerun from './fixtures/freerun';
|
|
16
17
|
import fixturePodcast from './fixtures/podcast';
|
|
17
18
|
import fixtureScorm from './fixtures/scorm';
|
|
19
|
+
import fixtureSelectableFalse from './fixtures/selectable-false';
|
|
20
|
+
import fixtureSelectableTrue from './fixtures/selectable-true';
|
|
18
21
|
import fixtureVideo from './fixtures/video';
|
|
19
22
|
test('Molecule › MoleculeCard > should have valid propTypes', t => {
|
|
20
23
|
t.pass();
|
|
@@ -26,6 +29,7 @@ test('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered',
|
|
|
26
29
|
test('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);
|
|
27
30
|
test('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);
|
|
28
31
|
test('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);
|
|
32
|
+
test('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);
|
|
29
33
|
test('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);
|
|
30
34
|
test('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);
|
|
31
35
|
test('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);
|
|
@@ -35,5 +39,7 @@ test('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered',
|
|
|
35
39
|
test('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);
|
|
36
40
|
test('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);
|
|
37
41
|
test('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);
|
|
42
|
+
test('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);
|
|
43
|
+
test('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);
|
|
38
44
|
test('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);
|
|
39
45
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureVideo","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,YAAP,MAAyB,IAAzB;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,YAAP,MAAyB,kBAAzB;
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/card/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCard","fixtureAdaptivAndDisabled","fixtureAdaptiv","fixtureArabic","fixtureArticle","fixtureCoorpmanager","fixtureDefault","fixtureDisabled","fixtureEmpty","fixtureExternalContent","fixtureFavorite","fixtureFreerunAndDisabled","fixtureFreerun","fixturePodcast","fixtureScorm","fixtureSelectableFalse","fixtureSelectableTrue","fixtureVideo","t","pass","propTypes","value","key","not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Macro from '../../../test/helpers/render-component';\nimport MoleculeCard from '..';\nimport fixtureAdaptivAndDisabled from './fixtures/adaptiv-and-disabled';\nimport fixtureAdaptiv from './fixtures/adaptiv';\nimport fixtureArabic from './fixtures/arabic';\nimport fixtureArticle from './fixtures/article';\nimport fixtureCoorpmanager from './fixtures/coorpmanager';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDisabled from './fixtures/disabled';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureExternalContent from './fixtures/external-content';\nimport fixtureFavorite from './fixtures/favorite';\nimport fixtureFreerunAndDisabled from './fixtures/freerun-and-disabled';\nimport fixtureFreerun from './fixtures/freerun';\nimport fixturePodcast from './fixtures/podcast';\nimport fixtureScorm from './fixtures/scorm';\nimport fixtureSelectableFalse from './fixtures/selectable-false';\nimport fixtureSelectableTrue from './fixtures/selectable-true';\nimport fixtureVideo from './fixtures/video';\n\ntest('Molecule › MoleculeCard > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCard.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCard.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCard › AdaptivAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptivAndDisabled);\ntest('Molecule › MoleculeCard › Adaptiv › should be rendered', renderComponentMacro, MoleculeCard, fixtureAdaptiv);\ntest('Molecule › MoleculeCard › Arabic › should be rendered', renderComponentMacro, MoleculeCard, fixtureArabic);\ntest('Molecule › MoleculeCard › Article › should be rendered', renderComponentMacro, MoleculeCard, fixtureArticle);\ntest('Molecule › MoleculeCard › Coorpmanager › should be rendered', renderComponentMacro, MoleculeCard, fixtureCoorpmanager);\ntest('Molecule › MoleculeCard › Default › should be rendered', renderComponentMacro, MoleculeCard, fixtureDefault);\ntest('Molecule › MoleculeCard › Disabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureDisabled);\ntest('Molecule › MoleculeCard › Empty › should be rendered', renderComponentMacro, MoleculeCard, fixtureEmpty);\ntest('Molecule › MoleculeCard › ExternalContent › should be rendered', renderComponentMacro, MoleculeCard, fixtureExternalContent);\ntest('Molecule › MoleculeCard › Favorite › should be rendered', renderComponentMacro, MoleculeCard, fixtureFavorite);\ntest('Molecule › MoleculeCard › FreerunAndDisabled › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerunAndDisabled);\ntest('Molecule › MoleculeCard › Freerun › should be rendered', renderComponentMacro, MoleculeCard, fixtureFreerun);\ntest('Molecule › MoleculeCard › Podcast › should be rendered', renderComponentMacro, MoleculeCard, fixturePodcast);\ntest('Molecule › MoleculeCard › Scorm › should be rendered', renderComponentMacro, MoleculeCard, fixtureScorm);\ntest('Molecule › MoleculeCard › SelectableFalse › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableFalse);\ntest('Molecule › MoleculeCard › SelectableTrue › should be rendered', renderComponentMacro, MoleculeCard, fixtureSelectableTrue);\ntest('Molecule › MoleculeCard › Video › should be rendered', renderComponentMacro, MoleculeCard, fixtureVideo);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/forEach';
|
|
3
|
+
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
+
import MoleculeCmPopin from '..';
|
|
5
|
+
import fixtureDangerous from './fixtures/dangerous';
|
|
6
|
+
import fixtureDefault from './fixtures/default';
|
|
7
|
+
import fixtureWarningWithClose from './fixtures/warning-with-close';
|
|
8
|
+
test('Molecule › MoleculeCmPopin > should have valid propTypes', t => {
|
|
9
|
+
t.pass();
|
|
10
|
+
forEach(MoleculeCmPopin.propTypes, (value, key) => {
|
|
11
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCmPopin.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
12
|
+
});
|
|
13
|
+
});
|
|
14
|
+
test('Molecule › MoleculeCmPopin › Dangerous › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDangerous);
|
|
15
|
+
test('Molecule › MoleculeCmPopin › Default › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDefault);
|
|
16
|
+
test('Molecule › MoleculeCmPopin › WarningWithClose › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureWarningWithClose);
|
|
17
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/cm-popin/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCmPopin","fixtureDangerous","fixtureDefault","fixtureWarningWithClose","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,eAAP,MAA4B,IAA5B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,uBAAP,MAAoC,+BAApC;AAEAN,IAAI,CAAC,0DAAD,EAA6DO,CAAC,IAAI;AACpEA,EAAAA,CAAC,CAACC,IAAF;AACAP,EAAAA,OAAO,CAACE,eAAe,CAACM,SAAjB,EAA4B,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,oDAAmDF,GAAI,mEAAhF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAX,IAAI,CAAC,6DAAD,EAAgEE,oBAAhE,EAAsFC,eAAtF,EAAuGC,gBAAvG,CAAJ;AACAJ,IAAI,CAAC,2DAAD,EAA8DE,oBAA9D,EAAoFC,eAApF,EAAqGE,cAArG,CAAJ;AACAL,IAAI,CAAC,oEAAD,EAAuEE,oBAAvE,EAA6FC,eAA7F,EAA8GG,uBAA9G,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCmPopin from '..';\nimport fixtureDangerous from './fixtures/dangerous';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWarningWithClose from './fixtures/warning-with-close';\n\ntest('Molecule › MoleculeCmPopin > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCmPopin.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCmPopin.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCmPopin › Dangerous › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDangerous);\ntest('Molecule › MoleculeCmPopin › Default › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureDefault);\ntest('Molecule › MoleculeCmPopin › WarningWithClose › should be rendered', renderComponentMacro, MoleculeCmPopin, fixtureWarningWithClose);\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 MoleculeCoorpManagerRoles from '..';
|
|
5
|
+
import fixtureDefault from './fixtures/default';
|
|
6
|
+
test('Molecule › MoleculeCoorpManagerRoles > should have valid propTypes', t => {
|
|
7
|
+
t.pass();
|
|
8
|
+
forEach(MoleculeCoorpManagerRoles.propTypes, (value, key) => {
|
|
9
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCoorpManagerRoles.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
10
|
+
});
|
|
11
|
+
});
|
|
12
|
+
test('Molecule › MoleculeCoorpManagerRoles › Default › should be rendered', renderComponentMacro, MoleculeCoorpManagerRoles, fixtureDefault);
|
|
13
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/coorp-manager-roles/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeCoorpManagerRoles","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,yBAAP,MAAsC,IAAtC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AAEAJ,IAAI,CAAC,oEAAD,EAAuEK,CAAC,IAAI;AAC9EA,EAAAA,CAAC,CAACC,IAAF;AACAL,EAAAA,OAAO,CAACE,yBAAyB,CAACI,SAA3B,EAAsC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8DAA6DF,GAAI,mEAA1F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAT,IAAI,CAAC,qEAAD,EAAwEE,oBAAxE,EAA8FC,yBAA9F,EAAyHC,cAAzH,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCoorpManagerRoles from '..';\nimport fixtureDefault from './fixtures/default';\n\ntest('Molecule › MoleculeCoorpManagerRoles > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCoorpManagerRoles.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCoorpManagerRoles.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCoorpManagerRoles › Default › should be rendered', renderComponentMacro, MoleculeCoorpManagerRoles, fixtureDefault);\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 MoleculeCourseSection from '..';
|
|
5
|
+
import fixtureChapter from './fixtures/chapter';
|
|
6
|
+
import fixtureCourse from './fixtures/course';
|
|
7
|
+
test('Molecule › MoleculeCourseSection > should have valid propTypes', t => {
|
|
8
|
+
t.pass();
|
|
9
|
+
forEach(MoleculeCourseSection.propTypes, (value, key) => {
|
|
10
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSection.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
+
});
|
|
12
|
+
});
|
|
13
|
+
test('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);
|
|
14
|
+
test('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);
|
|
15
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +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,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
+
import InputTextWithTitle from '../../atom/input-text-with-title';
|
|
3
4
|
import CourseSection from '../course-section';
|
|
4
5
|
import DraggableList from '../draggable-list';
|
|
5
6
|
import Loader from '../../atom/loader';
|
|
@@ -14,10 +15,20 @@ const CourseSections = ({
|
|
|
14
15
|
sections,
|
|
15
16
|
onDrop,
|
|
16
17
|
isLoading,
|
|
17
|
-
title
|
|
18
|
+
title,
|
|
19
|
+
mandatoryCoursesInput,
|
|
20
|
+
inputTitle
|
|
18
21
|
}) => {
|
|
19
22
|
if (isLoading) return /*#__PURE__*/React.createElement(Loading, null);
|
|
20
|
-
return /*#__PURE__*/React.createElement("div", null,
|
|
23
|
+
return /*#__PURE__*/React.createElement("div", null, inputTitle ? /*#__PURE__*/React.createElement("div", {
|
|
24
|
+
className: style.title
|
|
25
|
+
}, /*#__PURE__*/React.createElement(Title, {
|
|
26
|
+
title: inputTitle,
|
|
27
|
+
type: 'form-group',
|
|
28
|
+
"data-name": 'mandatory-courses-input-title'
|
|
29
|
+
})) : null, mandatoryCoursesInput ? /*#__PURE__*/React.createElement("div", {
|
|
30
|
+
className: style.mandatoryCoursesInput
|
|
31
|
+
}, /*#__PURE__*/React.createElement(InputTextWithTitle, mandatoryCoursesInput)) : null, title ? /*#__PURE__*/React.createElement("div", {
|
|
21
32
|
className: style.title
|
|
22
33
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
23
34
|
title: title,
|
|
@@ -31,10 +42,12 @@ const CourseSections = ({
|
|
|
31
42
|
};
|
|
32
43
|
|
|
33
44
|
CourseSections.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
45
|
+
inputTitle: PropTypes.string,
|
|
34
46
|
title: PropTypes.string,
|
|
35
47
|
sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),
|
|
36
48
|
onDrop: PropTypes.func,
|
|
37
|
-
isLoading: PropTypes.bool
|
|
49
|
+
isLoading: PropTypes.bool,
|
|
50
|
+
mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)
|
|
38
51
|
} : {};
|
|
39
52
|
export default CourseSections;
|
|
40
53
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["React","PropTypes","CourseSection","DraggableList","Loader","Title","style","Loading","CourseSections","sections","onDrop","isLoading","title","propTypes","string","arrayOf","shape","func","bool"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,mBACd,8CACE,oBAAC,MAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["React","PropTypes","InputTextWithTitle","CourseSection","DraggableList","Loader","Title","style","Loading","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","propTypes","string","arrayOf","shape","func","bool"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,kBAAP,MAA+B,kCAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,mBACd,8CACE,oBAAC,MAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA,MAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,KAJsB;AAKtBC,EAAAA,qBALsB;AAMtBC,EAAAA;AANsB,CAAD,KAOjB;AACJ,MAAIH,SAAJ,EAAe,oBAAO,oBAAC,OAAD,OAAP;AAEf,sBACE,iCACGG,UAAU,gBACT;AAAK,IAAA,SAAS,EAAER,KAAK,CAACM;AAAtB,kBACE,oBAAC,KAAD;AACE,IAAA,KAAK,EAAEE,UADT;AAEE,IAAA,IAAI,EAAE,YAFR;AAGE,iBAAW;AAHb,IADF,CADS,GAQP,IATN,EAUGD,qBAAqB,gBACpB;AAAK,IAAA,SAAS,EAAEP,KAAK,CAACO;AAAtB,kBACE,oBAAC,kBAAD,EAAwBA,qBAAxB,CADF,CADoB,GAIlB,IAdN,EAeGD,KAAK,gBACJ;AAAK,IAAA,SAAS,EAAEN,KAAK,CAACM;AAAtB,kBACE,oBAAC,KAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADI,GAIF,IAnBN,eAoBE,oBAAC,aAAD;AAAe,IAAA,QAAQ,EAAC,gBAAxB;AAAyC,IAAA,KAAK,EAAEH,QAAhD;AAA0D,IAAA,MAAM,EAAEC;AAAlE,IApBF,CADF;AAwBD,CAlCD;;AAoCAF,cAAc,CAACO,SAAf,2CAA2B;AACzBD,EAAAA,UAAU,EAAEd,SAAS,CAACgB,MADG;AAEzBJ,EAAAA,KAAK,EAAEZ,SAAS,CAACgB,MAFQ;AAGzBP,EAAAA,QAAQ,EAAET,SAAS,CAACiB,OAAV,CAAkBjB,SAAS,CAACkB,KAAV,CAAgBhB,aAAa,CAACa,SAA9B,CAAlB,CAHe;AAIzBL,EAAAA,MAAM,EAAEV,SAAS,CAACmB,IAJO;AAKzBR,EAAAA,SAAS,EAAEX,SAAS,CAACoB,IALI;AAMzBP,EAAAA,qBAAqB,EAAEb,SAAS,CAACkB,KAAV,CAAgBjB,kBAAkB,CAACc,SAAnC;AANE,CAA3B;AASA,eAAeP,cAAf","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div>\n <Loader theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
|