@coorpacademy/components 10.13.14 → 10.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/button-link-icon-only/test/fixtures.js +0 -2
- package/es/atom/button-link-icon-only/test/fixtures.js.map +1 -1
- package/es/atom/drag-and-drop/index.js +8 -4
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/error.js +3 -1
- package/es/atom/drag-and-drop/test/fixtures/error.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures.js +0 -8
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/image-upload/test/fixtures.js +2 -4
- package/es/atom/image-upload/test/fixtures.js.map +1 -1
- package/es/atom/review-presentation/index.js +98 -0
- package/es/atom/review-presentation/index.js.map +1 -0
- package/es/atom/review-presentation/style.css +152 -0
- package/es/atom/review-presentation/test/fixtures/default.js +27 -0
- package/es/atom/review-presentation/test/fixtures/default.js.map +1 -0
- package/es/atom/select/test/fixtures.js +0 -4
- package/es/atom/select/test/fixtures.js.map +1 -1
- package/es/molecule/brand-form-group/test/fixtures.js +0 -2
- package/es/molecule/brand-form-group/test/fixtures.js.map +1 -1
- package/es/molecule/card/test/fixtures.js +0 -2
- package/es/molecule/card/test/fixtures.js.map +1 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +17 -0
- package/es/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/es/molecule/drag-and-drop-wrapper/index.js +3 -8
- package/es/molecule/drag-and-drop-wrapper/index.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js +1 -5
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +3 -2
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js +1 -1
- package/es/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js.map +1 -1
- package/es/molecule/external-content-viewer/index.js +3 -2
- package/es/molecule/external-content-viewer/index.js.map +1 -1
- package/es/molecule/questions/free-text/test/fixtures.js +2 -4
- package/es/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/es/molecule/setup-slide/test/fixtures.js +0 -2
- package/es/molecule/setup-slide/test/fixtures.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures.js +0 -2
- package/es/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/es/organism/brand-form/test/fixtures/wizard-certification.js +2 -2
- package/es/organism/brand-form/test/fixtures/wizard-certification.js.map +1 -1
- package/es/organism/brand-form/test/fixtures.js +0 -2
- package/es/organism/brand-form/test/fixtures.js.map +1 -1
- package/es/organism/course-selection/test/fixtures.js +0 -2
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/rewards-form/test/fixtures/default.js +2 -2
- package/es/organism/rewards-form/test/fixtures/default.js.map +1 -1
- package/es/organism/search-and-chips-results/test/fixtures.js +0 -2
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures.js +0 -6
- package/es/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/es/template/app-player/popin-end/test/fixtures.js +0 -2
- package/es/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/test/fixtures.js +0 -4
- package/es/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/es/template/external-course/index.js +3 -1
- package/es/template/external-course/index.js.map +1 -1
- package/es/template/external-course/test/fixtures/pdf-mobile.js +10 -0
- package/es/template/external-course/test/fixtures/pdf-mobile.js.map +1 -0
- package/es/template/external-course/test/fixtures/pdf-no-mobile.js +18 -0
- package/es/template/external-course/test/fixtures/pdf-no-mobile.js.map +1 -0
- package/lib/atom/button-link-icon-only/test/fixtures.js +0 -3
- package/lib/atom/button-link-icon-only/test/fixtures.js.map +1 -1
- package/lib/atom/drag-and-drop/index.js +8 -4
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/error.js +3 -1
- package/lib/atom/drag-and-drop/test/fixtures/error.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures.js +0 -12
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures.js +3 -6
- package/lib/atom/image-upload/test/fixtures.js.map +1 -1
- package/lib/atom/review-presentation/index.js +112 -0
- package/lib/atom/review-presentation/index.js.map +1 -0
- package/lib/atom/review-presentation/style.css +152 -0
- package/lib/atom/review-presentation/test/fixtures/default.js +33 -0
- package/lib/atom/review-presentation/test/fixtures/default.js.map +1 -0
- package/lib/atom/select/test/fixtures.js +0 -6
- package/lib/atom/select/test/fixtures.js.map +1 -1
- package/lib/molecule/brand-form-group/test/fixtures.js +0 -3
- package/lib/molecule/brand-form-group/test/fixtures.js.map +1 -1
- package/lib/molecule/card/test/fixtures.js +0 -3
- package/lib/molecule/card/test/fixtures.js.map +1 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +28 -0
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +1 -0
- package/lib/molecule/drag-and-drop-wrapper/index.js +3 -8
- package/lib/molecule/drag-and-drop-wrapper/index.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js +1 -6
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/default.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js +4 -2
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops.js.map +1 -1
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js +1 -1
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures/without-checkbox.js.map +1 -1
- package/lib/molecule/external-content-viewer/index.js +3 -2
- package/lib/molecule/external-content-viewer/index.js.map +1 -1
- package/lib/molecule/questions/free-text/test/fixtures.js +2 -5
- package/lib/molecule/questions/free-text/test/fixtures.js.map +1 -1
- package/lib/molecule/setup-slide/test/fixtures.js +0 -3
- package/lib/molecule/setup-slide/test/fixtures.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures.js +0 -3
- package/lib/molecule/wizard-summary/test/fixtures.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures/wizard-certification.js.map +1 -1
- package/lib/organism/brand-form/test/fixtures.js +0 -3
- package/lib/organism/brand-form/test/fixtures.js.map +1 -1
- package/lib/organism/course-selection/test/fixtures.js +0 -3
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/rewards-form/test/fixtures/default.js +2 -2
- package/lib/organism/rewards-form/test/fixtures/default.js.map +1 -1
- package/lib/organism/search-and-chips-results/test/fixtures.js +0 -3
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures.js +0 -9
- package/lib/organism/wizard-contents/test/fixtures.js.map +1 -1
- package/lib/template/app-player/popin-end/test/fixtures.js +0 -3
- package/lib/template/app-player/popin-end/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/test/fixtures.js +0 -6
- package/lib/template/back-office/brand-update/test/fixtures.js.map +1 -1
- package/lib/template/external-course/index.js +3 -1
- package/lib/template/external-course/index.js.map +1 -1
- package/lib/template/external-course/test/fixtures/pdf-mobile.js +15 -0
- package/lib/template/external-course/test/fixtures/pdf-mobile.js.map +1 -0
- package/lib/template/external-course/test/fixtures/pdf-no-mobile.js +23 -0
- package/lib/template/external-course/test/fixtures/pdf-no-mobile.js.map +1 -0
- package/package.json +3 -3
- package/es/atom/card-image-preview/test/fixtures.js +0 -15
- package/es/atom/card-image-preview/test/fixtures.js.map +0 -1
- package/es/atom/checkbox-with-title/test/fixtures.js +0 -15
- package/es/atom/checkbox-with-title/test/fixtures.js.map +0 -1
- package/es/atom/input-text-with-title/test/fixtures.js +0 -15
- package/es/atom/input-text-with-title/test/fixtures.js.map +0 -1
- package/es/atom/review-header-step-item/test/fixtures.js +0 -19
- package/es/atom/review-header-step-item/test/fixtures.js.map +0 -1
- package/es/molecule/course-section/test/fixtures.js +0 -21
- package/es/molecule/course-section/test/fixtures.js.map +0 -1
- package/es/molecule/course-sections/test/fixtures.js +0 -17
- package/es/molecule/course-sections/test/fixtures.js.map +0 -1
- package/es/molecule/dashboard/review-banner/test/fixtures.js +0 -13
- package/es/molecule/dashboard/review-banner/test/fixtures.js.map +0 -1
- package/es/molecule/drag-and-drop-wrapper/test/fixtures.js +0 -17
- package/es/molecule/drag-and-drop-wrapper/test/fixtures.js.map +0 -1
- package/es/molecule/draggable/test/fixtures.js +0 -13
- package/es/molecule/draggable/test/fixtures.js.map +0 -1
- package/es/molecule/draggable-list/test/fixtures.js +0 -15
- package/es/molecule/draggable-list/test/fixtures.js.map +0 -1
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -15
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
- package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js +0 -15
- package/es/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +0 -1
- package/es/molecule/list-badges/test/fixtures.js +0 -19
- package/es/molecule/list-badges/test/fixtures.js.map +0 -1
- package/es/molecule/review-correction-popin/test/fixtures.js +0 -15
- package/es/molecule/review-correction-popin/test/fixtures.js.map +0 -1
- package/es/molecule/review-header-steps/test/fixtures.js +0 -23
- package/es/molecule/review-header-steps/test/fixtures.js.map +0 -1
- package/es/molecule/skill-card/test/fixtures.js +0 -19
- package/es/molecule/skill-card/test/fixtures.js.map +0 -1
- package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js +0 -19
- package/es/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +0 -1
- package/es/organism/playlist-translation/test/fixtures.js +0 -15
- package/es/organism/playlist-translation/test/fixtures.js.map +0 -1
- package/es/organism/review-header/test/fixtures.js +0 -23
- package/es/organism/review-header/test/fixtures.js.map +0 -1
- package/es/organism/rewards-form/test/fixtures.js +0 -19
- package/es/organism/rewards-form/test/fixtures.js.map +0 -1
- package/lib/atom/card-image-preview/test/fixtures.js +0 -25
- package/lib/atom/card-image-preview/test/fixtures.js.map +0 -1
- package/lib/atom/checkbox-with-title/test/fixtures.js +0 -25
- package/lib/atom/checkbox-with-title/test/fixtures.js.map +0 -1
- package/lib/atom/input-text-with-title/test/fixtures.js +0 -25
- package/lib/atom/input-text-with-title/test/fixtures.js.map +0 -1
- package/lib/atom/review-header-step-item/test/fixtures.js +0 -31
- package/lib/atom/review-header-step-item/test/fixtures.js.map +0 -1
- package/lib/molecule/course-section/test/fixtures.js +0 -34
- package/lib/molecule/course-section/test/fixtures.js.map +0 -1
- package/lib/molecule/course-sections/test/fixtures.js +0 -28
- package/lib/molecule/course-sections/test/fixtures.js.map +0 -1
- package/lib/molecule/dashboard/review-banner/test/fixtures.js +0 -22
- package/lib/molecule/dashboard/review-banner/test/fixtures.js.map +0 -1
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js +0 -28
- package/lib/molecule/drag-and-drop-wrapper/test/fixtures.js.map +0 -1
- package/lib/molecule/draggable/test/fixtures.js +0 -22
- package/lib/molecule/draggable/test/fixtures.js.map +0 -1
- package/lib/molecule/draggable-list/test/fixtures.js +0 -25
- package/lib/molecule/draggable-list/test/fixtures.js.map +0 -1
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +0 -25
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +0 -1
- package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js +0 -25
- package/lib/molecule/input-text-with-titled-checkbox/test/fixtures.js.map +0 -1
- package/lib/molecule/list-badges/test/fixtures.js +0 -31
- package/lib/molecule/list-badges/test/fixtures.js.map +0 -1
- package/lib/molecule/review-correction-popin/test/fixtures.js +0 -25
- package/lib/molecule/review-correction-popin/test/fixtures.js.map +0 -1
- package/lib/molecule/review-header-steps/test/fixtures.js +0 -37
- package/lib/molecule/review-header-steps/test/fixtures.js.map +0 -1
- package/lib/molecule/skill-card/test/fixtures.js +0 -31
- package/lib/molecule/skill-card/test/fixtures.js.map +0 -1
- package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js +0 -31
- package/lib/molecule/title-and-checkbox-wrapper/test/fixtures.js.map +0 -1
- package/lib/organism/playlist-translation/test/fixtures.js +0 -25
- package/lib/organism/playlist-translation/test/fixtures.js.map +0 -1
- package/lib/organism/review-header/test/fixtures.js +0 -37
- package/lib/organism/review-header/test/fixtures.js.map +0 -1
- package/lib/organism/rewards-form/test/fixtures.js +0 -31
- package/lib/organism/rewards-form/test/fixtures.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/organism/rewards-form/test/fixtures/default.js"],"names":["inputText","CheckboxWithTitle","singleDragAndDrop","doubleDragAndDrop","props","items","child","childType","title","undefined","checkboxWithTitle"
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/rewards-form/test/fixtures/default.js"],"names":["inputText","CheckboxWithTitle","singleDragAndDrop","doubleDragAndDrop","props","items","child","childType","title","undefined","checkboxWithTitle"],"mappings":";;AAAA,OAAOA,SAAP,MAAsB,4DAAtB;AACA,OAAOC,iBAAP,MAA8B,4DAA9B;AACA,OAAOC,iBAAP,MAA8B,kEAA9B;AACA,OAAOC,iBAAP,MAA8B,6EAA9B;AAEA,eAAe;AACbC,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,CACL;AACEC,MAAAA,KAAK,wBAAMN,SAAS,CAACI,KAAhB;AAAuBG,QAAAA,SAAS,EAAE,YAAlC;AAAgDC,QAAAA,KAAK,EAAEC;AAAvD,QADP;AAEEC,MAAAA,iBAAiB,EAAET,iBAAiB,CAACG;AAFvC,KADK,EAKL;AACEE,MAAAA,KAAK,wBACAJ,iBAAiB,CAACE,KADlB;AAEHG,QAAAA,SAAS,EAAE,uBAFR;AAGHC,QAAAA,KAAK,EAAE;AAHJ,QADP;AAMEE,MAAAA,iBAAiB,EAAE;AAACF,QAAAA,KAAK,EAAE;AAAR;AANrB,KALK,EAaL;AACEF,MAAAA,KAAK,wBAAMH,iBAAiB,CAACC,KAAxB;AAA+BG,QAAAA,SAAS,EAAE;AAA1C,QADP;AAEEG,MAAAA,iBAAiB,EAAE;AAACF,QAAAA,KAAK,EAAE;AAAR;AAFrB,KAbK;AADF;AADM,CAAf","sourcesContent":["import inputText from '../../../../atom/input-text-with-title/test/fixtures/error';\nimport CheckboxWithTitle from '../../../../atom/checkbox-with-title/test/fixtures/checked';\nimport singleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/default';\nimport doubleDragAndDrop from '../../../../molecule/drag-and-drop-wrapper/test/fixtures/two-drag-and-drops';\n\nexport default {\n props: {\n items: [\n {\n child: {...inputText.props, childType: 'input-text', title: undefined},\n checkboxWithTitle: CheckboxWithTitle.props\n },\n {\n child: {\n ...singleDragAndDrop.props,\n childType: 'drag-and-drop-wrapper',\n title: 'Create badge'\n },\n checkboxWithTitle: {title: 'Create badge'}\n },\n {\n child: {...doubleDragAndDrop.props, childType: 'drag-and-drop-wrapper'},\n checkboxWithTitle: {title: 'Create diploma'}\n }\n ]\n }\n};\n"],"file":"default.js"}
|
|
@@ -5,7 +5,6 @@ import OrganismSearchAndChipsResults from '..';
|
|
|
5
5
|
import fixtureDefault from './fixtures/default';
|
|
6
6
|
import fixtureEmpty from './fixtures/empty';
|
|
7
7
|
import fixtureFiltered from './fixtures/filtered';
|
|
8
|
-
import fixtureLoading from './fixtures/loading';
|
|
9
8
|
import fixtureSortedSelected from './fixtures/sorted-selected';
|
|
10
9
|
import fixtureUnsortedSelected from './fixtures/unsorted-selected';
|
|
11
10
|
test('Organism › OrganismSearchAndChipsResults > should have valid propTypes', t => {
|
|
@@ -17,7 +16,6 @@ test('Organism › OrganismSearchAndChipsResults > should have valid propTypes',
|
|
|
17
16
|
test('Organism › OrganismSearchAndChipsResults › Default › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureDefault);
|
|
18
17
|
test('Organism › OrganismSearchAndChipsResults › Empty › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureEmpty);
|
|
19
18
|
test('Organism › OrganismSearchAndChipsResults › Filtered › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureFiltered);
|
|
20
|
-
test('Organism › OrganismSearchAndChipsResults › Loading › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureLoading);
|
|
21
19
|
test('Organism › OrganismSearchAndChipsResults › SortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureSortedSelected);
|
|
22
20
|
test('Organism › OrganismSearchAndChipsResults › UnsortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureUnsortedSelected);
|
|
23
21
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/search-and-chips-results/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismSearchAndChipsResults","fixtureDefault","fixtureEmpty","fixtureFiltered","
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/search-and-chips-results/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismSearchAndChipsResults","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureUnsortedSelected","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,YAAP,MAAyB,kBAAzB;AACA,OAAOC,eAAP,MAA4B,qBAA5B;AACA,OAAOC,qBAAP,MAAkC,4BAAlC;AACA,OAAOC,uBAAP,MAAoC,8BAApC;AAEAR,IAAI,CAAC,wEAAD,EAA2ES,CAAC,IAAI;AAClFA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,6BAA6B,CAACQ,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC/DJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,kEAAiEF,GAAI,mEAA9F;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,yEAAD,EAA4EE,oBAA5E,EAAkGC,6BAAlG,EAAiIC,cAAjI,CAAJ;AACAJ,IAAI,CAAC,uEAAD,EAA0EE,oBAA1E,EAAgGC,6BAAhG,EAA+HE,YAA/H,CAAJ;AACAL,IAAI,CAAC,0EAAD,EAA6EE,oBAA7E,EAAmGC,6BAAnG,EAAkIG,eAAlI,CAAJ;AACAN,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,6BAAzG,EAAwII,qBAAxI,CAAJ;AACAP,IAAI,CAAC,kFAAD,EAAqFE,oBAArF,EAA2GC,6BAA3G,EAA0IK,uBAA1I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismSearchAndChipsResults from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismSearchAndChipsResults > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismSearchAndChipsResults.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismSearchAndChipsResults.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismSearchAndChipsResults › Default › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureDefault);\ntest('Organism › OrganismSearchAndChipsResults › Empty › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureEmpty);\ntest('Organism › OrganismSearchAndChipsResults › Filtered › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureFiltered);\ntest('Organism › OrganismSearchAndChipsResults › SortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureSortedSelected);\ntest('Organism › OrganismSearchAndChipsResults › UnsortedSelected › should be rendered', renderComponentMacro, OrganismSearchAndChipsResults, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
|
|
@@ -2,12 +2,9 @@ import test from 'ava';
|
|
|
2
2
|
import forEach from 'lodash/forEach';
|
|
3
3
|
import renderComponentMacro from '../../../test/helpers/render-component';
|
|
4
4
|
import OrganismWizardContents from '..';
|
|
5
|
-
import fixtureCertificationGeneralSettingsEdit from './fixtures/certification-general-settings-edit';
|
|
6
|
-
import fixtureCertificationRewards from './fixtures/certification-rewards';
|
|
7
5
|
import fixturePlaylistAddCoursesCreate from './fixtures/playlist-add-courses-create';
|
|
8
6
|
import fixturePlaylistGeneralSettingsCreate from './fixtures/playlist-general-settings-create';
|
|
9
7
|
import fixturePlaylistGeneralSettingsEdit from './fixtures/playlist-general-settings-edit';
|
|
10
|
-
import fixturePlaylistOrganizeCourses from './fixtures/playlist-organize-courses';
|
|
11
8
|
import fixturePlaylistPopulationsCreate from './fixtures/playlist-populations-create';
|
|
12
9
|
import fixturePlaylistTranslateEdit from './fixtures/playlist-translate-edit';
|
|
13
10
|
test('Organism › OrganismWizardContents > should have valid propTypes', t => {
|
|
@@ -16,12 +13,9 @@ test('Organism › OrganismWizardContents > should have valid propTypes', t => {
|
|
|
16
13
|
t.not(value, undefined, `PropType for "Organism.OrganismWizardContents.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
17
14
|
});
|
|
18
15
|
});
|
|
19
|
-
test('Organism › OrganismWizardContents › CertificationGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixtureCertificationGeneralSettingsEdit);
|
|
20
|
-
test('Organism › OrganismWizardContents › CertificationRewards › should be rendered', renderComponentMacro, OrganismWizardContents, fixtureCertificationRewards);
|
|
21
16
|
test('Organism › OrganismWizardContents › PlaylistAddCoursesCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistAddCoursesCreate);
|
|
22
17
|
test('Organism › OrganismWizardContents › PlaylistGeneralSettingsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsCreate);
|
|
23
18
|
test('Organism › OrganismWizardContents › PlaylistGeneralSettingsEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistGeneralSettingsEdit);
|
|
24
|
-
test('Organism › OrganismWizardContents › PlaylistOrganizeCourses › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistOrganizeCourses);
|
|
25
19
|
test('Organism › OrganismWizardContents › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);
|
|
26
20
|
test('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);
|
|
27
21
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/wizard-contents/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismWizardContents","
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/wizard-contents/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","OrganismWizardContents","fixturePlaylistAddCoursesCreate","fixturePlaylistGeneralSettingsCreate","fixturePlaylistGeneralSettingsEdit","fixturePlaylistPopulationsCreate","fixturePlaylistTranslateEdit","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,wCAAjC;AACA,OAAOC,sBAAP,MAAmC,IAAnC;AACA,OAAOC,+BAAP,MAA4C,wCAA5C;AACA,OAAOC,oCAAP,MAAiD,6CAAjD;AACA,OAAOC,kCAAP,MAA+C,2CAA/C;AACA,OAAOC,gCAAP,MAA6C,wCAA7C;AACA,OAAOC,4BAAP,MAAyC,oCAAzC;AAEAR,IAAI,CAAC,iEAAD,EAAoES,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACAT,EAAAA,OAAO,CAACE,sBAAsB,CAACQ,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDJ,IAAAA,CAAC,CAACK,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFM,CAAP;AAGD,CALG,CAAJ;AAOAb,IAAI,CAAC,mFAAD,EAAsFE,oBAAtF,EAA4GC,sBAA5G,EAAoIC,+BAApI,CAAJ;AACAJ,IAAI,CAAC,wFAAD,EAA2FE,oBAA3F,EAAiHC,sBAAjH,EAAyIE,oCAAzI,CAAJ;AACAL,IAAI,CAAC,sFAAD,EAAyFE,oBAAzF,EAA+GC,sBAA/G,EAAuIG,kCAAvI,CAAJ;AACAN,IAAI,CAAC,oFAAD,EAAuFE,oBAAvF,EAA6GC,sBAA7G,EAAqII,gCAArI,CAAJ;AACAP,IAAI,CAAC,gFAAD,EAAmFE,oBAAnF,EAAyGC,sBAAzG,EAAiIK,4BAAjI,CAAJ","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 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 › PlaylistPopulationsCreate › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistPopulationsCreate);\ntest('Organism › OrganismWizardContents › PlaylistTranslateEdit › should be rendered', renderComponentMacro, OrganismWizardContents, fixturePlaylistTranslateEdit);\n"],"file":"fixtures.js"}
|
|
@@ -21,7 +21,6 @@ import fixtureSimpleAction from './fixtures/simple-action';
|
|
|
21
21
|
import fixtureSubscribe from './fixtures/subscribe';
|
|
22
22
|
import fixtureWithLoadingRecommendations from './fixtures/with-loading-recommendations';
|
|
23
23
|
import fixtureWithRecommendations from './fixtures/with-recommendations';
|
|
24
|
-
import fixtureWithoutRecommendation from './fixtures/without-recommendation';
|
|
25
24
|
test('TemplateAppPlayer › TemplateAppPlayerPopinEnd > should have valid propTypes', t => {
|
|
26
25
|
t.pass();
|
|
27
26
|
forEach(TemplateAppPlayerPopinEnd.propTypes, (value, key) => {
|
|
@@ -47,5 +46,4 @@ test('TemplateAppPlayer › TemplateAppPlayerPopinEnd › SimpleAction › shoul
|
|
|
47
46
|
test('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Subscribe › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureSubscribe);
|
|
48
47
|
test('TemplateAppPlayer › TemplateAppPlayerPopinEnd › WithLoadingRecommendations › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureWithLoadingRecommendations);
|
|
49
48
|
test('TemplateAppPlayer › TemplateAppPlayerPopinEnd › WithRecommendations › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureWithRecommendations);
|
|
50
|
-
test('TemplateAppPlayer › TemplateAppPlayerPopinEnd › WithoutRecommendation › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureWithoutRecommendation);
|
|
51
49
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/template/app-player/popin-end/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateAppPlayerPopinEnd","fixtureAdaptive","fixtureArabicCorrect","fixtureArabicNextLevelAdaptiveImg","fixtureArabicWithRecommendations","fixtureCommentIsLoading","fixtureCommentSent","fixtureComment","fixtureCorrect","fixtureDefault","fixtureFail","fixtureInfiniteLives","fixtureLoading","fixtureNegativeRank","fixtureNextCourse","fixtureNextLevelAdaptiveImg","fixtureSimpleAction","fixtureSubscribe","fixtureWithLoadingRecommendations","fixtureWithRecommendations","
|
|
1
|
+
{"version":3,"sources":["../../../../../src/template/app-player/popin-end/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateAppPlayerPopinEnd","fixtureAdaptive","fixtureArabicCorrect","fixtureArabicNextLevelAdaptiveImg","fixtureArabicWithRecommendations","fixtureCommentIsLoading","fixtureCommentSent","fixtureComment","fixtureCorrect","fixtureDefault","fixtureFail","fixtureInfiniteLives","fixtureLoading","fixtureNegativeRank","fixtureNextCourse","fixtureNextLevelAdaptiveImg","fixtureSimpleAction","fixtureSubscribe","fixtureWithLoadingRecommendations","fixtureWithRecommendations","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,yBAAP,MAAs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AI,CAAC,0FAAD,EAA6FE,oBAA7F,EAAmHC,yBAAnH,EAA8ImB,0BAA9I,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../../test/helpers/render-component';\nimport TemplateAppPlayerPopinEnd from '..';\nimport fixtureAdaptive from './fixtures/adaptive';\nimport fixtureArabicCorrect from './fixtures/arabic-correct';\nimport fixtureArabicNextLevelAdaptiveImg from './fixtures/arabic-next-level-adaptive-img';\nimport fixtureArabicWithRecommendations from './fixtures/arabic-with-recommendations';\nimport fixtureCommentIsLoading from './fixtures/comment-is-loading';\nimport fixtureCommentSent from './fixtures/comment-sent';\nimport fixtureComment from './fixtures/comment';\nimport fixtureCorrect from './fixtures/correct';\nimport fixtureDefault from './fixtures/default';\nimport fixtureFail from './fixtures/fail';\nimport fixtureInfiniteLives from './fixtures/infinite-lives';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureNegativeRank from './fixtures/negative-rank';\nimport fixtureNextCourse from './fixtures/next-course';\nimport fixtureNextLevelAdaptiveImg from './fixtures/next-level-adaptive-img';\nimport fixtureSimpleAction from './fixtures/simple-action';\nimport fixtureSubscribe from './fixtures/subscribe';\nimport fixtureWithLoadingRecommendations from './fixtures/with-loading-recommendations';\nimport fixtureWithRecommendations from './fixtures/with-recommendations';\n\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd > should have valid propTypes', t => {\n t.pass();\n forEach(TemplateAppPlayerPopinEnd.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"TemplateAppPlayer.TemplateAppPlayerPopinEnd.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Adaptive › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureAdaptive);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › ArabicCorrect › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureArabicCorrect);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › ArabicNextLevelAdaptiveImg › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureArabicNextLevelAdaptiveImg);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › ArabicWithRecommendations › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureArabicWithRecommendations);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › CommentIsLoading › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureCommentIsLoading);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › CommentSent › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureCommentSent);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Comment › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureComment);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Correct › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureCorrect);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Default › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureDefault);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Fail › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureFail);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › InfiniteLives › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureInfiniteLives);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Loading › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureLoading);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › NegativeRank › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureNegativeRank);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › NextCourse › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureNextCourse);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › NextLevelAdaptiveImg › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureNextLevelAdaptiveImg);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › SimpleAction › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureSimpleAction);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › Subscribe › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureSubscribe);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › WithLoadingRecommendations › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureWithLoadingRecommendations);\ntest('TemplateAppPlayer › TemplateAppPlayerPopinEnd › WithRecommendations › should be rendered', renderComponentMacro, TemplateAppPlayerPopinEnd, fixtureWithRecommendations);\n"],"file":"fixtures.js"}
|
|
@@ -36,10 +36,8 @@ import fixtureUploadusers from './fixtures/uploadusers';
|
|
|
36
36
|
import fixtureWizardAddCoursesPlaylist from './fixtures/wizard-add-courses-playlist';
|
|
37
37
|
import fixtureWizardFormCreatePlaylist from './fixtures/wizard-form-create-playlist';
|
|
38
38
|
import fixtureWizardFormEditPlaylist from './fixtures/wizard-form-edit-playlist';
|
|
39
|
-
import fixtureWizardOrganizeCoursesPlaylist from './fixtures/wizard-organize-courses-playlist';
|
|
40
39
|
import fixtureWizardPopulationsPlaylistWithPopin from './fixtures/wizard-populations-playlist-with-popin';
|
|
41
40
|
import fixtureWizardPopulationsPlaylist from './fixtures/wizard-populations-playlist';
|
|
42
|
-
import fixtureWizardRewardsCertification from './fixtures/wizard-rewards-certification';
|
|
43
41
|
import fixtureWizardTranslatePlaylist from './fixtures/wizard-translate-playlist';
|
|
44
42
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate > should have valid propTypes', t => {
|
|
45
43
|
t.pass();
|
|
@@ -81,9 +79,7 @@ test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › Uploadusers › s
|
|
|
81
79
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardAddCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardAddCoursesPlaylist);
|
|
82
80
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormCreatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormCreatePlaylist);
|
|
83
81
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardFormEditPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardFormEditPlaylist);
|
|
84
|
-
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardOrganizeCoursesPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardOrganizeCoursesPlaylist);
|
|
85
82
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylistWithPopin › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylistWithPopin);
|
|
86
83
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardPopulationsPlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardPopulationsPlaylist);
|
|
87
|
-
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardRewardsCertification › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardRewardsCertification);
|
|
88
84
|
test('TemplateBackOffice › TemplateBackOfficeBrandUpdate › WizardTranslatePlaylist › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardTranslatePlaylist);
|
|
89
85
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/template/back-office/brand-update/test/fixtures.js"],"names":["test","forEach","renderComponentMacro","TemplateBackOfficeBrandUpdate","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","fixtureWizardRewardsCertification","fixtureWizardTranslatePlaylist","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2CAAjC;AACA,OAAOC,6BAAP,MAA0C,IAA1C;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,iBAAP,MAA8B,uBAA9B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,aAAP,MAA0B,mBAA1B;AACA,OAAOC,gBAAP,MAA6B,sBAA7B;AACA,OAAOC,0BAAP,MAAuC,iCAAvC;AACA,OAAOC,cAAP,MAA2B,oBAA3B;AACA,OAAOC,6BAAP,MAA0C,qCAA1C;AACA,OAAOC,sBAAP,MAAmC,6BAAnC;AACA,OAAOC,wBAAP,MAAqC,gCAArC;AACA,OAAOC,qBAAP,MAAkC,6BAAlC;AACA,OAAOC,kCAAP,MAA+C,4CAA/C;AACA,OAAOC,yBAAP,MAAsC,iCAAtC;AACA,OAAOC,eAAP,MAA4B,sBAA5B;AACA,OAAOC,kBAAP,MAA+B,yBAA/B;AACA,OAAOC,iBA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AgHC,6BAAhH,EAA+I+B,kBAA/I,CAAJ;AACAlC,IAAI,CAAC,oGAAD,EAAuGE,oBAAvG,EAA6HC,6BAA7H,EAA4JgC,+BAA5J,CAAJ;AACAnC,IAAI,CAAC,oGAAD,EAAuGE,oBAAvG,EAA6HC,6BAA7H,EAA4JiC,+BAA5J,CAAJ;AACApC,IAAI,CAAC,kGAAD,EAAqGE,oBAArG,EAA2HC,6BAA3H,EAA0JkC,6BAA1J,CAAJ;AACArC,IAAI,CAAC,yGAAD,EAA4GE,oBAA5G,EAAkIC,6BAAlI,EAAiKmC,oCAAjK,CAAJ;AACAtC,IAAI,CAAC,8GAAD,EAAiHE,oBAAjH,EAAuIC,6BAAvI,EAAsKoC,yCAAtK,CAAJ;AACAvC,IAAI,CAAC,qGAAD,EAAwGE,oBAAxG,EAA8HC,6BAA9H,EAA6JqC,gCAA7J,CAAJ;AACAxC,IAAI,CAAC,sGAAD,EAAyGE,oBAAzG,EAA+HC,6BAA/H,EAA8JsC,iCAA9J,CAAJ;AACAzC,IAAI,CAAC,mGAAD,EAAsGE,oBAAtG,EAA4HC,6BAA5H,EAA2JuC,8BAA3J,CAAJ","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 fixtureWizardRewardsCertification from './fixtures/wizard-rewards-certification';\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 › WizardRewardsCertification › should be rendered', renderComponentMacro, TemplateBackOfficeBrandUpdate, fixtureWizardRewardsCertification);\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":["test","forEach","renderComponentMacro","TemplateBackOfficeBrandUpdate","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","t","pass","propTypes","value","key","not","undefined"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,gBAApB;AACA,OAAOC,oBAAP,MAAiC,2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H,EAAmJyB,sBAAnJ,CAAJ;AACA5B,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+I0B,kBAA/I,CAAJ;AACA7B,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+I2B,kBAA/I,CAAJ;AACA9B,IAAI,CAAC,+EAAD,EAAkFE,oBAAlF,EAAwGC,6BAAxG,EAAuI4B,UAAvI,CAAJ;AACA/B,IAAI,CAAC,8FAAD,EAAiGE,oBAAjG,EAAuHC,6BAAvH,EAAsJ6B,yBAAtJ,CAAJ;AACAhC,IAAI,CAAC,iGAAD,EAAoGE,oBAApG,EAA0HC,6BAA1H,EAAyJ8B,4BAAzJ,CAAJ;AACAjC,IAAI,CAAC,uFAAD,EAA0FE,oBAA1F,EAAgHC,6BAAhH,EAA+I+B,kBAA/I,CAAJ;AACAlC,IAAI,CAAC,oGAAD,EAAuGE,oBAAvG,EAA6HC,6BAA7H,EAA4JgC,+BAA5J,CAAJ;AACAnC,IAAI,CAAC,oGAAD,EAAuGE,oBAAvG,EAA6HC,6BAA7H,EAA4JiC,+BAA5J,CAAJ;AACApC,IAAI,CAAC,kGAAD,EAAqGE,oBAArG,EAA2HC,6BAA3H,EAA0JkC,6BAA1J,CAAJ;AACArC,IAAI,CAAC,8GAAD,EAAiHE,oBAAjH,EAAuIC,6BAAvI,EAAsKmC,yCAAtK,CAAJ;AACAtC,IAAI,CAAC,qGAAD,EAAwGE,oBAAxG,EAA8HC,6BAA9H,EAA6JoC,gCAA7J,CAAJ;AACAvC,IAAI,CAAC,mGAAD,EAAsGE,oBAAtG,EAA4HC,6BAA5H,EAA2JqC,8BAA3J,CAAJ","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"}
|
|
@@ -21,7 +21,8 @@ import ExternalContentViewer from '../../molecule/external-content-viewer';
|
|
|
21
21
|
import style from './style.css';
|
|
22
22
|
const defaultWrapperStyle = {
|
|
23
23
|
default: style.default,
|
|
24
|
-
cockpit: style.defaultCockpit
|
|
24
|
+
cockpit: style.defaultCockpit,
|
|
25
|
+
mobile: style.default
|
|
25
26
|
};
|
|
26
27
|
|
|
27
28
|
class ExternalCourse extends React.Component {
|
|
@@ -63,6 +64,7 @@ class ExternalCourse extends React.Component {
|
|
|
63
64
|
className: style.loader
|
|
64
65
|
}, /*#__PURE__*/React.createElement(Loader, null)) : /*#__PURE__*/React.createElement(ExternalContentViewer, {
|
|
65
66
|
url: url,
|
|
67
|
+
mode: mode,
|
|
66
68
|
backgroundImageUrl: backgroundImageUrl,
|
|
67
69
|
contentType: contentType
|
|
68
70
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/template/external-course/index.js"],"names":["React","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","convert","classnames","PropTypes","EXTERNAL_CONTENT_ICONS","Provider","Loader","Button","innerHTML","ExternalContentViewer","style","defaultWrapperStyle","default","cockpit","defaultCockpit","ExternalCourse","Component","field","e","stopPropagation","preventDefault","onClick","render","name","type","url","warning","complete","quit","loading","backgroundImageUrl","contentType","mode","props","skin","context","primary","IconType","icon","IconColor","color","mainContentSlot","loader","completeButton","disabled","handleOnClick","label","backgroundColor","cursor","completeCta","warningButton","leftSection","iconLabel","link","iconQuestion","quitButton","quitCta","titleSection","title","oval","iconHeader","__html","header","rightSection","footer","childContextTypes","propTypes","string","oneOf","isRequired","shape","func","bool"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,+CAA+C,IAAIC,YAA3D,QAA8E,0BAA9E;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,sBAAR,QAAqC,6BAArC;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,SAAR,QAAwB,4BAAxB;AACA,OAAOC,qBAAP,MAAkC,wCAAlC;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,mBAAmB,GAAG;AAC1BC,EAAAA,OAAO,EAAEF,KAAK,CAACE,OADW;AAE1BC,EAAAA,OAAO,EAAEH,KAAK,CAACI;AAFW,CAA5B;;AAKA,MAAMC,cAAN,SAA6BjB,KAAK,CAACkB,SAAnC,CAA6C;AAAA;AAAA;;AAAA,2CA4B3BC,KAAK,IAAIC,CAAC,IAAI;AAC5BA,MAAAA,CAAC,CAACC,eAAF;AACAD,MAAAA,CAAC,CAACE,cAAF;;AACA,YAAMC,OAAO,GAAG,KAAI,SAAJ,EAAeJ,KAAf,CAAhB;;AACA,aAAOI,OAAO,IAAIA,OAAO,CAACH,CAAD,CAAzB;AACD,KAjC0C;AAAA;;AAmC3CI,EAAAA,MAAM,GAAG;AACP,UAAM;AACJC,MAAAA,IADI;AAEJC,MAAAA,IAFI;AAGJC,MAAAA,GAHI;AAIJC,MAAAA,OAJ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EAAEtB,SAAS,CAACgE,MAAV,CAAiBE,UAHL;AAIjBzC,EAAAA,IAAI,EAAEzB,SAAS,CAACmE,KAAV,CAAgB;AACpBxB,IAAAA,KAAK,EAAE3C,SAAS,CAACgE,MAAV,CAAiBE,UADJ;AAEpBhD,IAAAA,OAAO,EAAElB,SAAS,CAACoE;AAFC,GAAhB,CAJW;AAQjB5C,EAAAA,QAAQ,EAAExB,SAAS,CAACmE,KAAV,CAAgB;AACxBxB,IAAAA,KAAK,EAAE3C,SAAS,CAACgE,MAAV,CAAiBE,UADA;AAExBzB,IAAAA,QAAQ,EAAEzC,SAAS,CAACqE,IAFI;AAGxBnD,IAAAA,OAAO,EAAElB,SAAS,CAACoE;AAHK,GAAhB,CARO;AAajB7C,EAAAA,OAAO,EAAEvB,SAAS,CAACmE,KAAV,CAAgB;AACvBxB,IAAAA,KAAK,EAAE3C,SAAS,CAACgE,MAAV,CAAiBE,UADD;AAEvBhD,IAAAA,OAAO,EAAElB,SAAS,CAACoE;AAFI,GAAhB,CAbQ;AAiBjB1C,EAAAA,OAAO,EAAE1B,SAAS,CAACqE,IAjBF;AAkBjB1C,EAAAA,kBAAkB,EAAE3B,SAAS,CAACgE,MAlBb;AAmBjBpC,EAAAA,WAAW,EAAE5B,SAAS,CAACgE,MAnBN;AAoBjBnC,EAAAA,IAAI,EAAE7B,SAAS,CAACgE;AApBC,C;AAmJrB,eAAepD,cAAf","sourcesContent":["import React from 'react';\nimport {NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon} from '@coorpacademy/nova-icons';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, getOr, keys, identity, isNil, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport Button from '../../atom/button';\nimport {innerHTML} from '../../atom/label/style.css';\nimport ExternalContentViewer from '../../molecule/external-content-viewer';\nimport style from './style.css';\n\nconst defaultWrapperStyle = {\n default: style.default,\n cockpit: style.defaultCockpit\n};\n\nclass ExternalCourse extends React.Component {\n static propTypes = {\n name: PropTypes.string,\n type: PropTypes.oneOf(keys(EXTERNAL_CONTENT_ICONS)),\n url: PropTypes.string.isRequired,\n quit: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n complete: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n }),\n warning: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string,\n contentType: PropTypes.string,\n mode: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n handleOnClick = field => e => {\n e.stopPropagation();\n e.preventDefault();\n const onClick = get('onClick', field);\n return onClick && onClick(e);\n };\n\n render() {\n const {\n name,\n type,\n url,\n warning,\n complete,\n quit,\n loading,\n backgroundImageUrl,\n contentType,\n mode = 'default'\n } = this.props;\n const {skin} = this.context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const IconColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n const mainContentSlot = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : (\n <ExternalContentViewer\n url={url}\n backgroundImageUrl={backgroundImageUrl}\n contentType={contentType}\n />\n );\n\n const completeButton = !isNil(complete) ? (\n <Button\n type=\"button\"\n disabled={loading ? true : complete.disabled}\n onClick={loading ? identity : this.handleOnClick(complete)}\n submitValue={complete.label}\n style={{\n backgroundColor:\n complete.disabled || loading ? convert(`color(${primary} a(-50%))`) : primary,\n cursor: loading ? 'progress' : 'pointer'\n }}\n className={classnames(\n style.completeCta,\n complete.disabled || loading ? style.disabled : null,\n loading ? style.loading : null\n )}\n />\n ) : null;\n\n const warningButton = !isNil(warning) ? (\n <div className={style.leftSection}>\n <div\n onClick={this.handleOnClick(warning)}\n className={classnames(style.iconLabel, style.link)}\n >\n <QuestionIcon className={style.iconQuestion} width={24} height={24} />\n <span>{warning.label}</span>\n </div>\n </div>\n ) : null;\n\n const quitButton = !isNil(quit) ? (\n <div className={style.leftSection}>\n <span\n className={classnames(style.quitCta, loading ? style.loading : null)}\n onClick={loading ? identity : this.handleOnClick(quit)}\n >\n {quit.label}\n </span>\n </div>\n ) : null;\n\n const titleSection = !isNil(name) ? (\n <div className={classnames(style.iconLabel, style.title)}>\n <div className={style.oval} style={{backgroundColor: IconColor}}>\n <IconType className={style.iconHeader} />\n </div>\n <span\n className={innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: name}}\n />\n </div>\n ) : null;\n\n const header =\n !isNil(quit) || !isEmpty(name) ? (\n <div className={style.header}>\n {quitButton}\n {titleSection}\n {isNil(quit) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const footer =\n !isNil(warning) || !isNil(complete) ? (\n <div className={style.footer}>\n {warningButton}\n {completeButton}\n {isNil(warning) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n return (\n <div className={defaultWrapperStyle[mode]}>\n {header}\n {mainContentSlot}\n {footer}\n </div>\n );\n }\n}\n\nexport default ExternalCourse;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/template/external-course/index.js"],"names":["React","NovaSolidInterfaceFeedbackInterfaceQuestionMark","QuestionIcon","convert","classnames","PropTypes","EXTERNAL_CONTENT_ICONS","Provider","Loader","Button","innerHTML","ExternalContentViewer","style","defaultWrapperStyle","default","cockpit","defaultCockpit","mobile","ExternalCourse","Component","field","e","stopPropagation","preventDefault","onClick","render","name","type","url","warning","complete","quit","loading","backgroundImageUrl","contentType","mode","props","skin","context","primary","IconType","icon","IconColor","color","mainContentSlot","loader","completeButton","disabled","handleOnClick","label","backgroundColor","cursor","completeCta","warningButton","leftSection","iconLabel","link","iconQuestion","quitButton","quitCta","titleSection","title","oval","iconHeader","__html","header","rightSection","footer","childContextTypes","propTypes","string","oneOf","isRequired","shape","func","bool"],"mappings":";;;;;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAAQC,+CAA+C,IAAIC,YAA3D,QAA8E,0BAA9E;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,sBAAR,QAAqC,6BAArC;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,SAAQC,SAAR,QAAwB,4BAAxB;AACA,OAAOC,qBAAP,MAAkC,wCAAlC;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,mBAAmB,GAAG;AAC1BC,EAAAA,OAAO,EAAEF,KAAK,CAACE,OADW;AAE1BC,EAAAA,OAAO,EAAEH,KAAK,CAACI,cAFW;AAG1BC,EAAAA,MAAM,EAAEL,KAAK,CAACE;AAHY,CAA5B;;AAMA,MAAMI,cAAN,SAA6BlB,KAAK,CAACmB,SAAnC,CAA6C;AAAA;AAAA;;AAAA,2CA4B3BC,KAAK,IAAIC,CAAC,IAAI;AAC5BA,MAAAA,CAAC,CAACC,eAAF;AACAD,MAAAA,CAAC,CAACE,cAAF;;AACA,YAAMC,OAAO,GAAG,KAAI,SAAJ,EAAeJ,KAAf,CAAhB;;AACA,aAAOI,OAAO,IAAIA,OAAO,CAACH,CAAD,CAAzB;AACD,KAjC0C;AAAA;;AAmC3CI,EAAAA,MAAM,GAAG;AACP,UAAM;AACJC,MAAAA,IADI;AAEJC,MAAAA,IAFI;AAGJC,MAAAA,GAHI;AAIJC,MAAAA,OAJI;AAKJC,MAAAA,QALI;AAMJC,MAAAA,IANI;AAOJC,MAAAA,OAPI;AAQJC,MAAAA,kBARI;AASJC,MAAAA,WATI;AAUJC,MAAAA,IAAI,GAA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V,CAAgB;AACpBxB,IAAAA,KAAK,EAAE5C,SAAS,CAACiE,MAAV,CAAiBE,UADJ;AAEpBhD,IAAAA,OAAO,EAAEnB,SAAS,CAACqE;AAFC,GAAhB,CAJW;AAQjB5C,EAAAA,QAAQ,EAAEzB,SAAS,CAACoE,KAAV,CAAgB;AACxBxB,IAAAA,KAAK,EAAE5C,SAAS,CAACiE,MAAV,CAAiBE,UADA;AAExBzB,IAAAA,QAAQ,EAAE1C,SAAS,CAACsE,IAFI;AAGxBnD,IAAAA,OAAO,EAAEnB,SAAS,CAACqE;AAHK,GAAhB,CARO;AAajB7C,EAAAA,OAAO,EAAExB,SAAS,CAACoE,KAAV,CAAgB;AACvBxB,IAAAA,KAAK,EAAE5C,SAAS,CAACiE,MAAV,CAAiBE,UADD;AAEvBhD,IAAAA,OAAO,EAAEnB,SAAS,CAACqE;AAFI,GAAhB,CAbQ;AAiBjB1C,EAAAA,OAAO,EAAE3B,SAAS,CAACsE,IAjBF;AAkBjB1C,EAAAA,kBAAkB,EAAE5B,SAAS,CAACiE,MAlBb;AAmBjBpC,EAAAA,WAAW,EAAE7B,SAAS,CAACiE,MAnBN;AAoBjBnC,EAAAA,IAAI,EAAE9B,SAAS,CAACiE;AApBC,C;AAoJrB,eAAepD,cAAf","sourcesContent":["import React from 'react';\nimport {NovaSolidInterfaceFeedbackInterfaceQuestionMark as QuestionIcon} from '@coorpacademy/nova-icons';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, getOr, keys, identity, isNil, isEmpty} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport {EXTERNAL_CONTENT_ICONS} from '../../util/external-content';\nimport Provider from '../../atom/provider';\nimport Loader from '../../atom/loader';\nimport Button from '../../atom/button';\nimport {innerHTML} from '../../atom/label/style.css';\nimport ExternalContentViewer from '../../molecule/external-content-viewer';\nimport style from './style.css';\n\nconst defaultWrapperStyle = {\n default: style.default,\n cockpit: style.defaultCockpit,\n mobile: style.default\n};\n\nclass ExternalCourse extends React.Component {\n static propTypes = {\n name: PropTypes.string,\n type: PropTypes.oneOf(keys(EXTERNAL_CONTENT_ICONS)),\n url: PropTypes.string.isRequired,\n quit: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n complete: PropTypes.shape({\n label: PropTypes.string.isRequired,\n disabled: PropTypes.bool,\n onClick: PropTypes.func\n }),\n warning: PropTypes.shape({\n label: PropTypes.string.isRequired,\n onClick: PropTypes.func\n }),\n loading: PropTypes.bool,\n backgroundImageUrl: PropTypes.string,\n contentType: PropTypes.string,\n mode: PropTypes.string\n };\n\n static contextTypes = {\n skin: Provider.childContextTypes.skin\n };\n\n handleOnClick = field => e => {\n e.stopPropagation();\n e.preventDefault();\n const onClick = get('onClick', field);\n return onClick && onClick(e);\n };\n\n render() {\n const {\n name,\n type,\n url,\n warning,\n complete,\n quit,\n loading,\n backgroundImageUrl,\n contentType,\n mode = 'default'\n } = this.props;\n const {skin} = this.context;\n const primary = getOr('#00B0FF', 'common.primary', skin);\n const IconType = EXTERNAL_CONTENT_ICONS[type].icon;\n const IconColor = EXTERNAL_CONTENT_ICONS[type].color;\n\n const mainContentSlot = loading ? (\n <div className={style.loader}>\n <Loader />\n </div>\n ) : (\n <ExternalContentViewer\n url={url}\n mode={mode}\n backgroundImageUrl={backgroundImageUrl}\n contentType={contentType}\n />\n );\n\n const completeButton = !isNil(complete) ? (\n <Button\n type=\"button\"\n disabled={loading ? true : complete.disabled}\n onClick={loading ? identity : this.handleOnClick(complete)}\n submitValue={complete.label}\n style={{\n backgroundColor:\n complete.disabled || loading ? convert(`color(${primary} a(-50%))`) : primary,\n cursor: loading ? 'progress' : 'pointer'\n }}\n className={classnames(\n style.completeCta,\n complete.disabled || loading ? style.disabled : null,\n loading ? style.loading : null\n )}\n />\n ) : null;\n\n const warningButton = !isNil(warning) ? (\n <div className={style.leftSection}>\n <div\n onClick={this.handleOnClick(warning)}\n className={classnames(style.iconLabel, style.link)}\n >\n <QuestionIcon className={style.iconQuestion} width={24} height={24} />\n <span>{warning.label}</span>\n </div>\n </div>\n ) : null;\n\n const quitButton = !isNil(quit) ? (\n <div className={style.leftSection}>\n <span\n className={classnames(style.quitCta, loading ? style.loading : null)}\n onClick={loading ? identity : this.handleOnClick(quit)}\n >\n {quit.label}\n </span>\n </div>\n ) : null;\n\n const titleSection = !isNil(name) ? (\n <div className={classnames(style.iconLabel, style.title)}>\n <div className={style.oval} style={{backgroundColor: IconColor}}>\n <IconType className={style.iconHeader} />\n </div>\n <span\n className={innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: name}}\n />\n </div>\n ) : null;\n\n const header =\n !isNil(quit) || !isEmpty(name) ? (\n <div className={style.header}>\n {quitButton}\n {titleSection}\n {isNil(quit) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n const footer =\n !isNil(warning) || !isNil(complete) ? (\n <div className={style.footer}>\n {warningButton}\n {completeButton}\n {isNil(warning) ? null : <div className={style.rightSection} />}\n </div>\n ) : null;\n\n return (\n <div className={defaultWrapperStyle[mode]}>\n {header}\n {mainContentSlot}\n {footer}\n </div>\n );\n }\n}\n\nexport default ExternalCourse;\n"],"file":"index.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/template/external-course/test/fixtures/pdf-mobile.js"],"names":["props","type","url","mode","contentType","loading"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,SADD;AAELC,IAAAA,GAAG,EAAE,gFAFA;AAGLC,IAAAA,IAAI,EAAE,QAHD;AAILC,IAAAA,WAAW,EAAE,iBAJR;AAKLC,IAAAA,OAAO,EAAE;AALJ;AADM,CAAf","sourcesContent":["export default {\n props: {\n type: 'article',\n url: 'https://api.coorpacademy.com/external/3673d4b6-bf5a-4b24-9665-ad97dc9b89da.pdf',\n mode: 'mobile',\n contentType: 'application/pdf',\n loading: false\n }\n};\n"],"file":"pdf-mobile.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
props: {
|
|
3
|
+
name: 'Massive Open Online Course',
|
|
4
|
+
type: 'article',
|
|
5
|
+
url: 'https://api.coorpacademy.com/external/3673d4b6-bf5a-4b24-9665-ad97dc9b89da.pdf',
|
|
6
|
+
quit: {
|
|
7
|
+
label: 'close',
|
|
8
|
+
onClick: () => console.log('close')
|
|
9
|
+
},
|
|
10
|
+
complete: {
|
|
11
|
+
disabled: false,
|
|
12
|
+
label: 'finish',
|
|
13
|
+
onClick: () => console.log('finish')
|
|
14
|
+
},
|
|
15
|
+
loading: false
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=pdf-no-mobile.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/template/external-course/test/fixtures/pdf-no-mobile.js"],"names":["props","name","type","url","quit","label","onClick","console","log","complete","disabled","loading"],"mappings":"AAAA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,IAAI,EAAE,4BADD;AAELC,IAAAA,IAAI,EAAE,SAFD;AAGLC,IAAAA,GAAG,EAAE,gFAHA;AAILC,IAAAA,IAAI,EAAE;AACJC,MAAAA,KAAK,EAAE,OADH;AAEJC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAFX,KAJD;AAQLC,IAAAA,QAAQ,EAAE;AACRC,MAAAA,QAAQ,EAAE,KADF;AAERL,MAAAA,KAAK,EAAE,QAFC;AAGRC,MAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,QAAZ;AAHP,KARL;AAaLG,IAAAA,OAAO,EAAE;AAbJ;AADM,CAAf","sourcesContent":["export default {\n props: {\n name: 'Massive Open Online Course',\n type: 'article',\n url: 'https://api.coorpacademy.com/external/3673d4b6-bf5a-4b24-9665-ad97dc9b89da.pdf',\n quit: {\n label: 'close',\n onClick: () => console.log('close')\n },\n complete: {\n disabled: false,\n label: 'finish',\n onClick: () => console.log('finish')\n },\n loading: false\n }\n};\n"],"file":"pdf-no-mobile.js"}
|
|
@@ -14,8 +14,6 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
|
14
14
|
|
|
15
15
|
var _noIcon = _interopRequireDefault(require("./fixtures/no-icon"));
|
|
16
16
|
|
|
17
|
-
var _reviewHeader = _interopRequireDefault(require("./fixtures/review-header"));
|
|
18
|
-
|
|
19
17
|
var _smallButtonDisabled = _interopRequireDefault(require("./fixtures/small-button-disabled"));
|
|
20
18
|
|
|
21
19
|
var _smallLinkDownload = _interopRequireDefault(require("./fixtures/small-link-download"));
|
|
@@ -31,7 +29,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
31
29
|
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', _renderComponent.default, _.default, _buttonIconBullet.default);
|
|
32
30
|
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
33
31
|
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', _renderComponent.default, _.default, _noIcon.default);
|
|
34
|
-
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › ReviewHeader › should be rendered', _renderComponent.default, _.default, _reviewHeader.default);
|
|
35
32
|
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', _renderComponent.default, _.default, _smallButtonDisabled.default);
|
|
36
33
|
(0, _ava.default)('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', _renderComponent.default, _.default, _smallLinkDownload.default);
|
|
37
34
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["t","pass","AtomButtonLinkIconOnly","propTypes","value","key","not","undefined","renderComponentMacro","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/button-link-icon-only/test/fixtures.js"],"names":["t","pass","AtomButtonLinkIconOnly","propTypes","value","key","not","undefined","renderComponentMacro","fixtureButtonIconBullet","fixtureDefault","fixtureNoIcon","fixtureSmallButtonDisabled","fixtureSmallLinkDownload"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,6DAAL,EAAoEA,CAAC,IAAI;AACvEA,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,uDAAsDF,GAAI,mEAAnF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,uEAAL,EAA8EG,wBAA9E,EAAoGN,SAApG,EAA4HO,yBAA5H;AACA,kBAAK,8DAAL,EAAqED,wBAArE,EAA2FN,SAA3F,EAAmHQ,gBAAnH;AACA,kBAAK,6DAAL,EAAoEF,wBAApE,EAA0FN,SAA1F,EAAkHS,eAAlH;AACA,kBAAK,0EAAL,EAAiFH,wBAAjF,EAAuGN,SAAvG,EAA+HU,4BAA/H;AACA,kBAAK,wEAAL,EAA+EJ,wBAA/E,EAAqGN,SAArG,EAA6HW,0BAA7H","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomButtonLinkIconOnly from '..';\nimport fixtureButtonIconBullet from './fixtures/button-icon-bullet';\nimport fixtureDefault from './fixtures/default';\nimport fixtureNoIcon from './fixtures/no-icon';\nimport fixtureSmallButtonDisabled from './fixtures/small-button-disabled';\nimport fixtureSmallLinkDownload from './fixtures/small-link-download';\n\ntest('Atom › AtomButtonLinkIconOnly > should have valid propTypes', t => {\n t.pass();\n forEach(AtomButtonLinkIconOnly.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomButtonLinkIconOnly.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomButtonLinkIconOnly › ButtonIconBullet › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureButtonIconBullet);\ntest('Atom › AtomButtonLinkIconOnly › Default › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureDefault);\ntest('Atom › AtomButtonLinkIconOnly › NoIcon › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureNoIcon);\ntest('Atom › AtomButtonLinkIconOnly › SmallButtonDisabled › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallButtonDisabled);\ntest('Atom › AtomButtonLinkIconOnly › SmallLinkDownload › should be rendered', renderComponentMacro, AtomButtonLinkIconOnly, fixtureSmallLinkDownload);\n"],"file":"fixtures.js"}
|
|
@@ -63,7 +63,9 @@ class DragAndDrop extends _react.default.Component {
|
|
|
63
63
|
loading = false,
|
|
64
64
|
modified = false,
|
|
65
65
|
onReset = null,
|
|
66
|
-
error = ''
|
|
66
|
+
error = '',
|
|
67
|
+
buttonAriaLabel = '',
|
|
68
|
+
errorButtonLabel = ''
|
|
67
69
|
} = this.props;
|
|
68
70
|
const {
|
|
69
71
|
dragging
|
|
@@ -121,7 +123,7 @@ class DragAndDrop extends _react.default.Component {
|
|
|
121
123
|
const buildButton = () => {
|
|
122
124
|
const defaultButtonProps = {
|
|
123
125
|
label: uploadLabel,
|
|
124
|
-
'aria-label':
|
|
126
|
+
'aria-label': buttonAriaLabel,
|
|
125
127
|
'data-name': 'default-button',
|
|
126
128
|
icon: {
|
|
127
129
|
position: 'left',
|
|
@@ -133,7 +135,7 @@ class DragAndDrop extends _react.default.Component {
|
|
|
133
135
|
return null;
|
|
134
136
|
} else if (error) {
|
|
135
137
|
return /*#__PURE__*/_react.default.createElement(_buttonLink.default, _extends({}, defaultButtonProps, {
|
|
136
|
-
label:
|
|
138
|
+
label: errorButtonLabel,
|
|
137
139
|
icon: {}
|
|
138
140
|
}));
|
|
139
141
|
} else {
|
|
@@ -184,7 +186,9 @@ DragAndDrop.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
184
186
|
modified: _propTypes.default.bool,
|
|
185
187
|
children: _propTypes.default.func,
|
|
186
188
|
onReset: _propTypes.default.func,
|
|
187
|
-
error: _propTypes.default.string
|
|
189
|
+
error: _propTypes.default.string,
|
|
190
|
+
buttonAriaLabel: _propTypes.default.string,
|
|
191
|
+
errorButtonLabel: _propTypes.default.string
|
|
188
192
|
} : {};
|
|
189
193
|
var _default = DragAndDrop;
|
|
190
194
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["constantNull","DragAndDrop","React","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","idBox","children","title","description","uploadLabel","previewLabel","previewContent","loading","modified","onReset","error","previewView","type","style","preview","src","loaderWrapper","loadingCancel","closeIcon","loader","loaderText","resetContent","resetUploadWrapper","resetSrcLabel","buildButton","defaultButtonProps","label","icon","position","button","previewContainer","modifiedPreviewContainer","inputWrapper","modifiedInputWrapper","errorInputWrapper","wrapper","infosContainer","iconError","dragAndDropLabel","errorMessage","propTypes","PropTypes","string","shape","bool","func"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,YAAY,GAAG,wBAAS,IAAT,CAArB;;AAEA,MAAMC,WAAN,SAA0BC,eAAMC,SAAhC,CAA0C;AAiBxCC,EAAAA,WAAW,CAACC,KAAD,EAAQ;AACjB,UAAMA,KAAN;AAEA,SAAKC,KAAL,GAAa;AACXC,MAAAA,QAAQ,EAAE;AADC,KAAb;AAIA,SAAKC,eAAL,GAAuB,KAAKA,eAAL,CAAqBC,IAArB,CAA0B,IAA1B,CAAvB;AACA,SAAKC,cAAL,GAAsB,KAAKA,c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AS,EAAEG,eAAMyB;AAAtB,OAAyC,kBAAzC,CAPlB,CADF,EAUGT,MAVH,eAWE,0CAAM5B,QAAQ,CAAC,KAAKN,eAAN,EAAuB,KAAKE,cAA5B,CAAd,CAXF,CALJ,EAmBGa,KAAK,gBAAG;AAAM,MAAA,SAAS,EAAEG,eAAM0B;AAAvB,OAAsC7B,KAAtC,CAAH,GAAyDW,YAnBjE,CADF;AAuBD;;AAvKuC;;AAApCjC,W,CACGoD,S,2CAAY;AACjBtC,EAAAA,KAAK,EAAEuC,mBAAUC,MADA;AAEjBvC,EAAAA,WAAW,EAAEsC,mBAAUC,MAFN;AAGjBtC,EAAAA,WAAW,EAAEqC,mBAAUC,MAHN;AAIjBrC,EAAAA,YAAY,EAAEoC,mBAAUC,MAJP;AAKjBpC,EAAAA,cAAc,EAAEmC,mBAAUE,KAAV,CAAgB;AAC9B/B,IAAAA,IAAI,EAAE6B,mBAAUC,MADc;AAE9B3B,IAAAA,GAAG,EAAE0B,mBAAUC;AAFe,GAAhB,CALC;AASjBnC,EAAAA,OAAO,EAAEkC,mBAAUG,IATF;AAUjBpC,EAAAA,QAAQ,EAAEiC,mBAAUG,IAVH;AAWjB3C,EAAAA,QAAQ,EAAEwC,mBAAUI,IAXH;AAYjBpC,EAAAA,OAAO,EAAEgC,mBAAUI,IAZF;AAajBnC,EAAAA,KAAK,EAAE+B,mBAAUC;AAbA,C;eAyKNtD,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {uniqueId, constant, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusClose as Close,\n NovaSolidFilesBasicFileUpload2 as FileUploadIcon,\n NovaSolidFilesBasicFileBlock2 as FileUploadBlockedIcon\n} from '@coorpacademy/nova-icons';\nimport Loader from '../loader';\nimport Button from '../button-link';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst constantNull = constant(null);\n\nclass DragAndDrop extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n uploadLabel: PropTypes.string,\n previewLabel: PropTypes.string,\n previewContent: PropTypes.shape({\n type: PropTypes.string,\n src: PropTypes.string\n }),\n loading: PropTypes.bool,\n modified: PropTypes.bool,\n children: PropTypes.func,\n onReset: PropTypes.func,\n error: PropTypes.string\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n dragging: false\n };\n\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragStop = this.handleDragStop.bind(this);\n }\n\n handleDragStart() {\n this.setState({\n dragging: true\n });\n }\n\n handleDragStop() {\n this.setState({\n dragging: false\n });\n }\n\n render() {\n const idBox = uniqueId('drop-box-');\n const {\n children = constantNull,\n title,\n description,\n uploadLabel,\n previewLabel = '',\n previewContent,\n loading = false,\n modified = false,\n onReset = null,\n error = ''\n } = this.props;\n const {dragging} = this.state;\n\n let previewView = null;\n\n if (previewContent && previewContent.type === 'image') {\n previewView = (\n <div className={style.preview}>\n <img src={previewContent.src} />\n </div>\n );\n } else if (previewContent && previewContent.type === 'video') {\n previewView = (\n <div className={style.preview}>\n <video controls src={previewContent.src} type=\"video/*\" />\n </div>\n );\n } else if (loading) {\n previewView = (\n <div className={style.loaderWrapper}>\n <div className={style.loadingCancel}>\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n <span className={style.loaderText}>Uploading</span>\n </div>\n );\n } else {\n previewView = <span>{previewLabel}</span>;\n }\n\n const resetContent =\n previewContent && previewContent.src ? (\n <div className={style.resetUploadWrapper}>\n <div className={style.resetSrcLabel}>{previewContent.src}</div>\n {onReset ? (\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n ) : null}\n </div>\n ) : null;\n\n const buildButton = () => {\n const defaultButtonProps = {\n label: uploadLabel,\n 'aria-label': 'aria button',\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'folders'\n }\n };\n if (dragging) {\n return null;\n } else if (error) {\n return <Button {...defaultButtonProps} label=\"Try again\" icon={{}} />;\n } else {\n return <Button {...defaultButtonProps} />;\n }\n };\n\n const button = buildButton(dragging, error);\n\n const previewContainer = getClassState(\n style.previewContainer,\n style.modifiedPreviewContainer,\n null,\n modified,\n error\n );\n const inputWrapper = getClassState(\n style.inputWrapper,\n style.modifiedInputWrapper,\n style.errorInputWrapper,\n modified,\n error\n );\n\n return (\n <div className={style.wrapper} data-name=\"drag-and-drop-wrapper\">\n <div className={style.title}>{title}</div>\n {!isEmpty(previewContent) || loading ? (\n <div className={previewContainer}>{previewView}</div>\n ) : (\n <div className={dragging ? style.dragging : inputWrapper} id={idBox}>\n <div className={style.infosContainer}>\n {error ? (\n <FileUploadBlockedIcon className={style.iconError} />\n ) : (\n <FileUploadIcon className={style.icon} />\n )}\n {description ? <div className={style.description}>{description}</div> : null}\n {error ? null : <div className={style.dragAndDropLabel}>{'Drag & Drop here'}</div>}\n </div>\n {button}\n <div>{children(this.handleDragStart, this.handleDragStop)}</div>\n </div>\n )}\n {error ? <span className={style.errorMessage}>{error}</span> : resetContent}\n </div>\n );\n }\n}\n\nexport default DragAndDrop;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/drag-and-drop/index.js"],"names":["constantNull","DragAndDrop","React","Component","constructor","props","state","dragging","handleDragStart","bind","handleDragStop","setState","render","idBox","children","title","description","uploadLabel","previewLabel","previewContent","loading","modified","onReset","error","buttonAriaLabel","errorButtonLabel","previewView","type","style","preview","src","loaderWrapper","loadingCancel","closeIcon","loader","loaderText","resetContent","resetUploadWrapper","resetSrcLabel","buildButton","defaultButtonProps","label","icon","position","button","previewContainer","modifiedPreviewContainer","inputWrapper","modifiedInputWrapper","errorInputWrapper","wrapper","infosContainer","iconError","dragAndDropLabel","errorMessage","propTypes","PropTypes","string","shape","bool","func"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AAKA;;AACA;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,mBAAUI,IAZF;AAajBrC,EAAAA,KAAK,EAAEiC,mBAAUC,MAbA;AAcjBjC,EAAAA,eAAe,EAAEgC,mBAAUC,MAdV;AAejBhC,EAAAA,gBAAgB,EAAE+B,mBAAUC;AAfX,C;eA6KNxD,W","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {uniqueId, constant, isEmpty} from 'lodash/fp';\nimport {\n NovaSolidStatusClose as Close,\n NovaSolidFilesBasicFileUpload2 as FileUploadIcon,\n NovaSolidFilesBasicFileBlock2 as FileUploadBlockedIcon\n} from '@coorpacademy/nova-icons';\nimport Loader from '../loader';\nimport Button from '../button-link';\nimport getClassState from '../../util/get-class-state';\nimport style from './style.css';\n\nconst constantNull = constant(null);\n\nclass DragAndDrop extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n uploadLabel: PropTypes.string,\n previewLabel: PropTypes.string,\n previewContent: PropTypes.shape({\n type: PropTypes.string,\n src: PropTypes.string\n }),\n loading: PropTypes.bool,\n modified: PropTypes.bool,\n children: PropTypes.func,\n onReset: PropTypes.func,\n error: PropTypes.string,\n buttonAriaLabel: PropTypes.string,\n errorButtonLabel: PropTypes.string\n };\n\n constructor(props) {\n super(props);\n\n this.state = {\n dragging: false\n };\n\n this.handleDragStart = this.handleDragStart.bind(this);\n this.handleDragStop = this.handleDragStop.bind(this);\n }\n\n handleDragStart() {\n this.setState({\n dragging: true\n });\n }\n\n handleDragStop() {\n this.setState({\n dragging: false\n });\n }\n\n render() {\n const idBox = uniqueId('drop-box-');\n const {\n children = constantNull,\n title,\n description,\n uploadLabel,\n previewLabel = '',\n previewContent,\n loading = false,\n modified = false,\n onReset = null,\n error = '',\n buttonAriaLabel = '',\n errorButtonLabel = ''\n } = this.props;\n const {dragging} = this.state;\n\n let previewView = null;\n\n if (previewContent && previewContent.type === 'image') {\n previewView = (\n <div className={style.preview}>\n <img src={previewContent.src} />\n </div>\n );\n } else if (previewContent && previewContent.type === 'video') {\n previewView = (\n <div className={style.preview}>\n <video controls src={previewContent.src} type=\"video/*\" />\n </div>\n );\n } else if (loading) {\n previewView = (\n <div className={style.loaderWrapper}>\n <div className={style.loadingCancel}>\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n </div>\n <div className={style.loader}>\n <Loader theme=\"coorpmanager\" />\n </div>\n <span className={style.loaderText}>Uploading</span>\n </div>\n );\n } else {\n previewView = <span>{previewLabel}</span>;\n }\n\n const resetContent =\n previewContent && previewContent.src ? (\n <div className={style.resetUploadWrapper}>\n <div className={style.resetSrcLabel}>{previewContent.src}</div>\n {onReset ? (\n <Close\n data-name=\"reset-content-icon\"\n height={12}\n width={12}\n className={style.closeIcon}\n onClick={onReset}\n />\n ) : null}\n </div>\n ) : null;\n\n const buildButton = () => {\n const defaultButtonProps = {\n label: uploadLabel,\n 'aria-label': buttonAriaLabel,\n 'data-name': 'default-button',\n icon: {\n position: 'left',\n type: 'folders'\n }\n };\n if (dragging) {\n return null;\n } else if (error) {\n return <Button {...defaultButtonProps} label={errorButtonLabel} icon={{}} />;\n } else {\n return <Button {...defaultButtonProps} />;\n }\n };\n\n const button = buildButton(dragging, error);\n\n const previewContainer = getClassState(\n style.previewContainer,\n style.modifiedPreviewContainer,\n null,\n modified,\n error\n );\n const inputWrapper = getClassState(\n style.inputWrapper,\n style.modifiedInputWrapper,\n style.errorInputWrapper,\n modified,\n error\n );\n\n return (\n <div className={style.wrapper} data-name=\"drag-and-drop-wrapper\">\n <div className={style.title}>{title}</div>\n {!isEmpty(previewContent) || loading ? (\n <div className={previewContainer}>{previewView}</div>\n ) : (\n <div className={dragging ? style.dragging : inputWrapper} id={idBox}>\n <div className={style.infosContainer}>\n {error ? (\n <FileUploadBlockedIcon className={style.iconError} />\n ) : (\n <FileUploadIcon className={style.icon} />\n )}\n {description ? <div className={style.description}>{description}</div> : null}\n {error ? null : <div className={style.dragAndDropLabel}>{'Drag & Drop here'}</div>}\n </div>\n {button}\n <div>{children(this.handleDragStart, this.handleDragStop)}</div>\n </div>\n )}\n {error ? <span className={style.errorMessage}>{error}</span> : resetContent}\n </div>\n );\n }\n}\n\nexport default DragAndDrop;\n"],"file":"index.js"}
|
|
@@ -14,7 +14,9 @@ const {
|
|
|
14
14
|
} = _default2.default;
|
|
15
15
|
var _default = {
|
|
16
16
|
props: _extends(_extends({}, props), {}, {
|
|
17
|
-
error: 'The file is invalid'
|
|
17
|
+
error: 'The file is invalid',
|
|
18
|
+
errorButtonLabel: 'Try again',
|
|
19
|
+
buttonAriaLabel: 'Aria label'
|
|
18
20
|
})
|
|
19
21
|
};
|
|
20
22
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/error.js"],"names":["props","defaultProps","error"],"mappings":";;;;;AAAA;;;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,wBACAA,KADA;AAEHE,IAAAA,KAAK,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/error.js"],"names":["props","defaultProps","error","errorButtonLabel","buttonAriaLabel"],"mappings":";;;;;AAAA;;;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,iBAAhB;eAEe;AACbD,EAAAA,KAAK,wBACAA,KADA;AAEHE,IAAAA,KAAK,EAAE,qBAFJ;AAGHC,IAAAA,gBAAgB,EAAE,WAHf;AAIHC,IAAAA,eAAe,EAAE;AAJd;AADQ,C","sourcesContent":["import defaultProps from './default';\n\nconst {props} = defaultProps;\n\nexport default {\n props: {\n ...props,\n error: 'The file is invalid',\n errorButtonLabel: 'Try again',\n buttonAriaLabel: 'Aria label'\n }\n};\n"],"file":"error.js"}
|
|
@@ -8,24 +8,16 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require(".."));
|
|
10
10
|
|
|
11
|
-
var _cleanAndModified = _interopRequireDefault(require("./fixtures/clean-and-modified"));
|
|
12
|
-
|
|
13
11
|
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
14
12
|
|
|
15
|
-
var _error = _interopRequireDefault(require("./fixtures/error"));
|
|
16
|
-
|
|
17
13
|
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
18
14
|
|
|
19
|
-
var _modified = _interopRequireDefault(require("./fixtures/modified"));
|
|
20
|
-
|
|
21
15
|
var _withChildren = _interopRequireDefault(require("./fixtures/with-children"));
|
|
22
16
|
|
|
23
17
|
var _withImageReset = _interopRequireDefault(require("./fixtures/with-image-reset"));
|
|
24
18
|
|
|
25
19
|
var _withImage = _interopRequireDefault(require("./fixtures/with-image"));
|
|
26
20
|
|
|
27
|
-
var _withLongDescription = _interopRequireDefault(require("./fixtures/with-long-description"));
|
|
28
|
-
|
|
29
21
|
var _withVideo = _interopRequireDefault(require("./fixtures/with-video"));
|
|
30
22
|
|
|
31
23
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -36,14 +28,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
36
28
|
t.not(value, undefined, `PropType for "Atom.AtomDragAndDrop.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
37
29
|
});
|
|
38
30
|
});
|
|
39
|
-
(0, _ava.default)('Atom › AtomDragAndDrop › CleanAndModified › should be rendered', _renderComponent.default, _.default, _cleanAndModified.default);
|
|
40
31
|
(0, _ava.default)('Atom › AtomDragAndDrop › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
41
|
-
(0, _ava.default)('Atom › AtomDragAndDrop › Error › should be rendered', _renderComponent.default, _.default, _error.default);
|
|
42
32
|
(0, _ava.default)('Atom › AtomDragAndDrop › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
43
|
-
(0, _ava.default)('Atom › AtomDragAndDrop › Modified › should be rendered', _renderComponent.default, _.default, _modified.default);
|
|
44
33
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithChildren › should be rendered', _renderComponent.default, _.default, _withChildren.default);
|
|
45
34
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImageReset › should be rendered', _renderComponent.default, _.default, _withImageReset.default);
|
|
46
35
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImage › should be rendered', _renderComponent.default, _.default, _withImage.default);
|
|
47
|
-
(0, _ava.default)('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', _renderComponent.default, _.default, _withLongDescription.default);
|
|
48
36
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithVideo › should be rendered', _renderComponent.default, _.default, _withVideo.default);
|
|
49
37
|
//# sourceMappingURL=fixtures.js.map
|