@coorpacademy/components 10.13.2 → 10.13.3-alpha.13
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/drag-and-drop/index.js +74 -42
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +173 -70
- package/es/atom/drag-and-drop/test/fixtures/default.js +4 -3
- package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/error.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/error.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/modified.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/modified.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/es/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/es/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/es/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js +12 -0
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures.js +6 -0
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/clean-modified.js +13 -0
- package/es/atom/image-upload/test/fixtures/clean-modified.js.map +1 -0
- package/es/atom/image-upload/test/fixtures/{without-image.js → default.js} +1 -1
- package/es/atom/image-upload/test/fixtures/default.js.map +1 -0
- package/es/atom/image-upload/test/fixtures/desktop.js +2 -1
- package/es/atom/image-upload/test/fixtures/desktop.js.map +1 -1
- package/es/atom/image-upload/test/fixtures/mobile.js +2 -1
- package/es/atom/image-upload/test/fixtures/mobile.js.map +1 -1
- package/es/atom/image-upload/test/fixtures.js +4 -2
- package/es/atom/image-upload/test/fixtures.js.map +1 -1
- package/es/atom/loader/style.css +7 -3
- package/es/atom/review-header-step-item/test/fixtures.js +19 -0
- package/es/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/es/molecule/brand-form-group/index.js +3 -1
- package/es/molecule/brand-form-group/index.js.map +1 -1
- package/es/molecule/brand-form-group/style.css +5 -0
- package/es/molecule/brand-form-group/test/fixtures/images.js +6 -2
- package/es/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
- package/es/molecule/course-sections/index.js +4 -1
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +14 -1
- package/es/molecule/review-header-steps/test/fixtures.js +23 -0
- package/es/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/es/molecule/setup-slide/index.js +3 -1
- package/es/molecule/setup-slide/index.js.map +1 -1
- package/es/molecule/setup-slide/style.css +5 -0
- package/es/organism/course-selection/index.js +2 -1
- package/es/organism/course-selection/index.js.map +1 -1
- package/es/organism/course-selection/style.css +12 -3
- package/es/organism/course-selection/test/fixtures/loading.js +9 -0
- package/es/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/es/organism/course-selection/test/fixtures.js +2 -0
- package/es/organism/course-selection/test/fixtures.js.map +1 -1
- package/es/organism/search-and-chips-results/index.js +2 -1
- package/es/organism/search-and-chips-results/index.js.map +1 -1
- package/es/organism/search-and-chips-results/style.css +10 -3
- package/es/organism/search-and-chips-results/test/fixtures/loading.js +9 -0
- package/es/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/es/organism/search-and-chips-results/test/fixtures.js +2 -0
- package/es/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/es/template/back-office/brand-update/index.js +5 -2
- package/es/template/back-office/brand-update/index.js.map +1 -1
- package/es/template/back-office/brand-update/style.css +10 -1
- package/es/util/button-icons.js +3 -2
- package/es/util/button-icons.js.map +1 -1
- package/lib/atom/drag-and-drop/index.js +76 -41
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +173 -70
- package/lib/atom/drag-and-drop/test/fixtures/default.js +4 -3
- package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/error.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/error.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/loading.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/loading.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/modified.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/modified.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js +1 -0
- package/lib/atom/drag-and-drop/test/fixtures/with-children.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js +2 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-image.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js +3 -1
- package/lib/atom/drag-and-drop/test/fixtures/with-video.js.map +1 -1
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js +21 -0
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures.js +9 -0
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/clean-modified.js +22 -0
- package/lib/atom/image-upload/test/fixtures/clean-modified.js.map +1 -0
- package/lib/atom/image-upload/test/fixtures/{without-image.js → default.js} +1 -1
- package/lib/atom/image-upload/test/fixtures/default.js.map +1 -0
- package/lib/atom/image-upload/test/fixtures/desktop.js +2 -1
- package/lib/atom/image-upload/test/fixtures/desktop.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures/mobile.js +2 -1
- package/lib/atom/image-upload/test/fixtures/mobile.js.map +1 -1
- package/lib/atom/image-upload/test/fixtures.js +6 -3
- package/lib/atom/image-upload/test/fixtures.js.map +1 -1
- package/lib/atom/loader/style.css +7 -3
- package/lib/atom/review-header-step-item/test/fixtures.js +31 -0
- package/lib/atom/review-header-step-item/test/fixtures.js.map +1 -0
- package/lib/molecule/brand-form-group/index.js +3 -1
- package/lib/molecule/brand-form-group/index.js.map +1 -1
- package/lib/molecule/brand-form-group/style.css +5 -0
- package/lib/molecule/brand-form-group/test/fixtures/images.js +6 -2
- package/lib/molecule/brand-form-group/test/fixtures/images.js.map +1 -1
- package/lib/molecule/course-sections/index.js +4 -1
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +14 -1
- package/lib/molecule/review-header-steps/test/fixtures.js +37 -0
- package/lib/molecule/review-header-steps/test/fixtures.js.map +1 -0
- package/lib/molecule/setup-slide/index.js +3 -1
- package/lib/molecule/setup-slide/index.js.map +1 -1
- package/lib/molecule/setup-slide/style.css +5 -0
- package/lib/organism/course-selection/index.js +2 -1
- package/lib/organism/course-selection/index.js.map +1 -1
- package/lib/organism/course-selection/style.css +12 -3
- package/lib/organism/course-selection/test/fixtures/loading.js +19 -0
- package/lib/organism/course-selection/test/fixtures/loading.js.map +1 -0
- package/lib/organism/course-selection/test/fixtures.js +3 -0
- package/lib/organism/course-selection/test/fixtures.js.map +1 -1
- package/lib/organism/search-and-chips-results/index.js +2 -1
- package/lib/organism/search-and-chips-results/index.js.map +1 -1
- package/lib/organism/search-and-chips-results/style.css +10 -3
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js +19 -0
- package/lib/organism/search-and-chips-results/test/fixtures/loading.js.map +1 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js +3 -0
- package/lib/organism/search-and-chips-results/test/fixtures.js.map +1 -1
- package/lib/template/back-office/brand-update/index.js +5 -2
- package/lib/template/back-office/brand-update/index.js.map +1 -1
- package/lib/template/back-office/brand-update/style.css +10 -1
- package/lib/util/button-icons.js +2 -1
- package/lib/util/button-icons.js.map +1 -1
- package/package.json +2 -2
- package/es/atom/image-upload/test/fixtures/without-image.js.map +0 -1
- package/lib/atom/image-upload/test/fixtures/without-image.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/image-upload/test/fixtures/default.js"],"names":["props","Desktop"],"mappings":";;;;;;;AACA;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,gBAAhB;eAEe;AACbD,EAAAA,KAAK,EAAE,oBAAK,gBAAL,EAAuBA,KAAvB;AADM,C","sourcesContent":["import {omit} from 'lodash/fp';\nimport Desktop from './desktop';\n\nconst {props} = Desktop;\n\nexport default {\n props: omit('previewContent', props)\n};\n"],"file":"default.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/image-upload/test/fixtures/desktop.js"],"names":["props","title","uploadLabel","previewLabel","onChange","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,aADF;AAELC,IAAAA,WAAW,EAAE,QAFR;AAGLC,IAAAA,YAAY,EAAE,SAHT;AAILC,IAAAA,QAAQ,EAAE,MAAM,IAJX;AAKLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/image-upload/test/fixtures/desktop.js"],"names":["props","title","uploadLabel","previewLabel","onChange","previewContent","type","src","modified"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,aADF;AAELC,IAAAA,WAAW,EAAE,QAFR;AAGLC,IAAAA,YAAY,EAAE,SAHT;AAILC,IAAAA,QAAQ,EAAE,MAAM,IAJX;AAKLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KALX;AASLC,IAAAA,QAAQ,EAAE;AATL;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Desktop (*)',\n uploadLabel: 'Upload',\n previewLabel: 'Preview',\n onChange: () => true,\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n },\n modified: false\n }\n};\n"],"file":"desktop.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/image-upload/test/fixtures/mobile.js"],"names":["props","Desktop","title","description","previewContent","type","src"],"mappings":";;;;;AAAA;;;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,gBAAhB;eAEe;AACbD,EAAAA,KAAK,wBACAA,KADA;AAEHE,IAAAA,KAAK,EAAE,YAFJ;AAGHC,IAAAA,WAAW,EACT,iKAJC;AAKHC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/image-upload/test/fixtures/mobile.js"],"names":["props","Desktop","title","description","previewContent","type","src","modified"],"mappings":";;;;;AAAA;;;;;;AAEA,MAAM;AAACA,EAAAA;AAAD,IAAUC,gBAAhB;eAEe;AACbD,EAAAA,KAAK,wBACAA,KADA;AAEHE,IAAAA,KAAK,EAAE,YAFJ;AAGHC,IAAAA,WAAW,EACT,iKAJC;AAKHC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KALb;AASHC,IAAAA,QAAQ,EAAE;AATP;AADQ,C","sourcesContent":["import Desktop from './desktop';\n\nconst {props} = Desktop;\n\nexport default {\n props: {\n ...props,\n title: 'Mobile (*)',\n description:\n 'Recommended aspect ratio: 1:1 (e.g. 250px x 250px). Maximum accepted aspect ratio: 2:1 (e.g. 500px x 250px. Meaning, no more than twice as large as it is tall)',\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_mobile-1491560713685.svg'\n },\n modified: false\n }\n};\n"],"file":"mobile.js"}
|
|
@@ -8,6 +8,10 @@ var _renderComponent = _interopRequireDefault(require("../../../test/helpers/ren
|
|
|
8
8
|
|
|
9
9
|
var _ = _interopRequireDefault(require(".."));
|
|
10
10
|
|
|
11
|
+
var _cleanModified = _interopRequireDefault(require("./fixtures/clean-modified"));
|
|
12
|
+
|
|
13
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
14
|
+
|
|
11
15
|
var _desktopResetDescriptionMultiple = _interopRequireDefault(require("./fixtures/desktop-reset-description-multiple"));
|
|
12
16
|
|
|
13
17
|
var _desktopResetDescriptionOnlyPng = _interopRequireDefault(require("./fixtures/desktop-reset-description-only-png"));
|
|
@@ -24,8 +28,6 @@ var _mobile = _interopRequireDefault(require("./fixtures/mobile"));
|
|
|
24
28
|
|
|
25
29
|
var _modified = _interopRequireDefault(require("./fixtures/modified"));
|
|
26
30
|
|
|
27
|
-
var _withoutImage = _interopRequireDefault(require("./fixtures/without-image"));
|
|
28
|
-
|
|
29
31
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
30
32
|
|
|
31
33
|
(0, _ava.default)('Atom › AtomImageUpload > should have valid propTypes', t => {
|
|
@@ -34,6 +36,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
34
36
|
t.not(value, undefined, `PropType for "Atom.AtomImageUpload.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
35
37
|
});
|
|
36
38
|
});
|
|
39
|
+
(0, _ava.default)('Atom › AtomImageUpload › CleanModified › should be rendered', _renderComponent.default, _.default, _cleanModified.default);
|
|
40
|
+
(0, _ava.default)('Atom › AtomImageUpload › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
37
41
|
(0, _ava.default)('Atom › AtomImageUpload › DesktopResetDescriptionMultiple › should be rendered', _renderComponent.default, _.default, _desktopResetDescriptionMultiple.default);
|
|
38
42
|
(0, _ava.default)('Atom › AtomImageUpload › DesktopResetDescriptionOnlyPng › should be rendered', _renderComponent.default, _.default, _desktopResetDescriptionOnlyPng.default);
|
|
39
43
|
(0, _ava.default)('Atom › AtomImageUpload › DesktopResetDescription › should be rendered', _renderComponent.default, _.default, _desktopResetDescription.default);
|
|
@@ -42,5 +46,4 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
42
46
|
(0, _ava.default)('Atom › AtomImageUpload › Email › should be rendered', _renderComponent.default, _.default, _email.default);
|
|
43
47
|
(0, _ava.default)('Atom › AtomImageUpload › Mobile › should be rendered', _renderComponent.default, _.default, _mobile.default);
|
|
44
48
|
(0, _ava.default)('Atom › AtomImageUpload › Modified › should be rendered', _renderComponent.default, _.default, _modified.default);
|
|
45
|
-
(0, _ava.default)('Atom › AtomImageUpload › WithoutImage › should be rendered', _renderComponent.default, _.default, _withoutImage.default);
|
|
46
49
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/image-upload/test/fixtures.js"],"names":["t","pass","AtomImageUpload","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDesktopResetDescriptionMultiple","fixtureDesktopResetDescriptionOnlyPng","fixtureDesktopResetDescription","fixtureDesktopResetNoDescription","fixtureDesktop","fixtureEmail","fixtureMobile","fixtureModified"
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/image-upload/test/fixtures.js"],"names":["t","pass","AtomImageUpload","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCleanModified","fixtureDefault","fixtureDesktopResetDescriptionMultiple","fixtureDesktopResetDescriptionOnlyPng","fixtureDesktopResetDescription","fixtureDesktopResetNoDescription","fixtureDesktop","fixtureEmail","fixtureMobile","fixtureModified"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,sDAAL,EAA6DA,CAAC,IAAI;AAChEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAgBC,SAAxB,EAAmC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACjDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,gDAA+CF,GAAI,mEAA5E;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,6DAAL,EAAoEG,wBAApE,EAA0FN,SAA1F,EAA2GO,sBAA3G;AACA,kBAAK,uDAAL,EAA8DD,wBAA9D,EAAoFN,SAApF,EAAqGQ,gBAArG;AACA,kBAAK,+EAAL,EAAsFF,wBAAtF,EAA4GN,SAA5G,EAA6HS,wCAA7H;AACA,kBAAK,8EAAL,EAAqFH,wBAArF,EAA2GN,SAA3G,EAA4HU,uCAA5H;AACA,kBAAK,uEAAL,EAA8EJ,wBAA9E,EAAoGN,SAApG,EAAqHW,gCAArH;AACA,kBAAK,yEAAL,EAAgFL,wBAAhF,EAAsGN,SAAtG,EAAuHY,kCAAvH;AACA,kBAAK,uDAAL,EAA8DN,wBAA9D,EAAoFN,SAApF,EAAqGa,gBAArG;AACA,kBAAK,qDAAL,EAA4DP,wBAA5D,EAAkFN,SAAlF,EAAmGc,cAAnG;AACA,kBAAK,sDAAL,EAA6DR,wBAA7D,EAAmFN,SAAnF,EAAoGe,eAApG;AACA,kBAAK,wDAAL,EAA+DT,wBAA/D,EAAqFN,SAArF,EAAsGgB,iBAAtG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomImageUpload from '..';\nimport fixtureCleanModified from './fixtures/clean-modified';\nimport fixtureDefault from './fixtures/default';\nimport fixtureDesktopResetDescriptionMultiple from './fixtures/desktop-reset-description-multiple';\nimport fixtureDesktopResetDescriptionOnlyPng from './fixtures/desktop-reset-description-only-png';\nimport fixtureDesktopResetDescription from './fixtures/desktop-reset-description';\nimport fixtureDesktopResetNoDescription from './fixtures/desktop-reset-no-description';\nimport fixtureDesktop from './fixtures/desktop';\nimport fixtureEmail from './fixtures/email';\nimport fixtureMobile from './fixtures/mobile';\nimport fixtureModified from './fixtures/modified';\n\ntest('Atom › AtomImageUpload > should have valid propTypes', t => {\n t.pass();\n forEach(AtomImageUpload.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomImageUpload.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomImageUpload › CleanModified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureCleanModified);\ntest('Atom › AtomImageUpload › Default › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDefault);\ntest('Atom › AtomImageUpload › DesktopResetDescriptionMultiple › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionMultiple);\ntest('Atom › AtomImageUpload › DesktopResetDescriptionOnlyPng › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescriptionOnlyPng);\ntest('Atom › AtomImageUpload › DesktopResetDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetDescription);\ntest('Atom › AtomImageUpload › DesktopResetNoDescription › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktopResetNoDescription);\ntest('Atom › AtomImageUpload › Desktop › should be rendered', renderComponentMacro, AtomImageUpload, fixtureDesktop);\ntest('Atom › AtomImageUpload › Email › should be rendered', renderComponentMacro, AtomImageUpload, fixtureEmail);\ntest('Atom › AtomImageUpload › Mobile › should be rendered', renderComponentMacro, AtomImageUpload, fixtureMobile);\ntest('Atom › AtomImageUpload › Modified › should be rendered', renderComponentMacro, AtomImageUpload, fixtureModified);\n"],"file":"fixtures.js"}
|
|
@@ -32,7 +32,11 @@
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
.cmLoaderContainer {
|
|
35
|
-
|
|
35
|
+
position: relative;
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 0;
|
|
38
|
+
height: 100%;
|
|
39
|
+
width: 100%;
|
|
36
40
|
}
|
|
37
41
|
|
|
38
42
|
.dots {
|
|
@@ -73,8 +77,8 @@
|
|
|
73
77
|
}
|
|
74
78
|
|
|
75
79
|
.icon {
|
|
76
|
-
width:
|
|
77
|
-
height:
|
|
80
|
+
width: 100%;
|
|
81
|
+
height: 100%;
|
|
78
82
|
position: absolute;
|
|
79
83
|
}
|
|
80
84
|
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _current = _interopRequireDefault(require("./fixtures/current"));
|
|
12
|
+
|
|
13
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
14
|
+
|
|
15
|
+
var _right = _interopRequireDefault(require("./fixtures/right"));
|
|
16
|
+
|
|
17
|
+
var _wrong = _interopRequireDefault(require("./fixtures/wrong"));
|
|
18
|
+
|
|
19
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
20
|
+
|
|
21
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem > should have valid propTypes', t => {
|
|
22
|
+
t.pass();
|
|
23
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
24
|
+
t.not(value, undefined, `PropType for "Atom.AtomReviewHeaderStepItem.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
25
|
+
});
|
|
26
|
+
});
|
|
27
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Current › should be rendered', _renderComponent.default, _.default, _current.default);
|
|
28
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
29
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Right › should be rendered', _renderComponent.default, _.default, _right.default);
|
|
30
|
+
(0, _ava.default)('Atom › AtomReviewHeaderStepItem › Wrong › should be rendered', _renderComponent.default, _.default, _wrong.default);
|
|
31
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/review-header-step-item/test/fixtures.js"],"names":["t","pass","AtomReviewHeaderStepItem","propTypes","value","key","not","undefined","renderComponentMacro","fixtureCurrent","fixtureDefault","fixtureRight","fixtureWrong"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+DAAL,EAAsEA,CAAC,IAAI;AACzEA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAyBC,SAAjC,EAA4C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC1DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yDAAwDF,GAAI,mEAArF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gEAAL,EAAuEG,wBAAvE,EAA6FN,SAA7F,EAAuHO,gBAAvH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAuHQ,gBAAvH;AACA,kBAAK,8DAAL,EAAqEF,wBAArE,EAA2FN,SAA3F,EAAqHS,cAArH;AACA,kBAAK,8DAAL,EAAqEH,wBAArE,EAA2FN,SAA3F,EAAqHU,cAArH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomReviewHeaderStepItem from '..';\nimport fixtureCurrent from './fixtures/current';\nimport fixtureDefault from './fixtures/default';\nimport fixtureRight from './fixtures/right';\nimport fixtureWrong from './fixtures/wrong';\n\ntest('Atom › AtomReviewHeaderStepItem > should have valid propTypes', t => {\n t.pass();\n forEach(AtomReviewHeaderStepItem.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomReviewHeaderStepItem.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomReviewHeaderStepItem › Current › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureCurrent);\ntest('Atom › AtomReviewHeaderStepItem › Default › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureDefault);\ntest('Atom › AtomReviewHeaderStepItem › Right › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureRight);\ntest('Atom › AtomReviewHeaderStepItem › Wrong › should be rendered', renderComponentMacro, AtomReviewHeaderStepItem, fixtureWrong);\n"],"file":"fixtures.js"}
|
|
@@ -104,7 +104,9 @@ const buildInput = field => {
|
|
|
104
104
|
return /*#__PURE__*/_react.default.createElement(_inputCheckbox.default, field);
|
|
105
105
|
|
|
106
106
|
case 'image':
|
|
107
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
107
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
108
|
+
className: _style.default.imageUploadContainer
|
|
109
|
+
}, /*#__PURE__*/_react.default.createElement(_imageUpload.default, field));
|
|
108
110
|
|
|
109
111
|
case 'slider':
|
|
110
112
|
return /*#__PURE__*/_react.default.createElement(_setupSlider.default, field);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","ImageUpload","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","SelectMultiple","Roles"],"mappings":";;;;;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clB,SADnB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,UAAD,CAAhB;AAFR,KAhDkB,EAoDlBN,mBAAUI,KAAV,uBACKc,mBAAUnB,SADf;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,MAAD,CAAhB,CAFR;AAGEvB,IAAAA,IAAI,EAAEiB,mBAAUM,KAAV,CAAgB,oBAAKtC,mBAAL,CAAhB;AAHR,KApDkB,EAyDlBgC,mBAAUI,KAAV,uBACKe,0BAAiBpB,SADtB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAzDkB,EA6DlBN,mBAAUI,KAAV,uBACKgB,wBAAerB,SADpB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KA7DkB,EAiElBN,mBAAUI,KAAV,uBACKiB,gBAAOtB,SADZ;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KAjEkB,EAqElBN,mBAAUI,KAAV,uBACKkB,wBAAevB,SADpB;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KArEkB,EAyElBN,mBAAUI,KAAV,uBACKmB,2BAAMxB,SADX;AAEErB,IAAAA,IAAI,EAAEsB,mBAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBN,mBAAUI,KAAV,CAAgBc,mBAAUnB,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;eAuFed,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <ImageUpload {...field} />;\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/brand-form-group/index.js"],"names":["inputContainerStyle","default","style","defaultWidth","medium","mediumWidth","large","largeWidth","buildInput","field","type","imageUploadContainer","buildField","index","input","theme","size","styleInput","BrandFormGroup","props","title","subtitle","fieldsLayout","groupLayout","fields","fieldsList","convert","cap","wrapper","groupGrid","titleWrapper","grid","propTypes","PropTypes","string","arrayOf","oneOfType","shape","Autocomplete","oneOf","InputColor","InputReadonly","InputSwitch","InputTextarea","InputHTML","InputDoublestep","Select","InputCheckbox","ImageUpload","SetupSlider","SetupSections","InputText","BrandDownloadBox","BrandUploadBox","Button","SelectMultiple","Roles"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,mBAAmB,GAAG;AAC1BC,EAAAA,OAAO,EAAEC,eAAMC,YADW;AAE1BC,EAAAA,MAAM,EAAEF,eAAMG,WAFY;AAG1BC,EAAAA,KAAK,EAAEJ,eAAMK;AAHa,CAA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AAEiB,mBAAUM,KAAV,CAAgB,oBAAKvC,mBAAL,CAAhB;AAHR,KApDkB,EAyDlBiC,mBAAUI,KAAV,uBACKe,0BAAiBpB,SADtB;AAEEtB,IAAAA,IAAI,EAAEuB,mBAAUM,KAAV,CAAgB,CAAC,aAAD,CAAhB;AAFR,KAzDkB,EA6DlBN,mBAAUI,KAAV,uBACKgB,wBAAerB,SADpB;AAEEtB,IAAAA,IAAI,EAAEuB,mBAAUM,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KA7DkB,EAiElBN,mBAAUI,KAAV,uBACKiB,gBAAOtB,SADZ;AAEEtB,IAAAA,IAAI,EAAEuB,mBAAUM,KAAV,CAAgB,CAAC,QAAD,CAAhB;AAFR,KAjEkB,EAqElBN,mBAAUI,KAAV,uBACKkB,wBAAevB,SADpB;AAEEtB,IAAAA,IAAI,EAAEuB,mBAAUM,KAAV,CAAgB,CAAC,gBAAD,CAAhB;AAFR,KArEkB,EAyElBN,mBAAUI,KAAV,uBACKmB,2BAAMxB,SADX;AAEEtB,IAAAA,IAAI,EAAEuB,mBAAUM,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KAzEkB,EA6ElBN,mBAAUI,KAAV,CAAgBc,mBAAUnB,SAA1B,CA7EkB,CAApB,CADM;AALiB,CAA3B;eAuFed,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {keys, map, snakeCase} from 'lodash/fp';\nimport classNames from 'classnames';\nimport Autocomplete from '../../atom/autocomplete';\nimport Select from '../../atom/select';\nimport SelectMultiple from '../select-multiple';\nimport InputText from '../../atom/input-text';\nimport InputColor from '../../atom/input-color';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputSwitch from '../../atom/input-switch';\nimport BrandUploadBox from '../brand-upload-box';\nimport BrandDownloadBox from '../brand-download-box';\nimport Button from '../../atom/button';\nimport InputTextarea from '../../atom/input-textarea';\nimport InputHTML from '../../atom/input-html';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupSlider from '../setup-slider';\nimport SetupSections from '../setup-sections';\nimport Title from '../../atom/title';\nimport Roles from '../coorp-manager-roles';\nimport style from './style.css';\n\nconst inputContainerStyle = {\n default: style.defaultWidth,\n medium: style.mediumWidth,\n large: style.largeWidth\n};\n\nconst buildInput = field => {\n const {type} = field;\n\n switch (type) {\n case 'autoComplete':\n return <Autocomplete {...field} />;\n case 'color':\n return <InputColor {...field} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'switch':\n return <InputSwitch {...field} />;\n case 'textarea':\n return <InputTextarea {...field} />;\n case 'html':\n return <InputHTML {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'selectMultiple':\n return <SelectMultiple {...field} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <div className={style.imageUploadContainer}>\n <ImageUpload {...field} />\n </div>\n case 'slider':\n return <SetupSlider {...field} />;\n case 'sections':\n return <SetupSections {...field} />;\n case 'text':\n return <InputText {...field} />;\n case 'downloadbox':\n return <BrandDownloadBox {...field} />;\n case 'uploadbox':\n return <BrandUploadBox {...field} />;\n case 'button':\n case 'link':\n return <Button {...field} />;\n case 'roles':\n return <Roles {...field} />;\n default:\n return <InputText {...field} />;\n }\n};\n\nconst buildField = (field, index) => {\n const input = buildInput(field);\n const {theme, size = 'default'} = field;\n const styleInput = theme === 'coorpmanager' ? inputContainerStyle[size] : style.field;\n\n return (\n <div className={styleInput} key={index}>\n {input}\n </div>\n );\n};\n\nconst BrandFormGroup = props => {\n const {title, subtitle = '', fieldsLayout = '', groupLayout = '', fields = []} = props;\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return (\n <div\n data-name={`brand_form_group_${snakeCase(title)}`}\n className={classNames(style.wrapper, groupLayout === 'grid' && style.groupGrid)}\n >\n <div className={style.titleWrapper}>\n <Title title={title} subtitle={subtitle} type={'form-group'} />\n </div>\n <div className={fieldsLayout === 'grid' ? style.grid : null}>{fieldsList}</div>\n </div>\n );\n};\n\nBrandFormGroup.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n fieldsLayout: PropTypes.string,\n groupLayout: PropTypes.string,\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...Autocomplete.propTypes,\n type: PropTypes.oneOf(['autoComplete']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputColor.propTypes,\n type: PropTypes.oneOf(['color'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...InputTextarea.propTypes,\n type: PropTypes.oneOf(['textarea']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputHTML.propTypes,\n type: PropTypes.oneOf(['html'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...SetupSlider.propTypes,\n type: PropTypes.oneOf(['slider'])\n }),\n PropTypes.shape({\n ...SetupSections.propTypes,\n type: PropTypes.oneOf(['sections'])\n }),\n PropTypes.shape({\n ...InputText.propTypes,\n type: PropTypes.oneOf(['text']),\n size: PropTypes.oneOf(keys(inputContainerStyle))\n }),\n PropTypes.shape({\n ...BrandDownloadBox.propTypes,\n type: PropTypes.oneOf(['downloadbox'])\n }),\n PropTypes.shape({\n ...BrandUploadBox.propTypes,\n type: PropTypes.oneOf(['uploadbox'])\n }),\n PropTypes.shape({\n ...Button.propTypes,\n type: PropTypes.oneOf(['button'])\n }),\n PropTypes.shape({\n ...SelectMultiple.propTypes,\n type: PropTypes.oneOf(['selectMultiple'])\n }),\n PropTypes.shape({\n ...Roles.propTypes,\n type: PropTypes.oneOf(['roles'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default BrandFormGroup;\n"],"file":"index.js"}
|
|
@@ -21,9 +21,13 @@ var _default = {
|
|
|
21
21
|
fields: [_extends(_extends({}, _desktop.default.props), {}, {
|
|
22
22
|
type: 'image'
|
|
23
23
|
}), _extends(_extends({}, _mobile.default.props), {}, {
|
|
24
|
-
type: 'image'
|
|
24
|
+
type: 'image',
|
|
25
|
+
previewContent: {}
|
|
25
26
|
}), _extends(_extends({}, _email.default.props), {}, {
|
|
26
|
-
type: 'image'
|
|
27
|
+
type: 'image',
|
|
28
|
+
modified: false,
|
|
29
|
+
loading: true,
|
|
30
|
+
previewContent: {}
|
|
27
31
|
})]
|
|
28
32
|
}
|
|
29
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/images.js"],"names":["props","title","subtitle","fieldsLayout","fields","Desktop","type","Mobile","Email"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,gBADF;AAELC,IAAAA,QAAQ,EACN,4GAHG;AAILC,IAAAA,YAAY,EAAE,MAJT;AAKLC,IAAAA,MAAM,EAAE,uBAEDC,iBAAQL,KAFP;AAGJM,MAAAA,IAAI,EAAE;AAHF,8BAMDC,gBAAOP,KANN;AAOJM,MAAAA,IAAI,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/brand-form-group/test/fixtures/images.js"],"names":["props","title","subtitle","fieldsLayout","fields","Desktop","type","Mobile","previewContent","Email","modified","loading"],"mappings":";;;;;AAAA;;AACA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,gBADF;AAELC,IAAAA,QAAQ,EACN,4GAHG;AAILC,IAAAA,YAAY,EAAE,MAJT;AAKLC,IAAAA,MAAM,EAAE,uBAEDC,iBAAQL,KAFP;AAGJM,MAAAA,IAAI,EAAE;AAHF,8BAMDC,gBAAOP,KANN;AAOJM,MAAAA,IAAI,EAAE,OAPF;AAQJE,MAAAA,cAAc,EAAE;AARZ,8BAWDC,eAAMT,KAXL;AAYJM,MAAAA,IAAI,EAAE,OAZF;AAaJI,MAAAA,QAAQ,EAAE,KAbN;AAcJC,MAAAA,OAAO,EAAE,IAdL;AAeJH,MAAAA,cAAc,EAAE;AAfZ;AALH;AADM,C","sourcesContent":["import Desktop from '../../../../atom/image-upload/test/fixtures/desktop';\nimport Mobile from '../../../../atom/image-upload/test/fixtures/mobile';\nimport Email from '../../../../atom/image-upload/test/fixtures/email';\n\nexport default {\n props: {\n title: 'Platform logos',\n subtitle:\n '(SVG files are recommanded for retina display. For any other file types, max height recommanded is xxx px)',\n fieldsLayout: 'grid',\n fields: [\n {\n ...Desktop.props,\n type: 'image'\n },\n {\n ...Mobile.props,\n type: 'image',\n previewContent: {}\n },\n {\n ...Email.props,\n type: 'image',\n modified: false,\n loading: true,\n previewContent: {}\n }\n ]\n }\n};\n"],"file":"images.js"}
|
|
@@ -21,7 +21,10 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
21
21
|
|
|
22
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
23
|
|
|
24
|
-
const Loading = () => /*#__PURE__*/_react.default.createElement("div",
|
|
24
|
+
const Loading = () => /*#__PURE__*/_react.default.createElement("div", {
|
|
25
|
+
className: _style.default.loaderContainer
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
27
|
+
className: _style.default.loader,
|
|
25
28
|
theme: "coorpmanager"
|
|
26
29
|
}));
|
|
27
30
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","style","loaderContainer","loader","CourseSections","sections","onDrop","isLoading","title","mandatoryCoursesInput","inputTitle","propTypes","PropTypes","string","arrayOf","shape","CourseSection","func","bool","InputTextWithTitle"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd;AAAK,EAAA,SAAS,EAAEC,eAAMC;AAAtB,gBACE,6BAAC,eAAD;AAAQ,EAAA,SAAS,EAAED,eAAME,MAAzB;AAAiC,EAAA,KAAK,EAAC;AAAvC,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AACtBC,EAAAA,QADsB;AAEtBC,EAAAA,MAFsB;AAGtBC,EAAAA,SAHsB;AAItBC,EAAAA,KAJsB;AAKtBC,EAAAA,qBALsB;AAMtBC,EAAAA;AANsB,CAAD,KAOjB;AACJ,MAAIH,SAAJ,EAAe,oBAAO,6BAAC,OAAD,OAAP;AAEf,sBACE,0CACGG,UAAU,gBACT;AAAK,IAAA,SAAS,EAAET,eAAMO;AAAtB,kBACE,6BAAC,cAAD;AACE,IAAA,KAAK,EAAEE,UADT;AAEE,IAAA,IAAI,EAAE,YAFR;AAGE,iBAAW;AAHb,IADF,CADS,GAQP,IATN,EAUGD,qBAAqB,gBACpB;AAAK,IAAA,SAAS,EAAER,eAAMQ;AAAtB,kBACE,6BAAC,2BAAD,EAAwBA,qBAAxB,CADF,CADoB,GAIlB,IAdN,EAeGD,KAAK,gBACJ;AAAK,IAAA,SAAS,EAAEP,eAAMO;AAAtB,kBACE,6BAAC,cAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADI,GAIF,IAnBN,eAoBE,6BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAC,gBAAxB;AAAyC,IAAA,KAAK,EAAEH,QAAhD;AAA0D,IAAA,MAAM,EAAEC;AAAlE,IApBF,CADF;AAwBD,CAlCD;;AAoCAF,cAAc,CAACO,SAAf,2CAA2B;AACzBD,EAAAA,UAAU,EAAEE,mBAAUC,MADG;AAEzBL,EAAAA,KAAK,EAAEI,mBAAUC,MAFQ;AAGzBR,EAAAA,QAAQ,EAAEO,mBAAUE,OAAV,CAAkBF,mBAAUG,KAAV,CAAgBC,uBAAcL,SAA9B,CAAlB,CAHe;AAIzBL,EAAAA,MAAM,EAAEM,mBAAUK,IAJO;AAKzBV,EAAAA,SAAS,EAAEK,mBAAUM,IALI;AAMzBT,EAAAA,qBAAqB,EAAEG,mBAAUG,KAAV,CAAgBI,4BAAmBR,SAAnC;AANE,CAA3B;eASeP,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputTextWithTitle from '../../atom/input-text-with-title';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({\n sections,\n onDrop,\n isLoading,\n title,\n mandatoryCoursesInput,\n inputTitle\n}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\n {inputTitle ? (\n <div className={style.title}>\n <Title\n title={inputTitle}\n type={'form-group'}\n data-name={'mandatory-courses-input-title'}\n />\n </div>\n ) : null}\n {mandatoryCoursesInput ? (\n <div className={style.mandatoryCoursesInput}>\n <InputTextWithTitle {...mandatoryCoursesInput} />\n </div>\n ) : null}\n {title ? (\n <div className={style.title}>\n <Title title={title} type={'form-group'} data-name={'course-sections-title'} />\n </div>\n ) : null}\n <DraggableList itemType=\"course-section\" items={sections} onDrop={onDrop} />\n </div>\n );\n};\n\nCourseSections.propTypes = {\n inputTitle: PropTypes.string,\n title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool,\n mandatoryCoursesInput: PropTypes.shape(InputTextWithTitle.propTypes)\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _allQuestionsOk = _interopRequireDefault(require("./fixtures/all-questions-ok"));
|
|
12
|
+
|
|
13
|
+
var _currentQuestionNoAswered = _interopRequireDefault(require("./fixtures/current-question-no-aswered"));
|
|
14
|
+
|
|
15
|
+
var _currentQuestionWrong = _interopRequireDefault(require("./fixtures/current-question-wrong"));
|
|
16
|
+
|
|
17
|
+
var _firstQuestionCurrentRight = _interopRequireDefault(require("./fixtures/first-question-current-right"));
|
|
18
|
+
|
|
19
|
+
var _noAnsweredQuestion = _interopRequireDefault(require("./fixtures/no-answered-question"));
|
|
20
|
+
|
|
21
|
+
var _questionToRepeat = _interopRequireDefault(require("./fixtures/question-to-repeat"));
|
|
22
|
+
|
|
23
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
+
|
|
25
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps > should have valid propTypes', t => {
|
|
26
|
+
t.pass();
|
|
27
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
28
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeReviewHeaderSteps.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › AllQuestionsOk › should be rendered', _renderComponent.default, _.default, _allQuestionsOk.default);
|
|
32
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionNoAswered › should be rendered', _renderComponent.default, _.default, _currentQuestionNoAswered.default);
|
|
33
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionWrong › should be rendered', _renderComponent.default, _.default, _currentQuestionWrong.default);
|
|
34
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › FirstQuestionCurrentRight › should be rendered', _renderComponent.default, _.default, _firstQuestionCurrentRight.default);
|
|
35
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › NoAnsweredQuestion › should be rendered', _renderComponent.default, _.default, _noAnsweredQuestion.default);
|
|
36
|
+
(0, _ava.default)('Molecule › MoleculeReviewHeaderSteps › QuestionToRepeat › should be rendered', _renderComponent.default, _.default, _questionToRepeat.default);
|
|
37
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/review-header-steps/test/fixtures.js"],"names":["t","pass","MoleculeReviewHeaderSteps","propTypes","value","key","not","undefined","renderComponentMacro","fixtureAllQuestionsOk","fixtureCurrentQuestionNoAswered","fixtureCurrentQuestionWrong","fixtureFirstQuestionCurrentRight","fixtureNoAnsweredQuestion","fixtureQuestionToRepeat"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,oEAAL,EAA2EA,CAAC,IAAI;AAC9EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAA0BC,SAAlC,EAA6C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AAC3DL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,8DAA6DF,GAAI,mEAA1F;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,4EAAL,EAAmFG,wBAAnF,EAAyGN,SAAzG,EAAoIO,uBAApI;AACA,kBAAK,sFAAL,EAA6FD,wBAA7F,EAAmHN,SAAnH,EAA8IQ,iCAA9I;AACA,kBAAK,kFAAL,EAAyFF,wBAAzF,EAA+GN,SAA/G,EAA0IS,6BAA1I;AACA,kBAAK,uFAAL,EAA8FH,wBAA9F,EAAoHN,SAApH,EAA+IU,kCAA/I;AACA,kBAAK,gFAAL,EAAuFJ,wBAAvF,EAA6GN,SAA7G,EAAwIW,2BAAxI;AACA,kBAAK,8EAAL,EAAqFL,wBAArF,EAA2GN,SAA3G,EAAsIY,yBAAtI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeReviewHeaderSteps from '..';\nimport fixtureAllQuestionsOk from './fixtures/all-questions-ok';\nimport fixtureCurrentQuestionNoAswered from './fixtures/current-question-no-aswered';\nimport fixtureCurrentQuestionWrong from './fixtures/current-question-wrong';\nimport fixtureFirstQuestionCurrentRight from './fixtures/first-question-current-right';\nimport fixtureNoAnsweredQuestion from './fixtures/no-answered-question';\nimport fixtureQuestionToRepeat from './fixtures/question-to-repeat';\n\ntest('Molecule › MoleculeReviewHeaderSteps > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeReviewHeaderSteps.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeReviewHeaderSteps.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeReviewHeaderSteps › AllQuestionsOk › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureAllQuestionsOk);\ntest('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionNoAswered › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionNoAswered);\ntest('Molecule › MoleculeReviewHeaderSteps › CurrentQuestionWrong › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureCurrentQuestionWrong);\ntest('Molecule › MoleculeReviewHeaderSteps › FirstQuestionCurrentRight › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureFirstQuestionCurrentRight);\ntest('Molecule › MoleculeReviewHeaderSteps › NoAnsweredQuestion › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureNoAnsweredQuestion);\ntest('Molecule › MoleculeReviewHeaderSteps › QuestionToRepeat › should be rendered', renderComponentMacro, MoleculeReviewHeaderSteps, fixtureQuestionToRepeat);\n"],"file":"fixtures.js"}
|
|
@@ -56,7 +56,9 @@ const SetupSlide = props => {
|
|
|
56
56
|
return /*#__PURE__*/_react.default.createElement(_inputCheckbox.default, field);
|
|
57
57
|
|
|
58
58
|
case 'image':
|
|
59
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
59
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
60
|
+
className: _style.default.imageUploadContainer
|
|
61
|
+
}, /*#__PURE__*/_react.default.createElement(_imageUpload.default, field));
|
|
60
62
|
|
|
61
63
|
case 'splitForm':
|
|
62
64
|
return /*#__PURE__*/_react.default.createElement(_setupCohortItem.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/setup-slide/index.js"],"names":["SetupSlide","props","fields","buildInput","field","type","title","subtitle","buildField","index","input","
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/setup-slide/index.js"],"names":["SetupSlide","props","fields","buildInput","field","type","style","imageUploadContainer","title","subtitle","buildField","index","input","fieldsList","convert","cap","wrapper","defaultProps","propTypes","PropTypes","arrayOf","oneOfType","shape","InputSwitch","oneOf","Select","InputCheckbox","ImageUpload","InputReadonly","InputDoublestep","SetupCohortItem","MessagePopin","InputText"],"mappings":";;;;;;;AAAA;;AAC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,IAAAA,IAAI,EAAEc,mBAAUK,KAAV,CAAgB,CAAC,WAAD,CAAhB;AAFR,KAzBkB,EA6BlBL,mBAAUG,KAAV,uBACKS,sBAAab,SADlB;AAEEb,IAAAA,IAAI,EAAEc,mBAAUK,KAAV,CAAgB,CAAC,OAAD,CAAhB;AAFR,KA7BkB,EAiClBL,mBAAUG,KAAV,CAAgBU,mBAAUd,SAA1B,CAjCkB,CAApB,CADM;AADa,CAAvB;eAuCelB,U","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {map} from 'lodash/fp';\nimport Select from '../../atom/select';\nimport InputReadonly from '../../atom/input-readonly';\nimport InputText from '../../atom/input-text';\nimport InputCheckbox from '../../atom/input-checkbox';\nimport InputDoublestep from '../../atom/input-doublestep';\nimport InputSwitch from '../../atom/input-switch';\nimport ImageUpload from '../../atom/image-upload';\nimport SetupCohortItem from '../setup-cohort-item';\nimport MessagePopin from '../message-popin';\nimport style from './style.css';\n\nconst SetupSlide = props => {\n const {fields} = props;\n const buildInput = field => {\n const {type} = field;\n switch (type) {\n case 'switch':\n return <InputSwitch {...field} />;\n case 'select':\n return <Select {...field} theme={'coorpmanager'} />;\n case 'checkbox':\n return <InputCheckbox {...field} />;\n case 'image':\n return <div className={style.imageUploadContainer}><ImageUpload {...field} /></div>;\n case 'splitForm':\n return <SetupCohortItem field={field} />;\n case 'alert':\n return <MessagePopin header={field.title} content={field.subtitle} />;\n case 'readonly':\n return <InputReadonly {...field} />;\n case 'doublestep':\n return <InputDoublestep {...field} />;\n default:\n return <InputText {...field} />;\n }\n };\n\n const buildField = (field, index) => {\n const input = buildInput(field);\n return (\n <div className={style.field} key={index}>\n {input}\n </div>\n );\n };\n\n const fieldsList = map.convert({cap: false})(buildField, fields);\n\n return <div className={style.wrapper}>{fieldsList}</div>;\n};\n\nSetupSlide.defaultProps = {\n fields: []\n};\n\nSetupSlide.propTypes = {\n fields: PropTypes.arrayOf(\n PropTypes.oneOfType([\n PropTypes.shape({\n ...InputSwitch.propTypes,\n type: PropTypes.oneOf(['switch'])\n }),\n PropTypes.shape({\n ...Select.propTypes,\n type: PropTypes.oneOf(['select'])\n }),\n PropTypes.shape({\n ...InputCheckbox.propTypes,\n type: PropTypes.oneOf(['checkbox'])\n }),\n PropTypes.shape({\n ...ImageUpload.propTypes,\n type: PropTypes.oneOf(['image'])\n }),\n PropTypes.shape({\n ...InputReadonly.propTypes,\n type: PropTypes.oneOf(['readonly'])\n }),\n PropTypes.shape({\n ...InputDoublestep.propTypes,\n type: PropTypes.oneOf(['doublestep'])\n }),\n PropTypes.shape({\n ...SetupCohortItem.propTypes,\n type: PropTypes.oneOf(['splitForm'])\n }),\n PropTypes.shape({\n ...MessagePopin.propTypes,\n type: PropTypes.oneOf(['alert'])\n }),\n PropTypes.shape(InputText.propTypes)\n ])\n )\n};\nexport default SetupSlide;\n"],"file":"index.js"}
|
|
@@ -75,8 +75,9 @@ const CourseSelection = props => {
|
|
|
75
75
|
className: _style.default.cardsContainer,
|
|
76
76
|
"data-name": 'courses-result'
|
|
77
77
|
}, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
78
|
-
className: _style.default.
|
|
78
|
+
className: _style.default.loaderContainer
|
|
79
79
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
80
|
+
className: _style.default.loader,
|
|
80
81
|
theme: "coorpmanager"
|
|
81
82
|
})) : resultView));
|
|
82
83
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","isLoading","items","map","card","index","title","type","style","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA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AAK,IAAA,SAAS,EAAEJ,eAAMU;AAAtB,kBACE,6BAAC,uBAAD,EAAoBL,iBAApB,CADF,CAJF,eAOE,6BAAC,oBAAD,EAAiBC,YAAjB,CAPF,CADF,eAUE;AAAK,IAAA,SAAS,EAAEN,eAAMW,cAAtB;AAAsC,iBAAW;AAAjD,KACGlB,SAAS,gBACR;AAAK,IAAA,SAAS,EAAEO,eAAMY;AAAtB,kBACE,6BAAC,eAAD;AAAQ,IAAA,KAAK,EAAC;
|
|
1
|
+
{"version":3,"sources":["../../../src/organism/course-selection/index.js"],"names":["buildResultView","courses","coursesSelectionAriaLabel","emptyMessages","isLoading","items","map","card","index","title","type","style","cards","CourseSelection","props","search","contentTypeFilter","switchButton","resultView","container","filters","contentFilter","cardsContainer","loaderContainer","loader","propTypes","PropTypes","shape","Search","bool","SelectMultiple","arrayOf","Card","string","firstMessage","secondMessage","InputSwitch"],"mappings":";;;;;;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,eAAe,GAAG,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SAApD,KAAkE;AACxF,MAAI,CAACA,SAAD,IAAc,uBAAQH,OAAR,CAAlB,EAAoC;AAClC,wBAAO,6BAAC,0BAAD,EAAuBE,aAAvB,CAAP;AACD;;AAED,QAAME,KAAK,GAAGJ,OAAO,CAACK,GAAR,CAAY,CAACC,IAAD,EAAOC,KAAP,KAAiB;AACzC,UAAMC,KAAK,GAAG,mBAAI,OAAJ,EAAaF,IAAb,CAAd;AACA,UAAMG,IAAI,GAAG,mBAAI,MAAJ,EAAYH,IAAZ,CAAb;AACA,wBACE;AAAI,MAAA,SAAS,EAAEI,eAAMC,KAArB;AAA4B,MAAA,GAAG,EAAG,QAAOJ,KAAM,EAA/C;AAAkD,mBAAY,GAAEE,IAAK,IAAG,yBAAUD,KAAV,CAAiB;AAAzF,oBACE,6BAAC,aAAD,EAAUF,IAAV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AEU,mBAAUC,KAAV,CAAgBG,wBAAeJ,SAA/B,CAHO;AAI1BzB,EAAAA,OAAO,EAAEyB,mBAAUK,OAAV,CAAkBL,mBAAUC,KAAV,CAAgBK,cAAKP,SAArB,CAAlB,CAJiB;AAK1B,kCAAgCC,mBAAUO,MALhB;AAM1B9B,EAAAA,aAAa,EAAEuB,mBAAUC,KAAV,CAAgB;AAC7BO,IAAAA,YAAY,EAAER,mBAAUO,MADK;AAE7BE,IAAAA,aAAa,EAAET,mBAAUO;AAFI,GAAhB,CANW;AAU1BhB,EAAAA,YAAY,EAAES,mBAAUC,KAAV,CAAgBS,qBAAYV,SAA5B;AAVY,CAA5B;eAaeb,e","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, get, kebabCase} from 'lodash/fp';\nimport EmptySearchResult from '../../atom/empty-search-result';\nimport Search from '../../atom/input-search';\nimport SelectMultiple from '../../molecule/select-multiple';\nimport Card from '../../molecule/card';\nimport InputSwitch from '../../atom/input-switch';\nimport Loader from '../../atom/loader';\nimport style from './style.css';\n\nconst buildResultView = (courses, coursesSelectionAriaLabel, emptyMessages, isLoading) => {\n if (!isLoading && isEmpty(courses)) {\n return <EmptySearchResult {...emptyMessages} />;\n }\n\n const items = courses.map((card, index) => {\n const title = get('title', card);\n const type = get('type', card);\n return (\n <li className={style.cards} key={`card-${index}`} data-name={`${type}-${kebabCase(title)}`}>\n <Card {...card} />\n </li>\n );\n });\n\n return <ul aria-label={coursesSelectionAriaLabel}>{items}</ul>;\n};\n\nconst CourseSelection = props => {\n const {\n search,\n contentTypeFilter,\n courses,\n emptyMessages,\n isLoading = false,\n 'courses-selection-aria-label': coursesSelectionAriaLabel,\n switchButton\n } = props;\n\n const resultView = buildResultView(courses, coursesSelectionAriaLabel, emptyMessages, isLoading);\n\n return (\n <div className={style.container}>\n <div className={style.filters}>\n <div className={style.search}>\n <Search {...search} theme=\"coorpmanager\" />\n </div>\n <div className={style.contentFilter}>\n <SelectMultiple {...contentTypeFilter} />\n </div>\n <InputSwitch {...switchButton} />\n </div>\n <div className={style.cardsContainer} data-name={'courses-result'}>\n {isLoading ? (\n <div className={style.loaderContainer}>\n <Loader className={style.loader} theme=\"coorpmanager\" />\n </div>\n ) : (\n resultView\n )}\n </div>\n </div>\n );\n};\n\nCourseSelection.propTypes = {\n search: PropTypes.shape(Search.PropTypes),\n isLoading: PropTypes.bool,\n contentTypeFilter: PropTypes.shape(SelectMultiple.PropTypes),\n courses: PropTypes.arrayOf(PropTypes.shape(Card.propTypes)),\n 'courses-selection-aria-label': PropTypes.string,\n emptyMessages: PropTypes.shape({\n firstMessage: PropTypes.string,\n secondMessage: PropTypes.string\n }),\n switchButton: PropTypes.shape(InputSwitch.PropTypes)\n};\n\nexport default CourseSelection;\n"],"file":"index.js"}
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
@value cm_grey_900 from colors;
|
|
5
5
|
|
|
6
6
|
.container {
|
|
7
|
+
height: 100%;
|
|
7
8
|
width: 100%;
|
|
8
9
|
}
|
|
9
10
|
|
|
@@ -26,6 +27,7 @@
|
|
|
26
27
|
|
|
27
28
|
.cardsContainer {
|
|
28
29
|
margin: 24px 0 0 0;
|
|
30
|
+
height: 100%;
|
|
29
31
|
width: 100%;
|
|
30
32
|
}
|
|
31
33
|
|
|
@@ -34,8 +36,15 @@
|
|
|
34
36
|
margin: 0 16px 16px 0px;
|
|
35
37
|
}
|
|
36
38
|
|
|
37
|
-
.
|
|
38
|
-
position: relative;
|
|
39
|
-
min-height: 50vh;
|
|
39
|
+
.loaderContainer {
|
|
40
40
|
width: 100%;
|
|
41
|
+
height: 50vh;
|
|
42
|
+
display: flex;
|
|
43
|
+
align-items: center;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.loader {
|
|
48
|
+
height: 60px;
|
|
49
|
+
width: 60px;
|
|
41
50
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
11
|
+
|
|
12
|
+
var _default = _extends(_extends({}, _default2.default), {}, {
|
|
13
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
+
isLoading: true
|
|
15
|
+
})
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
exports.default = _default;
|
|
19
|
+
//# sourceMappingURL=loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/organism/course-selection/test/fixtures/loading.js"],"names":["props","isLoading"],"mappings":";;;;;AAAA;;;;;;qCAGOA,iB;AACHA,EAAAA,KAAK,wBACEA,kBAAMA,KADR;AAEDC,IAAAA,SAAS,EAAE;AAFV","sourcesContent":["import props from './default';\n\nexport default {\n ...props,\n props: {\n ...props.props,\n isLoading: true\n }\n}\n"],"file":"loading.js"}
|
|
@@ -14,6 +14,8 @@ var _empty = _interopRequireDefault(require("./fixtures/empty"));
|
|
|
14
14
|
|
|
15
15
|
var _filtered = _interopRequireDefault(require("./fixtures/filtered"));
|
|
16
16
|
|
|
17
|
+
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
18
|
+
|
|
17
19
|
var _sortedSelected = _interopRequireDefault(require("./fixtures/sorted-selected"));
|
|
18
20
|
|
|
19
21
|
var _switchActivated = _interopRequireDefault(require("./fixtures/switch-activated"));
|
|
@@ -31,6 +33,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
31
33
|
(0, _ava.default)('Organism › OrganismCourseSelection › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
32
34
|
(0, _ava.default)('Organism › OrganismCourseSelection › Empty › should be rendered', _renderComponent.default, _.default, _empty.default);
|
|
33
35
|
(0, _ava.default)('Organism › OrganismCourseSelection › Filtered › should be rendered', _renderComponent.default, _.default, _filtered.default);
|
|
36
|
+
(0, _ava.default)('Organism › OrganismCourseSelection › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
34
37
|
(0, _ava.default)('Organism › OrganismCourseSelection › SortedSelected › should be rendered', _renderComponent.default, _.default, _sortedSelected.default);
|
|
35
38
|
(0, _ava.default)('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', _renderComponent.default, _.default, _switchActivated.default);
|
|
36
39
|
(0, _ava.default)('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', _renderComponent.default, _.default, _unsortedSelected.default);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["t","pass","OrganismCourseSelection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kEAAL,EAAyEA,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAwBC,SAAhC,EAA2C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAAyHO,gBAAzH;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAuHQ,cAAvH;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAA0HS,iBAA1H;AACA,kBAAK,0EAAL,
|
|
1
|
+
{"version":3,"sources":["../../../../src/organism/course-selection/test/fixtures.js"],"names":["t","pass","OrganismCourseSelection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureEmpty","fixtureFiltered","fixtureLoading","fixtureSortedSelected","fixtureSwitchActivated","fixtureUnsortedSelected"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,kEAAL,EAAyEA,CAAC,IAAI;AAC5EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAwBC,SAAhC,EAA2C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACzDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,4DAA2DF,GAAI,mEAAxF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,mEAAL,EAA0EG,wBAA1E,EAAgGN,SAAhG,EAAyHO,gBAAzH;AACA,kBAAK,iEAAL,EAAwED,wBAAxE,EAA8FN,SAA9F,EAAuHQ,cAAvH;AACA,kBAAK,oEAAL,EAA2EF,wBAA3E,EAAiGN,SAAjG,EAA0HS,iBAA1H;AACA,kBAAK,mEAAL,EAA0EH,wBAA1E,EAAgGN,SAAhG,EAAyHU,gBAAzH;AACA,kBAAK,0EAAL,EAAiFJ,wBAAjF,EAAuGN,SAAvG,EAAgIW,uBAAhI;AACA,kBAAK,2EAAL,EAAkFL,wBAAlF,EAAwGN,SAAxG,EAAiIY,wBAAjI;AACA,kBAAK,4EAAL,EAAmFN,wBAAnF,EAAyGN,SAAzG,EAAkIa,yBAAlI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport OrganismCourseSelection from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureEmpty from './fixtures/empty';\nimport fixtureFiltered from './fixtures/filtered';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureSortedSelected from './fixtures/sorted-selected';\nimport fixtureSwitchActivated from './fixtures/switch-activated';\nimport fixtureUnsortedSelected from './fixtures/unsorted-selected';\n\ntest('Organism › OrganismCourseSelection > should have valid propTypes', t => {\n t.pass();\n forEach(OrganismCourseSelection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Organism.OrganismCourseSelection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Organism › OrganismCourseSelection › Default › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureDefault);\ntest('Organism › OrganismCourseSelection › Empty › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureEmpty);\ntest('Organism › OrganismCourseSelection › Filtered › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureFiltered);\ntest('Organism › OrganismCourseSelection › Loading › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureLoading);\ntest('Organism › OrganismCourseSelection › SortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSortedSelected);\ntest('Organism › OrganismCourseSelection › SwitchActivated › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureSwitchActivated);\ntest('Organism › OrganismCourseSelection › UnsortedSelected › should be rendered', renderComponentMacro, OrganismCourseSelection, fixtureUnsortedSelected);\n"],"file":"fixtures.js"}
|
|
@@ -83,8 +83,9 @@ const SearchAndChipsResults = props => {
|
|
|
83
83
|
})))), /*#__PURE__*/_react.default.createElement("div", {
|
|
84
84
|
className: _style.default.resultContainer
|
|
85
85
|
}, isLoading ? /*#__PURE__*/_react.default.createElement("div", {
|
|
86
|
-
className: _style.default.
|
|
86
|
+
className: _style.default.loaderContainer
|
|
87
87
|
}, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
88
|
+
className: _style.default.loader,
|
|
88
89
|
theme: "coorpmanager"
|
|
89
90
|
})) : resultView));
|
|
90
91
|
};
|