@coorpacademy/components 10.5.3 → 10.5.7-alpha.10
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/range/handle.css +18 -2
- package/es/atom/range/handle.js +7 -3
- package/es/atom/range/handle.js.map +1 -1
- package/es/atom/range/style.css +2 -2
- package/es/atom/select/index.js +38 -20
- package/es/atom/select/index.js.map +1 -1
- package/es/atom/select/style.css +129 -40
- package/es/atom/select/test/fixtures/player.js +11 -0
- package/es/atom/select/test/fixtures/player.js.map +1 -0
- package/es/atom/select/test/fixtures.js +2 -0
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/atom/select/test/select.js +49 -0
- package/es/atom/select/test/select.js.map +1 -0
- package/es/molecule/course-section/index.js +5 -3
- package/es/molecule/course-section/index.js.map +1 -1
- package/es/molecule/course-section/style.css +2 -1
- package/es/molecule/course-section/test/fixtures/chapter.js +2 -1
- package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -1
- package/es/molecule/course-section/test/fixtures/course.js +2 -1
- package/es/molecule/course-section/test/fixtures/course.js.map +1 -1
- 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 +40 -0
- package/es/molecule/course-sections/index.js.map +1 -0
- package/es/molecule/course-sections/style.css +3 -0
- package/es/molecule/course-sections/test/fixtures/default.js +149 -0
- package/es/molecule/course-sections/test/fixtures/default.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures/loading.js +9 -0
- package/es/molecule/course-sections/test/fixtures/loading.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +15 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -0
- package/es/molecule/draggable/index.js +1 -1
- package/es/molecule/draggable/index.js.map +1 -1
- package/es/molecule/draggable/style.css +2 -16
- package/es/molecule/draggable-list/index.js +56 -0
- package/es/molecule/draggable-list/index.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures/course-sections.js +20 -0
- package/es/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures/dashboard-sections.js +26 -0
- package/es/molecule/draggable-list/test/fixtures/dashboard-sections.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/{setup-sections → draggable-list}/test/on-drop.js +17 -17
- package/es/molecule/draggable-list/test/on-drop.js.map +1 -0
- package/es/molecule/questions/drop-down/index.js +1 -6
- package/es/molecule/questions/drop-down/index.js.map +1 -1
- package/es/molecule/questions/free-text/index.js +35 -15
- package/es/molecule/questions/free-text/index.js.map +1 -1
- package/es/molecule/questions/free-text/style.css +34 -15
- package/es/molecule/questions/free-text/test/fixtures/default.js +1 -1
- package/es/molecule/questions/free-text/test/fixtures/default.js.map +1 -1
- package/es/molecule/questions/free-text/test/fixtures/with-value-on-change.js +9 -0
- package/es/molecule/questions/free-text/test/fixtures/with-value-on-change.js.map +1 -0
- package/es/molecule/questions/free-text/test/fixtures/{with-default-value.js → with-value.js} +2 -2
- package/es/molecule/questions/free-text/test/fixtures/with-value.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/questions/free-text/test/free-text.js +106 -0
- package/es/molecule/questions/free-text/test/free-text.js.map +1 -0
- package/es/molecule/questions/qcm/index.js +37 -25
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm/style.css +48 -14
- package/es/molecule/questions/qcm/test/fixtures/default.js +8 -0
- package/es/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
- package/es/molecule/questions/qcm/test/qcm.js +103 -0
- package/es/molecule/questions/qcm/test/qcm.js.map +1 -0
- package/es/molecule/questions/qcm-graphic/index.js +35 -17
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/style.css +64 -13
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js +65 -0
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
- package/es/molecule/questions/question-range/style.css +9 -8
- package/es/molecule/questions/template/index.js +13 -10
- package/es/molecule/questions/template/index.js.map +1 -1
- package/es/molecule/select-multiple/style.css +8 -5
- package/es/molecule/setup-section/style.css +1 -0
- package/es/molecule/setup-sections/index.js +7 -33
- package/es/molecule/setup-sections/index.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/organize-courses.js +106 -0
- package/es/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
- package/es/molecule/wizard-summary/test/fixtures.js +2 -0
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js +1 -1
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
- package/es/organism/wizard-contents/index.js +6 -0
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +45 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
- package/es/organism/wizard-contents/test/fixtures.js +2 -0
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +22 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures.js +2 -0
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/util/get-shadow-box-color-from-primary.js +4 -0
- package/es/util/get-shadow-box-color-from-primary.js.map +1 -0
- package/es/util/test/get-shadow-box-color-from-primary.js +33 -0
- package/es/util/test/get-shadow-box-color-from-primary.js.map +1 -0
- package/es/variables/colors.css +3 -0
- package/lib/atom/range/handle.css +18 -2
- package/lib/atom/range/handle.js +8 -3
- package/lib/atom/range/handle.js.map +1 -1
- package/lib/atom/range/style.css +2 -2
- package/lib/atom/select/index.js +40 -17
- package/lib/atom/select/index.js.map +1 -1
- package/lib/atom/select/style.css +129 -40
- package/lib/atom/select/test/fixtures/player.js +21 -0
- package/lib/atom/select/test/fixtures/player.js.map +1 -0
- package/lib/atom/select/test/fixtures.js +3 -0
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/atom/select/test/select.js +62 -0
- package/lib/atom/select/test/select.js.map +1 -0
- package/lib/molecule/course-section/index.js +5 -3
- package/lib/molecule/course-section/index.js.map +1 -1
- package/lib/molecule/course-section/style.css +2 -1
- package/lib/molecule/course-section/test/fixtures/chapter.js +2 -1
- package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -1
- package/lib/molecule/course-section/test/fixtures/course.js +2 -1
- package/lib/molecule/course-section/test/fixtures/course.js.map +1 -1
- 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 +54 -0
- package/lib/molecule/course-sections/index.js.map +1 -0
- package/lib/molecule/course-sections/style.css +3 -0
- package/lib/molecule/course-sections/test/fixtures/default.js +154 -0
- package/lib/molecule/course-sections/test/fixtures/default.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures/loading.js +14 -0
- package/lib/molecule/course-sections/test/fixtures/loading.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +25 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -0
- package/lib/molecule/draggable/index.js +1 -1
- package/lib/molecule/draggable/index.js.map +1 -1
- package/lib/molecule/draggable/style.css +2 -16
- package/lib/molecule/draggable-list/index.js +73 -0
- package/lib/molecule/draggable-list/index.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures/course-sections.js +29 -0
- package/lib/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures/dashboard-sections.js +37 -0
- package/lib/molecule/draggable-list/test/fixtures/dashboard-sections.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/{setup-sections → draggable-list}/test/on-drop.js +19 -19
- package/lib/molecule/draggable-list/test/on-drop.js.map +1 -0
- package/lib/molecule/questions/drop-down/index.js +1 -5
- package/lib/molecule/questions/drop-down/index.js.map +1 -1
- package/lib/molecule/questions/free-text/index.js +32 -14
- package/lib/molecule/questions/free-text/index.js.map +1 -1
- package/lib/molecule/questions/free-text/style.css +34 -15
- package/lib/molecule/questions/free-text/test/fixtures/default.js +1 -1
- package/lib/molecule/questions/free-text/test/fixtures/default.js.map +1 -1
- package/lib/molecule/questions/free-text/test/fixtures/with-value-on-change.js +14 -0
- package/lib/molecule/questions/free-text/test/fixtures/with-value-on-change.js.map +1 -0
- package/lib/molecule/questions/free-text/test/fixtures/{with-default-value.js → with-value.js} +2 -2
- package/lib/molecule/questions/free-text/test/fixtures/with-value.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/questions/free-text/test/free-text.js +119 -0
- package/lib/molecule/questions/free-text/test/free-text.js.map +1 -0
- package/lib/molecule/questions/qcm/index.js +44 -23
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm/style.css +48 -14
- package/lib/molecule/questions/qcm/test/fixtures/default.js +8 -0
- package/lib/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
- package/lib/molecule/questions/qcm/test/qcm.js +115 -0
- package/lib/molecule/questions/qcm/test/qcm.js.map +1 -0
- package/lib/molecule/questions/qcm-graphic/index.js +33 -15
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/style.css +64 -13
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js +76 -0
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
- package/lib/molecule/questions/question-range/style.css +9 -8
- package/lib/molecule/questions/template/index.js +13 -10
- package/lib/molecule/questions/template/index.js.map +1 -1
- package/lib/molecule/select-multiple/style.css +8 -5
- package/lib/molecule/setup-section/style.css +1 -0
- package/lib/molecule/setup-sections/index.js +7 -37
- package/lib/molecule/setup-sections/index.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js +111 -0
- package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
- package/lib/molecule/wizard-summary/test/fixtures.js +3 -0
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js +1 -1
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
- package/lib/organism/wizard-contents/index.js +7 -0
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +54 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
- package/lib/organism/wizard-contents/test/fixtures.js +3 -0
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +32 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures.js +3 -0
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/util/get-shadow-box-color-from-primary.js +12 -0
- package/lib/util/get-shadow-box-color-from-primary.js.map +1 -0
- package/lib/util/test/get-shadow-box-color-from-primary.js +40 -0
- package/lib/util/test/get-shadow-box-color-from-primary.js.map +1 -0
- package/lib/variables/colors.css +3 -0
- package/package.json +2 -2
- package/es/molecule/questions/free-text/test/fixtures/with-default-value.js.map +0 -1
- package/es/molecule/search/test/fixtures.js +0 -15
- package/es/molecule/search/test/fixtures.js.map +0 -1
- package/es/molecule/setup-sections/test/on-drop.js.map +0 -1
- package/lib/molecule/questions/free-text/test/fixtures/with-default-value.js.map +0 -1
- package/lib/molecule/search/test/fixtures.js +0 -25
- package/lib/molecule/search/test/fixtures.js.map +0 -1
- package/lib/molecule/setup-sections/test/on-drop.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/brand-form/test/fixtures/wizard-playlists.js"],"names":["props","groups","fields","type","title","placeholder","description","theme","hint","size","options","name","value","selected","multiple"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,MAAM,EAAE,CACN;AACEC,QAAAA,IAAI,EAAE,gBADR;AAEEC,QAAAA,KAAK,EAAE,WAFT;AAGEC,QAAAA,WAAW,EAAE,oBAHf;AAIEC,QAAAA,WAAW,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/brand-form/test/fixtures/wizard-playlists.js"],"names":["props","groups","fields","type","title","placeholder","description","theme","hint","size","options","name","value","selected","multiple"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,MAAM,EAAE,CACN;AACEC,MAAAA,MAAM,EAAE,CACN;AACEC,QAAAA,IAAI,EAAE,gBADR;AAEEC,QAAAA,KAAK,EAAE,WAFT;AAGEC,QAAAA,WAAW,EAAE,oBAHf;AAIEC,QAAAA,WAAW,EACT,wLALJ;AAMEC,QAAAA,KAAK,EAAE,cANT;AAOEC,QAAAA,IAAI,EAAE,oBAPR;AAQEC,QAAAA,IAAI,EAAE,SARR;AASEC,QAAAA,OAAO,EAAE,CACP;AACEC,UAAAA,IAAI,EAAE,cADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SADO,EAMP;AACEF,UAAAA,IAAI,EAAE,aADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SANO,EAWP;AACEF,UAAAA,IAAI,EAAE,WADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SAXO,EAgBP;AACEF,UAAAA,IAAI,EAAE,cADR;AAEEC,UAAAA,KAAK,EAAE,IAFT;AAGEC,UAAAA,QAAQ,EAAE;AAHZ,SAhBO,CATX;AA+BEC,QAAAA,QAAQ,EAAE;AA/BZ,OADM,EAkCN;AACEX,QAAAA,IAAI,EAAE,MADR;AAEEC,QAAAA,KAAK,EAAE,eAFT;AAGEC,QAAAA,WAAW,EAAE,eAHf;AAIEC,QAAAA,WAAW,EAAE,0BAJf;AAKEC,QAAAA,KAAK,EAAE,cALT;AAMEC,QAAAA,IAAI,EAAE,oBANR;AAOEI,QAAAA,KAAK,EAAE,kBAPT;AAQEH,QAAAA,IAAI,EAAE;AARR,OAlCM,EA4CN;AACEN,QAAAA,IAAI,EAAE,UADR;AAEEC,QAAAA,KAAK,EAAE,aAFT;AAGEC,QAAAA,WAAW,EAAE,aAHf;AAIEC,QAAAA,WAAW,EAAE,0BAJf;AAKEC,QAAAA,KAAK,EAAE,cALT;AAMEC,QAAAA,IAAI,EAAE,qBANR;AAOEC,QAAAA,IAAI,EAAE,QAPR;AAQEG,QAAAA,KAAK,EACH;AATJ,OA5CM;AADV,KADM;AADH;AADM,C","sourcesContent":["export default {\n props: {\n groups: [\n {\n fields: [\n {\n type: 'selectMultiple',\n title: 'Languages',\n placeholder: 'Language selection',\n description:\n 'The name and description of your custom playlist will be displayed in the selected language. Only the selected language will be saved. You can translate during step 2 \"Translations\".',\n theme: 'coorpmanager',\n hint: '15 / 30 characters',\n size: 'default',\n options: [\n {\n name: '🇬🇧 English',\n value: 'en',\n selected: true\n },\n {\n name: '🇩🇪 German',\n value: 'de',\n selected: false\n },\n {\n name: '🇹🇭 Thai',\n value: 'th',\n selected: false\n },\n {\n name: '🇪🇸 Spanish',\n value: 'es',\n selected: false\n }\n ],\n multiple: false\n },\n {\n type: 'text',\n title: 'Playlist name',\n placeholder: 'Playlist name',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '15 / 30 characters',\n value: 'Marketing expert',\n size: 'default'\n },\n {\n type: 'textarea',\n title: 'Description',\n placeholder: 'Description',\n description: 'This is the tooltip text',\n theme: 'coorpmanager',\n hint: '80 / 200 characters',\n size: 'medium',\n value:\n 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis fermentum sem ac fermentum luctus. Integer eu dui magna. Donec ut tristique dui. Vestibulum non accumsan tellus. Donec luctus erat vitae aliquet viverra. Mauris malesuada tortor quis viverra vestibulum. Nullam laoreet porta massa vitae porta.'\n }\n ]\n }\n ]\n }\n};\n"],"file":"wizard-playlists.js"}
|
|
@@ -25,6 +25,8 @@ var _searchAndChipsResults = _interopRequireDefault(require("../search-and-chips
|
|
|
25
25
|
|
|
26
26
|
var _courseSelection = _interopRequireDefault(require("../course-selection"));
|
|
27
27
|
|
|
28
|
+
var _courseSections = _interopRequireDefault(require("../../molecule/course-sections"));
|
|
29
|
+
|
|
28
30
|
var _style = _interopRequireDefault(require("./style.css"));
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -70,6 +72,9 @@ const buildForm = content => {
|
|
|
70
72
|
|
|
71
73
|
case 'courses':
|
|
72
74
|
return /*#__PURE__*/_react.default.createElement(_courseSelection.default, content);
|
|
75
|
+
|
|
76
|
+
case 'organize-courses':
|
|
77
|
+
return /*#__PURE__*/_react.default.createElement(_courseSections.default, content);
|
|
73
78
|
}
|
|
74
79
|
};
|
|
75
80
|
|
|
@@ -177,6 +182,8 @@ WizardContents.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
177
182
|
type: _propTypes.default.oneOf(['populations'])
|
|
178
183
|
})), _propTypes.default.shape(_extends(_extends({}, _courseSelection.default.propTypes), {}, {
|
|
179
184
|
type: _propTypes.default.oneOf(['courses'])
|
|
185
|
+
})), _propTypes.default.shape(_extends(_extends({}, _courseSections.default.propTypes), {}, {
|
|
186
|
+
type: _propTypes.default.oneOf(['organize-courses'])
|
|
180
187
|
}))]),
|
|
181
188
|
previousStep: _propTypes.default.shape({
|
|
182
189
|
label: _propTypes.default.string,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","style","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","PropTypes","bool","shape","string","func","isRequired","WizardSteps","WizardSummary","oneOfType","BrandForm","oneOf","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAW,GAAG,CAACC,YAAD,EAAeC,KAAf,KAAyB;AAC3C,QAAM;AAACC,IAAAA,KAAD;AAAQC,IAAAA;AAAR,MAAmBH,YAAzB;AAEA,QAAMI,eAAe,GAAG;AACtBC,IAAAA,IAAI,EAAE,OADgB;AAEtB,iBAAa,cAFS;AAGtB,kBAAc,cAHQ;AAItBC,IAAAA,IAAI,EAAE,OAJgB;AAKtBH,IAAAA;AALsB,GAAxB;AAQA,sBACE,uDACE;AAAK,IAAA,SAAS,EAAEI,eAAMC;AAAtB,kBACE,6BAAC,2BAAD,EAAwBJ,eAAxB,CADF,eAEE;AAAK,IAAA,SAAS,EAAEG,eAAME,WAAtB;AAAmC,iBAAW;AAA9C,KACGP,KADH,CAFF,CADF,eAOE,6BAAC,oBAAD;AAAa,IAAA,KAAK,EAAED;AAApB,IAPF,CADF;AAWD,CAtBD;;AAwBA,MAAMS,SAAS,GAAGC,OAAO,IAAI;AAC3B,QAAM;AAACC,IAAAA;AAAD,MA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BV,mBAAUE,KAAV,uBACKU,+BAA8Bb,SADnC;AAEEpC,IAAAA,IAAI,EAAEqC,mBAAUU,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAT2B,EAa3BV,mBAAUE,KAAV,uBACKW,yBAAgBd,SADrB;AAEEpC,IAAAA,IAAI,EAAEqC,mBAAUU,KAAV,CAAgB,CAAC,SAAD,CAAhB;AAFR,KAb2B,CAApB,CAVgB;AA4BzBnC,EAAAA,YAAY,EAAEyB,mBAAUE,KAAV,CAAgB;AAC5B9B,IAAAA,KAAK,EAAE4B,mBAAUG,MADW;AAE5BjD,IAAAA,OAAO,EAAE8C,mBAAUI;AAFS,GAAhB,CA5BW;AAgCzB5B,EAAAA,QAAQ,EAAEwB,mBAAUE,KAAV,CAAgB;AACxBvC,IAAAA,IAAI,EAAEqC,mBAAUU,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;AAExBtC,IAAAA,KAAK,EAAE4B,mBAAUG,MAFO;AAGxBjD,IAAAA,OAAO,EAAE8C,mBAAUI;AAHK,GAAhB;AAhCe,CAA3B;eAuCetB,c","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'custom-playlist-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"custom-playlist-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/wizard-contents/index.js"],"names":["buildHeader","wizardHeader","steps","title","onClick","buttonCloseIcon","size","icon","style","header","headerTitle","buildForm","content","type","buildButton","step","side","ICONS","previous","position","next","publish","label","buttonProps","buildActionZone","previousStep","nextStep","previousButton","nextStepType","nextButton","actionZone","button","WizardContents","props","isLoading","summary","headerView","formView","rightActionView","footerActionView","container","leftSection","form","rightSection","stickySection","summaryZone","footer","summaryFooter","actionFooter","propTypes","PropTypes","bool","shape","string","func","isRequired","WizardSteps","WizardSummary","oneOfType","BrandForm","oneOf","ContentTranslate","OrganismSearchAndChipsResults","CourseSelection","CourseSections"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,WAAW,GAAG,CAACC,YAAD,EAAe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AAQ,EAAEwB,mBAAUE,KAAV,CAAgB;AACxBvC,IAAAA,IAAI,EAAEqC,mBAAUU,KAAV,CAAgB,CAAC,MAAD,EAAS,SAAT,CAAhB,CADkB;AAExBtC,IAAAA,KAAK,EAAE4B,mBAAUG,MAFO;AAGxBjD,IAAAA,OAAO,EAAE8C,mBAAUI;AAHK,GAAhB;AApCe,CAA3B;eA2CetB,c","sourcesContent":["import React from 'react';\nimport getOr from 'lodash/fp/getOr';\nimport PropTypes from 'prop-types';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIconOnly from '../../atom/button-link-icon-only';\nimport WizardSteps from '../../atom/wizard-steps';\nimport WizardSummary from '../../molecule/wizard-summary';\nimport BrandForm from '../brand-form';\nimport ContentTranslate from '../content-translation';\nimport OrganismSearchAndChipsResults from '../search-and-chips-results';\nimport CourseSelection from '../course-selection';\nimport CourseSections from '../../molecule/course-sections';\nimport style from './style.css';\n\nconst buildHeader = (wizardHeader, steps) => {\n const {title, onClick} = wizardHeader;\n\n const buttonCloseIcon = {\n size: 'small',\n 'data-name': 'close-button',\n 'aria-label': 'close button',\n icon: 'close',\n onClick\n };\n\n return (\n <div>\n <div className={style.header}>\n <ButtonLinkIconOnly {...buttonCloseIcon} />\n <div className={style.headerTitle} data-name={'custom-playlist-title'}>\n {title}\n </div>\n </div>\n <WizardSteps steps={steps} />\n </div>\n );\n};\n\nconst buildForm = content => {\n const {type} = content;\n switch (type) {\n case 'form':\n return <BrandForm {...content} />;\n case 'translate':\n return <ContentTranslate {...content} />;\n case 'populations':\n return <OrganismSearchAndChipsResults {...content} />;\n case 'courses':\n return <CourseSelection {...content} />;\n case 'organize-courses':\n return <CourseSections {...content} />;\n }\n};\n\nconst buildButton = (type, step, side) => {\n const ICONS = {\n previous: {\n position: 'left',\n type: 'chevron-left'\n },\n next: {\n position: 'right',\n type: 'chevron-right'\n },\n publish: {\n position: 'left',\n type: 'publish'\n }\n };\n\n const {label, onClick} = step;\n const buttonProps = {\n type: type === 'previous' ? 'secondary' : 'primary',\n 'aria-label': `${type} step button`,\n 'data-name': `${type}-step-button-${side}`,\n icon: ICONS[type],\n label,\n onClick\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nconst buildActionZone = (previousStep, nextStep, side) => {\n const previousButton = previousStep ? buildButton('previous', previousStep, side) : null;\n const nextStepType = getOr('next', 'type', nextStep);\n const nextButton = nextStep ? buildButton(nextStepType, nextStep, side) : null;\n return (\n <div className={style.actionZone}>\n <div className={style.button}>{previousButton}</div>\n <div className={style.button}>{nextButton}</div>\n </div>\n );\n};\n\nconst WizardContents = props => {\n const {isLoading, wizardHeader, steps, summary, content, nextStep, previousStep} = props;\n const headerView = buildHeader(wizardHeader, steps);\n const formView = buildForm({...content, isLoading});\n const rightActionView = buildActionZone(previousStep, nextStep, 'right');\n const footerActionView = buildActionZone(previousStep, nextStep, 'footer');\n\n return (\n <div className={style.container} data-name=\"custom-playlist-summary\">\n <div className={style.leftSection}>\n {headerView}\n <div className={style.form}>{formView}</div>\n </div>\n <div className={style.rightSection} data-name=\"summary-right-section\">\n <div className={style.stickySection}>\n <div className={style.summaryZone} data-name=\"summary-zone\">\n <WizardSummary {...summary} side={'right'} />\n </div>\n {rightActionView}\n </div>\n </div>\n <div className={style.footer} data-name=\"summary-footer-section\">\n <div className={style.summaryFooter}>\n <WizardSummary {...summary} side={'footer'} />\n </div>\n <div className={style.actionFooter}>{footerActionView}</div>\n </div>\n </div>\n );\n};\n\nWizardContents.propTypes = {\n isLoading: PropTypes.bool,\n wizardHeader: PropTypes.shape({\n title: PropTypes.string,\n onClick: PropTypes.func\n }).isRequired,\n steps: WizardSteps.propTypes.steps,\n summary: PropTypes.shape({\n ...WizardSummary.propTypes\n }).isRequired,\n content: PropTypes.oneOfType([\n PropTypes.shape({\n ...BrandForm.propTypes,\n type: PropTypes.oneOf(['form'])\n }),\n PropTypes.shape({\n ...ContentTranslate.propTypes,\n type: PropTypes.oneOf(['translate'])\n }),\n PropTypes.shape({\n ...OrganismSearchAndChipsResults.propTypes,\n type: PropTypes.oneOf(['populations'])\n }),\n PropTypes.shape({\n ...CourseSelection.propTypes,\n type: PropTypes.oneOf(['courses'])\n }),\n PropTypes.shape({\n ...CourseSections.propTypes,\n type: PropTypes.oneOf(['organize-courses'])\n })\n ]),\n previousStep: PropTypes.shape({\n label: PropTypes.string,\n onClick: PropTypes.func\n }),\n nextStep: PropTypes.shape({\n type: PropTypes.oneOf(['next', 'publish']),\n label: PropTypes.string,\n onClick: PropTypes.func\n })\n};\n\nexport default WizardContents;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _organizeCourses = _interopRequireDefault(require("../../../../molecule/wizard-summary/test/fixtures/organize-courses"));
|
|
7
|
+
|
|
8
|
+
var _default2 = _interopRequireDefault(require("../../../../molecule/course-sections/test/fixtures/default"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
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); }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
props: {
|
|
16
|
+
isLoading: false,
|
|
17
|
+
wizardHeader: {
|
|
18
|
+
title: 'Create a new custom playlist',
|
|
19
|
+
onClick: () => console.log('Close')
|
|
20
|
+
},
|
|
21
|
+
steps: [{
|
|
22
|
+
title: 'General Informations',
|
|
23
|
+
done: true
|
|
24
|
+
}, {
|
|
25
|
+
title: 'Translations',
|
|
26
|
+
done: true
|
|
27
|
+
}, {
|
|
28
|
+
title: 'Assign populations',
|
|
29
|
+
done: true
|
|
30
|
+
}, {
|
|
31
|
+
title: 'Add courses',
|
|
32
|
+
done: true
|
|
33
|
+
}, {
|
|
34
|
+
title: 'Organize courses',
|
|
35
|
+
done: false,
|
|
36
|
+
current: true
|
|
37
|
+
}],
|
|
38
|
+
summary: _organizeCourses.default.props,
|
|
39
|
+
content: _extends(_extends({}, _default2.default.props), {}, {
|
|
40
|
+
type: 'organize-courses'
|
|
41
|
+
}),
|
|
42
|
+
previousStep: {
|
|
43
|
+
label: 'Previous Step',
|
|
44
|
+
onClick: () => console.log('Previous Step')
|
|
45
|
+
},
|
|
46
|
+
nextStep: {
|
|
47
|
+
type: 'publish',
|
|
48
|
+
label: 'Publish',
|
|
49
|
+
onClick: () => console.log('Next Step')
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
};
|
|
53
|
+
exports.default = _default;
|
|
54
|
+
//# sourceMappingURL=playlist-organize-courses.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/wizard-contents/test/fixtures/playlist-organize-courses.js"],"names":["props","isLoading","wizardHeader","title","onClick","console","log","steps","done","current","summary","wizardSummaryOrganizeCourses","content","organizeCoursesForm","type","previousStep","label","nextStep"],"mappings":";;;;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,SAAS,EAAE,KADN;AAELC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,8BADK;AAEZC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFH,KAFT;AAMLC,IAAAA,KAAK,EAAE,CACL;AACEJ,MAAAA,KAAK,EAAE,sBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KADK,EAKL;AACEL,MAAAA,KAAK,EAAE,cADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KALK,EASL;AACEL,MAAAA,KAAK,EAAE,oBADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KATK,EAaL;AACEL,MAAAA,KAAK,EAAE,aADT;AAEEK,MAAAA,IAAI,EAAE;AAFR,KAbK,EAiBL;AACEL,MAAAA,KAAK,EAAE,kBADT;AAEEK,MAAAA,IAAI,EAAE,KAFR;AAGEC,MAAAA,OAAO,EAAE;AAHX,KAjBK,CANF;AA6BLC,IAAAA,OAAO,EAAEC,yBAA6BX,KA7BjC;AA8BLY,IAAAA,OAAO,wBACFC,kBAAoBb,KADlB;AAELc,MAAAA,IAAI,EAAE;AAFD,MA9BF;AAkCLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,eADK;AAEZZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,eAAZ;AAFH,KAlCT;AAsCLW,IAAAA,QAAQ,EAAE;AACRH,MAAAA,IAAI,EAAE,SADE;AAERE,MAAAA,KAAK,EAAE,SAFC;AAGRZ,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,WAAZ;AAHP;AAtCL;AADM,C","sourcesContent":["/* eslint-disable no-console */\nimport wizardSummaryOrganizeCourses from '../../../../molecule/wizard-summary/test/fixtures/organize-courses';\nimport organizeCoursesForm from '../../../../molecule/course-sections/test/fixtures/default';\n\nexport default {\n props: {\n isLoading: false,\n wizardHeader: {\n title: 'Create a new custom playlist',\n onClick: () => console.log('Close')\n },\n steps: [\n {\n title: 'General Informations',\n done: true\n },\n {\n title: 'Translations',\n done: true\n },\n {\n title: 'Assign populations',\n done: true\n },\n {\n title: 'Add courses',\n done: true\n },\n {\n title: 'Organize courses',\n done: false,\n current: true\n }\n ],\n summary: wizardSummaryOrganizeCourses.props,\n content: {\n ...organizeCoursesForm.props,\n type: 'organize-courses'\n },\n previousStep: {\n label: 'Previous Step',\n onClick: () => console.log('Previous Step')\n },\n nextStep: {\n type: 'publish',\n label: 'Publish',\n onClick: () => console.log('Next Step')\n }\n }\n};\n"],"file":"playlist-organize-courses.js"}
|
|
@@ -14,6 +14,8 @@ var _playlistGeneralSettingsCreate = _interopRequireDefault(require("./fixtures/
|
|
|
14
14
|
|
|
15
15
|
var _playlistGeneralSettingsEdit = _interopRequireDefault(require("./fixtures/playlist-general-settings-edit"));
|
|
16
16
|
|
|
17
|
+
var _playlistOrganizeCourses = _interopRequireDefault(require("./fixtures/playlist-organize-courses"));
|
|
18
|
+
|
|
17
19
|
var _playlistPopulationsCreate = _interopRequireDefault(require("./fixtures/playlist-populations-create"));
|
|
18
20
|
|
|
19
21
|
var _playlistTranslateEdit = _interopRequireDefault(require("./fixtures/playlist-translate-edit"));
|
|
@@ -29,6 +31,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
29
31
|
(0, _ava.default)('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', _renderComponent.default, _.default, _playlistAddCoursesCreate.default);
|
|
30
32
|
(0, _ava.default)('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', _renderComponent.default, _.default, _playlistGeneralSettingsCreate.default);
|
|
31
33
|
(0, _ava.default)('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', _renderComponent.default, _.default, _playlistGeneralSettingsEdit.default);
|
|
34
|
+
(0, _ava.default)('Organism › OrganismWizardContents › PlaylistOrganizeCourses › should be rendered', _renderComponent.default, _.default, _playlistOrganizeCourses.default);
|
|
32
35
|
(0, _ava.default)('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', _renderComponent.default, _.default, _playlistPopulationsCreate.default);
|
|
33
36
|
(0, _ava.default)('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', _renderComponent.default, _.default, _playlistTranslateEdit.default);
|
|
34
37
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/wizard-contents/test/fixtures.js"],"names":["t","pass","OrganismWizardContents","propTypes","value","key","not","undefined","renderComponentMacro","fixturePlaylistAddCoursesCreate","fixturePlaylistGeneralSettingsCreate","fixturePlaylistGeneralSettingsEdit","fixturePlaylistPopulationsCreate","fixturePlaylistTranslateEdit"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;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,mFAAL,EAA0FG,wBAA1F,EAAgHN,SAAhH,EAAwIO,iCAAxI;AACA,kBAAK,wFAAL,EAA+FD,wBAA/F,EAAqHN,SAArH,EAA6IQ,sCAA7I;AACA,kBAAK,sFAAL,EAA6FF,wBAA7F,EAAmHN,SAAnH,EAA2IS,oCAA3I;AACA,kBAAK,oFAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/wizard-contents/test/fixtures.js"],"names":["t","pass","OrganismWizardContents","propTypes","value","key","not","undefined","renderComponentMacro","fixturePlaylistAddCoursesCreate","fixturePlaylistGeneralSettingsCreate","fixturePlaylistGeneralSettingsEdit","fixturePlaylistOrganizeCourses","fixturePlaylistPopulationsCreate","fixturePlaylistTranslateEdit"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;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,mFAAL,EAA0FG,wBAA1F,EAAgHN,SAAhH,EAAwIO,iCAAxI;AACA,kBAAK,wFAAL,EAA+FD,wBAA/F,EAAqHN,SAArH,EAA6IQ,sCAA7I;AACA,kBAAK,sFAAL,EAA6FF,wBAA7F,EAAmHN,SAAnH,EAA2IS,oCAA3I;AACA,kBAAK,kFAAL,EAAyFH,wBAAzF,EAA+GN,SAA/G,EAAuIU,gCAAvI;AACA,kBAAK,oFAAL,EAA2FJ,wBAA3F,EAAiHN,SAAjH,EAAyIW,kCAAzI;AACA,kBAAK,gFAAL,EAAuFL,wBAAvF,EAA6GN,SAA7G,EAAqIY,8BAArI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismWizardContents from '..';\nimport fixturePlaylistAddCoursesCreate from './fixtures/playlist-add-courses-create';\nimport fixturePlaylistGeneralSettingsCreate from './fixtures/playlist-general-settings-create';\nimport fixturePlaylistGeneralSettingsEdit from './fixtures/playlist-general-settings-edit';\nimport fixturePlaylistOrganizeCourses from './fixtures/playlist-organize-courses';\nimport fixturePlaylistPopulationsCreate from './fixtures/playlist-populations-create';\nimport fixturePlaylistTranslateEdit from './fixtures/playlist-translate-edit';\n\ntest('Organism › OrganismWizardContents > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismWizardContents.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismWizardContents.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistAddCoursesCreate);\ntest('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsCreate);\ntest('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsEdit);\ntest('Organism › OrganismWizardContents › PlaylistOrganizeCourses › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistOrganizeCourses);\ntest('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);\ntest('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);\n"],"file":"fixtures.js"}
|
package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _playlistOrganizeCourses = _interopRequireDefault(require("../../../../../organism/wizard-contents/test/fixtures/playlist-organize-courses"));
|
|
7
|
+
|
|
8
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
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); }
|
|
13
|
+
|
|
14
|
+
const {
|
|
15
|
+
header,
|
|
16
|
+
items
|
|
17
|
+
} = _default2.default.props;
|
|
18
|
+
const form = _playlistOrganizeCourses.default.props;
|
|
19
|
+
var _default = {
|
|
20
|
+
props: {
|
|
21
|
+
header,
|
|
22
|
+
items,
|
|
23
|
+
notifications: [],
|
|
24
|
+
content: _extends(_extends({}, form), {}, {
|
|
25
|
+
isLoading: false,
|
|
26
|
+
key: 'add-courses',
|
|
27
|
+
type: 'wizard'
|
|
28
|
+
})
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
exports.default = _default;
|
|
32
|
+
//# sourceMappingURL=wizard-organize-courses-playlist.js.map
|
package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js"],"names":["header","items","headerAndMenu","props","form","WizardForm","notifications","content","isLoading","key","type"],"mappings":";;;;;AAAA;;AACA;;;;;;AAEA,MAAM;AAACA,EAAAA,MAAD;AAASC,EAAAA;AAAT,IAAkBC,kBAAcC,KAAtC;AACA,MAAMC,IAAI,GAAGC,iCAAWF,KAAxB;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLH,IAAAA,MADK;AAELC,IAAAA,KAFK;AAGLK,IAAAA,aAAa,EAAE,EAHV;AAILC,IAAAA,OAAO,wBACFH,IADE;AAELI,MAAAA,SAAS,EAAE,KAFN;AAGLC,MAAAA,GAAG,EAAE,aAHA;AAILC,MAAAA,IAAI,EAAE;AAJD;AAJF;AADM,C","sourcesContent":["import WizardForm from '../../../../../organism/wizard-contents/test/fixtures/playlist-organize-courses';\nimport headerAndMenu from './default';\n\nconst {header, items} = headerAndMenu.props;\nconst form = WizardForm.props;\n\nexport default {\n props: {\n header,\n items,\n notifications: [],\n content: {\n ...form,\n isLoading: false,\n key: 'add-courses',\n type: 'wizard'\n }\n }\n};\n"],"file":"wizard-organize-courses-playlist.js"}
|
|
@@ -76,6 +76,8 @@ var _wizardFormCreatePlaylist = _interopRequireDefault(require("./fixtures/wizar
|
|
|
76
76
|
|
|
77
77
|
var _wizardFormEditPlaylist = _interopRequireDefault(require("./fixtures/wizard-form-edit-playlist"));
|
|
78
78
|
|
|
79
|
+
var _wizardOrganizeCoursesPlaylist = _interopRequireDefault(require("./fixtures/wizard-organize-courses-playlist"));
|
|
80
|
+
|
|
79
81
|
var _wizardPopulationsPlaylistWithPopin = _interopRequireDefault(require("./fixtures/wizard-populations-playlist-with-popin"));
|
|
80
82
|
|
|
81
83
|
var _wizardPopulationsPlaylist = _interopRequireDefault(require("./fixtures/wizard-populations-playlist"));
|
|
@@ -124,6 +126,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
124
126
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', _renderComponent.default, _.default, _wizardAddCoursesPlaylist.default);
|
|
125
127
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', _renderComponent.default, _.default, _wizardFormCreatePlaylist.default);
|
|
126
128
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', _renderComponent.default, _.default, _wizardFormEditPlaylist.default);
|
|
129
|
+
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardOrganizeCoursesPlaylist › should be rendered', _renderComponent.default, _.default, _wizardOrganizeCoursesPlaylist.default);
|
|
127
130
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylistWithPopin › should be rendered', _renderComponent.default, _.default, _wizardPopulationsPlaylistWithPopin.default);
|
|
128
131
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', _renderComponent.default, _.default, _wizardPopulationsPlaylist.default);
|
|
129
132
|
(0, _ava.default)('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', _renderComponent.default, _.default, _wizardTranslatePlaylist.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["t","pass","TemplateBackOfficeBrandUpdate","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureListItemsArchived","fixtureListItemsDraft","fixtureListItemsPublishedWithPopin","fixtureListItemsPublished","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers","fixtureWizardAddCoursesPlaylist","fixtureWizardFormCreatePlaylist","fixtureWizardFormEditPlaylist","fixtureWizardPopulationsPlaylistWithPopin","fixtureWizardPopulationsPlaylist","fixtureWizardTranslatePlaylist"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kFAAL,EAAyFA,CAAC,IAAI;AAC5FA,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,4EAA2EF,GAAI,mEAAxG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,qFAAL,EAA4FG,wBAA5F,EAAkHN,SAAlH,EAAiJO,kBAAjJ;AACA,kBAAK,sFAAL,EAA6FD,wBAA7F,EAAmHN,SAAnH,EAAkJQ,mBAAlJ;AACA,kBAAK,uFAAL,EAA8FF,wBAA9F,EAAoHN,SAApH,EAAmJS,oBAAnJ;AACA,kBAAK,kFAAL,EAAyFH,wBAAzF,EAA+GN,SAA/G,EAA8IU,eAA9I;AACA,kBAAK,qFAAL,EAA4FJ,wBAA5F,EAAkHN,SAAlH,EAAiJW,kB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BAA9F,EAAoHN,SAApH,EAAmJ6B,oBAAnJ;AACA,kBAAK,2FAAL,EAAkGvB,wBAAlG,EAAwHN,SAAxH,EAAuJ8B,wBAAvJ;AACA,kBAAK,2FAAL,EAAkGxB,wBAAlG,EAAwHN,SAAxH,EAAuJ+B,wBAAvJ;AACA,kBAAK,uFAAL,EAA8FzB,wBAA9F,EAAoHN,SAApH,EAAmJgC,oBAAnJ;AACA,kBAAK,uFAAL,EAA8F1B,wBAA9F,EAAoHN,SAApH,EAAmJiC,oBAAnJ;AACA,kBAAK,+EAAL,EAAsF3B,wBAAtF,EAA4GN,SAA5G,EAA2IkC,YAA3I;AACA,kBAAK,8FAAL,EAAqG5B,wBAArG,EAA2HN,SAA3H,EAA0JmC,2BAA1J;AACA,kBAAK,iGAAL,EAAwG7B,wBAAxG,EAA8HN,SAA9H,EAA6JoC,8BAA7J;AACA,kBAAK,uFAAL,EAA8F9B,wBAA9F,EAAoHN,SAApH,EAAmJqC,oBAAnJ;AACA,kBAAK,oGAAL,EAA2G/B,wBAA3G,EAAiIN,SAAjI,EAAgKsC,iCAAhK;AACA,kBAAK,oGAAL,EAA2GhC,wBAA3G,EAAiIN,SAAjI,EAAgKuC,iCAAhK;AACA,kBAAK,kGAAL,EAAyGjC,wBAAzG,EAA+HN,SAA/H,EAA8JwC,+BAA9J;AACA,kBAAK,8GAAL,EAAqHlC,wBAArH,EAA2IN,SAA3I,EAA0KyC,2CAA1K;AACA,kBAAK,qGAAL,EAA4GnC,wBAA5G,EAAkIN,SAAlI,EAAiK0C,kCAAjK;AACA,kBAAK,mGAAL,EAA0GpC,wBAA1G,EAAgIN,SAAhI,EAA+J2C,gCAA/J","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureListItemsArchived from './fixtures/list-items-archived';\nimport fixtureListItemsDraft from './fixtures/list-items-draft';\nimport fixtureListItemsPublishedWithPopin from './fixtures/list-items-published-with-popin';\nimport fixtureListItemsPublished from './fixtures/list-items-published';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\nimport fixtureWizardAddCoursesPlaylist from './fixtures/wizard-add-courses-playlist';\nimport fixtureWizardFormCreatePlaylist from './fixtures/wizard-form-create-playlist';\nimport fixtureWizardFormEditPlaylist from './fixtures/wizard-form-edit-playlist';\nimport fixtureWizardPopulationsPlaylistWithPopin from './fixtures/wizard-populations-playlist-with-popin';\nimport fixtureWizardPopulationsPlaylist from './fixtures/wizard-populations-playlist';\nimport fixtureWizardTranslatePlaylist from './fixtures/wizard-translate-playlist';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsArchived › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsArchived);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsDraft › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsDraft);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublishedWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublishedWithPopin);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublished › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublished);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardAddCoursesPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormCreatePlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormEditPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylistWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylistWithPopin);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardTranslatePlaylist);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["t","pass","TemplateBackOfficeBrandUpdate","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAnalytics","fixtureAnimations","fixtureCohortError","fixtureCohort","fixtureDashboard","fixtureDashboardsAnalytics","fixtureDefault","fixtureGeneralSettingsSuccess","fixtureGeneralSettings","fixtureListItemsArchived","fixtureListItemsDraft","fixtureListItemsPublishedWithPopin","fixtureListItemsPublished","fixtureLmsError","fixtureLmsModified","fixtureLmsSuccess","fixtureLms","fixtureLoader","fixtureLookandfeelError","fixtureLookandfeelModified","fixtureLookandfeelPending","fixtureLookandfeelSuccess","fixtureLookandfeel","fixtureManageusersEdit","fixtureManageusersList","fixtureQuickAccess","fixtureSsoActivate","fixtureSso","fixtureUploadusersLoading","fixtureUploadusersSuccessful","fixtureUploadusers","fixtureWizardAddCoursesPlaylist","fixtureWizardFormCreatePlaylist","fixtureWizardFormEditPlaylist","fixtureWizardOrganizeCoursesPlaylist","fixtureWizardPopulationsPlaylistWithPopin","fixtureWizardPopulationsPlaylist","fixtureWizardTranslatePlaylist"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;A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AACA,kBAAK,iGAAL,EAAwG7B,wBAAxG,EAA8HN,SAA9H,EAA6JoC,8BAA7J;AACA,kBAAK,uFAAL,EAA8F9B,wBAA9F,EAAoHN,SAApH,EAAmJqC,oBAAnJ;AACA,kBAAK,oGAAL,EAA2G/B,wBAA3G,EAAiIN,SAAjI,EAAgKsC,iCAAhK;AACA,kBAAK,oGAAL,EAA2GhC,wBAA3G,EAAiIN,SAAjI,EAAgKuC,iCAAhK;AACA,kBAAK,kGAAL,EAAyGjC,wBAAzG,EAA+HN,SAA/H,EAA8JwC,+BAA9J;AACA,kBAAK,yGAAL,EAAgHlC,wBAAhH,EAAsIN,SAAtI,EAAqKyC,sCAArK;AACA,kBAAK,8GAAL,EAAqHnC,wBAArH,EAA2IN,SAA3I,EAA0K0C,2CAA1K;AACA,kBAAK,qGAAL,EAA4GpC,wBAA5G,EAAkIN,SAAlI,EAAiK2C,kCAAjK;AACA,kBAAK,mGAAL,EAA0GrC,wBAA1G,EAAgIN,SAAhI,EAA+J4C,gCAA/J","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateBackOfficeBrandUpdate from '..';\nimport fixtureAnalytics from './fixtures/analytics';\nimport fixtureAnimations from './fixtures/animations';\nimport fixtureCohortError from './fixtures/cohort-error';\nimport fixtureCohort from './fixtures/cohort';\nimport fixtureDashboard from './fixtures/dashboard';\nimport fixtureDashboardsAnalytics from './fixtures/dashboards-analytics';\nimport fixtureDefault from './fixtures/default';\nimport fixtureGeneralSettingsSuccess from './fixtures/general-settings-success';\nimport fixtureGeneralSettings from './fixtures/general-settings';\nimport fixtureListItemsArchived from './fixtures/list-items-archived';\nimport fixtureListItemsDraft from './fixtures/list-items-draft';\nimport fixtureListItemsPublishedWithPopin from './fixtures/list-items-published-with-popin';\nimport fixtureListItemsPublished from './fixtures/list-items-published';\nimport fixtureLmsError from './fixtures/lms-error';\nimport fixtureLmsModified from './fixtures/lms-modified';\nimport fixtureLmsSuccess from './fixtures/lms-success';\nimport fixtureLms from './fixtures/lms';\nimport fixtureLoader from './fixtures/loader';\nimport fixtureLookandfeelError from './fixtures/lookandfeel-error';\nimport fixtureLookandfeelModified from './fixtures/lookandfeel-modified';\nimport fixtureLookandfeelPending from './fixtures/lookandfeel-pending';\nimport fixtureLookandfeelSuccess from './fixtures/lookandfeel-success';\nimport fixtureLookandfeel from './fixtures/lookandfeel';\nimport fixtureManageusersEdit from './fixtures/manageusers-edit';\nimport fixtureManageusersList from './fixtures/manageusers-list';\nimport fixtureQuickAccess from './fixtures/quick-access';\nimport fixtureSsoActivate from './fixtures/sso-activate';\nimport fixtureSso from './fixtures/sso';\nimport fixtureUploadusersLoading from './fixtures/uploadusers-loading';\nimport fixtureUploadusersSuccessful from './fixtures/uploadusers-successful';\nimport fixtureUploadusers from './fixtures/uploadusers';\nimport fixtureWizardAddCoursesPlaylist from './fixtures/wizard-add-courses-playlist';\nimport fixtureWizardFormCreatePlaylist from './fixtures/wizard-form-create-playlist';\nimport fixtureWizardFormEditPlaylist from './fixtures/wizard-form-edit-playlist';\nimport fixtureWizardOrganizeCoursesPlaylist from './fixtures/wizard-organize-courses-playlist';\nimport fixtureWizardPopulationsPlaylistWithPopin from './fixtures/wizard-populations-playlist-with-popin';\nimport fixtureWizardPopulationsPlaylist from './fixtures/wizard-populations-playlist';\nimport fixtureWizardTranslatePlaylist from './fixtures/wizard-translate-playlist';\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateBackOfficeBrandUpdate.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateBackOffice.TemplateBackOfficeBrandUpdate.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Analytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Animations › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureAnimations);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › CohortError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohortError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Cohort › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureCohort);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Dashboard › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboard);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › DashboardsAnalytics › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDashboardsAnalytics);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Default › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureDefault);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettingsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettingsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › GeneralSettings › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureGeneralSettings);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsArchived › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsArchived);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsDraft › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsDraft);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublishedWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublishedWithPopin);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ListItemsPublished › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureListItemsPublished);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LmsSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLmsSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lms › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLms);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Loader › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLoader);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelError › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelError);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelModified › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelModified);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelPending › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelPending);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › LookandfeelSuccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeelSuccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Lookandfeel › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureLookandfeel);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersEdit › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersEdit);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › ManageusersList › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureManageusersList);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › QuickAccess › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureQuickAccess);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › SsoActivate › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSsoActivate);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Sso › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureSso);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersLoading › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersLoading);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › UploadusersSuccessful › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusersSuccessful);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureUploadusers);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardAddCoursesPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormCreatePlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormEditPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardOrganizeCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardOrganizeCoursesPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylistWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylistWithPopin);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylist);\ntest('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardTranslatePlaylist);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.getShadowBoxColorFromPrimary = void 0;
|
|
5
|
+
|
|
6
|
+
var _cssColorFunction = require("css-color-function");
|
|
7
|
+
|
|
8
|
+
// darken the color down to 35% && apply alpha of 25%
|
|
9
|
+
const getShadowBoxColorFromPrimary = primaryColor => (0, _cssColorFunction.convert)(`color(${primaryColor} lightness(35%) a(25%))`);
|
|
10
|
+
|
|
11
|
+
exports.getShadowBoxColorFromPrimary = getShadowBoxColorFromPrimary;
|
|
12
|
+
//# sourceMappingURL=get-shadow-box-color-from-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/get-shadow-box-color-from-primary.js"],"names":["getShadowBoxColorFromPrimary","primaryColor"],"mappings":";;;;;AAAA;;AAEA;AACO,MAAMA,4BAA4B,GAAGC,YAAY,IACtD,+BAAS,SAAQA,YAAa,yBAA9B,CADK","sourcesContent":["import {convert} from 'css-color-function';\n\n// darken the color down to 35% && apply alpha of 25%\nexport const getShadowBoxColorFromPrimary = primaryColor =>\n convert(`color(${primaryColor} lightness(35%) a(25%))`);\n"],"file":"get-shadow-box-color-from-primary.js"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/fp/forEach"));
|
|
6
|
+
|
|
7
|
+
var _getShadowBoxColorFromPrimary = require("../get-shadow-box-color-from-primary");
|
|
8
|
+
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
|
|
11
|
+
(0, _ava.default)('should return transformed colors', t => {
|
|
12
|
+
t.plan(13);
|
|
13
|
+
const expectedOrange = 'rgba(179, 42, 0, 0.25)';
|
|
14
|
+
const expectedRed = 'rgba(179, 0, 0, 0.25)';
|
|
15
|
+
const expectedYellow = 'rgba(179, 140, 0, 0.25)';
|
|
16
|
+
const expectedBlue = 'rgba(0, 68, 179, 0.25)'; // a set of possible primary/brand colors
|
|
17
|
+
|
|
18
|
+
const primaryColors = {
|
|
19
|
+
orange: ['#ff6f43', expectedOrange],
|
|
20
|
+
// original, expected
|
|
21
|
+
orangeRGB: ['rgb(255, 111, 67)', expectedOrange],
|
|
22
|
+
orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],
|
|
23
|
+
red: ['#FF0A0A', expectedRed],
|
|
24
|
+
redRGB: ['rgb(255, 10, 10)', expectedRed],
|
|
25
|
+
redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],
|
|
26
|
+
yellow: ['#ffca0a', expectedYellow],
|
|
27
|
+
yellowRGB: ['rgb(255, 202, 10)', expectedYellow],
|
|
28
|
+
yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],
|
|
29
|
+
blue: ['#0061FF', expectedBlue],
|
|
30
|
+
blueRGB: ['rgb(0, 97, 255)', expectedBlue],
|
|
31
|
+
blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]
|
|
32
|
+
};
|
|
33
|
+
(0, _forEach.default)(color => {
|
|
34
|
+
const [original, expected] = color;
|
|
35
|
+
const boxShadowColor = (0, _getShadowBoxColorFromPrimary.getShadowBoxColorFromPrimary)(original);
|
|
36
|
+
t.is(boxShadowColor, expected);
|
|
37
|
+
}, primaryColors);
|
|
38
|
+
t.pass();
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=get-shadow-box-color-from-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/util/test/get-shadow-box-color-from-primary.js"],"names":["t","plan","expectedOrange","expectedRed","expectedYellow","expectedBlue","primaryColors","orange","orangeRGB","orangeRGBA","red","redRGB","redRGBA","yellow","yellowRGB","yellowRGBA","blue","blueRGB","blueRGBA","color","original","expected","boxShadowColor","is","pass"],"mappings":";;AAAA;;AACA;;AAEA;;;;AAEA,kBAAK,kCAAL,EAAyCA,CAAC,IAAI;AAC5CA,EAAAA,CAAC,CAACC,IAAF,CAAO,EAAP;AACA,QAAMC,cAAc,GAAG,wBAAvB;AACA,QAAMC,WAAW,GAAG,uBAApB;AACA,QAAMC,cAAc,GAAG,yBAAvB;AACA,QAAMC,YAAY,GAAG,wBAArB,CAL4C,CAM5C;;AACA,QAAMC,aAAa,GAAG;AACpBC,IAAAA,MAAM,EAAE,CAAC,SAAD,EAAYL,cAAZ,CADY;AACiB;AACrCM,IAAAA,SAAS,EAAE,CAAC,mBAAD,EAAsBN,cAAtB,CAFS;AAGpBO,IAAAA,UAAU,EAAE,CAAC,uBAAD,EAA0BP,cAA1B,CAHQ;AAIpBQ,IAAAA,GAAG,EAAE,CAAC,SAAD,EAAYP,WAAZ,CAJe;AAKpBQ,IAAAA,MAAM,EAAE,CAAC,kBAAD,EAAqBR,WAArB,CALY;AAMpBS,IAAAA,OAAO,EAAE,CAAC,sBAAD,EAAyBT,WAAzB,CANW;AAOpBU,IAAAA,MAAM,EAAE,CAAC,SAAD,EAAYT,cAAZ,CAPY;AAQpBU,IAAAA,SAAS,EAAE,CAAC,mBAAD,EAAsBV,cAAtB,CARS;AASpBW,IAAAA,UAAU,EAAE,CAAC,uBAAD,EAA0BX,cAA1B,CATQ;AAUpBY,IAAAA,IAAI,EAAE,CAAC,SAAD,EAAYX,YAAZ,CAVc;AAWpBY,IAAAA,OAAO,EAAE,CAAC,iBAAD,EAAoBZ,YAApB,CAXW;AAYpBa,IAAAA,QAAQ,EAAE,CAAC,qBAAD,EAAwBb,YAAxB;AAZU,GAAtB;AAeA,wBAAQc,KAAK,IAAI;AACf,UAAM,CAACC,QAAD,EAAWC,QAAX,IAAuBF,KAA7B;AACA,UAAMG,cAAc,GAAG,gEAA6BF,QAA7B,CAAvB;AACApB,IAAAA,CAAC,CAACuB,EAAF,CAAKD,cAAL,EAAqBD,QAArB;AACD,GAJD,EAIGf,aAJH;AAMAN,EAAAA,CAAC,CAACwB,IAAF;AACD,CA7BD","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/fp/forEach';\n\nimport {getShadowBoxColorFromPrimary} from '../get-shadow-box-color-from-primary';\n\ntest('should return transformed colors', t => {\n t.plan(13);\n const expectedOrange = 'rgba(179, 42, 0, 0.25)';\n const expectedRed = 'rgba(179, 0, 0, 0.25)';\n const expectedYellow = 'rgba(179, 140, 0, 0.25)';\n const expectedBlue = 'rgba(0, 68, 179, 0.25)';\n // a set of possible primary/brand colors\n const primaryColors = {\n orange: ['#ff6f43', expectedOrange], // original, expected\n orangeRGB: ['rgb(255, 111, 67)', expectedOrange],\n orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],\n red: ['#FF0A0A', expectedRed],\n redRGB: ['rgb(255, 10, 10)', expectedRed],\n redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],\n yellow: ['#ffca0a', expectedYellow],\n yellowRGB: ['rgb(255, 202, 10)', expectedYellow],\n yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],\n blue: ['#0061FF', expectedBlue],\n blueRGB: ['rgb(0, 97, 255)', expectedBlue],\n blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]\n };\n\n forEach(color => {\n const [original, expected] = color;\n const boxShadowColor = getShadowBoxColorFromPrimary(original);\n t.is(boxShadowColor, expected);\n }, primaryColors);\n\n t.pass();\n});\n"],"file":"get-shadow-box-color-from-primary.js"}
|
package/lib/variables/colors.css
CHANGED
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
@value cm_blue_50: #f1f6fe;
|
|
31
31
|
@value cm_blue_200: #74A5F6;
|
|
32
32
|
@value cm_blue_600: #0051d6;
|
|
33
|
+
@value cm_blue_900: #06265B;
|
|
33
34
|
@value cm_bleu_article: #365FCD;
|
|
34
35
|
@value cm_grey_50: #FAFAFA;
|
|
36
|
+
@value cm_grey_75: #F4F4F5;
|
|
35
37
|
@value cm_grey_100: #EAEAEB;
|
|
36
38
|
@value cm_grey_150: #E1E1E3;
|
|
37
39
|
@value cm_grey_200: #d7d7da;
|
|
@@ -59,3 +61,4 @@
|
|
|
59
61
|
@value cm_red_video: #E8335E;
|
|
60
62
|
@value cm_violet_podcast: #432ba7;
|
|
61
63
|
@value cm_warning_50: rgba(255, 192, 67, 0.13);
|
|
64
|
+
@value box_shadow_light_dark: rgba(0, 0, 0, 0.12);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "10.5.
|
|
3
|
+
"version": "10.5.7-alpha.10+1fe080234",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -119,5 +119,5 @@
|
|
|
119
119
|
"webpack-hot-middleware": "^2.25.0"
|
|
120
120
|
},
|
|
121
121
|
"author": "CoorpAcademy",
|
|
122
|
-
"gitHead": "
|
|
122
|
+
"gitHead": "1fe08023498ff9260d5cf26e945f43b5f64af962"
|
|
123
123
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/molecule/questions/free-text/test/fixtures/with-default-value.js"],"names":["props","placeholder","defaultValue"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,WAAW,EAAE,uBADR;AAELC,IAAAA,YAAY,EAAE;AAFT;AADM,CAAf","sourcesContent":["export default {\n props: {\n placeholder: 'Type your answer here',\n defaultValue: 'plop!'\n }\n};\n"],"file":"with-default-value.js"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import test from 'ava';
|
|
2
|
-
import forEach from 'lodash/forEach';
|
|
3
|
-
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
|
-
import MoleculeSearch from '..';
|
|
5
|
-
import fixtureDefault from './fixtures/default';
|
|
6
|
-
import fixtureWithValue from './fixtures/with-value';
|
|
7
|
-
test('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
8
|
-
t.pass();
|
|
9
|
-
forEach(MoleculeSearch.propTypes, (value, key) => {
|
|
10
|
-
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
test('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);
|
|
14
|
-
test('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);
|
|
15
|
-
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","MoleculeSearch","fixtureDefault","fixtureWithValue","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,gBAAP,MAA6B,uBAA7B;AAEAL,IAAI,CAAC,yDAAD,EAA4DM,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACAN,EAAAA,OAAO,CAACE,cAAc,CAACK,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;AAOAV,IAAI,CAAC,0DAAD,EAA6DE,oBAA7D,EAAmFC,cAAnF,EAAmGC,cAAnG,CAAJ;AACAJ,IAAI,CAAC,4DAAD,EAA+DE,oBAA/D,EAAqFC,cAArF,EAAqGE,gBAArG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSearch from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Molecule › MoleculeSearch > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);\ntest('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/setup-sections/test/on-drop.js"],"names":["browserEnv","test","React","mount","configure","Adapter","wrappingComponent","SetupSections","style","fixtures","adapter","t","plan","elementToDrag","props","sections","id","elementToDrop","dropHandler","dragged","dropped","is","wrapper","dragStartEvent","preventDefault","pass","dragOverEvent","dragLeaveEvent","dropEvent","find","section","at","simulate","fail"],"mappings":";;;;AAAA,OAAOA,UAAP,MAAuB,aAAvB;AACA,OAAOC,IAAP,MAAiB,KAAjB;AACA,OAAOC,KAAP,MAAkB,OAAlB;AACA,SAAQC,KAAR,EAAeC,SAAf,QAA+B,QAA/B;AAEA,OAAOC,OAAP,MAAoB,yBAApB;AACA,SAAQC,iBAAR,QAAgC,wCAAhC;AACA,OAAOC,aAAP,MAA0B,IAA1B,C,CACA;;AACA,OAAOC,KAAP,MAAkB,2BAAlB;AACA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AAQ,EAA/B,EAAkCC,EAAlC,CAAqC,CAArC,EAAwCC,QAAxC,CAAiD,UAAjD,EAA6DN,aAA7D;AACAJ,EAAAA,OAAO,CAACO,IAAR,CAAc,IAAGrB,KAAK,CAACsB,OAAQ,EAA/B,EAAkCC,EAAlC,CAAqC,CAArC,EAAwCC,QAAxC,CAAiD,WAAjD,EAA8DL,cAA9D;AACAL,EAAAA,OAAO,CAACO,IAAR,CAAc,IAAGrB,KAAK,CAACsB,OAAQ,EAA/B,EAAkCC,EAAlC,CAAqC,CAArC,EAAwCC,QAAxC,CAAiD,UAAjD,EAA6DN,aAA7D;AACAJ,EAAAA,OAAO,CAACO,IAAR,CAAc,IAAGrB,KAAK,CAACsB,OAAQ,EAA/B,EAAkCC,EAAlC,CAAqC,CAArC,EAAwCC,QAAxC,CAAiD,MAAjD,EAAyDJ,SAAzD;AACD,CAzBG,CAAJ","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport {set} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {wrappingComponent} from '../../../test/helpers/render-component';\nimport SetupSections from '..';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from '../../draggable/style.css';\nimport fixtures from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\ntest('should trigger onDrop handler', t => {\n t.plan(7);\n\n const elementToDrag = fixtures.props.sections[0].id;\n const elementToDrop = fixtures.props.sections[2].id;\n\n const dropHandler = (dragged, dropped) => {\n t.is(dropped, elementToDrop);\n t.is(dragged, elementToDrag);\n };\n\n const wrapper = mount(<SetupSections {...fixtures.props} onDrop={dropHandler} />, {\n wrappingComponent\n });\n\n const dragStartEvent = {preventDefault: () => t.pass()};\n const dragOverEvent = {preventDefault: () => t.pass()};\n const dragLeaveEvent = {preventDefault: () => t.pass()};\n const dropEvent = {preventDefault: () => t.pass()};\n\n wrapper.find(`.${style.section}`).at(0).simulate('dragStart', dragStartEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragLeave', dragLeaveEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('drop', dropEvent);\n});\n\ntest('should skip drop event if dragStart is not called', t => {\n t.plan(1);\n\n const dropHandler = (dragged, dropped) => {\n t.fail();\n };\n\n const wrapper = mount(<SetupSections {...fixtures.props} onDrop={dropHandler} />, {\n wrappingComponent\n });\n\n const dropEvent = {preventDefault: () => t.pass()};\n wrapper.find(`.${style.section}`).at(2).simulate('drop', dropEvent);\n});\n\ntest('should skip dragStart event if section id is not defined', t => {\n t.plan(0);\n\n const dropHandler = (dragged, dropped) => {\n t.fail();\n };\n\n const wrapper = mount(\n <SetupSections {...set('sections.0.id', '', fixtures.props)} onDrop={dropHandler} />,\n {\n wrappingComponent\n }\n );\n\n const dragStartEvent = {preventDefault: () => {}};\n const dragOverEvent = {preventDefault: () => {}};\n const dragLeaveEvent = {preventDefault: () => {}};\n const dropEvent = {preventDefault: () => {}};\n\n wrapper.find(`.${style.section}`).at(0).simulate('dragStart', dragStartEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragLeave', dragLeaveEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('drop', dropEvent);\n});\n"],"file":"on-drop.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../../src/molecule/questions/free-text/test/fixtures/with-default-value.js"],"names":["props","placeholder","defaultValue"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,WAAW,EAAE,uBADR;AAELC,IAAAA,YAAY,EAAE;AAFT;AADM,C","sourcesContent":["export default {\n props: {\n placeholder: 'Type your answer here',\n defaultValue: 'plop!'\n }\n};\n"],"file":"with-default-value.js"}
|
|
@@ -1,25 +0,0 @@
|
|
|
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 _withValue = _interopRequireDefault(require("./fixtures/with-value"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
(0, _ava.default)('Molecule › MoleculeSearch > should have valid propTypes', t => {
|
|
18
|
-
t.pass();
|
|
19
|
-
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
-
t.not(value, undefined, `PropType for "Molecule.MoleculeSearch.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
(0, _ava.default)('Molecule › MoleculeSearch › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
-
(0, _ava.default)('Molecule › MoleculeSearch › WithValue › should be rendered', _renderComponent.default, _.default, _withValue.default);
|
|
25
|
-
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/search/test/fixtures.js"],"names":["t","pass","MoleculeSearch","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureWithValue"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,yDAAL,EAAgEA,CAAC,IAAI;AACnEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAeC,SAAvB,EAAkC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAChDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,mDAAkDF,GAAI,mEAA/E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,0DAAL,EAAiEG,wBAAjE,EAAuFN,SAAvF,EAAuGO,gBAAvG;AACA,kBAAK,4DAAL,EAAmED,wBAAnE,EAAyFN,SAAzF,EAAyGQ,kBAAzG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeSearch from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureWithValue from './fixtures/with-value';\n\ntest('Molecule › MoleculeSearch > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeSearch.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeSearch.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeSearch › Default › should be rendered', renderComponentMacro, MoleculeSearch, fixtureDefault);\ntest('Molecule › MoleculeSearch › WithValue › should be rendered', renderComponentMacro, MoleculeSearch, fixtureWithValue);\n"],"file":"fixtures.js"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/setup-sections/test/on-drop.js"],"names":["adapter","Adapter","t","plan","elementToDrag","fixtures","props","sections","id","elementToDrop","dropHandler","dragged","dropped","is","wrapper","wrappingComponent","dragStartEvent","preventDefault","pass","dragOverEvent","dragLeaveEvent","dropEvent","find","style","section","at","simulate","fail"],"mappings":";;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AAEA;;AACA;;;;;;AAEA;AACA,uBAAU;AAACA,EAAAA,OAAO,EAAE,IAAIC,2BAAJ;AAAV,CA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AA8DN,cAA9D;AACAN,EAAAA,OAAO,CAACQ,IAAR,CAAc,IAAGC,eAAMC,OAAQ,EAA/B,EAAkCC,EAAlC,CAAqC,CAArC,EAAwCC,QAAxC,CAAiD,UAAjD,EAA6DP,aAA7D;AACAL,EAAAA,OAAO,CAACQ,IAAR,CAAc,IAAGC,eAAMC,OAAQ,EAA/B,EAAkCC,EAAlC,CAAqC,CAArC,EAAwCC,QAAxC,CAAiD,MAAjD,EAAyDL,SAAzD;AACD,CAzBD","sourcesContent":["import browserEnv from 'browser-env';\nimport test from 'ava';\nimport React from 'react';\nimport {mount, configure} from 'enzyme';\nimport {set} from 'lodash/fp';\nimport Adapter from 'enzyme-adapter-react-16';\nimport {wrappingComponent} from '../../../test/helpers/render-component';\nimport SetupSections from '..';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from '../../draggable/style.css';\nimport fixtures from './fixtures/default';\n\nbrowserEnv();\nconfigure({adapter: new Adapter()});\n\ntest('should trigger onDrop handler', t => {\n t.plan(7);\n\n const elementToDrag = fixtures.props.sections[0].id;\n const elementToDrop = fixtures.props.sections[2].id;\n\n const dropHandler = (dragged, dropped) => {\n t.is(dropped, elementToDrop);\n t.is(dragged, elementToDrag);\n };\n\n const wrapper = mount(<SetupSections {...fixtures.props} onDrop={dropHandler} />, {\n wrappingComponent\n });\n\n const dragStartEvent = {preventDefault: () => t.pass()};\n const dragOverEvent = {preventDefault: () => t.pass()};\n const dragLeaveEvent = {preventDefault: () => t.pass()};\n const dropEvent = {preventDefault: () => t.pass()};\n\n wrapper.find(`.${style.section}`).at(0).simulate('dragStart', dragStartEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragLeave', dragLeaveEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('drop', dropEvent);\n});\n\ntest('should skip drop event if dragStart is not called', t => {\n t.plan(1);\n\n const dropHandler = (dragged, dropped) => {\n t.fail();\n };\n\n const wrapper = mount(<SetupSections {...fixtures.props} onDrop={dropHandler} />, {\n wrappingComponent\n });\n\n const dropEvent = {preventDefault: () => t.pass()};\n wrapper.find(`.${style.section}`).at(2).simulate('drop', dropEvent);\n});\n\ntest('should skip dragStart event if section id is not defined', t => {\n t.plan(0);\n\n const dropHandler = (dragged, dropped) => {\n t.fail();\n };\n\n const wrapper = mount(\n <SetupSections {...set('sections.0.id', '', fixtures.props)} onDrop={dropHandler} />,\n {\n wrappingComponent\n }\n );\n\n const dragStartEvent = {preventDefault: () => {}};\n const dragOverEvent = {preventDefault: () => {}};\n const dragLeaveEvent = {preventDefault: () => {}};\n const dropEvent = {preventDefault: () => {}};\n\n wrapper.find(`.${style.section}`).at(0).simulate('dragStart', dragStartEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(0).simulate('dragLeave', dragLeaveEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('dragOver', dragOverEvent);\n wrapper.find(`.${style.section}`).at(2).simulate('drop', dropEvent);\n});\n"],"file":"on-drop.js"}
|