@coorpacademy/components 11.32.35-alpha.7 → 11.32.35
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/discipline-associated-skills/index.d.ts +0 -1
- package/es/molecule/discipline-associated-skills/index.d.ts.map +1 -1
- package/es/molecule/discipline-associated-skills/index.js +3 -8
- package/es/molecule/discipline-associated-skills/index.js.map +1 -1
- package/es/molecule/progress-wrapper/index.d.ts +5 -4
- package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/es/molecule/progress-wrapper/index.js +28 -14
- package/es/molecule/progress-wrapper/index.js.map +1 -1
- package/es/molecule/progress-wrapper/style.css +25 -3
- package/es/template/certification-detail/index.d.ts +47 -5
- package/es/template/certification-detail/index.d.ts.map +1 -1
- package/es/template/certification-detail/index.js +41 -26
- package/es/template/certification-detail/index.js.map +1 -1
- package/es/template/certification-detail/style.css +12 -1
- package/es/template/common/discipline/index.d.ts +0 -1
- package/es/template/common/discipline/index.d.ts.map +1 -1
- package/es/template/common/discipline/index.js +2 -6
- package/es/template/common/discipline/index.js.map +1 -1
- package/es/template/skill-detail/all-courses.d.ts.map +1 -1
- package/es/template/skill-detail/all-courses.js +2 -2
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/lib/molecule/discipline-associated-skills/index.d.ts +0 -1
- package/lib/molecule/discipline-associated-skills/index.d.ts.map +1 -1
- package/lib/molecule/discipline-associated-skills/index.js +3 -8
- package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
- package/lib/molecule/progress-wrapper/index.d.ts +5 -4
- package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
- package/lib/molecule/progress-wrapper/index.js +29 -14
- package/lib/molecule/progress-wrapper/index.js.map +1 -1
- package/lib/molecule/progress-wrapper/style.css +25 -3
- package/lib/template/certification-detail/index.d.ts +47 -5
- package/lib/template/certification-detail/index.d.ts.map +1 -1
- package/lib/template/certification-detail/index.js +42 -27
- package/lib/template/certification-detail/index.js.map +1 -1
- package/lib/template/certification-detail/style.css +12 -1
- package/lib/template/common/discipline/index.d.ts +0 -1
- package/lib/template/common/discipline/index.d.ts.map +1 -1
- package/lib/template/common/discipline/index.js +2 -6
- package/lib/template/common/discipline/index.js.map +1 -1
- package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
- package/lib/template/skill-detail/all-courses.js +2 -2
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/locales/en/global.json +0 -1
- package/package.json +2 -2
|
@@ -10,7 +10,6 @@ declare namespace DisciplineAssociatedSkills {
|
|
|
10
10
|
locale: PropTypes.Requireable<string>;
|
|
11
11
|
focused: PropTypes.Requireable<boolean>;
|
|
12
12
|
}> | null | undefined)[]>;
|
|
13
|
-
const skillsBaseUrl: PropTypes.Requireable<string>;
|
|
14
13
|
const onSkillClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
15
14
|
}
|
|
16
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-associated-skills/index.js"],"names":[],"mappings":";AAUA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-associated-skills/index.js"],"names":[],"mappings":";AAUA,0FAyEC"}
|
|
@@ -15,10 +15,8 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
15
15
|
} = context;
|
|
16
16
|
const {
|
|
17
17
|
skills = [],
|
|
18
|
-
skillsBaseUrl,
|
|
19
18
|
onSkillClick
|
|
20
19
|
} = props;
|
|
21
|
-
const hrefFormat = useCallback(skill => skillsBaseUrl ? `${skillsBaseUrl}/${skill.ref}` : '', [skillsBaseUrl]);
|
|
22
20
|
const AnchorElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
|
|
23
21
|
className: style.chipFocusedContent
|
|
24
22
|
}, skill.focused ? /*#__PURE__*/React.createElement(Icon, {
|
|
@@ -41,9 +39,8 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
41
39
|
}, /*#__PURE__*/React.createElement("div", {
|
|
42
40
|
className: style.chipsWrapper
|
|
43
41
|
}, skills.map(skill => {
|
|
44
|
-
function handleSkillClick(
|
|
45
|
-
|
|
46
|
-
onSkillClick();
|
|
42
|
+
function handleSkillClick() {
|
|
43
|
+
onSkillClick(skill.ref);
|
|
47
44
|
}
|
|
48
45
|
|
|
49
46
|
function handleAnchorElement() {
|
|
@@ -54,8 +51,7 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
54
51
|
return TooltipContentElement(skill);
|
|
55
52
|
}
|
|
56
53
|
|
|
57
|
-
return /*#__PURE__*/React.createElement("
|
|
58
|
-
href: hrefFormat(skill),
|
|
54
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
59
55
|
key: _uniqueId(),
|
|
60
56
|
className: classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused),
|
|
61
57
|
onClick: handleSkillClick
|
|
@@ -80,7 +76,6 @@ DisciplineAssociatedSkills.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
80
76
|
locale: PropTypes.string,
|
|
81
77
|
focused: PropTypes.bool
|
|
82
78
|
})),
|
|
83
|
-
skillsBaseUrl: PropTypes.string,
|
|
84
79
|
onSkillClick: PropTypes.func
|
|
85
80
|
} : {};
|
|
86
81
|
export default DisciplineAssociatedSkills;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","skill","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], onSkillClick} = props;\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n [translate]\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick() {\n onSkillClick(skill.ref);\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <div\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </div>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,cAAP,MAA2B,4BAA3B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,0BAA0B,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACrD,MAAM;IAACC;EAAD,IAAcD,OAApB;EAEA,MAAM;IAACE,MAAM,GAAG,EAAV;IAAcC;EAAd,IAA8BJ,KAApC;EAEA,MAAMK,aAAa,GAAGd,WAAW,CAC/Be,KAAK,iBACH;IAAK,SAAS,EAAER,KAAK,CAACS;EAAtB,GACGD,KAAK,CAACE,OAAN,gBACC,oBAAC,IAAD;IACE,QAAQ,EAAC,gBADX;IAEE,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT;EAFR,EADD,GAQG,IATN,eAUE;IAAK,SAAS,EAAEZ,KAAK,CAACa;EAAtB,GAA+CL,KAAK,CAACM,MAArD,CAVF,CAF6B,EAe/B,EAf+B,CAAjC;EAkBA,MAAMC,qBAAqB,GAAGtB,WAAW,CACvCe,KAAK,iBACH;IAAK,SAAS,EAAER,KAAK,CAACgB;EAAtB,GACGR,KAAK,CAACE,OA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EACxCzB,SAAS,EAAEN,QAAQ,CAACgC,iBAAT,CAA2B1B;AADE,CAA1C;AAIAH,0BAA0B,CAAC8B,SAA3B,2CAAuC;EACrC1B,MAAM,EAAEX,SAAS,CAACsC,OAAV,CACNtC,SAAS,CAACuC,KAAV,CAAgB;IACdZ,GAAG,EAAE3B,SAAS,CAACwC,MADD;IAEdpB,MAAM,EAAEpB,SAAS,CAACwC,MAFJ;IAGdxB,OAAO,EAAEhB,SAAS,CAACyC;EAHL,CAAhB,CADM,CAD6B;EAQrC7B,YAAY,EAAEZ,SAAS,CAAC0C;AARa,CAAvC;AAWA,eAAenC,0BAAf"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default ProgressWrapper;
|
|
2
|
-
declare function ProgressWrapper({
|
|
2
|
+
declare function ProgressWrapper({ completedCourses, completedModules, title, subtitle, progression, sections }: {
|
|
3
|
+
completedCourses: any;
|
|
3
4
|
completedModules: any;
|
|
4
|
-
mandatoryModules: any;
|
|
5
5
|
title: any;
|
|
6
6
|
subtitle: any;
|
|
7
7
|
progression: any;
|
|
@@ -14,12 +14,13 @@ declare namespace ProgressWrapper {
|
|
|
14
14
|
namespace propTypes {
|
|
15
15
|
const title: PropTypes.Requireable<string>;
|
|
16
16
|
const subtitle: PropTypes.Requireable<string>;
|
|
17
|
+
const completedCourses: PropTypes.Requireable<number>;
|
|
17
18
|
const completedModules: PropTypes.Requireable<number>;
|
|
18
|
-
const mandatoryModules: PropTypes.Requireable<number>;
|
|
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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import _map from "lodash/fp/map";
|
|
2
|
+
import _lowerCase from "lodash/fp/lowerCase";
|
|
2
3
|
import _isEmpty from "lodash/fp/isEmpty";
|
|
3
4
|
|
|
4
5
|
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
@@ -23,7 +24,8 @@ const DetailSection = ({
|
|
|
23
24
|
index,
|
|
24
25
|
type,
|
|
25
26
|
isLocked,
|
|
26
|
-
|
|
27
|
+
badgeUrl,
|
|
28
|
+
onDownload,
|
|
27
29
|
stars
|
|
28
30
|
}, context) => {
|
|
29
31
|
const {
|
|
@@ -32,10 +34,7 @@ const DetailSection = ({
|
|
|
32
34
|
const isTypeStars = type === 'stars';
|
|
33
35
|
const DownloadButton = /*#__PURE__*/React.createElement(ButtonLink, {
|
|
34
36
|
label: translate('download'),
|
|
35
|
-
|
|
36
|
-
target: '_blank',
|
|
37
|
-
href: downloadUrl
|
|
38
|
-
},
|
|
37
|
+
onClick: onDownload,
|
|
39
38
|
"data-name": "download-button",
|
|
40
39
|
"aria-label": "download button",
|
|
41
40
|
customStyle: {
|
|
@@ -87,7 +86,7 @@ const DetailSection = ({
|
|
|
87
86
|
className: style[`detailsSection${index}`]
|
|
88
87
|
}, /*#__PURE__*/React.createElement("img", {
|
|
89
88
|
className: style.img,
|
|
90
|
-
src:
|
|
89
|
+
src: badgeUrl || 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'
|
|
91
90
|
}), /*#__PURE__*/React.createElement("div", {
|
|
92
91
|
className: style.detailsInfo
|
|
93
92
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -100,8 +99,8 @@ const DetailSection = ({
|
|
|
100
99
|
};
|
|
101
100
|
|
|
102
101
|
const ProgressWrapper = ({
|
|
102
|
+
completedCourses,
|
|
103
103
|
completedModules,
|
|
104
|
-
mandatoryModules,
|
|
105
104
|
title,
|
|
106
105
|
subtitle,
|
|
107
106
|
progression,
|
|
@@ -110,7 +109,7 @@ const ProgressWrapper = ({
|
|
|
110
109
|
const {
|
|
111
110
|
translate
|
|
112
111
|
} = context;
|
|
113
|
-
const
|
|
112
|
+
const modulesCompletedLocal = translate('modules_completed');
|
|
114
113
|
const isLocked = progression !== 100;
|
|
115
114
|
return /*#__PURE__*/React.createElement("div", {
|
|
116
115
|
className: style.container
|
|
@@ -127,7 +126,13 @@ const ProgressWrapper = ({
|
|
|
127
126
|
className: style.stats
|
|
128
127
|
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
|
|
129
128
|
className: style.statsNumber
|
|
130
|
-
},
|
|
129
|
+
}, completedCourses), _lowerCase(translate('courses_completed'))), /*#__PURE__*/React.createElement("div", {
|
|
130
|
+
className: style.divider
|
|
131
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
132
|
+
className: style.statsModule
|
|
133
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
134
|
+
className: style.statsNumber
|
|
135
|
+
}, completedModules), modulesCompletedLocal)), /*#__PURE__*/React.createElement("div", {
|
|
131
136
|
className: style.progression
|
|
132
137
|
}, /*#__PURE__*/React.createElement("span", {
|
|
133
138
|
className: style.statsNumber
|
|
@@ -140,19 +145,27 @@ const ProgressWrapper = ({
|
|
|
140
145
|
value: progression,
|
|
141
146
|
max: 100
|
|
142
147
|
}), /*#__PURE__*/React.createElement("div", {
|
|
148
|
+
className: style.statsMobile
|
|
149
|
+
}, /*#__PURE__*/React.createElement("div", {
|
|
150
|
+
className: style.statsModuleMobile
|
|
151
|
+
}, /*#__PURE__*/React.createElement("span", {
|
|
152
|
+
className: style.statsNumber
|
|
153
|
+
}, completedModules), modulesCompletedLocal), /*#__PURE__*/React.createElement("div", {
|
|
143
154
|
className: style.statsProgressionMobile
|
|
144
155
|
}, /*#__PURE__*/React.createElement("span", {
|
|
145
156
|
className: style.statsNumber
|
|
146
|
-
}, progression, "%")), _isEmpty(sections) ? null : /*#__PURE__*/React.createElement("div", {
|
|
157
|
+
}, progression, "%"))), _isEmpty(sections) ? null : /*#__PURE__*/React.createElement("div", {
|
|
147
158
|
className: style.details
|
|
148
159
|
}, uncappedMap(({
|
|
149
160
|
type,
|
|
150
161
|
stars,
|
|
151
|
-
|
|
162
|
+
badgeUrl,
|
|
163
|
+
onDownload
|
|
152
164
|
}, index) => /*#__PURE__*/React.createElement(DetailSection, {
|
|
153
165
|
type,
|
|
154
166
|
isLocked,
|
|
155
|
-
|
|
167
|
+
badgeUrl,
|
|
168
|
+
onDownload,
|
|
156
169
|
stars,
|
|
157
170
|
key: `${type}-${index}`,
|
|
158
171
|
index: index
|
|
@@ -161,7 +174,8 @@ const ProgressWrapper = ({
|
|
|
161
174
|
|
|
162
175
|
const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
|
|
163
176
|
type: PropTypes.oneOf(['diploma', 'badge', 'stars']),
|
|
164
|
-
|
|
177
|
+
badgeUrl: PropTypes.string,
|
|
178
|
+
onDownload: PropTypes.func,
|
|
165
179
|
stars: PropTypes.number
|
|
166
180
|
} : {};
|
|
167
181
|
DetailSection.contextTypes = {
|
|
@@ -177,8 +191,8 @@ ProgressWrapper.contextTypes = {
|
|
|
177
191
|
ProgressWrapper.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
178
192
|
title: PropTypes.string,
|
|
179
193
|
subtitle: PropTypes.string,
|
|
194
|
+
completedCourses: PropTypes.number,
|
|
180
195
|
completedModules: PropTypes.number,
|
|
181
|
-
mandatoryModules: PropTypes.number,
|
|
182
196
|
progression: PropTypes.number,
|
|
183
197
|
sections: PropTypes.arrayOf(PropTypes.shape(commonDetailSectionPropTypes))
|
|
184
198
|
} : {};
|
|
@@ -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","completedModules","mandatoryModules","title","subtitle","progression","sections","mandatoryCompletedModulesLocal","container","titleContainer","statscontainer","stats","statsNumber","customProgressBar","positive","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, 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 {completedModules, mandatoryModules, title, subtitle, progression, sections},\n context\n) => {\n const {translate} = context;\n const mandatoryCompletedModulesLocal = translate('modules_completed_mandatory');\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}>\n {`${\n completedModules > mandatoryModules ? mandatoryModules : completedModules\n } / ${mandatoryModules}`}\n </span>\n {mandatoryCompletedModulesLocal}\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.statsProgressionMobile}>\n <span className={style.statsNumber}>{progression}%</span>\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 completedModules: PropTypes.number,\n mandatoryModules: 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;EAAwBC,WAAxB;EAAqCC;AAArC,CAAD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CAAhB,CAD6B;EAEnC3C,WAAW,EAAEhB,SAAS,CAAC4D,MAFY;EAGnC3C,KAAK,EAAEjB,SAAS,CAAC6D;AAHkB,CAArC;AAMAjD,aAAa,CAACkD,YAAd,GAA6B;EAC3B3C,SAAS,EAAEZ,QAAQ,CAACwD,iBAAT,CAA2B5C;AADX,CAA7B;AAIAP,aAAa,CAACoD,SAAd;EACEnD,KAAK,EAAEb,SAAS,CAAC6D,MADnB;EAEE9C,QAAQ,EAAEf,SAAS,CAACiE;AAFtB,GAGKP,4BAHL;AAMAjB,eAAe,CAACqB,YAAhB,GAA+B;EAC7B3C,SAAS,EAAEZ,QAAQ,CAACwD,iBAAT,CAA2B5C;AADT,CAA/B;AAIAsB,eAAe,CAACuB,SAAhB,2CAA4B;EAC1BpB,KAAK,EAAE5C,SAAS,CAAC4D,MADS;EAE1Bf,QAAQ,EAAE7C,SAAS,CAAC4D,MAFM;EAG1BlB,gBAAgB,EAAE1C,SAAS,CAAC6D,MAHF;EAI1BlB,gBAAgB,EAAE3C,SAAS,CAAC6D,MAJF;EAK1Bf,WAAW,EAAE9C,SAAS,CAAC6D,MALG;EAM1Bd,QAAQ,EAAE/C,SAAS,CAACkE,OAAV,CAAkBlE,SAAS,CAACmE,KAAV,CAAgBT,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAejB,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;EAAwBC,QAAxB;EAAkCC,UAAlC;EAA8CC;AAA9C,CAAD,EAAuDC,OAAvD,KAAmE;EACvF,MAAM;IAACC;EAAD,IAAcD,OAApB;EACA,MAAME,WAAW,GAAGP,IAAI,KAAK,OAA7B;EAEA,MAAMQ,cAAc,gBAClB,oBAAC,UAAD;IACE,KAAK,EAAEF,SAAS,CAAC,UAAD,CADlB;IAEE,OAAO,EAAEH,UAFX;IAGE,aAAU,iBAHZ;IAIE,cAAW,iBAJb;IAKE,WAAW,EAAE;MAACM,eAAe,EAAE,SAAlB;MAA6BC,KAAK,EAAE;IAApC,CALf;IAME,IAAI,EAAE;MACJC,QAAQ,EAAE,MADN;MAEJC,MAAM,E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AHa;EAInC9C,KAAK,EAAElB,SAAS,CAACiE;AAJkB,CAArC;AAOArD,aAAa,CAACsD,YAAd,GAA6B;EAC3B9C,SAAS,EAAEb,QAAQ,CAAC4D,iBAAT,CAA2B/C;AADX,CAA7B;AAIAR,aAAa,CAACwD,SAAd;EACEvD,KAAK,EAAEb,SAAS,CAACiE,MADnB;EAEElD,QAAQ,EAAEf,SAAS,CAACqE;AAFtB,GAGKR,4BAHL;AAMArB,eAAe,CAAC0B,YAAhB,GAA+B;EAC7B9C,SAAS,EAAEb,QAAQ,CAAC4D,iBAAT,CAA2B/C;AADT,CAA/B;AAIAoB,eAAe,CAAC4B,SAAhB,2CAA4B;EAC1BzB,KAAK,EAAE3C,SAAS,CAAC+D,MADS;EAE1BnB,QAAQ,EAAE5C,SAAS,CAAC+D,MAFM;EAG1BtB,gBAAgB,EAAEzC,SAAS,CAACiE,MAHF;EAI1BvB,gBAAgB,EAAE1C,SAAS,CAACiE,MAJF;EAK1BpB,WAAW,EAAE7C,SAAS,CAACiE,MALG;EAM1BnB,QAAQ,EAAE9C,SAAS,CAACsE,OAAV,CAAkBtE,SAAS,CAACuE,KAAV,CAAgBV,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAerB,eAAf"}
|
|
@@ -41,6 +41,14 @@
|
|
|
41
41
|
gap: 16px;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
|
+
.divider {
|
|
45
|
+
width: 4px;
|
|
46
|
+
height: 4px;
|
|
47
|
+
background-color: #d7d7da;
|
|
48
|
+
border: solid #d7d7da 1px;
|
|
49
|
+
border-radius: 4px;
|
|
50
|
+
}
|
|
51
|
+
|
|
44
52
|
.progression {
|
|
45
53
|
display: flex;
|
|
46
54
|
justify-content: end;
|
|
@@ -121,6 +129,10 @@
|
|
|
121
129
|
font-weight: 700;
|
|
122
130
|
}
|
|
123
131
|
|
|
132
|
+
.statsMobile {
|
|
133
|
+
display: none;
|
|
134
|
+
}
|
|
135
|
+
|
|
124
136
|
.statsModuleMobile {
|
|
125
137
|
display: none;
|
|
126
138
|
}
|
|
@@ -128,9 +140,6 @@
|
|
|
128
140
|
.statsProgressionMobile {
|
|
129
141
|
composes: progression;
|
|
130
142
|
display: none;
|
|
131
|
-
color: cm_grey_400;
|
|
132
|
-
font-weight: 600;
|
|
133
|
-
padding-top: 16px;
|
|
134
143
|
}
|
|
135
144
|
|
|
136
145
|
@media mobile, tablet {
|
|
@@ -151,6 +160,12 @@
|
|
|
151
160
|
justify-content: space-around;
|
|
152
161
|
gap: 0;
|
|
153
162
|
}
|
|
163
|
+
.divider {
|
|
164
|
+
display: none;
|
|
165
|
+
}
|
|
166
|
+
.statsModule {
|
|
167
|
+
display: none;
|
|
168
|
+
}
|
|
154
169
|
.progression {
|
|
155
170
|
display: none;
|
|
156
171
|
}
|
|
@@ -160,4 +175,11 @@
|
|
|
160
175
|
.statsModuleMobile {
|
|
161
176
|
display: block;
|
|
162
177
|
}
|
|
178
|
+
.statsMobile {
|
|
179
|
+
display: flex;
|
|
180
|
+
justify-content: space-between;
|
|
181
|
+
padding-top: 16px;
|
|
182
|
+
color: cm_grey_400;
|
|
183
|
+
font-weight: 600;
|
|
184
|
+
}
|
|
163
185
|
}
|
|
@@ -33,12 +33,21 @@ declare namespace CertificationDetail {
|
|
|
33
33
|
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
34
34
|
progression: PropTypes.Requireable<number>;
|
|
35
35
|
stars: PropTypes.Requireable<number>;
|
|
36
|
-
|
|
37
|
-
|
|
36
|
+
completedCourses: PropTypes.Requireable<number>;
|
|
37
|
+
completedModules: PropTypes.Requireable<number>;
|
|
38
|
+
}>>;
|
|
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
|
+
}>>;
|
|
44
|
+
const ongoingCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
45
|
+
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
46
|
+
customStyle: PropTypes.Requireable<{
|
|
47
|
+
[x: string]: string | null | undefined;
|
|
48
|
+
}>;
|
|
49
|
+
loading: PropTypes.Requireable<boolean>;
|
|
38
50
|
}>>;
|
|
39
|
-
const diplomaUrl: PropTypes.Requireable<string>;
|
|
40
|
-
const badgeUrl: PropTypes.Requireable<string>;
|
|
41
|
-
const ongoingCoursesAvailable: PropTypes.Requireable<boolean>;
|
|
42
51
|
const certificationCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
43
52
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
44
53
|
customStyle: PropTypes.Requireable<{
|
|
@@ -46,6 +55,8 @@ declare namespace CertificationDetail {
|
|
|
46
55
|
}>;
|
|
47
56
|
loading: PropTypes.Requireable<boolean>;
|
|
48
57
|
}>>;
|
|
58
|
+
const totalCourses: PropTypes.Requireable<number>;
|
|
59
|
+
const totalModules: PropTypes.Requireable<number>;
|
|
49
60
|
const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
50
61
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
62
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -55,6 +66,37 @@ declare namespace CertificationDetail {
|
|
|
55
66
|
validOption: PropTypes.Requireable<boolean>;
|
|
56
67
|
}> | null | undefined)[]>;
|
|
57
68
|
}>>;
|
|
69
|
+
const sorting: PropTypes.Requireable<PropTypes.InferProps<{
|
|
70
|
+
title: PropTypes.Requireable<string>;
|
|
71
|
+
name: PropTypes.Requireable<string>;
|
|
72
|
+
className: PropTypes.Requireable<string>;
|
|
73
|
+
borderClassName: PropTypes.Requireable<string>;
|
|
74
|
+
disabled: PropTypes.Requireable<boolean>;
|
|
75
|
+
multiple: PropTypes.Requireable<boolean>;
|
|
76
|
+
description: PropTypes.Requireable<string>;
|
|
77
|
+
required: PropTypes.Requireable<boolean>;
|
|
78
|
+
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
79
|
+
theme: PropTypes.Requireable<string>;
|
|
80
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
81
|
+
name: PropTypes.Validator<string>;
|
|
82
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
83
|
+
selected: PropTypes.Requireable<boolean>;
|
|
84
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
85
|
+
}> | null | undefined)[]>;
|
|
86
|
+
optgroups: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
87
|
+
label: PropTypes.Validator<string>;
|
|
88
|
+
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
89
|
+
name: PropTypes.Validator<string>;
|
|
90
|
+
value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
|
|
91
|
+
selected: PropTypes.Requireable<boolean>;
|
|
92
|
+
validOption: PropTypes.Requireable<boolean>;
|
|
93
|
+
}> | null | undefined)[]>;
|
|
94
|
+
}> | null | undefined)[]>;
|
|
95
|
+
modified: PropTypes.Requireable<boolean>;
|
|
96
|
+
error: PropTypes.Requireable<boolean>;
|
|
97
|
+
'aria-label': PropTypes.Requireable<string>;
|
|
98
|
+
'aria-labelledby': PropTypes.Requireable<string>;
|
|
99
|
+
}>>;
|
|
58
100
|
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
59
101
|
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
60
102
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAkBA,4EA8GC"}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import _size from "lodash/fp/size";
|
|
2
|
-
import _get from "lodash/fp/get";
|
|
3
|
-
import _pipe from "lodash/fp/pipe";
|
|
4
1
|
import _lowerCase from "lodash/fp/lowerCase";
|
|
5
2
|
import _compact from "lodash/fp/compact";
|
|
6
3
|
import React, { useCallback, useState } from 'react';
|
|
@@ -8,11 +5,12 @@ import PropTypes from 'prop-types';
|
|
|
8
5
|
import classnames from 'classnames';
|
|
9
6
|
import Provider from '../../atom/provider';
|
|
10
7
|
import Tag from '../../atom/tag';
|
|
11
|
-
import { SelectOptionPropTypes } from '../../atom/select';
|
|
8
|
+
import Select, { SelectOptionPropTypes } from '../../atom/select';
|
|
12
9
|
import ButtonLinkIcon from '../../atom/button-link-icon';
|
|
13
10
|
import Icon from '../../atom/icon';
|
|
14
11
|
import CardsGrid from '../../organism/cards-grid';
|
|
15
12
|
import AllCourses from '../skill-detail/all-courses';
|
|
13
|
+
import ContinueLearning from '../skill-detail/continue-learning';
|
|
16
14
|
import { ContinueLearningButton } from '../skill-detail';
|
|
17
15
|
import ProgressWrapper from '../../molecule/progress-wrapper';
|
|
18
16
|
import style from './style.css';
|
|
@@ -24,24 +22,31 @@ const CertificationDetail = (props, context) => {
|
|
|
24
22
|
title,
|
|
25
23
|
description,
|
|
26
24
|
certificationCourses,
|
|
27
|
-
|
|
25
|
+
ongoingCourses,
|
|
26
|
+
totalCourses,
|
|
27
|
+
totalModules,
|
|
28
28
|
filters,
|
|
29
|
+
sorting,
|
|
29
30
|
onBackClick,
|
|
30
31
|
onContinueLearningClick,
|
|
31
32
|
metrics,
|
|
32
33
|
logoUrl,
|
|
33
|
-
|
|
34
|
-
|
|
34
|
+
onDownloadDiploma,
|
|
35
|
+
badge = {}
|
|
35
36
|
} = props;
|
|
36
37
|
const {
|
|
37
38
|
translate
|
|
38
39
|
} = context;
|
|
39
40
|
const {
|
|
40
41
|
progression,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
42
|
+
completedCourses,
|
|
43
|
+
completedModules,
|
|
44
|
+
stars
|
|
44
45
|
} = metrics;
|
|
46
|
+
const {
|
|
47
|
+
badgeUrl = false,
|
|
48
|
+
onDownloadBadge
|
|
49
|
+
} = badge;
|
|
45
50
|
const [showMore, setShowMore] = useState(false);
|
|
46
51
|
const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
47
52
|
const Description = useCallback(() => {
|
|
@@ -49,10 +54,6 @@ const CertificationDetail = (props, context) => {
|
|
|
49
54
|
className: classnames(style.description, !showMore && style.truncate)
|
|
50
55
|
}, description);
|
|
51
56
|
}, [showMore, description]);
|
|
52
|
-
|
|
53
|
-
const totalCourses = _pipe(_get('list'), _size)(certificationCourses);
|
|
54
|
-
|
|
55
|
-
const completedModules = mandatoryModules * progression / 100;
|
|
56
57
|
return /*#__PURE__*/React.createElement("div", {
|
|
57
58
|
className: style.backgroundContainer
|
|
58
59
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -87,21 +88,28 @@ const CertificationDetail = (props, context) => {
|
|
|
87
88
|
}
|
|
88
89
|
})) : null) : null, /*#__PURE__*/React.createElement("div", {
|
|
89
90
|
className: style.contentStats
|
|
90
|
-
}, /*#__PURE__*/React.createElement("span", null, `${
|
|
91
|
-
|
|
91
|
+
}, /*#__PURE__*/React.createElement("span", null, `${totalCourses} ${_lowerCase(translate('courses'))}`), /*#__PURE__*/React.createElement("div", {
|
|
92
|
+
className: style.divider
|
|
93
|
+
}), /*#__PURE__*/React.createElement("span", null, `${totalModules} ${_lowerCase(translate('modules'))}`)), /*#__PURE__*/React.createElement(ContinueLearningButton, {
|
|
94
|
+
ongoingCoursesAvailable: !!ongoingCourses.list.length,
|
|
92
95
|
onClick: onContinueLearningClick
|
|
93
|
-
}))), /*#__PURE__*/React.createElement(
|
|
96
|
+
}))), /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
className: style.continueLearningSection
|
|
98
|
+
}, /*#__PURE__*/React.createElement(ContinueLearning, {
|
|
99
|
+
ongoingCourses: ongoingCourses
|
|
100
|
+
})), /*#__PURE__*/React.createElement(ProgressWrapper, {
|
|
94
101
|
title: translate('your_progress'),
|
|
95
102
|
subtitle: translate('certification_progress_wrapper_subtitle'),
|
|
96
103
|
progression: progression,
|
|
104
|
+
completedCourses: completedCourses,
|
|
97
105
|
completedModules: completedModules,
|
|
98
|
-
mandatoryModules: mandatoryModules,
|
|
99
106
|
sections: _compact([{
|
|
100
107
|
type: 'diploma',
|
|
101
|
-
|
|
108
|
+
onDownload: () => onDownloadDiploma
|
|
102
109
|
}, badgeUrl && {
|
|
103
110
|
type: 'badge',
|
|
104
|
-
|
|
111
|
+
badgeUrl,
|
|
112
|
+
onDownload: () => onDownloadBadge
|
|
105
113
|
}, {
|
|
106
114
|
type: 'stars',
|
|
107
115
|
stars
|
|
@@ -109,7 +117,8 @@ const CertificationDetail = (props, context) => {
|
|
|
109
117
|
}), /*#__PURE__*/React.createElement(AllCourses, {
|
|
110
118
|
courses: certificationCourses,
|
|
111
119
|
totalCourses: totalCourses,
|
|
112
|
-
filters: filters
|
|
120
|
+
filters: filters,
|
|
121
|
+
sorting: sorting
|
|
113
122
|
})));
|
|
114
123
|
};
|
|
115
124
|
|
|
@@ -125,17 +134,23 @@ CertificationDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
125
134
|
metrics: PropTypes.shape({
|
|
126
135
|
progression: PropTypes.number,
|
|
127
136
|
stars: PropTypes.number,
|
|
128
|
-
|
|
129
|
-
|
|
137
|
+
completedCourses: PropTypes.number,
|
|
138
|
+
completedModules: PropTypes.number
|
|
139
|
+
}),
|
|
140
|
+
onDownloadDiploma: PropTypes.func,
|
|
141
|
+
badge: PropTypes.shape({
|
|
142
|
+
badgeUrl: PropTypes.string,
|
|
143
|
+
onDownloadBadge: PropTypes.func
|
|
130
144
|
}),
|
|
131
|
-
|
|
132
|
-
badgeUrl: PropTypes.string,
|
|
133
|
-
ongoingCoursesAvailable: PropTypes.bool,
|
|
145
|
+
ongoingCourses: PropTypes.shape(CardsGrid.propTypes),
|
|
134
146
|
certificationCourses: PropTypes.shape(CardsGrid.propTypes),
|
|
147
|
+
totalCourses: PropTypes.number,
|
|
148
|
+
totalModules: PropTypes.number,
|
|
135
149
|
filters: PropTypes.shape({
|
|
136
150
|
onChange: PropTypes.func,
|
|
137
151
|
options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
|
|
138
152
|
}),
|
|
153
|
+
sorting: PropTypes.shape(Select.propTypes),
|
|
139
154
|
onBackClick: PropTypes.func,
|
|
140
155
|
onContinueLearningClick: PropTypes.func
|
|
141
156
|
} : {};
|