@coorpacademy/components 10.5.3 → 10.5.7-alpha.3
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/molecule/course-section/index.js +5 -3
- package/es/molecule/course-section/index.js.map +1 -1
- package/es/molecule/course-section/style.css +2 -1
- package/es/molecule/course-section/test/fixtures/chapter.js +2 -1
- package/es/molecule/course-section/test/fixtures/chapter.js.map +1 -1
- package/es/molecule/course-section/test/fixtures/course.js +2 -1
- package/es/molecule/course-section/test/fixtures/course.js.map +1 -1
- package/es/molecule/course-section/test/fixtures.js +15 -0
- package/es/molecule/course-section/test/fixtures.js.map +1 -0
- package/es/molecule/course-sections/index.js +40 -0
- package/es/molecule/course-sections/index.js.map +1 -0
- package/es/molecule/course-sections/style.css +3 -0
- package/es/molecule/course-sections/test/fixtures/default.js +149 -0
- package/es/molecule/course-sections/test/fixtures/default.js.map +1 -0
- package/es/molecule/course-sections/test/fixtures/loading.js +9 -0
- package/es/molecule/course-sections/test/fixtures/loading.js.map +1 -0
- package/es/molecule/draggable/index.js +1 -1
- package/es/molecule/draggable/index.js.map +1 -1
- package/es/molecule/draggable/style.css +2 -16
- package/es/molecule/draggable-list/index.js +56 -0
- package/es/molecule/draggable-list/index.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures/course-sections.js +20 -0
- package/es/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures/dashboard-sections.js +26 -0
- package/es/molecule/draggable-list/test/fixtures/dashboard-sections.js.map +1 -0
- package/es/molecule/draggable-list/test/fixtures.js +13 -0
- package/es/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/es/molecule/{setup-sections → draggable-list}/test/on-drop.js +17 -17
- package/es/molecule/draggable-list/test/on-drop.js.map +1 -0
- package/es/molecule/questions/qcm/index.js +40 -25
- package/es/molecule/questions/qcm/index.js.map +1 -1
- package/es/molecule/questions/qcm/style.css +39 -15
- package/es/molecule/questions/qcm/test/fixtures/default.js +8 -0
- package/es/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
- package/es/molecule/questions/qcm/test/qcm.js +105 -0
- package/es/molecule/questions/qcm/test/qcm.js.map +1 -0
- package/es/molecule/questions/qcm-graphic/index.js +38 -17
- package/es/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/es/molecule/questions/qcm-graphic/style.css +60 -15
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js +65 -0
- package/es/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
- package/es/molecule/select-multiple/style.css +8 -5
- package/es/molecule/setup-section/style.css +1 -0
- package/es/molecule/setup-sections/index.js +7 -33
- package/es/molecule/setup-sections/index.js.map +1 -1
- package/es/molecule/wizard-summary/test/fixtures/organize-courses.js +106 -0
- package/es/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js +1 -1
- package/es/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
- package/es/organism/wizard-contents/index.js +6 -0
- package/es/organism/wizard-contents/index.js.map +1 -1
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +45 -0
- package/es/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +22 -0
- package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
- package/es/util/get-shadow-box-color-from-primary.js +4 -0
- package/es/util/get-shadow-box-color-from-primary.js.map +1 -0
- package/es/util/test/get-shadow-box-color-from-primary.js +33 -0
- package/es/util/test/get-shadow-box-color-from-primary.js.map +1 -0
- package/es/variables/colors.css +3 -0
- package/lib/molecule/course-section/index.js +5 -3
- package/lib/molecule/course-section/index.js.map +1 -1
- package/lib/molecule/course-section/style.css +2 -1
- package/lib/molecule/course-section/test/fixtures/chapter.js +2 -1
- package/lib/molecule/course-section/test/fixtures/chapter.js.map +1 -1
- package/lib/molecule/course-section/test/fixtures/course.js +2 -1
- package/lib/molecule/course-section/test/fixtures/course.js.map +1 -1
- package/lib/molecule/course-section/test/fixtures.js +25 -0
- package/lib/molecule/course-section/test/fixtures.js.map +1 -0
- package/lib/molecule/course-sections/index.js +54 -0
- package/lib/molecule/course-sections/index.js.map +1 -0
- package/lib/molecule/course-sections/style.css +3 -0
- package/lib/molecule/course-sections/test/fixtures/default.js +154 -0
- package/lib/molecule/course-sections/test/fixtures/default.js.map +1 -0
- package/lib/molecule/course-sections/test/fixtures/loading.js +14 -0
- package/lib/molecule/course-sections/test/fixtures/loading.js.map +1 -0
- package/lib/molecule/draggable/index.js +1 -1
- package/lib/molecule/draggable/index.js.map +1 -1
- package/lib/molecule/draggable/style.css +2 -16
- package/lib/molecule/draggable-list/index.js +73 -0
- package/lib/molecule/draggable-list/index.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures/course-sections.js +29 -0
- package/lib/molecule/draggable-list/test/fixtures/course-sections.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures/dashboard-sections.js +37 -0
- package/lib/molecule/draggable-list/test/fixtures/dashboard-sections.js.map +1 -0
- package/lib/molecule/draggable-list/test/fixtures.js +22 -0
- package/lib/molecule/draggable-list/test/fixtures.js.map +1 -0
- package/lib/molecule/{setup-sections → draggable-list}/test/on-drop.js +19 -19
- package/lib/molecule/draggable-list/test/on-drop.js.map +1 -0
- package/lib/molecule/questions/qcm/index.js +47 -23
- package/lib/molecule/questions/qcm/index.js.map +1 -1
- package/lib/molecule/questions/qcm/style.css +39 -15
- package/lib/molecule/questions/qcm/test/fixtures/default.js +8 -0
- package/lib/molecule/questions/qcm/test/fixtures/default.js.map +1 -1
- package/lib/molecule/questions/qcm/test/qcm.js +117 -0
- package/lib/molecule/questions/qcm/test/qcm.js.map +1 -0
- package/lib/molecule/questions/qcm-graphic/index.js +36 -15
- package/lib/molecule/questions/qcm-graphic/index.js.map +1 -1
- package/lib/molecule/questions/qcm-graphic/style.css +60 -15
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js +76 -0
- package/lib/molecule/questions/qcm-graphic/test/qcm-graphic.js.map +1 -0
- package/lib/molecule/select-multiple/style.css +8 -5
- package/lib/molecule/setup-section/style.css +1 -0
- package/lib/molecule/setup-sections/index.js +7 -37
- package/lib/molecule/setup-sections/index.js.map +1 -1
- package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js +111 -0
- package/lib/molecule/wizard-summary/test/fixtures/organize-courses.js.map +1 -0
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js +1 -1
- package/lib/organism/brand-form/test/fixtures/wizard-playlists.js.map +1 -1
- package/lib/organism/wizard-contents/index.js +7 -0
- package/lib/organism/wizard-contents/index.js.map +1 -1
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js +54 -0
- package/lib/organism/wizard-contents/test/fixtures/playlist-organize-courses.js.map +1 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js +32 -0
- package/lib/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map +1 -0
- package/lib/util/get-shadow-box-color-from-primary.js +12 -0
- package/lib/util/get-shadow-box-color-from-primary.js.map +1 -0
- package/lib/util/test/get-shadow-box-color-from-primary.js +40 -0
- package/lib/util/test/get-shadow-box-color-from-primary.js.map +1 -0
- package/lib/variables/colors.css +3 -0
- package/package.json +2 -2
- package/es/molecule/search/test/fixtures.js +0 -15
- package/es/molecule/search/test/fixtures.js.map +0 -1
- package/es/molecule/setup-sections/test/on-drop.js.map +0 -1
- package/lib/molecule/search/test/fixtures.js +0 -25
- package/lib/molecule/search/test/fixtures.js.map +0 -1
- package/lib/molecule/setup-sections/test/on-drop.js.map +0 -1
package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
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); }
|
|
2
|
+
|
|
3
|
+
import WizardForm from '../../../../../organism/wizard-contents/test/fixtures/playlist-organize-courses';
|
|
4
|
+
import headerAndMenu from './default';
|
|
5
|
+
const {
|
|
6
|
+
header,
|
|
7
|
+
items
|
|
8
|
+
} = headerAndMenu.props;
|
|
9
|
+
const form = WizardForm.props;
|
|
10
|
+
export default {
|
|
11
|
+
props: {
|
|
12
|
+
header,
|
|
13
|
+
items,
|
|
14
|
+
notifications: [],
|
|
15
|
+
content: _extends(_extends({}, form), {}, {
|
|
16
|
+
isLoading: false,
|
|
17
|
+
key: 'add-courses',
|
|
18
|
+
type: 'wizard'
|
|
19
|
+
})
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=wizard-organize-courses-playlist.js.map
|
package/es/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../../src/template/back-office/brand-update/test/fixtures/wizard-organize-courses-playlist.js"],"names":["WizardForm","headerAndMenu","header","items","props","form","notifications","content","isLoading","key","type"],"mappings":";;AAAA,OAAOA,UAAP,MAAuB,iFAAvB;AACA,OAAOC,aAAP,MAA0B,WAA1B;AAEA,MAAM;AAACC,EAAAA,MAAD;AAASC,EAAAA;AAAT,IAAkBF,aAAa,CAACG,KAAtC;AACA,MAAMC,IAAI,GAAGL,UAAU,CAACI,KAAxB;AAEA,eAAe;AACbA,EAAAA,KAAK,EAAE;AACLF,IAAAA,MADK;AAELC,IAAAA,KAFK;AAGLG,IAAAA,aAAa,EAAE,EAHV;AAILC,IAAAA,OAAO,wBACFF,IADE;AAELG,MAAAA,SAAS,EAAE,KAFN;AAGLC,MAAAA,GAAG,EAAE,aAHA;AAILC,MAAAA,IAAI,EAAE;AAJD;AAJF;AADM,CAAf","sourcesContent":["import WizardForm from '../../../../../organism/wizard-contents/test/fixtures/playlist-organize-courses';\nimport headerAndMenu from './default';\n\nconst {header, items} = headerAndMenu.props;\nconst form = WizardForm.props;\n\nexport default {\n props: {\n header,\n items,\n notifications: [],\n content: {\n ...form,\n isLoading: false,\n key: 'add-courses',\n type: 'wizard'\n }\n }\n};\n"],"file":"wizard-organize-courses-playlist.js"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { convert } from 'css-color-function'; // darken the color down to 35% && apply alpha of 25%
|
|
2
|
+
|
|
3
|
+
export const getShadowBoxColorFromPrimary = primaryColor => convert(`color(${primaryColor} lightness(35%) a(25%))`);
|
|
4
|
+
//# sourceMappingURL=get-shadow-box-color-from-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/util/get-shadow-box-color-from-primary.js"],"names":["convert","getShadowBoxColorFromPrimary","primaryColor"],"mappings":"AAAA,SAAQA,OAAR,QAAsB,oBAAtB,C,CAEA;;AACA,OAAO,MAAMC,4BAA4B,GAAGC,YAAY,IACtDF,OAAO,CAAE,SAAQE,YAAa,yBAAvB,CADF","sourcesContent":["import {convert} from 'css-color-function';\n\n// darken the color down to 35% && apply alpha of 25%\nexport const getShadowBoxColorFromPrimary = primaryColor =>\n convert(`color(${primaryColor} lightness(35%) a(25%))`);\n"],"file":"get-shadow-box-color-from-primary.js"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import test from 'ava';
|
|
2
|
+
import forEach from 'lodash/fp/forEach';
|
|
3
|
+
import { getShadowBoxColorFromPrimary } from '../get-shadow-box-color-from-primary';
|
|
4
|
+
test('should return transformed colors', t => {
|
|
5
|
+
t.plan(13);
|
|
6
|
+
const expectedOrange = 'rgba(179, 42, 0, 0.25)';
|
|
7
|
+
const expectedRed = 'rgba(179, 0, 0, 0.25)';
|
|
8
|
+
const expectedYellow = 'rgba(179, 140, 0, 0.25)';
|
|
9
|
+
const expectedBlue = 'rgba(0, 68, 179, 0.25)'; // a set of possible primary/brand colors
|
|
10
|
+
|
|
11
|
+
const primaryColors = {
|
|
12
|
+
orange: ['#ff6f43', expectedOrange],
|
|
13
|
+
// original, expected
|
|
14
|
+
orangeRGB: ['rgb(255, 111, 67)', expectedOrange],
|
|
15
|
+
orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],
|
|
16
|
+
red: ['#FF0A0A', expectedRed],
|
|
17
|
+
redRGB: ['rgb(255, 10, 10)', expectedRed],
|
|
18
|
+
redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],
|
|
19
|
+
yellow: ['#ffca0a', expectedYellow],
|
|
20
|
+
yellowRGB: ['rgb(255, 202, 10)', expectedYellow],
|
|
21
|
+
yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],
|
|
22
|
+
blue: ['#0061FF', expectedBlue],
|
|
23
|
+
blueRGB: ['rgb(0, 97, 255)', expectedBlue],
|
|
24
|
+
blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]
|
|
25
|
+
};
|
|
26
|
+
forEach(color => {
|
|
27
|
+
const [original, expected] = color;
|
|
28
|
+
const boxShadowColor = getShadowBoxColorFromPrimary(original);
|
|
29
|
+
t.is(boxShadowColor, expected);
|
|
30
|
+
}, primaryColors);
|
|
31
|
+
t.pass();
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=get-shadow-box-color-from-primary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/util/test/get-shadow-box-color-from-primary.js"],"names":["test","forEach","getShadowBoxColorFromPrimary","t","plan","expectedOrange","expectedRed","expectedYellow","expectedBlue","primaryColors","orange","orangeRGB","orangeRGBA","red","redRGB","redRGBA","yellow","yellowRGB","yellowRGBA","blue","blueRGB","blueRGBA","color","original","expected","boxShadowColor","is","pass"],"mappings":"AAAA,OAAOA,IAAP,MAAiB,KAAjB;AACA,OAAOC,OAAP,MAAoB,mBAApB;AAEA,SAAQC,4BAAR,QAA2C,sCAA3C;AAEAF,IAAI,CAAC,kC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EAAAA,CAAC,CAACwB,IAAF;AACD,CA7BG,CAAJ","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/fp/forEach';\n\nimport {getShadowBoxColorFromPrimary} from '../get-shadow-box-color-from-primary';\n\ntest('should return transformed colors', t => {\n t.plan(13);\n const expectedOrange = 'rgba(179, 42, 0, 0.25)';\n const expectedRed = 'rgba(179, 0, 0, 0.25)';\n const expectedYellow = 'rgba(179, 140, 0, 0.25)';\n const expectedBlue = 'rgba(0, 68, 179, 0.25)';\n // a set of possible primary/brand colors\n const primaryColors = {\n orange: ['#ff6f43', expectedOrange], // original, expected\n orangeRGB: ['rgb(255, 111, 67)', expectedOrange],\n orangeRGBA: ['rgba(255, 111, 67, 0)', expectedOrange],\n red: ['#FF0A0A', expectedRed],\n redRGB: ['rgb(255, 10, 10)', expectedRed],\n redRGBA: ['rgba(255, 10, 10, 0)', expectedRed],\n yellow: ['#ffca0a', expectedYellow],\n yellowRGB: ['rgb(255, 202, 10)', expectedYellow],\n yellowRGBA: ['rgba(255, 202, 10, 0)', expectedYellow],\n blue: ['#0061FF', expectedBlue],\n blueRGB: ['rgb(0, 97, 255)', expectedBlue],\n blueRGBA: ['rgba(0, 97, 255, 1)', expectedBlue]\n };\n\n forEach(color => {\n const [original, expected] = color;\n const boxShadowColor = getShadowBoxColorFromPrimary(original);\n t.is(boxShadowColor, expected);\n }, primaryColors);\n\n t.pass();\n});\n"],"file":"get-shadow-box-color-from-primary.js"}
|
package/es/variables/colors.css
CHANGED
|
@@ -30,8 +30,10 @@
|
|
|
30
30
|
@value cm_blue_50: #f1f6fe;
|
|
31
31
|
@value cm_blue_200: #74A5F6;
|
|
32
32
|
@value cm_blue_600: #0051d6;
|
|
33
|
+
@value cm_blue_900: #06265B;
|
|
33
34
|
@value cm_bleu_article: #365FCD;
|
|
34
35
|
@value cm_grey_50: #FAFAFA;
|
|
36
|
+
@value cm_grey_75: #F4F4F5;
|
|
35
37
|
@value cm_grey_100: #EAEAEB;
|
|
36
38
|
@value cm_grey_150: #E1E1E3;
|
|
37
39
|
@value cm_grey_200: #d7d7da;
|
|
@@ -59,3 +61,4 @@
|
|
|
59
61
|
@value cm_red_video: #E8335E;
|
|
60
62
|
@value cm_violet_podcast: #432ba7;
|
|
61
63
|
@value cm_warning_50: rgba(255, 192, 67, 0.13);
|
|
64
|
+
@value box_shadow_light_dark: rgba(0, 0, 0, 0.12);
|
|
@@ -28,12 +28,13 @@ const CourseSection = props => {
|
|
|
28
28
|
'aria-label': {
|
|
29
29
|
title: ariaLabelTitle,
|
|
30
30
|
author: ariaLabelAuthor
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
|
+
id
|
|
32
33
|
} = props;
|
|
33
34
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
34
35
|
className: _style.default.container,
|
|
35
36
|
"aria-label": ariaLabelTitle,
|
|
36
|
-
"data-name": `course-section-${
|
|
37
|
+
"data-name": `course-section-${id}`
|
|
37
38
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
38
39
|
className: _style.default.position
|
|
39
40
|
}, position), /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -65,7 +66,8 @@ CourseSection.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
65
66
|
contentBadge: _propTypes.default.shape(_contentBadge.default.propTypes),
|
|
66
67
|
title: _propTypes.default.string,
|
|
67
68
|
author: _propTypes.default.string,
|
|
68
|
-
position: _propTypes.default.number
|
|
69
|
+
position: _propTypes.default.number,
|
|
70
|
+
id: _propTypes.default.string
|
|
69
71
|
} : {};
|
|
70
72
|
var _default = CourseSection;
|
|
71
73
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/course-section/index.js"],"names":["CourseSection","props","image","contentBadge","category","label","title","author","position","ariaLabelTitle","ariaLabelAuthor","style","container","containerImage","containerInfos","containerMainInfos","propTypes","PropTypes","shape","string","ContentBadge","number"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,aAAa,GAAGC,KAAK,IAAI;AAC7B,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,YAAY,EAAE;AAACC,MAAAA,QAAD;AAAWC,MAAAA;AAAX,KAFV;AAGJC,IAAAA,KAHI;AAIJC,IAAAA,MAJI;AAKJC,IAAAA,QALI;AAMJ,kBAAc;AAACF,MAAAA,KAAK,EAAEG,cAAR;AAAwBF,MAAAA,MAAM,EAAEG;AAAhC;
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/course-section/index.js"],"names":["CourseSection","props","image","contentBadge","category","label","title","author","position","ariaLabelTitle","ariaLabelAuthor","id","style","container","containerImage","containerInfos","containerMainInfos","propTypes","PropTypes","shape","string","ContentBadge","number"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,aAAa,GAAGC,KAAK,IAAI;AAC7B,QAAM;AACJC,IAAAA,KADI;AAEJC,IAAAA,YAAY,EAAE;AAACC,MAAAA,QAAD;AAAWC,MAAAA;AAAX,KAFV;AAGJC,IAAAA,KAHI;AAIJC,IAAAA,MAJI;AAKJC,IAAAA,QALI;AAMJ,kBAAc;AAACF,MAAAA,KAAK,EAAEG,cAAR;AAAwBF,MAAAA,MAAM,EAAEG;AAAhC,KANV;AAOJC,IAAAA;AAPI,MAQFV,KARJ;AASA,sBACE;AAAK,IAAA,SAAS,EAAEW,eAAMC,SAAtB;AAAiC,kBAAYJ,cAA7C;AAA6D,iBAAY,kBAAiBE,EAAG;AAA7F,kBACE;AAAM,IAAA,SAAS,EAAEC,eAAMJ;AAAvB,KAAkCA,QAAlC,CADF,eAEE;AAAK,IAAA,SAAS,EAAEI,eAAME;AAAtB,kBACE,6BAAC,yBAAD;AAAkB,IAAA,KAAK,EAAEZ;AAAzB,IADF,CAFF,eAKE;AAAK,IAAA,SAAS,EAAEU,eAAMG;AAAtB,kBACE;AAAK,IAAA,SAAS,EAAEH,eAAMI;AAAtB,kBACE,6BAAC,qBAAD;AAAc,IAAA,SAAS,EAAEJ,eAAMT,YAA/B;AAA6C,IAAA,QAAQ,EAAEC,QAAvD;AAAiE,IAAA,KAAK,EAAEC;AAAxE,IADF,eAEE;AAAK,IAAA,SAAS,EAAEO,eAAMN;AAAtB,KAA8BA,KAA9B,CAFF,CADF,eAKE;AAAM,IAAA,SAAS,EAAEM,eAAML,MAAvB;AAA+B,kBAAYG;AAA3C,KACGH,MADH,CALF,CALF,CADF;AAiBD,CA3BD;;AA6BAP,aAAa,CAACiB,SAAd,2CAA0B;AACxB,gBAAcC,mBAAUC,KAAV,CAAgB;AAC5Bb,IAAAA,KAAK,EAAEY,mBAAUE,MADW;AAE5Bb,IAAAA,MAAM,EAAEW,mBAAUE;AAFU,GAAhB,CADU;AAKxBlB,EAAAA,KAAK,EAAEgB,mBAAUE,MALO;AAMxBjB,EAAAA,YAAY,EAAEe,mBAAUC,KAAV,CAAgBE,sBAAaJ,SAA7B,CANU;AAOxBX,EAAAA,KAAK,EAAEY,mBAAUE,MAPO;AAQxBb,EAAAA,MAAM,EAAEW,mBAAUE,MARM;AASxBZ,EAAAA,QAAQ,EAAEU,mBAAUI,MATI;AAUxBX,EAAAA,EAAE,EAAEO,mBAAUE;AAVU,CAA1B;eAaepB,a","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport CardImagePreview from '../../atom/card-image-preview';\nimport ContentBadge from '../../atom/content-badge';\nimport style from './style.css';\n\nconst CourseSection = props => {\n const {\n image,\n contentBadge: {category, label},\n title,\n author,\n position,\n 'aria-label': {title: ariaLabelTitle, author: ariaLabelAuthor},\n id\n } = props;\n return (\n <div className={style.container} aria-label={ariaLabelTitle} data-name={`course-section-${id}`}>\n <span className={style.position}>{position}</span>\n <div className={style.containerImage}>\n <CardImagePreview image={image} />\n </div>\n <div className={style.containerInfos}>\n <div className={style.containerMainInfos}>\n <ContentBadge className={style.contentBadge} category={category} label={label} />\n <div className={style.title}>{title}</div>\n </div>\n <span className={style.author} aria-label={ariaLabelAuthor}>\n {author}\n </span>\n </div>\n </div>\n );\n};\n\nCourseSection.propTypes = {\n 'aria-label': PropTypes.shape({\n title: PropTypes.string,\n author: PropTypes.string\n }),\n image: PropTypes.string,\n contentBadge: PropTypes.shape(ContentBadge.propTypes),\n title: PropTypes.string,\n author: PropTypes.string,\n position: PropTypes.number,\n id: PropTypes.string\n};\n\nexport default CourseSection;\n"],"file":"index.js"}
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
justify-content: start;
|
|
14
14
|
margin-top: 8px;
|
|
15
15
|
padding: 8px 16px;
|
|
16
|
+
border-radius: 7px;
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.containerInfos {
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
font-family: Gilroy;
|
|
51
52
|
font-weight: 600;
|
|
52
53
|
line-height: 20px;
|
|
53
|
-
margin: 0 12px 0
|
|
54
|
+
margin: 0 12px 0 32px;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
.contentBadge {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/course-section/test/fixtures/chapter.js"],"names":["props","title","author","image","contentBadge","label","category","position"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACL,kBAAc;AACZC,MAAAA,KAAK,EAAE,kBADK;AAEZC,MAAAA,MAAM,EAAE;AAFI,KADT;AAKLD,IAAAA,KAAK,EAAE,iBALF;AAMLC,IAAAA,MAAM,EAAE,QANH;AAOLC,IAAAA,KAAK,EACH,4LARG;AASLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,SADK;AAEZC,MAAAA,QAAQ,EAAE;AAFE,KATT;AAaLC,IAAAA,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-section/test/fixtures/chapter.js"],"names":["props","title","author","image","contentBadge","label","category","position","id"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACL,kBAAc;AACZC,MAAAA,KAAK,EAAE,kBADK;AAEZC,MAAAA,MAAM,EAAE;AAFI,KADT;AAKLD,IAAAA,KAAK,EAAE,iBALF;AAMLC,IAAAA,MAAM,EAAE,QANH;AAOLC,IAAAA,KAAK,EACH,4LARG;AASLC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,SADK;AAEZC,MAAAA,QAAQ,EAAE;AAFE,KATT;AAaLC,IAAAA,QAAQ,EAAE,CAbL;AAcLC,IAAAA,EAAE,EAAE;AAdC;AADM,C","sourcesContent":["export default {\n props: {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social networks',\n author: 'Author',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'chapter',\n category: 'chapter'\n },\n position: 2,\n id: 'chap_1'\n }\n};\n"],"file":"chapter.js"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../../src/molecule/course-section/test/fixtures/course.js"],"names":["props","title","author","image","contentBadge","label","category","position"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACL,kBAAc;AACZC,MAAAA,KAAK,EAAE,kBADK;AAEZC,MAAAA,MAAM,EAAE;AAFI,KADT;AAKLD,IAAAA,KAAK,EACH,qIANG;AAOLC,IAAAA,MAAM,EAAE,QAPH;AAQLC,IAAAA,KAAK,EACH,4LATG;AAULC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,QADK;AAEZC,MAAAA,QAAQ,EAAE;AAFE,KAVT;AAcLC,IAAAA,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-section/test/fixtures/course.js"],"names":["props","title","author","image","contentBadge","label","category","position","id"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACL,kBAAc;AACZC,MAAAA,KAAK,EAAE,kBADK;AAEZC,MAAAA,MAAM,EAAE;AAFI,KADT;AAKLD,IAAAA,KAAK,EACH,qIANG;AAOLC,IAAAA,MAAM,EAAE,QAPH;AAQLC,IAAAA,KAAK,EACH,4LATG;AAULC,IAAAA,YAAY,EAAE;AACZC,MAAAA,KAAK,EAAE,QADK;AAEZC,MAAAA,QAAQ,EAAE;AAFE,KAVT;AAcLC,IAAAA,QAAQ,EAAE,CAdL;AAeLC,IAAAA,EAAE,EAAE;AAfC;AADM,C","sourcesContent":["export default {\n props: {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title:\n 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',\n author: 'Author',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'course',\n category: 'course'\n },\n position: 1,\n id: 'disc_1'\n }\n};\n"],"file":"course.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 _chapter = _interopRequireDefault(require("./fixtures/chapter"));
|
|
12
|
+
|
|
13
|
+
var _course = _interopRequireDefault(require("./fixtures/course"));
|
|
14
|
+
|
|
15
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
+
|
|
17
|
+
(0, _ava.default)('Molecule › MoleculeCourseSection > should have valid propTypes', t => {
|
|
18
|
+
t.pass();
|
|
19
|
+
(0, _forEach.default)(_.default.propTypes, (value, key) => {
|
|
20
|
+
t.not(value, undefined, `PropType for "Molecule.MoleculeCourseSection.propTypes.${key}" may not be undefined. Did you mistype the propTypes definition?`);
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
(0, _ava.default)('Molecule › MoleculeCourseSection › Chapter › should be rendered', _renderComponent.default, _.default, _chapter.default);
|
|
24
|
+
(0, _ava.default)('Molecule › MoleculeCourseSection › Course › should be rendered', _renderComponent.default, _.default, _course.default);
|
|
25
|
+
//# sourceMappingURL=fixtures.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/molecule/course-section/test/fixtures.js"],"names":["t","pass","MoleculeCourseSection","propTypes","value","key","not","undefined","renderComponentMacro","fixtureChapter","fixtureCourse"],"mappings":";;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,kBAAK,gEAAL,EAAuEA,CAAC,IAAI;AAC1EA,EAAAA,CAAC,CAACC,IAAF;AACA,wBAAQC,UAAsBC,SAA9B,EAAyC,CAACC,KAAD,EAAQC,GAAR,KAAgB;AACvDL,IAAAA,CAAC,CAACM,GAAF,CAAMF,KAAN,EAAaG,SAAb,EAAyB,0DAAyDF,GAAI,mEAAtF;AACD,GAFD;AAGD,CALD;AAOA,kBAAK,iEAAL,EAAwEG,wBAAxE,EAA8FN,SAA9F,EAAqHO,gBAArH;AACA,kBAAK,gEAAL,EAAuED,wBAAvE,EAA6FN,SAA7F,EAAoHQ,eAApH","sourcesContent":["import test from 'ava';\nimport forEach from 'lodash/forEach';\nimport renderComponentMacro from '../../../test/helpers/render-component';\nimport MoleculeCourseSection from '..';\nimport fixtureChapter from './fixtures/chapter';\nimport fixtureCourse from './fixtures/course';\n\ntest('Molecule › MoleculeCourseSection > should have valid propTypes', t => {\n t.pass();\n forEach(MoleculeCourseSection.propTypes, (value, key) => {\n t.not(value, undefined, `PropType for \"Molecule.MoleculeCourseSection.propTypes.${key}\" may not be undefined. Did you mistype the propTypes definition?`);\n });\n});\n\ntest('Molecule › MoleculeCourseSection › Chapter › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureChapter);\ntest('Molecule › MoleculeCourseSection › Course › should be rendered', renderComponentMacro, MoleculeCourseSection, fixtureCourse);\n"],"file":"fixtures.js"}
|
|
@@ -0,0 +1,54 @@
|
|
|
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 _courseSection = _interopRequireDefault(require("../course-section"));
|
|
11
|
+
|
|
12
|
+
var _draggableList = _interopRequireDefault(require("../draggable-list"));
|
|
13
|
+
|
|
14
|
+
var _loader = _interopRequireDefault(require("../../atom/loader"));
|
|
15
|
+
|
|
16
|
+
var _title = _interopRequireDefault(require("../../atom/title"));
|
|
17
|
+
|
|
18
|
+
var _style = _interopRequireDefault(require("./style.css"));
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
+
|
|
22
|
+
const Loading = () => /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_loader.default, {
|
|
23
|
+
theme: "coorpmanager"
|
|
24
|
+
}));
|
|
25
|
+
|
|
26
|
+
const CourseSections = ({
|
|
27
|
+
sections,
|
|
28
|
+
onDrop,
|
|
29
|
+
isLoading,
|
|
30
|
+
title
|
|
31
|
+
}) => {
|
|
32
|
+
if (isLoading) return /*#__PURE__*/_react.default.createElement(Loading, null);
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement("div", null, title ? /*#__PURE__*/_react.default.createElement("div", {
|
|
34
|
+
className: _style.default.title
|
|
35
|
+
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
36
|
+
title: title,
|
|
37
|
+
type: 'form-group',
|
|
38
|
+
"data-name": 'course-sections-title'
|
|
39
|
+
})) : null, /*#__PURE__*/_react.default.createElement(_draggableList.default, {
|
|
40
|
+
itemType: "course-section",
|
|
41
|
+
items: sections,
|
|
42
|
+
onDrop: onDrop
|
|
43
|
+
}));
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
CourseSections.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
47
|
+
title: _propTypes.default.string,
|
|
48
|
+
sections: _propTypes.default.arrayOf(_propTypes.default.shape(_courseSection.default.propTypes)),
|
|
49
|
+
onDrop: _propTypes.default.func,
|
|
50
|
+
isLoading: _propTypes.default.bool
|
|
51
|
+
} : {};
|
|
52
|
+
var _default = CourseSections;
|
|
53
|
+
exports.default = _default;
|
|
54
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/course-sections/index.js"],"names":["Loading","CourseSections","sections","onDrop","isLoading","title","style","propTypes","PropTypes","string","arrayOf","shape","CourseSection","func","bool"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAAG,mBACd,uDACE,6BAAC,eAAD;AAAQ,EAAA,KAAK,EAAC;AAAd,EADF,CADF;;AAMA,MAAMC,cAAc,GAAG,CAAC;AAACC,EAAAA,QAAD;AAAWC,EAAAA,MAAX;AAAmBC,EAAAA,SAAnB;AAA8BC,EAAAA;AAA9B,CAAD,KAA0C;AAC/D,MAAID,SAAJ,EAAe,oBAAO,6BAAC,OAAD,OAAP;AAEf,sBACE,0CACGC,KAAK,gBACJ;AAAK,IAAA,SAAS,EAAEC,eAAMD;AAAtB,kBACE,6BAAC,cAAD;AAAO,IAAA,KAAK,EAAEA,KAAd;AAAqB,IAAA,IAAI,EAAE,YAA3B;AAAyC,iBAAW;AAApD,IADF,CADI,GAIF,IALN,eAME,6BAAC,sBAAD;AAAe,IAAA,QAAQ,EAAC,gBAAxB;AAAyC,IAAA,KAAK,EAAEH,QAAhD;AAA0D,IAAA,MAAM,EAAEC;AAAlE,IANF,CADF;AAUD,CAbD;;AAeAF,cAAc,CAACM,SAAf,2CAA2B;AACzBF,EAAAA,KAAK,EAAEG,mBAAUC,MADQ;AAEzBP,EAAAA,QAAQ,EAAEM,mBAAUE,OAAV,CAAkBF,mBAAUG,KAAV,CAAgBC,uBAAcL,SAA9B,CAAlB,CAFe;AAGzBJ,EAAAA,MAAM,EAAEK,mBAAUK,IAHO;AAIzBT,EAAAA,SAAS,EAAEI,mBAAUM;AAJI,CAA3B;eAOeb,c","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport CourseSection from '../course-section';\nimport DraggableList from '../draggable-list';\nimport Loader from '../../atom/loader';\nimport Title from '../../atom/title';\nimport style from './style.css';\n\nconst Loading = () => (\n <div>\n <Loader theme=\"coorpmanager\" />\n </div>\n);\n\nconst CourseSections = ({sections, onDrop, isLoading, title}) => {\n if (isLoading) return <Loading />;\n\n return (\n <div>\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 title: PropTypes.string,\n sections: PropTypes.arrayOf(PropTypes.shape(CourseSection.propTypes)),\n onDrop: PropTypes.func,\n isLoading: PropTypes.bool\n};\n\nexport default CourseSections;\n"],"file":"index.js"}
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
sections: [{
|
|
8
|
+
'aria-label': {
|
|
9
|
+
title: 'aria label title',
|
|
10
|
+
author: 'aria label author'
|
|
11
|
+
},
|
|
12
|
+
title: 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',
|
|
13
|
+
author: 'Author',
|
|
14
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
15
|
+
contentBadge: {
|
|
16
|
+
label: 'course',
|
|
17
|
+
category: 'course'
|
|
18
|
+
},
|
|
19
|
+
position: 1,
|
|
20
|
+
id: 'disc_1'
|
|
21
|
+
}, {
|
|
22
|
+
'aria-label': {
|
|
23
|
+
title: 'aria label title',
|
|
24
|
+
author: 'aria label author'
|
|
25
|
+
},
|
|
26
|
+
title: 'Social networks',
|
|
27
|
+
author: 'Author',
|
|
28
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
29
|
+
contentBadge: {
|
|
30
|
+
label: "5' learning",
|
|
31
|
+
category: 'chapter'
|
|
32
|
+
},
|
|
33
|
+
position: 2,
|
|
34
|
+
id: 'chap_1'
|
|
35
|
+
}, {
|
|
36
|
+
'aria-label': {
|
|
37
|
+
title: 'aria label title',
|
|
38
|
+
author: 'aria label author'
|
|
39
|
+
},
|
|
40
|
+
title: 'Other title',
|
|
41
|
+
author: 'Author 2',
|
|
42
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
43
|
+
contentBadge: {
|
|
44
|
+
label: 'course',
|
|
45
|
+
category: 'course'
|
|
46
|
+
},
|
|
47
|
+
position: 3,
|
|
48
|
+
id: 'disc_2'
|
|
49
|
+
}, {
|
|
50
|
+
'aria-label': {
|
|
51
|
+
title: 'aria label title',
|
|
52
|
+
author: 'aria label author'
|
|
53
|
+
},
|
|
54
|
+
title: 'Social others',
|
|
55
|
+
author: 'Author XXX',
|
|
56
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
57
|
+
contentBadge: {
|
|
58
|
+
label: "5' learning",
|
|
59
|
+
category: 'chapter'
|
|
60
|
+
},
|
|
61
|
+
position: 4,
|
|
62
|
+
id: 'chap_2'
|
|
63
|
+
}, {
|
|
64
|
+
'aria-label': {
|
|
65
|
+
title: 'aria label title',
|
|
66
|
+
author: 'aria label author'
|
|
67
|
+
},
|
|
68
|
+
title: 'Social others others',
|
|
69
|
+
author: 'Author XXX',
|
|
70
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
71
|
+
contentBadge: {
|
|
72
|
+
label: "5' learning",
|
|
73
|
+
category: 'chapter'
|
|
74
|
+
},
|
|
75
|
+
position: 5,
|
|
76
|
+
id: 'chap_3'
|
|
77
|
+
}, {
|
|
78
|
+
'aria-label': {
|
|
79
|
+
title: 'aria label title',
|
|
80
|
+
author: 'aria label author'
|
|
81
|
+
},
|
|
82
|
+
title: 'Something about empowerment',
|
|
83
|
+
author: 'Author XXX',
|
|
84
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
85
|
+
contentBadge: {
|
|
86
|
+
label: 'course',
|
|
87
|
+
category: 'course'
|
|
88
|
+
},
|
|
89
|
+
position: 6,
|
|
90
|
+
id: 'disc_3'
|
|
91
|
+
}, {
|
|
92
|
+
'aria-label': {
|
|
93
|
+
title: 'aria label title',
|
|
94
|
+
author: 'aria label author'
|
|
95
|
+
},
|
|
96
|
+
title: 'Be a better human being',
|
|
97
|
+
author: 'Author XXX',
|
|
98
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
99
|
+
contentBadge: {
|
|
100
|
+
label: "5' learning",
|
|
101
|
+
category: 'chapter'
|
|
102
|
+
},
|
|
103
|
+
position: 7,
|
|
104
|
+
id: 'chap_4'
|
|
105
|
+
}, {
|
|
106
|
+
'aria-label': {
|
|
107
|
+
title: 'aria label title',
|
|
108
|
+
author: 'aria label author'
|
|
109
|
+
},
|
|
110
|
+
title: 'Stronger faster better',
|
|
111
|
+
author: 'Author XXX',
|
|
112
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
113
|
+
contentBadge: {
|
|
114
|
+
label: 'course',
|
|
115
|
+
category: 'course'
|
|
116
|
+
},
|
|
117
|
+
position: 8,
|
|
118
|
+
id: 'disc_4'
|
|
119
|
+
}, {
|
|
120
|
+
'aria-label': {
|
|
121
|
+
title: 'aria label title',
|
|
122
|
+
author: 'aria label author'
|
|
123
|
+
},
|
|
124
|
+
title: 'Relativity beyond time',
|
|
125
|
+
author: 'Author XXX',
|
|
126
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
127
|
+
contentBadge: {
|
|
128
|
+
label: 'course',
|
|
129
|
+
category: 'course'
|
|
130
|
+
},
|
|
131
|
+
position: 9,
|
|
132
|
+
id: 'disc_5'
|
|
133
|
+
}, {
|
|
134
|
+
'aria-label': {
|
|
135
|
+
title: 'aria label title',
|
|
136
|
+
author: 'aria label author'
|
|
137
|
+
},
|
|
138
|
+
title: 'Are you awake?',
|
|
139
|
+
author: 'Author XXX',
|
|
140
|
+
image: 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',
|
|
141
|
+
contentBadge: {
|
|
142
|
+
label: "5' learning",
|
|
143
|
+
category: 'chapter'
|
|
144
|
+
},
|
|
145
|
+
position: 10,
|
|
146
|
+
id: 'chap_5'
|
|
147
|
+
}],
|
|
148
|
+
isLoading: false,
|
|
149
|
+
onDrop: () => console.log('on drop'),
|
|
150
|
+
title: 'Organize courses'
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
exports.default = _default;
|
|
154
|
+
//# sourceMappingURL=default.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-sections/test/fixtures/default.js"],"names":["props","sections","title","author","image","contentBadge","label","category","position","id","isLoading","onDrop","console","log"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,CACR;AACE,oBAAc;AACZC,QAAAA,KAAK,EAAE,kBADK;AAEZC,QAAAA,MAAM,EAAE;AAFI,OADhB;AAKED,MAAAA,KAAK,EACH,qIANJ;AAOEC,MAAAA,MAAM,EAAE,QAPV;AAQEC,MAAAA,KAAK,EACH,4LATJ;AAUEC,MAAAA,YAAY,EAAE;AACZC,QAAAA,KAAK,EAAE,QADK;AAEZC,QAAAA,QAAQ,EAAE;AAFE,OAVhB;AAcEC,MAAAA,QAAQ,EAAE,CAdZ;AAeEC,MAAAA,EAAE,EAAE;AAfN,KADQ,EAkBR;AACE,oBAAc;AACZP,QAAAA,KAAK,EAAE,kBADK;AAEZC,QAAAA,MAAM,EAAE;AAFI,OADhB;AAKED,MAAAA,KAAK,EAAE,iBALT;AAMEC,MAAAA,MAAM,EAAE,QANV;AAOEC,MAAAA,KAAK,EACH,4LARJ;AASEC,MAAAA,YAAY,EAAE;AACZC,QAAAA,KAAK,EAAE,aADK;AAEZC,QAAAA,QAAQ,EAAE;AAFE,OAThB;AAaEC,MAAAA,QAAQ,EAAE,CAbZ;AAcEC,MAAAA,EAAE,EAAE;AAdN,KAlBQ,EAkCR;AACE,oBAAc;AACZP,QAAAA,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Ac;AACZP,QAAAA,KAAK,EAAE,kBADK;AAEZC,QAAAA,MAAM,EAAE;AAFI,OADhB;AAKED,MAAAA,KAAK,EAAE,gBALT;AAMEC,MAAAA,MAAM,EAAE,YANV;AAOEC,MAAAA,KAAK,EACH,4LARJ;AASEC,MAAAA,YAAY,EAAE;AACZC,QAAAA,KAAK,EAAE,aADK;AAEZC,QAAAA,QAAQ,EAAE;AAFE,OAThB;AAaEC,MAAAA,QAAQ,EAAE,EAbZ;AAcEC,MAAAA,EAAE,EAAE;AAdN,KAlJQ,CADL;AAoKLC,IAAAA,SAAS,EAAE,KApKN;AAqKLC,IAAAA,MAAM,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,SAAZ,CArKT;AAsKLX,IAAAA,KAAK,EAAE;AAtKF;AADM,C","sourcesContent":["export default {\n props: {\n sections: [\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title:\n 'Marketing and online advertising Marketing and online advertising Marketing and online advertising Marketing and online advertising',\n author: 'Author',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'course',\n category: 'course'\n },\n position: 1,\n id: 'disc_1'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social networks',\n author: 'Author',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: \"5' learning\",\n category: 'chapter'\n },\n position: 2,\n id: 'chap_1'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Other title',\n author: 'Author 2',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'course',\n category: 'course'\n },\n position: 3,\n id: 'disc_2'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social others',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: \"5' learning\",\n category: 'chapter'\n },\n position: 4,\n id: 'chap_2'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Social others others',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: \"5' learning\",\n category: 'chapter'\n },\n position: 5,\n id: 'chap_3'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Something about empowerment',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'course',\n category: 'course'\n },\n position: 6,\n id: 'disc_3'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Be a better human being',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: \"5' learning\",\n category: 'chapter'\n },\n position: 7,\n id: 'chap_4'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Stronger faster better',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'course',\n category: 'course'\n },\n position: 8,\n id: 'disc_4'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Relativity beyond time',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: 'course',\n category: 'course'\n },\n position: 9,\n id: 'disc_5'\n },\n {\n 'aria-label': {\n title: 'aria label title',\n author: 'aria label author'\n },\n title: 'Are you awake?',\n author: 'Author XXX',\n image:\n 'https://api.coorpacademy.com/api-service/medias?url=https://static.coorpacademy.com/content/partner-wedemain/fr/medias/img/cover/shutterstock_248741149-1470302136299.jpg&h=500&w=500&q=90',\n contentBadge: {\n label: \"5' learning\",\n category: 'chapter'\n },\n position: 10,\n id: 'chap_5'\n }\n ],\n isLoading: false,\n onDrop: () => console.log('on drop'),\n title: 'Organize courses'\n }\n};\n"],"file":"default.js"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.default = void 0;
|
|
5
|
+
var _default = {
|
|
6
|
+
props: {
|
|
7
|
+
sections: [],
|
|
8
|
+
isLoading: true,
|
|
9
|
+
onDrop: () => console.log('on drop'),
|
|
10
|
+
title: ''
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
exports.default = _default;
|
|
14
|
+
//# sourceMappingURL=loading.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../../src/molecule/course-sections/test/fixtures/loading.js"],"names":["props","sections","isLoading","onDrop","console","log","title"],"mappings":";;;;eAAe;AACbA,EAAAA,KAAK,EAAE;AACLC,IAAAA,QAAQ,EAAE,EADL;AAELC,IAAAA,SAAS,EAAE,IAFN;AAGLC,IAAAA,MAAM,EAAE,MAAMC,OAAO,CAACC,GAAR,CAAY,SAAZ,CAHT;AAILC,IAAAA,KAAK,EAAE;AAJF;AADM,C","sourcesContent":["export default {\n props: {\n sections: [],\n isLoading: true,\n onDrop: () => console.log('on drop'),\n title: ''\n }\n};\n"],"file":"loading.js"}
|
|
@@ -48,7 +48,7 @@ const Draggable = props => {
|
|
|
48
48
|
onDrop(id);
|
|
49
49
|
}, [id, onDrop]);
|
|
50
50
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
51
|
-
className: (0, _classnames.default)(dragging ? _style.default.dragging : null, _style.default.
|
|
51
|
+
className: (0, _classnames.default)(dragging ? _style.default.dragging : null, _style.default.draggable),
|
|
52
52
|
onDragStart: dragStartHandler,
|
|
53
53
|
onDragOver: dragOverHandler,
|
|
54
54
|
onDragLeave: dragLeaveHandler,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/molecule/draggable/index.js"],"names":["preventDefault","e","stopPropagation","Draggable","props","id","dragging","onDragStart","onDragOver","onDragLeave","onDrop","children","dragStartHandler","dragOverHandler","dragLeaveHandler","dropHandler","style","
|
|
1
|
+
{"version":3,"sources":["../../../src/molecule/draggable/index.js"],"names":["preventDefault","e","stopPropagation","Draggable","props","id","dragging","onDragStart","onDragOver","onDragLeave","onDrop","children","dragStartHandler","dragOverHandler","dragLeaveHandler","dropHandler","style","draggable","propTypes","PropTypes","string","bool","func","element"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,cAAc,GAAGC,CAAC,IAAIA,CAAC,CAACD,cAAF,EAA5B;;AACA,MAAME,eAAe,GAAGD,CAAC,IAAIA,CAAC,CAACC,eAAF,EAA7B;;AAEA,MAAMC,SAAS,GAAGC,KAAK,IAAI;AACzB,QAAM;AAACC,IAAAA,EAAD;AAAKC,IAAAA,QAAQ,GAAG,KAAhB;AAAuBC,IAAAA,WAAvB;AAAoCC,IAAAA,UAApC;AAA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AAW,EAAEY,mBAAUG,IAHH;AAIpBd,EAAAA,UAAU,EAAEW,mBAAUG,IAJF;AAKpBb,EAAAA,WAAW,EAAEU,mBAAUG,IALH;AAMpBZ,EAAAA,MAAM,EAAES,mBAAUG,IANE;AAOpBX,EAAAA,QAAQ,EAAEQ,mBAAUI;AAPA,CAAtB;eAUepB,S","sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport style from './style.css';\n\nconst preventDefault = e => e.preventDefault();\nconst stopPropagation = e => e.stopPropagation();\n\nconst Draggable = props => {\n const {id, dragging = false, onDragStart, onDragOver, onDragLeave, onDrop, children} = props;\n\n const dragStartHandler = useCallback(\n e => {\n stopPropagation(e);\n onDragStart(id);\n },\n [id, onDragStart]\n );\n const dragOverHandler = useCallback(\n e => {\n preventDefault(e);\n onDragOver(id);\n },\n [id, onDragOver]\n );\n const dragLeaveHandler = useCallback(\n e => {\n preventDefault(e);\n onDragLeave(id);\n },\n [id, onDragLeave]\n );\n const dropHandler = useCallback(\n e => {\n preventDefault(e);\n onDrop(id);\n },\n [id, onDrop]\n );\n\n return (\n <div\n className={classnames(dragging ? style.dragging : null, style.draggable)}\n onDragStart={dragStartHandler}\n onDragOver={dragOverHandler}\n onDragLeave={dragLeaveHandler}\n onDrop={dropHandler}\n draggable\n >\n {children}\n </div>\n );\n};\nDraggable.propTypes = {\n id: PropTypes.string,\n dragging: PropTypes.bool,\n onDragStart: PropTypes.func,\n onDragOver: PropTypes.func,\n onDragLeave: PropTypes.func,\n onDrop: PropTypes.func,\n children: PropTypes.element\n};\n\nexport default Draggable;\n"],"file":"index.js"}
|
|
@@ -4,24 +4,9 @@
|
|
|
4
4
|
@value medium from colors;
|
|
5
5
|
@value xtraLightGrey from colors;
|
|
6
6
|
@value dark from colors;
|
|
7
|
-
@value cm_grey_100 from colors
|
|
7
|
+
@value cm_grey_100 from colors;
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
.section {
|
|
11
|
-
border-top: 1px;
|
|
12
|
-
border-left: 1px;
|
|
13
|
-
border-right: 1px;
|
|
14
|
-
border-style: solid;
|
|
15
|
-
border-color: medium;
|
|
16
|
-
border-bottom: 0;
|
|
17
|
-
display: flex;
|
|
18
|
-
justify-content: center;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
.section:last-child {
|
|
22
|
-
border-bottom: 1px solid medium;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
10
|
.draggable {
|
|
26
11
|
cursor: grab;
|
|
27
12
|
position: relative;
|
|
@@ -68,6 +53,7 @@
|
|
|
68
53
|
font-family: 'Open Sans';
|
|
69
54
|
font-weight: 600;
|
|
70
55
|
font-size: 14px;
|
|
56
|
+
border-radius: 7px;
|
|
71
57
|
}
|
|
72
58
|
|
|
73
59
|
@media mobile {
|