@coorpacademy/components 10.13.0 → 10.13.3-alpha.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/atom/checkbox-with-title/test/fixtures.js +15 -0
- package/es/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/es/atom/drag-and-drop/index.js +39 -36
- package/es/atom/drag-and-drop/index.js.map +1 -1
- package/es/atom/drag-and-drop/style.css +110 -75
- package/es/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/es/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- 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/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 +9 -0
- package/es/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/es/atom/drag-and-drop/test/fixtures.js +2 -0
- package/es/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/es/atom/input-text-with-title/index.js +35 -0
- package/es/atom/input-text-with-title/index.js.map +1 -0
- package/es/atom/input-text-with-title/style.css +24 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js +12 -0
- package/es/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js +13 -0
- package/es/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/es/atom/input-text-with-title/test/fixtures.js +15 -0
- package/es/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/es/atom/loader/style.css +7 -3
- package/es/molecule/course-sections/index.js +20 -4
- package/es/molecule/course-sections/index.js.map +1 -1
- package/es/molecule/course-sections/style.css +17 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +11 -0
- package/es/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures.js +2 -0
- package/es/molecule/course-sections/test/fixtures.js.map +1 -1
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js +15 -0
- package/es/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/es/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/organism/wizard-contents/style.css +0 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/es/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/{molecule → atom}/checkbox-with-title/test/fixtures.js +4 -4
- package/lib/atom/checkbox-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/drag-and-drop/index.js +39 -34
- package/lib/atom/drag-and-drop/index.js.map +1 -1
- package/lib/atom/drag-and-drop/style.css +110 -75
- package/lib/atom/drag-and-drop/test/fixtures/default.js +3 -3
- package/lib/atom/drag-and-drop/test/fixtures/default.js.map +1 -1
- 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/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 +18 -0
- package/lib/atom/drag-and-drop/test/fixtures/withLongDescription.js.map +1 -0
- package/lib/atom/drag-and-drop/test/fixtures.js +3 -0
- package/lib/atom/drag-and-drop/test/fixtures.js.map +1 -1
- package/lib/atom/input-text-with-title/index.js +46 -0
- package/lib/atom/input-text-with-title/index.js.map +1 -0
- package/lib/atom/input-text-with-title/style.css +24 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js +21 -0
- package/lib/atom/input-text-with-title/test/fixtures/default.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js +22 -0
- package/lib/atom/input-text-with-title/test/fixtures/error.js.map +1 -0
- package/lib/atom/input-text-with-title/test/fixtures.js +25 -0
- package/lib/atom/input-text-with-title/test/fixtures.js.map +1 -0
- package/lib/atom/loader/style.css +7 -3
- package/lib/molecule/course-sections/index.js +21 -4
- package/lib/molecule/course-sections/index.js.map +1 -1
- package/lib/molecule/course-sections/style.css +17 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js +21 -0
- package/lib/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures.js +3 -0
- package/lib/molecule/course-sections/test/fixtures.js.map +1 -1
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js +25 -0
- package/lib/molecule/input-text-with-titeled-checkbox/test/fixtures.js.map +1 -0
- package/lib/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/organism/wizard-contents/style.css +0 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +2 -2
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -1
- package/lib/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/molecule/checkbox-with-title/test/fixtures.js +0 -15
- package/es/molecule/checkbox-with-title/test/fixtures.js.map +0 -1
- package/es/molecule/cockpit-popin/test/fixtures.js +0 -17
- package/es/molecule/cockpit-popin/test/fixtures.js.map +0 -1
- package/lib/molecule/checkbox-with-title/test/fixtures.js.map +0 -1
- package/lib/molecule/cockpit-popin/test/fixtures.js +0 -28
- package/lib/molecule/cockpit-popin/test/fixtures.js.map +0 -1
|
@@ -4,9 +4,9 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
-
title: 'Drag &
|
|
8
|
-
description: '
|
|
9
|
-
uploadLabel: '
|
|
7
|
+
title: 'Drag & drop here',
|
|
8
|
+
description: 'JPG or PNG, smaller than 5mb',
|
|
9
|
+
uploadLabel: 'Browse',
|
|
10
10
|
previewLabel: 'File Preview'
|
|
11
11
|
}
|
|
12
12
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/default.js"],"names":["props","title","description","uploadLabel","previewLabel"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/default.js"],"names":["props","title","description","uploadLabel","previewLabel"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,kBADF;AAELC,IAAAA,WAAW,EAAE,8BAFR;AAGLC,IAAAA,WAAW,EAAE,QAHR;AAILC,IAAAA,YAAY,EAAE;AAJT;AADM,C","sourcesContent":["export default {\n props: {\n title: 'Drag & drop here',\n description: 'JPG or PNG, smaller than 5mb',\n uploadLabel: 'Browse',\n previewLabel: 'File Preview'\n }\n};\n"],"file":"default.js"}
|
|
@@ -11,7 +11,8 @@ function _extends() { _extends = Object.assign || function (target) { for (var i
|
|
|
11
11
|
|
|
12
12
|
var _default = {
|
|
13
13
|
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
-
loading: true
|
|
14
|
+
loading: true,
|
|
15
|
+
modified: false
|
|
15
16
|
})
|
|
16
17
|
};
|
|
17
18
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/loading.js"],"names":["props","Default","loading"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,kBAAQD,KADR;AAEHE,IAAAA,OAAO,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/loading.js"],"names":["props","Default","loading","modified"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAC,kBAAQD,KADR;AAEHE,IAAAA,OAAO,EAAE,IAFN;AAGHC,IAAAA,QAAQ,EAAE;AAHP;AADQ,C","sourcesContent":["import Default from './default';\n\nexport default {\n props: {\n ...Default.props,\n loading: true,\n modified: false\n }\n};\n"],"file":"loading.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-children.js"],"names":["props","previewContent","type","src","title","displayName","uploadLabel","children","onDragStart","onDragStop","style","input"],"mappings":";;;;;AAAA;;AACA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-children.js"],"names":["props","modified","previewContent","type","src","title","displayName","uploadLabel","children","onDragStart","onDragStop","style","input"],"mappings":";;;;;AAAA;;AACA;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KAFX;AAMLC,IAAAA,KAAK,EAAE,aANF;AAOLC,IAAAA,WAAW,EAAE,cAPR;AAQLC,IAAAA,WAAW,EAAE;AARR,GADM;AAWb;AACAC,EAAAA,QAAQ,EAAE,CAACC,WAAD,EAAcC,UAAd,kBACR;AACE,IAAA,SAAS,EAAEC,eAAMC,KADnB;AAEE,IAAA,GAAG,EAAC,GAFN;AAGE,IAAA,IAAI,EAAC,MAHP;AAIE,IAAA,MAAM,EAAC,SAJT;AAKE,IAAA,QAAQ,EAAE,MAAM,IALlB;AAME,IAAA,WAAW,EAAEH,WANf;AAOE,IAAA,MAAM,EAAEC,UAPV;AAQE,IAAA,WAAW,EAAEA;AARf;AAbW,C","sourcesContent":["import React from 'react';\nimport style from '../../../image-upload/style.css';\n\nexport default {\n props: {\n modified: true,\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n },\n title: 'Desktop (*)',\n displayName: 'Upload image',\n uploadLabel: 'Upload'\n },\n // eslint-disable-next-line react/display-name\n children: (onDragStart, onDragStop) => (\n <input\n className={style.input}\n key=\"1\"\n type=\"file\"\n accept=\"image*/\"\n onChange={() => true}\n onDragEnter={onDragStart}\n onDrop={onDragStop}\n onDragLeave={onDragStop}\n />\n )\n};\n"],"file":"with-children.js"}
|
|
@@ -4,13 +4,14 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
+
modified: true,
|
|
7
8
|
title: 'Drag & Drop With Image',
|
|
8
9
|
description: 'Drag and drop component with an image',
|
|
9
10
|
uploadLabel: 'Upload Image(s)',
|
|
10
11
|
previewLabel: 'File Preview',
|
|
11
12
|
previewContent: {
|
|
12
13
|
type: 'image',
|
|
13
|
-
src: 'https://static.coorpacademy.com/content/up/raw/
|
|
14
|
+
src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-image.js"],"names":["props","modified","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,KAAK,EAAE,wBAFF;AAGLC,IAAAA,WAAW,EAAE,uCAHR;AAILC,IAAAA,WAAW,EAAE,iBAJR;AAKLC,IAAAA,YAAY,EAAE,cALT;AAMLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS;AANX;AADM,C","sourcesContent":["export default {\n props: {\n modified: true,\n title: 'Drag & Drop With Image',\n description: 'Drag and drop component with an image',\n uploadLabel: 'Upload Image(s)',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'image',\n src: 'https://static.coorpacademy.com/content/up/raw/logo_coorp-1491560495763.svg'\n }\n }\n};\n"],"file":"with-image.js"}
|
|
@@ -4,6 +4,7 @@ exports.__esModule = true;
|
|
|
4
4
|
exports.default = void 0;
|
|
5
5
|
var _default = {
|
|
6
6
|
props: {
|
|
7
|
+
modified: true,
|
|
7
8
|
title: 'Drag & Drop',
|
|
8
9
|
description: 'Drag and drop component with a video',
|
|
9
10
|
uploadLabel: 'Upload',
|
|
@@ -11,7 +12,8 @@ var _default = {
|
|
|
11
12
|
previewContent: {
|
|
12
13
|
type: 'video',
|
|
13
14
|
src: 'https://www.w3schools.com/tags/movie.mp4'
|
|
14
|
-
}
|
|
15
|
+
},
|
|
16
|
+
onReset: () => console.log('reset')
|
|
15
17
|
}
|
|
16
18
|
};
|
|
17
19
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-video.js"],"names":["props","title","description","uploadLabel","previewLabel","previewContent","type","src"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/with-video.js"],"names":["props","modified","title","description","uploadLabel","previewLabel","previewContent","type","src","onReset","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,IADL;AAELC,IAAAA,KAAK,EAAE,aAFF;AAGLC,IAAAA,WAAW,EAAE,sCAHR;AAILC,IAAAA,WAAW,EAAE,QAJR;AAKLC,IAAAA,YAAY,EAAE,cALT;AAMLC,IAAAA,cAAc,EAAE;AACdC,MAAAA,IAAI,EAAE,OADQ;AAEdC,MAAAA,GAAG,EAAE;AAFS,KANX;AAULC,IAAAA,OAAO,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,OAAZ;AAVV;AADM,C","sourcesContent":["export default {\n props: {\n modified: true,\n title: 'Drag & Drop',\n description: 'Drag and drop component with a video',\n uploadLabel: 'Upload',\n previewLabel: 'File Preview',\n previewContent: {\n type: 'video',\n src: 'https://www.w3schools.com/tags/movie.mp4'\n },\n onReset: () => console.log('reset')\n }\n};\n"],"file":"with-video.js"}
|
|
@@ -0,0 +1,18 @@
|
|
|
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 = {
|
|
13
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
14
|
+
description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'
|
|
15
|
+
})
|
|
16
|
+
};
|
|
17
|
+
exports.default = _default;
|
|
18
|
+
//# sourceMappingURL=withLongDescription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/drag-and-drop/test/fixtures/withLongDescription.js"],"names":["props","description"],"mappings":";;;;;AACA;;;;;;eAEe;AACXA,EAAAA,KAAK,wBACEA,kBAAMA,KADR;AAEDC,IAAAA,WAAW,EAAE;AAFZ;AADM,C","sourcesContent":["\nimport props from './default';\n\nexport default {\n props: {\n ...props.props,\n description: 'Max file size: 5MO. Recommended format: SVG (if your client uses a majority of IE, use PNG format instead). Recommended aspect ratio : horizontal 2:1 (e.g. 500px x 250px). Maximum recommended aspect ratio 1:1 (e.g. 500x500, which means that it should not be taller than its width).'\n }\n}\n"],"file":"withLongDescription.js"}
|
|
@@ -20,6 +20,8 @@ var _withImage = _interopRequireDefault(require("./fixtures/with-image"));
|
|
|
20
20
|
|
|
21
21
|
var _withVideo = _interopRequireDefault(require("./fixtures/with-video"));
|
|
22
22
|
|
|
23
|
+
var _withLongDescription = _interopRequireDefault(require("./fixtures/withLongDescription"));
|
|
24
|
+
|
|
23
25
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
26
|
|
|
25
27
|
(0, _ava.default)('Atom › AtomDragAndDrop > should have valid propTypes', t => {
|
|
@@ -34,4 +36,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
34
36
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImageReset › should be rendered', _renderComponent.default, _.default, _withImageReset.default);
|
|
35
37
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithImage › should be rendered', _renderComponent.default, _.default, _withImage.default);
|
|
36
38
|
(0, _ava.default)('Atom › AtomDragAndDrop › WithVideo › should be rendered', _renderComponent.default, _.default, _withVideo.default);
|
|
39
|
+
(0, _ava.default)('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', _renderComponent.default, _.default, _withLongDescription.default);
|
|
37
40
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/atom/drag-and-drop/test/fixtures.js"],"names":["t","pass","AtomDragAndDrop","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithChildren","fixtureWithImageReset","fixtureWithImage","fixtureWithVideo"],"mappings":";;AAAA;;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,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAqGO,gBAArG;AACA,kBAAK,uDAAL,EAA8DD,wBAA9D,EAAoFN,SAApF,EAAqGQ,gBAArG;AACA,kBAAK,4DAAL,EAAmEF,wBAAnE,EAAyFN,SAAzF,EAA0GS,qBAA1G;AACA,kBAAK,8DAAL,EAAqEH,wBAArE,EAA2FN,SAA3F,EAA4GU,uBAA5G;AACA,kBAAK,yDAAL,EAAgEJ,wBAAhE,EAAsFN,SAAtF,EAAuGW,kBAAvG;AACA,kBAAK,yDAAL,EAAgEL,wBAAhE,EAAsFN,SAAtF,EAAuGY,kBAAvG","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomDragAndDrop from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithChildren from './fixtures/with-children';\nimport fixtureWithImageReset from './fixtures/with-image-reset';\nimport fixtureWithImage from './fixtures/with-image';\nimport fixtureWithVideo from './fixtures/with-video';\n\ntest('Atom › AtomDragAndDrop > should have valid propTypes', t => {\n t.pass();\n forEach(AtomDragAndDrop.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomDragAndDrop.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);\ntest('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);\ntest('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);\ntest('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);\ntest('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/drag-and-drop/test/fixtures.js"],"names":["t","pass","AtomDragAndDrop","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithChildren","fixtureWithImageReset","fixtureWithImage","fixtureWithVideo","fixtureWithLongDescription"],"mappings":";;AAAA;;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,uDAAL,EAA8DG,wBAA9D,EAAoFN,SAApF,EAAqGO,gBAArG;AACA,kBAAK,uDAAL,EAA8DD,wBAA9D,EAAoFN,SAApF,EAAqGQ,gBAArG;AACA,kBAAK,4DAAL,EAAmEF,wBAAnE,EAAyFN,SAAzF,EAA0GS,qBAA1G;AACA,kBAAK,8DAAL,EAAqEH,wBAArE,EAA2FN,SAA3F,EAA4GU,uBAA5G;AACA,kBAAK,yDAAL,EAAgEJ,wBAAhE,EAAsFN,SAAtF,EAAuGW,kBAAvG;AACA,kBAAK,yDAAL,EAAgEL,wBAAhE,EAAsFN,SAAtF,EAAuGY,kBAAvG;AACA,kBAAK,mEAAL,EAA0EN,wBAA1E,EAAgGN,SAAhG,EAAiHa,4BAAjH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomDragAndDrop from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithChildren from './fixtures/with-children';\nimport fixtureWithImageReset from './fixtures/with-image-reset';\nimport fixtureWithImage from './fixtures/with-image';\nimport fixtureWithVideo from './fixtures/with-video';\nimport fixtureWithLongDescription from './fixtures/withLongDescription';\n\ntest('Atom › AtomDragAndDrop > should have valid propTypes', t => {\n t.pass();\n forEach(AtomDragAndDrop.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomDragAndDrop.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomDragAndDrop › Default › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureDefault);\ntest('Atom › AtomDragAndDrop › Loading › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureLoading);\ntest('Atom › AtomDragAndDrop › WithChildren › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithChildren);\ntest('Atom › AtomDragAndDrop › WithImageReset › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImageReset);\ntest('Atom › AtomDragAndDrop › WithImage › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithImage);\ntest('Atom › AtomDragAndDrop › WithVideo › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithVideo);\ntest('Atom › AtomDragAndDrop › WithLongDescription › should be rendered', renderComponentMacro, AtomDragAndDrop, fixtureWithLongDescription);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
|
|
8
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
+
|
|
10
|
+
var _inputText = _interopRequireDefault(require("../input-text"));
|
|
11
|
+
|
|
12
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
|
+
|
|
16
|
+
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); }
|
|
17
|
+
|
|
18
|
+
const InputTextWithTitle = props => {
|
|
19
|
+
const {
|
|
20
|
+
inputText,
|
|
21
|
+
title,
|
|
22
|
+
'data-name': dataName,
|
|
23
|
+
'aria-label': ariaLabel
|
|
24
|
+
} = props;
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
className: _style.default.container,
|
|
27
|
+
"data-name": dataName,
|
|
28
|
+
"aria-label": ariaLabel
|
|
29
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
30
|
+
className: _style.default.title
|
|
31
|
+
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
32
|
+
className: _style.default.inputText
|
|
33
|
+
}, /*#__PURE__*/_react.default.createElement(_inputText.default, inputText)));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
InputTextWithTitle.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
37
|
+
inputText: _propTypes.default.shape(_extends(_extends({}, _inputText.default.propTypes), {}, {
|
|
38
|
+
theme: _propTypes.default.string
|
|
39
|
+
})),
|
|
40
|
+
title: _propTypes.default.string,
|
|
41
|
+
'aria-label': _propTypes.default.string,
|
|
42
|
+
'data-name': _propTypes.default.string
|
|
43
|
+
} : {};
|
|
44
|
+
var _default = InputTextWithTitle;
|
|
45
|
+
exports.default = _default;
|
|
46
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/atom/input-text-with-title/index.js"],"names":["InputTextWithTitle","props","inputText","title","dataName","ariaLabel","style","container","propTypes","PropTypes","shape","InputText","theme","string"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;AAEA,MAAMA,kBAAkB,GAAGC,KAAK,IAAI;AAClC,QAAM;AAACC,IAAAA,SAAD;AAAYC,IAAAA,KAAZ;AAAmB,iBAAaC,QAAhC;AAA0C,kBAAcC;AAAxD,MAAqEJ,KAA3E;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEK,eAAMC,SAAtB;AAAiC,iBAAWH,QAA5C;AAAsD,kBAAYC;AAAlE,kBACE;AAAM,IAAA,SAAS,EAAEC,eAAMH;AAAvB,KAA+BA,KAA/B,CADF,eAEE;AAAK,IAAA,SAAS,EAAEG,eAAMJ;AAAtB,kBACE,6BAAC,kBAAD,EAAeA,SAAf,CADF,CAFF,CADF;AAQD,CAXD;;AAaAF,kBAAkB,CAACQ,SAAnB,2CAA+B;AAC7BN,EAAAA,SAAS,EAAEO,mBAAUC,KAAV,uBAAoBC,mBAAUH,SAA9B;AAAyCI,IAAAA,KAAK,EAAEH,mBAAUI;AAA1D,KADkB;AAE7BV,EAAAA,KAAK,EAAEM,mBAAUI,MAFY;AAG7B,gBAAcJ,mBAAUI,MAHK;AAI7B,eAAaJ,mBAAUI;AAJM,CAA/B;eAMeb,kB","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport InputText from '../input-text';\nimport style from './style.css';\n\nconst InputTextWithTitle = props => {\n const {inputText, title, 'data-name': dataName, 'aria-label': ariaLabel} = props;\n\n return (\n <div className={style.container} data-name={dataName} aria-label={ariaLabel}>\n <span className={style.title}>{title}</span>\n <div className={style.inputText}>\n <InputText {...inputText} />\n </div>\n </div>\n );\n};\n\nInputTextWithTitle.propTypes = {\n inputText: PropTypes.shape({...InputText.propTypes, theme: PropTypes.string}),\n title: PropTypes.string,\n 'aria-label': PropTypes.string,\n 'data-name': PropTypes.string\n};\nexport default InputTextWithTitle;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value white from colors;
|
|
3
|
+
@value dark from colors;
|
|
4
|
+
@value cm_grey_200 from colors;
|
|
5
|
+
@value cm_grey_100 from colors;
|
|
6
|
+
@value black from colors;
|
|
7
|
+
@value cm_primary_blue from colors;
|
|
8
|
+
|
|
9
|
+
.container {
|
|
10
|
+
display: flex;
|
|
11
|
+
flex-direction: column;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.title {
|
|
15
|
+
padding-bottom: 8px;
|
|
16
|
+
font-family: "Gilroy";
|
|
17
|
+
font-weight: bold;
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
font-style: normal;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.inputText {
|
|
23
|
+
width: 173px;
|
|
24
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _cmDefault = _interopRequireDefault(require("../../../input-text/test/fixtures/cm-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 = {
|
|
13
|
+
props: {
|
|
14
|
+
title: 'Mandatory courses to complete certification',
|
|
15
|
+
inputText: _extends(_extends({}, _cmDefault.default.props), {}, {
|
|
16
|
+
hint: ''
|
|
17
|
+
})
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/default.js"],"names":["props","title","inputText","hint"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELC,IAAAA,SAAS,wBAAMA,mBAAUF,KAAhB;AAAuBG,MAAAA,IAAI,EAAE;AAA7B;AAFJ;AADM,C","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {...inputText.props, hint: ''}\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _cmDefault = _interopRequireDefault(require("../../../input-text/test/fixtures/cm-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 = {
|
|
13
|
+
props: {
|
|
14
|
+
title: 'Mandatory courses to complete certification',
|
|
15
|
+
inputText: _extends(_extends({}, _cmDefault.default.props), {}, {
|
|
16
|
+
error: 'this is error',
|
|
17
|
+
hint: ''
|
|
18
|
+
})
|
|
19
|
+
}
|
|
20
|
+
};
|
|
21
|
+
exports.default = _default;
|
|
22
|
+
//# sourceMappingURL=error.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/atom/input-text-with-title/test/fixtures/error.js"],"names":["props","title","inputText","error","hint"],"mappings":";;;;;AAAA;;;;;;eAEe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,KAAK,EAAE,6CADF;AAELC,IAAAA,SAAS,wBAAMA,mBAAUF,KAAhB;AAAuBG,MAAAA,KAAK,EAAE,eAA9B;AAA+CC,MAAAA,IAAI,EAAE;AAArD;AAFJ;AADM,C","sourcesContent":["import inputText from '../../../input-text/test/fixtures/cm-default';\n\nexport default {\n props: {\n title: 'Mandatory courses to complete certification',\n inputText: {...inputText.props, error: 'this is error', hint: ''}\n }\n};\n"],"file":"error.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
12
|
+
|
|
13
|
+
var _error = _interopRequireDefault(require("./fixtures/error"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Atom › AtomInputTextWithTitle > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Atom.AtomInputTextWithTitle.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Atom › AtomInputTextWithTitle › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
|
+
(0, _ava.default)('Atom › AtomInputTextWithTitle › Error › should be rendered', _renderComponent.default, _.default, _error.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/atom/input-text-with-title/test/fixtures.js"],"names":["t","pass","AtomInputTextWithTitle","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureError"],"mappings":";;AAAA;;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,8DAAL,EAAqEG,wBAArE,EAA2FN,SAA3F,EAAmHO,gBAAnH;AACA,kBAAK,4DAAL,EAAmED,wBAAnE,EAAyFN,SAAzF,EAAiHQ,cAAjH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport AtomInputTextWithTitle from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureError from './fixtures/error';\n\ntest('Atom › AtomInputTextWithTitle > should have valid propTypes', t => {\n t.pass();\n forEach(AtomInputTextWithTitle.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Atom.AtomInputTextWithTitle.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Atom › AtomInputTextWithTitle › Default › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureDefault);\ntest('Atom › AtomInputTextWithTitle › Error › should be rendered', renderComponentMacro, AtomInputTextWithTitle, fixtureError);\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
|
|
|
@@ -7,6 +7,8 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
7
7
|
|
|
8
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
9
|
|
|
10
|
+
var _inputTextWithTitle = _interopRequireDefault(require("../../atom/input-text-with-title"));
|
|
11
|
+
|
|
10
12
|
var _courseSection = _interopRequireDefault(require("../course-section"));
|
|
11
13
|
|
|
12
14
|
var _draggableList = _interopRequireDefault(require("../draggable-list"));
|
|
@@ -19,7 +21,10 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
19
21
|
|
|
20
22
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
23
|
|
|
22
|
-
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,
|
|
23
28
|
theme: "coorpmanager"
|
|
24
29
|
}));
|
|
25
30
|
|
|
@@ -27,10 +32,20 @@ const CourseSections = ({
|
|
|
27
32
|
sections,
|
|
28
33
|
onDrop,
|
|
29
34
|
isLoading,
|
|
30
|
-
title
|
|
35
|
+
title,
|
|
36
|
+
mandatoryCoursesInput,
|
|
37
|
+
inputTitle
|
|
31
38
|
}) => {
|
|
32
39
|
if (isLoading) return /*#__PURE__*/_react.default.createElement(Loading, null);
|
|
33
|
-
return /*#__PURE__*/_react.default.createElement("div", null,
|
|
40
|
+
return /*#__PURE__*/_react.default.createElement("div", null, inputTitle ? /*#__PURE__*/_react.default.createElement("div", {
|
|
41
|
+
className: _style.default.title
|
|
42
|
+
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
43
|
+
title: inputTitle,
|
|
44
|
+
type: 'form-group',
|
|
45
|
+
"data-name": 'mandatory-courses-input-title'
|
|
46
|
+
})) : null, mandatoryCoursesInput ? /*#__PURE__*/_react.default.createElement("div", {
|
|
47
|
+
className: _style.default.mandatoryCoursesInput
|
|
48
|
+
}, /*#__PURE__*/_react.default.createElement(_inputTextWithTitle.default, mandatoryCoursesInput)) : null, title ? /*#__PURE__*/_react.default.createElement("div", {
|
|
34
49
|
className: _style.default.title
|
|
35
50
|
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
36
51
|
title: title,
|
|
@@ -44,10 +59,12 @@ const CourseSections = ({
|
|
|
44
59
|
};
|
|
45
60
|
|
|
46
61
|
CourseSections.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
62
|
+
inputTitle: _propTypes.default.string,
|
|
47
63
|
title: _propTypes.default.string,
|
|
48
64
|
sections: _propTypes.default.arrayOf(_propTypes.default.shape(_courseSection.default.propTypes)),
|
|
49
65
|
onDrop: _propTypes.default.func,
|
|
50
|
-
isLoading: _propTypes.default.bool
|
|
66
|
+
isLoading: _propTypes.default.bool,
|
|
67
|
+
mandatoryCoursesInput: _propTypes.default.shape(_inputTextWithTitle.default.propTypes)
|
|
51
68
|
} : {};
|
|
52
69
|
var _default = CourseSections;
|
|
53
70
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","
|
|
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"}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
.title {
|
|
2
2
|
margin-bottom: 16px;
|
|
3
3
|
}
|
|
4
|
+
|
|
5
|
+
.mandatoryCoursesInput {
|
|
6
|
+
margin: 0 0 16px 16px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.loader {
|
|
10
|
+
width: 60px;
|
|
11
|
+
height: 60px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.loaderContainer {
|
|
15
|
+
display: flex;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
align-items: center;
|
|
18
|
+
height: 50vh;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
|
|
6
|
+
var _error = _interopRequireDefault(require("../../../../atom/input-text-with-title/test/fixtures/error"));
|
|
7
|
+
|
|
8
|
+
var _default2 = _interopRequireDefault(require("./default"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
|
|
14
|
+
var _default = {
|
|
15
|
+
props: _extends(_extends({}, _default2.default.props), {}, {
|
|
16
|
+
mandatoryCoursesInput: _error.default.props,
|
|
17
|
+
inputTitle: 'Minimun courses completion'
|
|
18
|
+
})
|
|
19
|
+
};
|
|
20
|
+
exports.default = _default;
|
|
21
|
+
//# sourceMappingURL=with-mandatory-courses-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-sections/test/fixtures/with-mandatory-courses-input.js"],"names":["props","mandatoryCoursesInput","inputTitle"],"mappings":";;;;;AAAA;;AACA;;;;;;eAEe;AACbA,EAAAA,KAAK,wBACAA,kBAAMA,KADN;AAEHC,IAAAA,qBAAqB,EAAEA,eAAsBD,KAF1C;AAGHE,IAAAA,UAAU,EAAE;AAHT;AADQ,C","sourcesContent":["import mandatoryCoursesInput from '../../../../atom/input-text-with-title/test/fixtures/error';\nimport props from './default';\n\nexport default {\n props: {\n ...props.props,\n mandatoryCoursesInput: mandatoryCoursesInput.props,\n inputTitle: 'Minimun courses completion'\n }\n};\n"],"file":"with-mandatory-courses-input.js"}
|
|
@@ -12,6 +12,8 @@ var _default = _interopRequireDefault(require("./fixtures/default"));
|
|
|
12
12
|
|
|
13
13
|
var _loading = _interopRequireDefault(require("./fixtures/loading"));
|
|
14
14
|
|
|
15
|
+
var _withMandatoryCoursesInput = _interopRequireDefault(require("./fixtures/with-mandatory-courses-input"));
|
|
16
|
+
|
|
15
17
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
18
|
|
|
17
19
|
(0, _ava.default)('Molecule › MoleculeCourseSections > should have valid propTypes', t => {
|
|
@@ -22,4 +24,5 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
22
24
|
});
|
|
23
25
|
(0, _ava.default)('Molecule › MoleculeCourseSections › Default › should be rendered', _renderComponent.default, _.default, _default.default);
|
|
24
26
|
(0, _ava.default)('Molecule › MoleculeCourseSections › Loading › should be rendered', _renderComponent.default, _.default, _loading.default);
|
|
27
|
+
(0, _ava.default)('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', _renderComponent.default, _.default, _withMandatoryCoursesInput.default);
|
|
25
28
|
//# sourceMappingURL=fixtures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\n"],"file":"fixtures.js"}
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/course-sections/test/fixtures.js"],"names":["t","pass","MoleculeCourseSections","propTypes","value","key","not","undefined","renderComponentMacro","fixtureDefault","fixtureLoading","fixtureWithMandatoryCoursesInput"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,iEAAL,EAAwEA,CAAC,IAAI;AAC3EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAuBC,SAA/B,EAA0C,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACxDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,2DAA0DF,GAAI,mEAAvF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,kEAAL,EAAyEG,wBAAzE,EAA+FN,SAA/F,EAAuHO,gBAAvH;AACA,kBAAK,kEAAL,EAAyED,wBAAzE,EAA+FN,SAA/F,EAAuHQ,gBAAvH;AACA,kBAAK,oFAAL,EAA2FF,wBAA3F,EAAiHN,SAAjH,EAAyIS,kCAAzI","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSections from '..';\nimport fixtureDefault from './fixtures/default';\nimport fixtureLoading from './fixtures/loading';\nimport fixtureWithMandatoryCoursesInput from './fixtures/with-mandatory-courses-input';\n\ntest('Molecule › MoleculeCourseSections > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSections.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSections.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSections › Default › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureDefault);\ntest('Molecule › MoleculeCourseSections › Loading › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureLoading);\ntest('Molecule › MoleculeCourseSections › WithMandatoryCoursesInput › should be rendered', renderComponentMacro, MoleculeCourseSections, fixtureWithMandatoryCoursesInput);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _ava = _interopRequireDefault(require("ava"));
|
|
4
|
+
|
|
5
|
+
var _forEach = _interopRequireDefault(require("lodash/forEach"));
|
|
6
|
+
|
|
7
|
+
var _renderComponent = _interopRequireDefault(require("../../../test/helpers/render-component"));
|
|
8
|
+
|
|
9
|
+
var _ = _interopRequireDefault(require(".."));
|
|
10
|
+
|
|
11
|
+
var _checked = _interopRequireDefault(require("./fixtures/checked"));
|
|
12
|
+
|
|
13
|
+
var _unchecked = _interopRequireDefault(require("./fixtures/unchecked"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Molecule › MoleculeInputTextWithTiteledCheckbox > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeInputTextWithTiteledCheckbox.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Molecule › MoleculeInputTextWithTiteledCheckbox › Checked › should be rendered', _renderComponent.default, _.default, _checked.default);
|
|
24
|
+
(0, _ava.default)('Molecule › MoleculeInputTextWithTiteledCheckbox › Unchecked › should be rendered', _renderComponent.default, _.default, _unchecked.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/input-text-with-titeled-checkbox/test/fixtures.js"],"names":["t","pass","MoleculeInputTextWithTiteledCheckbox","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChecked","fixtureUnchecked"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,+EAAL,EAAsFA,CAAC,IAAI;AACzFA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAqCC,SAA7C,EAAwD,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACtEL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,yEAAwEF,GAAI,mEAArG;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,gFAAL,EAAuFG,wBAAvF,EAA6GN,SAA7G,EAAmJO,gBAAnJ;AACA,kBAAK,kFAAL,EAAyFD,wBAAzF,EAA+GN,SAA/G,EAAqJQ,kBAArJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeInputTextWithTiteledCheckbox from '..';\nimport fixtureChecked from './fixtures/checked';\nimport fixtureUnchecked from './fixtures/unchecked';\n\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeInputTextWithTiteledCheckbox.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeInputTextWithTiteledCheckbox.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox › Checked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureChecked);\ntest('Molecule › MoleculeInputTextWithTiteledCheckbox › Unchecked › should be rendered', renderComponentMacro, MoleculeInputTextWithTiteledCheckbox, fixtureUnchecked);\n"],"file":"fixtures.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,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,CADF,CADF;AAKD,GARa,CAAd;AAUA,sBAAO;AAAI,kBAAYL;AAAhB,KAA4CG,KAA5C,CAAP;AACD,CAhBD;;AAkBA,MAAMQ,eAAe,GAAGC,KAAK,IAAI;AAC/B,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,iBAFI;AAGJf,IAAAA,OAHI;AAIJE,IAAAA,aAJI;AAKJC,IAAAA,SAAS,GAAG,KALR;AAMJ,oCAAgCF,yBAN5B;AAOJe,IAAAA;AAPI,MAQFH,KARJ;AAUA,QAAMI,UAAU,GAAGlB,eAAe,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SAApD,CAAlC;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEO,eAAMQ;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAER,eAAMS;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAET,eAAMI;AAAtB,kBACE,6BAAC,oBAAD,eAAYA,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADF,eAIE;AAAK,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,CADF,CADF;AAKD,GARa,CAAd;AAUA,sBAAO;AAAI,kBAAYL;AAAhB,KAA4CG,KAA5C,CAAP;AACD,CAhBD;;AAkBA,MAAMQ,eAAe,GAAGC,KAAK,IAAI;AAC/B,QAAM;AACJC,IAAAA,MADI;AAEJC,IAAAA,iBAFI;AAGJf,IAAAA,OAHI;AAIJE,IAAAA,aAJI;AAKJC,IAAAA,SAAS,GAAG,KALR;AAMJ,oCAAgCF,yBAN5B;AAOJe,IAAAA;AAPI,MAQFH,KARJ;AAUA,QAAMI,UAAU,GAAGlB,eAAe,CAACC,OAAD,EAAUC,yBAAV,EAAqCC,aAArC,EAAoDC,SAApD,CAAlC;AAEA,sBACE;AAAK,IAAA,SAAS,EAAEO,eAAMQ;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAER,eAAMS;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAET,eAAMI;AAAtB,kBACE,6BAAC,oBAAD,eAAYA,MAAZ;AAAoB,IAAA,KAAK,EAAC;AAA1B,KADF,CADF,eAIE;AAAK,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,SAAS,EAAEZ,eAAMa,MAAzB;AAAiC,IAAA,KAAK,EAAC;AAAvC,IADF,CADQ,GAKRN,UANJ,CAVF,CADF;AAsBD,CAnCD;;AAqCAL,eAAe,CAACY,SAAhB,2CAA4B;AAC1BV,EAAAA,MAAM,EAAEW,mBAAUC,KAAV,CAAgBC,qBAAOF,SAAvB,CADkB;AAE1BtB,EAAAA,SAAS,EAAEsB,mBAAUG,IAFK;AAG1Bb,EAAAA,iBAAiB,EAAEU,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"}
|