@coorpacademy/components 11.32.33-alpha.30 → 11.32.33-alpha.31.30
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/title/index.d.ts.map +1 -1
- package/es/atom/title/index.js +6 -0
- package/es/atom/title/index.js.map +1 -1
- package/es/atom/title/style.css +11 -0
- package/es/molecule/certification-card/index.d.ts +21 -0
- package/es/molecule/certification-card/index.d.ts.map +1 -0
- package/es/molecule/certification-card/index.js +99 -0
- package/es/molecule/certification-card/index.js.map +1 -0
- package/es/molecule/certification-card/style.css +72 -0
- package/es/molecule/progress-wrapper/index.d.ts +2 -1
- package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/es/molecule/progress-wrapper/index.js +10 -9
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/template/certification-detail/index.d.ts +5 -2
- package/es/template/certification-detail/index.d.ts.map +1 -1
- package/es/template/certification-detail/index.js +14 -6
- package/es/template/certification-detail/index.js.map +1 -1
- package/es/template/certifications/index.d.ts +54 -0
- package/es/template/certifications/index.d.ts.map +1 -0
- package/es/template/certifications/index.js +91 -0
- package/es/template/certifications/index.js.map +1 -0
- package/es/template/certifications/style.css +70 -0
- package/es/template/skill-detail/all-courses.js +1 -1
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/lib/atom/title/index.d.ts.map +1 -1
- package/lib/atom/title/index.js +6 -0
- package/lib/atom/title/index.js.map +1 -1
- package/lib/atom/title/style.css +11 -0
- package/lib/molecule/certification-card/index.d.ts +21 -0
- package/lib/molecule/certification-card/index.d.ts.map +1 -0
- package/lib/molecule/certification-card/index.js +113 -0
- package/lib/molecule/certification-card/index.js.map +1 -0
- package/lib/molecule/certification-card/style.css +72 -0
- package/lib/molecule/progress-wrapper/index.d.ts +2 -1
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/progress-wrapper/index.js +10 -9
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/template/certification-detail/index.d.ts +5 -2
- package/lib/template/certification-detail/index.d.ts.map +1 -1
- package/lib/template/certification-detail/index.js +14 -6
- package/lib/template/certification-detail/index.js.map +1 -1
- package/lib/template/certifications/index.d.ts +54 -0
- package/lib/template/certifications/index.d.ts.map +1 -0
- package/lib/template/certifications/index.js +110 -0
- package/lib/template/certifications/index.js.map +1 -0
- package/lib/template/certifications/style.css +70 -0
- package/lib/template/skill-detail/all-courses.js +1 -1
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/locales/en/global.json +5 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AA4CA,gDA4BC"}
|
package/es/atom/title/index.js
CHANGED
|
@@ -13,6 +13,9 @@ const getTitleStyle = (type, size) => {
|
|
|
13
13
|
|
|
14
14
|
case 'form-group':
|
|
15
15
|
switch (size) {
|
|
16
|
+
case 'standard-light-weight':
|
|
17
|
+
return style.titleFormGroupLightWeight;
|
|
18
|
+
|
|
16
19
|
case 'standard':
|
|
17
20
|
return style.titleFormGroup;
|
|
18
21
|
|
|
@@ -36,6 +39,9 @@ const getSubtitleStyle = (type, size) => {
|
|
|
36
39
|
case 'standard':
|
|
37
40
|
return style.subtitleFormGroup;
|
|
38
41
|
|
|
42
|
+
case 'standard-without-margin':
|
|
43
|
+
return style.subtitleFormGroupWithoutMargin;
|
|
44
|
+
|
|
39
45
|
case 'small':
|
|
40
46
|
return style.smallSubtitleFormGroup;
|
|
41
47
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","style","getTitleStyle","type","size","titlePage","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","titleStyle","subtitleStyle","subtitleSection","container","propTypes","string","oneOf","shape"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.titleFormGroup;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),\n subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small']),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes)\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,IAAD,EAAOC,IAAP,KAAgB;EACpC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACI,SAAb;;IACF,KAAK,YAAL;MACE,QAAQD,IAAR;QACE,KAAK,
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Icon","Tag","style","getTitleStyle","type","size","titlePage","titleFormGroupLightWeight","titleFormGroup","mediumTitleFormGroup","smallTitleFormGroup","getSubtitleStyle","subtitlePage","subtitleFormGroup","subtitleFormGroupWithoutMargin","smallSubtitleFormGroup","smallSubtitleFormGroupWithoutMargin","extraSmallSubtitleFormGroup","Title","props","title","subtitle","dataName","titleSize","subtitleSize","icon","tag","titleStyle","subtitleStyle","subtitleSection","container","propTypes","string","oneOf","shape"],"sources":["../../../src/atom/title/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Icon from '../icon';\nimport Tag from '../tag';\nimport style from './style.css';\n\nconst getTitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.titlePage;\n case 'form-group':\n switch (size) {\n case 'standard-light-weight':\n return style.titleFormGroupLightWeight;\n case 'standard':\n return style.titleFormGroup;\n case 'medium':\n return style.mediumTitleFormGroup;\n case 'small':\n return style.smallTitleFormGroup;\n }\n }\n};\n\nconst getSubtitleStyle = (type, size) => {\n switch (type) {\n case 'page':\n return style.subtitlePage;\n case 'form-group':\n switch (size) {\n case 'standard':\n return style.subtitleFormGroup;\n case 'standard-without-margin':\n return style.subtitleFormGroupWithoutMargin;\n case 'small':\n return style.smallSubtitleFormGroup;\n case 'small-without-margin':\n return style.smallSubtitleFormGroupWithoutMargin;\n case 'extra-small':\n return style.extraSmallSubtitleFormGroup;\n }\n }\n};\n\nconst Title = props => {\n const {\n title,\n subtitle,\n type,\n 'data-name': dataName,\n titleSize = 'standard',\n subtitleSize = 'standard',\n icon,\n tag\n } = props;\n const titleStyle = getTitleStyle(type, titleSize);\n const subtitleStyle = getSubtitleStyle(type, subtitleSize);\n\n const subtitleSection = subtitle ? <div className={subtitleStyle}>{subtitle}</div> : null;\n\n return (\n <div className={style.container}>\n {icon ? <Icon {...icon} className={style.icon} /> : null}\n <div>\n <div className={titleStyle} data-name={dataName}>\n {title}\n {tag ? <Tag {...tag} /> : null}\n </div>\n {subtitleSection}\n </div>\n </div>\n );\n};\n\nTitle.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n type: PropTypes.oneOf(['page', 'form-group']),\n 'data-name': PropTypes.string,\n titleSize: PropTypes.oneOf(['standard', 'medium', 'small']),\n subtitleSize: PropTypes.oneOf(['standard', 'small', 'small-without-margin', 'extra-small']),\n icon: PropTypes.shape(Icon.propTypes),\n tag: PropTypes.shape(Tag.propTypes)\n};\nexport default Title;\n"],"mappings":";;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,SAAjB;AACA,OAAOC,GAAP,MAAgB,QAAhB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,aAAa,GAAG,CAACC,IAAD,EAAOC,IAAP,KAAgB;EACpC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACI,SAAb;;IACF,KAAK,YAAL;MACE,QAAQD,IAAR;QACE,KAAK,uBAAL;UACE,OAAOH,KAAK,CAACK,yBAAb;;QACF,KAAK,UAAL;UACE,OAAOL,KAAK,CAACM,cAAb;;QACF,KAAK,QAAL;UACE,OAAON,KAAK,CAACO,oBAAb;;QACF,KAAK,OAAL;UACE,OAAOP,K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AKGG,eALH,CAFF,CADF;AAYD,CA5BD;;AA8BAX,KAAK,CAACa,SAAN,2CAAkB;EAChBX,KAAK,EAAErB,SAAS,CAACiC,MADD;EAEhBX,QAAQ,EAAEtB,SAAS,CAACiC,MAFJ;EAGhB5B,IAAI,EAAEL,SAAS,CAACkC,KAAV,CAAgB,CAAC,MAAD,EAAS,YAAT,CAAhB,CAHU;EAIhB,aAAalC,SAAS,CAACiC,MAJP;EAKhBT,SAAS,EAAExB,SAAS,CAACkC,KAAV,CAAgB,CAAC,UAAD,EAAa,QAAb,EAAuB,OAAvB,CAAhB,CALK;EAMhBT,YAAY,EAAEzB,SAAS,CAACkC,KAAV,CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,sBAAtB,EAA8C,aAA9C,CAAhB,CANE;EAOhBR,IAAI,EAAE1B,SAAS,CAACmC,KAAV,CAAgBlC,IAAI,CAAC+B,SAArB,CAPU;EAQhBL,GAAG,EAAE3B,SAAS,CAACmC,KAAV,CAAgBjC,GAAG,CAAC8B,SAApB;AARW,CAAlB;AAUA,eAAeb,KAAf"}
|
package/es/atom/title/style.css
CHANGED
|
@@ -28,6 +28,11 @@
|
|
|
28
28
|
gap: 4px;
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
+
.titleFormGroupLightWeight {
|
|
32
|
+
composes: titleFormGroup;
|
|
33
|
+
font-weight: 600;
|
|
34
|
+
}
|
|
35
|
+
|
|
31
36
|
.mediumTitleFormGroup {
|
|
32
37
|
composes: title;
|
|
33
38
|
font-size: 16px;
|
|
@@ -64,6 +69,12 @@
|
|
|
64
69
|
color: cm_grey_400;
|
|
65
70
|
}
|
|
66
71
|
|
|
72
|
+
.subtitleFormGroupWithoutMargin {
|
|
73
|
+
composes: subtitleFormGroup;
|
|
74
|
+
font-weight: 500;
|
|
75
|
+
margin: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
67
78
|
.smallSubtitleFormGroup{
|
|
68
79
|
composes: subtitleFormGroup;
|
|
69
80
|
max-width: 455px;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export default CertificationCard;
|
|
2
|
+
declare function CertificationCard(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace CertificationCard {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
|
+
}
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
const label: PropTypes.Requireable<string>;
|
|
9
|
+
const goal: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
+
title: PropTypes.Requireable<string>;
|
|
11
|
+
condition: PropTypes.Requireable<PropTypes.InferProps<{
|
|
12
|
+
nbDone: PropTypes.Requireable<number>;
|
|
13
|
+
}>>;
|
|
14
|
+
}>>;
|
|
15
|
+
const progress: PropTypes.Requireable<number>;
|
|
16
|
+
const imgUrl: PropTypes.Requireable<string>;
|
|
17
|
+
const onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
import PropTypes from "prop-types";
|
|
21
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,0EAsDC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import PropTypes from 'prop-types';
|
|
3
|
+
import { COLORS } from '../../variables/colors';
|
|
4
|
+
import Provider from '../../atom/provider';
|
|
5
|
+
import Tag from '../../atom/tag';
|
|
6
|
+
import ProgressBar from '../progress-bar';
|
|
7
|
+
import style from './style.css';
|
|
8
|
+
|
|
9
|
+
const CertificationCard = (props, context) => {
|
|
10
|
+
const {
|
|
11
|
+
label,
|
|
12
|
+
goal,
|
|
13
|
+
progress,
|
|
14
|
+
imgUrl,
|
|
15
|
+
onClick
|
|
16
|
+
} = props;
|
|
17
|
+
const {
|
|
18
|
+
title,
|
|
19
|
+
condition: {
|
|
20
|
+
nbDone
|
|
21
|
+
}
|
|
22
|
+
} = goal;
|
|
23
|
+
const {
|
|
24
|
+
translate
|
|
25
|
+
} = context;
|
|
26
|
+
const isInprogress = progress < 100;
|
|
27
|
+
const progressLabel = isInprogress ? translate('in_progress') : translate('completed');
|
|
28
|
+
const progressTagType = isInprogress ? 'progress' : 'success';
|
|
29
|
+
const progressIconProps = {
|
|
30
|
+
position: 'left',
|
|
31
|
+
iconName: isInprogress ? 'clock' : 'circle-check',
|
|
32
|
+
iconColor: isInprogress ? '#B87A00' : '#05944F',
|
|
33
|
+
backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',
|
|
34
|
+
size: {
|
|
35
|
+
faSize: 10,
|
|
36
|
+
wrapperSize: 10
|
|
37
|
+
},
|
|
38
|
+
customStyle: {
|
|
39
|
+
padding: 0
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
43
|
+
className: style.container,
|
|
44
|
+
"data-name": `certification-card-${label}`,
|
|
45
|
+
onClick: onClick
|
|
46
|
+
}, progress > 0 ? /*#__PURE__*/React.createElement(Tag, {
|
|
47
|
+
label: progressLabel,
|
|
48
|
+
type: progressTagType,
|
|
49
|
+
customStyle: {
|
|
50
|
+
position: 'absolute',
|
|
51
|
+
top: '12px',
|
|
52
|
+
right: '12px'
|
|
53
|
+
},
|
|
54
|
+
icon: progressIconProps
|
|
55
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
56
|
+
className: style.imageWrapper
|
|
57
|
+
}, /*#__PURE__*/React.createElement("img", {
|
|
58
|
+
src: imgUrl,
|
|
59
|
+
width: "104",
|
|
60
|
+
height: "104"
|
|
61
|
+
})), /*#__PURE__*/React.createElement("div", {
|
|
62
|
+
className: style.detailWrapper
|
|
63
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
64
|
+
className: style.titleWrapper
|
|
65
|
+
}, /*#__PURE__*/React.createElement(Tag, {
|
|
66
|
+
label: translate('certification'),
|
|
67
|
+
size: "S"
|
|
68
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
69
|
+
className: style.title
|
|
70
|
+
}, title), /*#__PURE__*/React.createElement("div", {
|
|
71
|
+
className: style.moduleCount
|
|
72
|
+
}, /*#__PURE__*/React.createElement("span", null, nbDone), ` ${translate('certification_module')}`)), /*#__PURE__*/React.createElement(ProgressBar, {
|
|
73
|
+
className: style.customProgressBar,
|
|
74
|
+
style: {
|
|
75
|
+
backgroundColor: COLORS.positive
|
|
76
|
+
},
|
|
77
|
+
displayInfo: false,
|
|
78
|
+
value: progress,
|
|
79
|
+
max: 100
|
|
80
|
+
})));
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
CertificationCard.contextTypes = {
|
|
84
|
+
translate: Provider.childContextTypes.translate
|
|
85
|
+
};
|
|
86
|
+
CertificationCard.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
87
|
+
label: PropTypes.string,
|
|
88
|
+
goal: PropTypes.shape({
|
|
89
|
+
title: PropTypes.string,
|
|
90
|
+
condition: PropTypes.shape({
|
|
91
|
+
nbDone: PropTypes.number
|
|
92
|
+
})
|
|
93
|
+
}),
|
|
94
|
+
progress: PropTypes.number,
|
|
95
|
+
imgUrl: PropTypes.string,
|
|
96
|
+
onClick: PropTypes.func
|
|
97
|
+
} : {};
|
|
98
|
+
export default CertificationCard;
|
|
99
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","COLORS","Provider","Tag","ProgressBar","style","CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","container","top","right","imageWrapper","detailWrapper","titleWrapper","moduleCount","customProgressBar","positive","contextTypes","childContextTypes","propTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageWrapper}>\n <img src={imgUrl} width=\"104\" height=\"104\" />\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title}>{title}</div>\n <div className={style.moduleCount}>\n <span>{nbDone}</span>\n {` ${translate('certification_module')}`}\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default CertificationCard;\n"],"mappings":"AAAA,OAAOA,KAAP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MACzB5B,MAAM,EAAEhB,SAAS,CAAC6C;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BlC,QAAQ,EAAEX,SAAS,CAAC6C,MARQ;EAS5BjC,MAAM,EAAEZ,SAAS,CAAC2C,MATU;EAU5B9B,OAAO,EAAEb,SAAS,CAAC8C;AAVS,CAA9B;AAaA,eAAexC,iBAAf"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
@value colors: "../../variables/colors.css";
|
|
2
|
+
@value xtraLightGrey from colors;
|
|
3
|
+
@value cm_grey_100 from colors;
|
|
4
|
+
@value cm_grey_400 from colors;
|
|
5
|
+
@value cm_grey_500 from colors;
|
|
6
|
+
|
|
7
|
+
.container {
|
|
8
|
+
font-family: "Gilroy";
|
|
9
|
+
font-style: normal;
|
|
10
|
+
border-radius: 12px;
|
|
11
|
+
width: 345px;
|
|
12
|
+
height: 309px;
|
|
13
|
+
min-width: 288px;
|
|
14
|
+
background-color: #FFF;
|
|
15
|
+
border: 2px solid #FFF;
|
|
16
|
+
box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.10);
|
|
17
|
+
position: relative;
|
|
18
|
+
display: flex;
|
|
19
|
+
flex-direction: column;
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.imageWrapper {
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
background-color: xtraLightGrey;
|
|
28
|
+
height: 160px;
|
|
29
|
+
width: auto;
|
|
30
|
+
|
|
31
|
+
img {
|
|
32
|
+
min-width: 100px;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.detailWrapper {
|
|
37
|
+
padding: 16px;
|
|
38
|
+
display: flex;
|
|
39
|
+
flex-direction: column;
|
|
40
|
+
align-items: center;
|
|
41
|
+
justify-content: space-between;
|
|
42
|
+
flex-grow: 1;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.titleWrapper {
|
|
46
|
+
width: 100%;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.title {
|
|
50
|
+
font-size: 16px;
|
|
51
|
+
font-weight: 600;
|
|
52
|
+
line-height: 22px;
|
|
53
|
+
margin-top: 4px;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.moduleCount {
|
|
57
|
+
margin-top: 4px;
|
|
58
|
+
color: cm_grey_400;
|
|
59
|
+
font-size: 12px;
|
|
60
|
+
font-weight: 600;
|
|
61
|
+
line-height: 16px;
|
|
62
|
+
|
|
63
|
+
span {
|
|
64
|
+
color: cm_grey_500;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.customProgressBar {
|
|
69
|
+
width: 269px;
|
|
70
|
+
height: 4px;
|
|
71
|
+
background-color: cm_grey_100;
|
|
72
|
+
}
|
|
@@ -19,7 +19,8 @@ declare namespace ProgressWrapper {
|
|
|
19
19
|
const progression: PropTypes.Requireable<number>;
|
|
20
20
|
const sections: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
21
21
|
type: PropTypes.Requireable<string>;
|
|
22
|
-
|
|
22
|
+
badgeUrl: PropTypes.Requireable<string>;
|
|
23
|
+
onDownload: PropTypes.Requireable<(...args: any[]) => any>;
|
|
23
24
|
stars: PropTypes.Requireable<number>;
|
|
24
25
|
}> | null | undefined)[]>;
|
|
25
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AAyFA;;;;;;;8BA8DC"}
|
|
@@ -24,7 +24,8 @@ const DetailSection = ({
|
|
|
24
24
|
index,
|
|
25
25
|
type,
|
|
26
26
|
isLocked,
|
|
27
|
-
|
|
27
|
+
badgeUrl,
|
|
28
|
+
onDownload,
|
|
28
29
|
stars
|
|
29
30
|
}, context) => {
|
|
30
31
|
const {
|
|
@@ -33,10 +34,7 @@ const DetailSection = ({
|
|
|
33
34
|
const isTypeStars = type === 'stars';
|
|
34
35
|
const DownloadButton = /*#__PURE__*/React.createElement(ButtonLink, {
|
|
35
36
|
label: translate('download'),
|
|
36
|
-
|
|
37
|
-
target: '_blank',
|
|
38
|
-
href: downloadUrl
|
|
39
|
-
},
|
|
37
|
+
onClick: onDownload,
|
|
40
38
|
"data-name": "download-button",
|
|
41
39
|
"aria-label": "download button",
|
|
42
40
|
customStyle: {
|
|
@@ -88,7 +86,7 @@ const DetailSection = ({
|
|
|
88
86
|
className: style[`detailsSection${index}`]
|
|
89
87
|
}, /*#__PURE__*/React.createElement("img", {
|
|
90
88
|
className: style.img,
|
|
91
|
-
src:
|
|
89
|
+
src: badgeUrl || 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'
|
|
92
90
|
}), /*#__PURE__*/React.createElement("div", {
|
|
93
91
|
className: style.detailsInfo
|
|
94
92
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -161,11 +159,13 @@ const ProgressWrapper = ({
|
|
|
161
159
|
}, uncappedMap(({
|
|
162
160
|
type,
|
|
163
161
|
stars,
|
|
164
|
-
|
|
162
|
+
badgeUrl,
|
|
163
|
+
onDownload
|
|
165
164
|
}, index) => /*#__PURE__*/React.createElement(DetailSection, {
|
|
166
165
|
type,
|
|
167
166
|
isLocked,
|
|
168
|
-
|
|
167
|
+
badgeUrl,
|
|
168
|
+
onDownload,
|
|
169
169
|
stars,
|
|
170
170
|
key: `${type}-${index}`,
|
|
171
171
|
index: index
|
|
@@ -174,7 +174,8 @@ const ProgressWrapper = ({
|
|
|
174
174
|
|
|
175
175
|
const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
|
|
176
176
|
type: PropTypes.oneOf(['diploma', 'badge', 'stars']),
|
|
177
|
-
|
|
177
|
+
badgeUrl: PropTypes.string,
|
|
178
|
+
onDownload: PropTypes.func,
|
|
178
179
|
stars: PropTypes.number
|
|
179
180
|
} : {};
|
|
180
181
|
DetailSection.contextTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","Title","ProgressBar","COLORS","Tag","ButtonLink","Icon","Provider","style","uncappedMap","convert","cap","DetailSection","index","type","isLocked","downloadUrl","stars","context","translate","isTypeStars","DownloadButton","target","href","backgroundColor","color","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedCourses","completedModules","title","subtitle","progression","sections","modulesCompletedLocal","container","titleContainer","statscontainer","stats","statsNumber","divider","statsModule","customProgressBar","positive","statsMobile","statsModuleMobile","statsProgressionMobile","details","commonDetailSectionPropTypes","oneOf","string","number","contextTypes","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, lowerCase, map} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, downloadUrl, stars}, context) => {\n const {translate} = context;\n const isTypeStars = type === 'stars';\n\n const DownloadButton = (\n <ButtonLink\n label={translate('download')}\n link={{\n target: '_blank',\n href: downloadUrl\n }}\n data-name=\"download-button\"\n aria-label=\"download button\"\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF'}}\n icon={{\n position: 'left',\n faIcon: {\n name: 'download',\n color: '#0061FF',\n size: 14,\n customStyle: {padding: 0}\n }\n }}\n disabled={isLocked}\n />\n );\n\n const LockedTag = (\n <Tag\n label=\"Locked\"\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: '#515161',\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div className={style[`detailsSection${index}`]}>\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div className={style[`detailsSection${index}`]}>\n <img\n className={style.img}\n src={\n type === 'badge'\n ? downloadUrl\n : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>{DownloadButton}</div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedCourses, completedModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const modulesCompletedLocal = translate('modules_completed');\n const isLocked = progression !== 100;\n\n return (\n <div className={style.container}>\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div>\n <span className={style.statsNumber}>{completedCourses}</span>\n {lowerCase(translate('courses_completed'))}\n </div>\n <div className={style.divider} />\n <div className={style.statsModule}>\n <span className={style.statsNumber}>{completedModules}</span>\n {modulesCompletedLocal}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsMobile}>\n <div className={style.statsModuleMobile}>\n <span className={style.statsNumber}>{completedModules}</span>\n {modulesCompletedLocal}\n </div>\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n ({type, stars, downloadUrl}, index) => (\n <DetailSection\n {...{type, isLocked, downloadUrl, stars}}\n key={`${type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n downloadUrl: PropTypes.string,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedCourses: PropTypes.number,\n completedModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,QAAP,MAAqB,qBAArB,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,KAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ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AANgB,CAA5B;AASA,eAAerB,eAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","Title","ProgressBar","COLORS","Tag","ButtonLink","Icon","Provider","style","uncappedMap","convert","cap","DetailSection","index","type","isLocked","badgeUrl","onDownload","stars","context","translate","isTypeStars","DownloadButton","backgroundColor","color","position","faIcon","name","size","customStyle","padding","LockedTag","iconName","iconColor","preset","detailsInfo","detailsInfoText","detailsTitle","img","buttonContainer","ProgressWrapper","completedCourses","completedModules","title","subtitle","progression","sections","modulesCompletedLocal","container","titleContainer","statscontainer","stats","statsNumber","divider","statsModule","customProgressBar","positive","statsMobile","statsModuleMobile","statsProgressionMobile","details","commonDetailSectionPropTypes","oneOf","string","func","number","contextTypes","childContextTypes","propTypes","bool","arrayOf","shape"],"sources":["../../../src/molecule/progress-wrapper/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {isEmpty, lowerCase, map} from 'lodash/fp';\nimport Title from '../../atom/title';\nimport ProgressBar from '../progress-bar';\nimport {COLORS} from '../../variables/colors';\nimport Tag from '../../atom/tag';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport Provider from '../../atom/provider';\n// eslint-disable-next-line css-modules/no-unused-class\nimport style from './style.css';\n\nconst uncappedMap = map.convert({cap: false});\n\nconst DetailSection = ({index, type, isLocked, badgeUrl, onDownload, stars}, context) => {\n const {translate} = context;\n const isTypeStars = type === 'stars';\n\n const DownloadButton = (\n <ButtonLink\n label={translate('download')}\n onClick={onDownload}\n data-name=\"download-button\"\n aria-label=\"download button\"\n customStyle={{backgroundColor: '#F1F6FE', color: '#0061FF'}}\n icon={{\n position: 'left',\n faIcon: {\n name: 'download',\n color: '#0061FF',\n size: 14,\n customStyle: {padding: 0}\n }\n }}\n disabled={isLocked}\n />\n );\n\n const LockedTag = (\n <Tag\n label=\"Locked\"\n size=\"S\"\n icon={{\n position: 'left',\n iconName: 'lock',\n iconColor: '#515161',\n preset: 's',\n customStyle: {padding: 0}\n }}\n />\n );\n\n return isTypeStars ? (\n <div className={style[`detailsSection${index}`]}>\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>{translate('bonus_stars')}</span>\n {isLocked ? LockedTag : null}\n </div>\n <div className={style.stars}>\n <Icon iconName=\"star\" iconColor=\"#FFCE0A\" backgroundColor=\"#FFF9D1\" preset=\"xl\" />\n <span>{stars}</span>\n </div>\n </div>\n </div>\n ) : (\n <div className={style[`detailsSection${index}`]}>\n <img\n className={style.img}\n src={\n badgeUrl ||\n 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'\n }\n />\n <div className={style.detailsInfo}>\n <div className={style.detailsInfoText}>\n <span className={style.detailsTitle}>\n {type === 'diploma' ? translate('diploma') : translate('badge')}\n </span>\n {isLocked ? LockedTag : null}\n </div>\n\n <div className={style.buttonContainer}>{DownloadButton}</div>\n </div>\n </div>\n );\n};\n\nconst ProgressWrapper = (\n {completedCourses, completedModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const modulesCompletedLocal = translate('modules_completed');\n const isLocked = progression !== 100;\n\n return (\n <div className={style.container}>\n <div className={style.titleContainer}>\n <Title type=\"form-group\" titleSize=\"medium\" title={title} subtitle={subtitle} />\n </div>\n <div className={style.statscontainer}>\n <div className={style.stats}>\n <div>\n <span className={style.statsNumber}>{completedCourses}</span>\n {lowerCase(translate('courses_completed'))}\n </div>\n <div className={style.divider} />\n <div className={style.statsModule}>\n <span className={style.statsNumber}>{completedModules}</span>\n {modulesCompletedLocal}\n </div>\n </div>\n <div className={style.progression}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progression}\n max={100}\n />\n <div className={style.statsMobile}>\n <div className={style.statsModuleMobile}>\n <span className={style.statsNumber}>{completedModules}</span>\n {modulesCompletedLocal}\n </div>\n <div className={style.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\n </div>\n </div>\n\n {isEmpty(sections) ? null : (\n <div className={style.details}>\n {uncappedMap(\n ({type, stars, badgeUrl, onDownload}, index) => (\n <DetailSection\n {...{type, isLocked, badgeUrl, onDownload, stars}}\n key={`${type}-${index}`}\n index={index}\n />\n ),\n sections\n )}\n </div>\n )}\n </div>\n );\n};\n\nconst commonDetailSectionPropTypes = {\n type: PropTypes.oneOf(['diploma', 'badge', 'stars']),\n badgeUrl: PropTypes.string,\n onDownload: PropTypes.func,\n stars: PropTypes.number\n};\n\nDetailSection.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDetailSection.propTypes = {\n index: PropTypes.number,\n isLocked: PropTypes.bool,\n ...commonDetailSectionPropTypes\n};\n\nProgressWrapper.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nProgressWrapper.propTypes = {\n title: PropTypes.string,\n subtitle: PropTypes.string,\n completedCourses: PropTypes.number,\n completedModules: PropTypes.number,\n progression: PropTypes.number,\n sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))\n};\n\nexport default ProgressWrapper;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,QAAP,MAAqB,qBAArB,C,CACA;;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAG,KAAIC,OAAJ,CAAY;EAACC,GAAG,EAAE;AAAN,CAAZ,CAApB;;AAEA,MAAMC,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,IAAR;EAAcC,QAAd;EAAw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CertificationDetail {
|
|
|
36
36
|
completedCourses: PropTypes.Requireable<number>;
|
|
37
37
|
completedModules: PropTypes.Requireable<number>;
|
|
38
38
|
}>>;
|
|
39
|
-
const
|
|
40
|
-
const
|
|
39
|
+
const onDownloadDiploma: PropTypes.Requireable<(...args: any[]) => any>;
|
|
40
|
+
const badge: PropTypes.Requireable<PropTypes.InferProps<{
|
|
41
|
+
badgeUrl: PropTypes.Requireable<string>;
|
|
42
|
+
onDownloadBadge: PropTypes.Requireable<(...args: any[]) => any>;
|
|
43
|
+
}>>;
|
|
41
44
|
const ongoingCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
42
45
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
43
46
|
customStyle: PropTypes.Requireable<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAkBA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAkBA,4EA8GC"}
|
|
@@ -31,8 +31,8 @@ const CertificationDetail = (props, context) => {
|
|
|
31
31
|
onContinueLearningClick,
|
|
32
32
|
metrics,
|
|
33
33
|
logoUrl,
|
|
34
|
-
|
|
35
|
-
|
|
34
|
+
onDownloadDiploma,
|
|
35
|
+
badge = {}
|
|
36
36
|
} = props;
|
|
37
37
|
const {
|
|
38
38
|
translate
|
|
@@ -43,6 +43,10 @@ const CertificationDetail = (props, context) => {
|
|
|
43
43
|
completedModules,
|
|
44
44
|
stars
|
|
45
45
|
} = metrics;
|
|
46
|
+
const {
|
|
47
|
+
badgeUrl = false,
|
|
48
|
+
onDownloadBadge
|
|
49
|
+
} = badge;
|
|
46
50
|
const [showMore, setShowMore] = useState(false);
|
|
47
51
|
const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
48
52
|
const Description = useCallback(() => {
|
|
@@ -101,10 +105,11 @@ const CertificationDetail = (props, context) => {
|
|
|
101
105
|
completedModules: completedModules,
|
|
102
106
|
sections: _compact([{
|
|
103
107
|
type: 'diploma',
|
|
104
|
-
|
|
108
|
+
onDownload: () => onDownloadDiploma
|
|
105
109
|
}, badgeUrl && {
|
|
106
110
|
type: 'badge',
|
|
107
|
-
|
|
111
|
+
badgeUrl,
|
|
112
|
+
onDownload: () => onDownloadBadge
|
|
108
113
|
}, {
|
|
109
114
|
type: 'stars',
|
|
110
115
|
stars
|
|
@@ -132,8 +137,11 @@ CertificationDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
132
137
|
completedCourses: PropTypes.number,
|
|
133
138
|
completedModules: PropTypes.number
|
|
134
139
|
}),
|
|
135
|
-
|
|
136
|
-
|
|
140
|
+
onDownloadDiploma: PropTypes.func,
|
|
141
|
+
badge: PropTypes.shape({
|
|
142
|
+
badgeUrl: PropTypes.string,
|
|
143
|
+
onDownloadBadge: PropTypes.func
|
|
144
|
+
}),
|
|
137
145
|
ongoingCourses: PropTypes.shape(CardsGrid.propTypes),
|
|
138
146
|
certificationCourses: PropTypes.shape(CardsGrid.propTypes),
|
|
139
147
|
totalCourses: PropTypes.number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearning","ContinueLearningButton","ProgressWrapper","style","DESCRIPTION_BREAKPOINT","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCourses","totalCourses","totalModules","filters","sorting","onBackClick","onContinueLearningClick","metrics","logoUrl","diplomaUrl","badgeUrl","translate","progression","completedCourses","completedModules","stars","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButton","ctaContainer","logoContainer","logo","length","showMoreWrapper","faSize","wrapperSize","contentStats","divider","list","continueLearningSection","type","downloadUrl","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","onChange","func","options","arrayOf"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, lowerCase} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport ContinueLearning from '../skill-detail/continue-learning';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n description,\n certificationCourses,\n ongoingCourses,\n totalCourses,\n totalModules,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick,\n metrics,\n logoUrl,\n diplomaUrl,\n badgeUrl\n } = props;\n const {translate} = context;\n const {progression, completedCourses, completedModules, stars} = metrics;\n\n const [showMore, setShowMore] = useState(false);\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={translate('certification')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${totalCourses} ${lowerCase(translate('courses'))}`}</span>\n <div className={style.divider} />\n <span>{`${totalModules} ${lowerCase(translate('modules'))}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <div className={style.continueLearningSection}>\n <ContinueLearning ongoingCourses={ongoingCourses} />\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedCourses={completedCourses}\n completedModules={completedModules}\n sections={compact([\n {\n type: 'diploma',\n downloadUrl: diplomaUrl\n },\n badgeUrl && {\n type: 'badge',\n downloadUrl: badgeUrl\n },\n {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n courses={certificationCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nCertificationDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nCertificationDetail.propTypes = {\n title: PropTypes.string.isRequired,\n certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n completedCourses: PropTypes.number,\n completedModules: PropTypes.number\n }),\n diplomaUrl: PropTypes.string,\n badgeUrl: PropTypes.string,\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n totalModules: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default CertificationDetail;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,UAAP,MAAuB,6BAAvB;AACA,OAAOC,gBAAP,MAA6B,mCAA7B;AACA,SAAQC,sBAAR,QAAqC,iBAArC;AACA,OAAOC,eAAP,MAA4B,iCAA5B;AACA,OAAOC,KAAP,MAAkB,aAAlB;AAEA,MAAMC,sBAAsB,GAAG,GAA/B;;AAEA,MAAMC,mBAAmB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC9C,MAAM;IACJC,gBADI;IAEJC,KAFI;IAGJC,WAHI;IAIJC,oBAJI;IAKJC,cALI;IAMJC,YANI;IAOJC,YAPI;IAQJC,OARI;IASJC,OATI;IAUJC,WAVI;IAWJC,uBAXI;IAYJC,OAZI;IAaJC,OAbI;IAcJC,UAdI;IAeJC;EAfI,IAgBFhB,KAhBJ;EAiBA,MAAM;IAACiB;EAAD,IAAchB,OAApB;EACA,MAAM;IAACiB,WAAD;IAAcC,gBAAd;IAAgCC,gBAAhC;IAAkDC;EAAlD,IAA2DR,OAAjE;EAEA,MAAM,CAACS,QAAD,EAAWC,WAAX,IAA0BxC,QAAQ,CAAC,KAAD,CAAxC;EACA,MAAMyC,cAAc,GAAG1C,WAAW,CAAC,MAAMyC,WAAW,CAAC,CAACD,QAAF,CAAlB,EAA+B,CAACC,WAAD,EAAcD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,SAAS,CAACoE,IAtBO;EAuB9BxC,uBAAuB,EAAE5B,SAAS,CAACoE;AAvBL,CAAhC;AA0BA,eAAerD,mBAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearning","ContinueLearningButton","ProgressWrapper","style","DESCRIPTION_BREAKPOINT","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCourses","totalCourses","totalModules","filters","sorting","onBackClick","onContinueLearningClick","metrics","logoUrl","onDownloadDiploma","badge","translate","progression","completedCourses","completedModules","stars","badgeUrl","onDownloadBadge","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButton","ctaContainer","logoContainer","logo","length","showMoreWrapper","faSize","wrapperSize","contentStats","divider","list","continueLearningSection","type","onDownload","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","func","onChange","options","arrayOf"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, lowerCase} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport ContinueLearning from '../skill-detail/continue-learning';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n description,\n certificationCourses,\n ongoingCourses,\n totalCourses,\n totalModules,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick,\n metrics,\n logoUrl,\n onDownloadDiploma,\n badge = {}\n } = props;\n const {translate} = context;\n const {progression, completedCourses, completedModules, stars} = metrics;\n const {badgeUrl = false, onDownloadBadge} = badge;\n\n const [showMore, setShowMore] = useState(false);\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n const Description = useCallback(() => {\n return (\n <div className={classnames(style.description, !showMore && style.truncate)}>\n {description}\n </div>\n );\n }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={translate('certification')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${totalCourses} ${lowerCase(translate('courses'))}`}</span>\n <div className={style.divider} />\n <span>{`${totalModules} ${lowerCase(translate('modules'))}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <div className={style.continueLearningSection}>\n <ContinueLearning ongoingCourses={ongoingCourses} />\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedCourses={completedCourses}\n completedModules={completedModules}\n sections={compact([\n {\n type: 'diploma',\n onDownload: () => onDownloadDiploma\n },\n badgeUrl && {\n type: 'badge',\n badgeUrl,\n onDownload: () => onDownloadBadge\n },\n {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n courses={certificationCourses}\n totalCourses={totalCourses}\n filters={filters}\n sorting={sorting}\n />\n </div>\n </div>\n );\n};\n\nCertificationDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nCertificationDetail.propTypes = {\n title: PropTypes.string.isRequired,\n certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n completedCourses: PropTypes.number,\n completedModules: PropTypes.number\n }),\n onDownloadDiploma: PropTypes.func,\n badge: PropTypes.shape({\n badgeUrl: PropTypes.string,\n onDownloadBadge: PropTypes.func\n }),\n ongoingCourses: PropTypes.shape(CardsGrid.propTypes),\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n totalCourses: PropTypes.number,\n totalModules: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default CertificationDetail;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,UAAP,MAAuB,6BAAvB;AACA,OAAOC,gBAAP,MAA6B,mCAA7B;AACA,SAAQC,sBAAR,QAAqC,iBAArC;AACA,OAAOC,eAAP,MAA4B,iCAA5B;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ACoE,MAFM;IAGvBjC,gBAAgB,EAAEnC,SAAS,CAACoE,MAHL;IAIvBhC,gBAAgB,EAAEpC,SAAS,CAACoE;EAJL,CAAhB,CALqB;EAW9BrC,iBAAiB,EAAE/B,SAAS,CAACqE,IAXC;EAY9BrC,KAAK,EAAEhC,SAAS,CAACmE,KAAV,CAAgB;IACrB7B,QAAQ,EAAEtC,SAAS,CAACiE,MADC;IAErB1B,eAAe,EAAEvC,SAAS,CAACqE;EAFN,CAAhB,CAZuB;EAgB9B/C,cAAc,EAAEtB,SAAS,CAACmE,KAAV,CAAgB3D,SAAS,CAACwD,SAA1B,CAhBc;EAiB9B3C,oBAAoB,EAAErB,SAAS,CAACmE,KAAV,CAAgB3D,SAAS,CAACwD,SAA1B,CAjBQ;EAkB9BzC,YAAY,EAAEvB,SAAS,CAACoE,MAlBM;EAmB9B5C,YAAY,EAAExB,SAAS,CAACoE,MAnBM;EAoB9B3C,OAAO,EAAEzB,SAAS,CAACmE,KAAV,CAAgB;IACvBG,QAAQ,EAAEtE,SAAS,CAACqE,IADG;IAEvBE,OAAO,EAAEvE,SAAS,CAACwE,OAAV,CAAkBxE,SAAS,CAACmE,KAAV,CAAgB9D,qBAAhB,CAAlB;EAFc,CAAhB,CApBqB;EAwB9BqB,OAAO,EAAE1B,SAAS,CAACmE,KAAV,CAAgB/D,MAAM,CAAC4D,SAAvB,CAxBqB;EAyB9BrC,WAAW,EAAE3B,SAAS,CAACqE,IAzBO;EA0B9BzC,uBAAuB,EAAE5B,SAAS,CAACqE;AA1BL,CAAhC;AA6BA,eAAetD,mBAAf"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
export default Certifications;
|
|
2
|
+
declare function Certifications(props: any, context: any): JSX.Element;
|
|
3
|
+
declare namespace Certifications {
|
|
4
|
+
namespace contextTypes {
|
|
5
|
+
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
6
|
+
}
|
|
7
|
+
namespace propTypes {
|
|
8
|
+
const certifications: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
9
|
+
label: PropTypes.Requireable<string>;
|
|
10
|
+
goal: PropTypes.Requireable<PropTypes.InferProps<{
|
|
11
|
+
title: PropTypes.Requireable<string>;
|
|
12
|
+
condition: PropTypes.Requireable<PropTypes.InferProps<{
|
|
13
|
+
nbDone: PropTypes.Requireable<number>;
|
|
14
|
+
}>>;
|
|
15
|
+
}>>;
|
|
16
|
+
progress: PropTypes.Requireable<number>;
|
|
17
|
+
imgUrl: PropTypes.Requireable<string>;
|
|
18
|
+
onClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
19
|
+
}> | null | undefined)[]>;
|
|
20
|
+
const sorting: PropTypes.Requireable<PropTypes.InferProps<{
|
|
21
|
+
title: PropTypes.Requireable<string>;
|
|
22
|
+
name: PropTypes.Requireable<string>;
|
|
23
|
+
className: PropTypes.Requireable<string>;
|
|
24
|
+
borderClassName: PropTypes.Requireable<string>;
|
|
25
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
26
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
27
|
+
description: PropTypes.Requireable<string>;
|
|
28
|
+
required: PropTypes.Requireable<boolean>;
|
|
29
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
30
|
+
theme: PropTypes.Requireable<string>;
|
|
31
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
32
|
+
name: PropTypes.Validator<string>;
|
|
33
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
34
|
+
selected: PropTypes.Requireable<boolean>;
|
|
35
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
36
|
+
}> | null | undefined)[]>;
|
|
37
|
+
optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
38
|
+
label: PropTypes.Validator<string>;
|
|
39
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
40
|
+
name: PropTypes.Validator<string>;
|
|
41
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
42
|
+
selected: PropTypes.Requireable<boolean>;
|
|
43
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
44
|
+
}> | null | undefined)[]>;
|
|
45
|
+
}> | null | undefined)[]>;
|
|
46
|
+
modified: PropTypes.Requireable<boolean>;
|
|
47
|
+
error: PropTypes.Requireable<boolean>;
|
|
48
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
49
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
50
|
+
}>>;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
import PropTypes from "prop-types";
|
|
54
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certifications/index.js"],"names":[],"mappings":";AASA,uEAkEC"}
|