@coorpacademy/components 11.32.33-alpha.31.30 → 11.32.33-alpha.32

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.
Files changed (54) hide show
  1. package/es/atom/title/index.d.ts.map +1 -1
  2. package/es/atom/title/index.js +0 -6
  3. package/es/atom/title/index.js.map +1 -1
  4. package/es/atom/title/style.css +0 -11
  5. package/es/molecule/progress-wrapper/index.d.ts +2 -4
  6. package/es/molecule/progress-wrapper/index.d.ts.map +1 -1
  7. package/es/molecule/progress-wrapper/index.js +10 -17
  8. package/es/molecule/progress-wrapper/index.js.map +1 -1
  9. package/es/molecule/progress-wrapper/style.css +1 -9
  10. package/es/template/certification-detail/index.d.ts +3 -44
  11. package/es/template/certification-detail/index.d.ts.map +1 -1
  12. package/es/template/certification-detail/index.js +14 -34
  13. package/es/template/certification-detail/index.js.map +1 -1
  14. package/es/template/certification-detail/style.css +1 -12
  15. package/es/template/skill-detail/all-courses.js +3 -3
  16. package/es/template/skill-detail/all-courses.js.map +1 -1
  17. package/lib/atom/title/index.d.ts.map +1 -1
  18. package/lib/atom/title/index.js +0 -6
  19. package/lib/atom/title/index.js.map +1 -1
  20. package/lib/atom/title/style.css +0 -11
  21. package/lib/molecule/progress-wrapper/index.d.ts +2 -4
  22. package/lib/molecule/progress-wrapper/index.d.ts.map +1 -1
  23. package/lib/molecule/progress-wrapper/index.js +10 -18
  24. package/lib/molecule/progress-wrapper/index.js.map +1 -1
  25. package/lib/molecule/progress-wrapper/style.css +1 -9
  26. package/lib/template/certification-detail/index.d.ts +3 -44
  27. package/lib/template/certification-detail/index.d.ts.map +1 -1
  28. package/lib/template/certification-detail/index.js +14 -35
  29. package/lib/template/certification-detail/index.js.map +1 -1
  30. package/lib/template/certification-detail/style.css +1 -12
  31. package/lib/template/skill-detail/all-courses.js +3 -3
  32. package/lib/template/skill-detail/all-courses.js.map +1 -1
  33. package/locales/en/global.json +0 -5
  34. package/package.json +2 -2
  35. package/es/molecule/certification-card/index.d.ts +0 -21
  36. package/es/molecule/certification-card/index.d.ts.map +0 -1
  37. package/es/molecule/certification-card/index.js +0 -99
  38. package/es/molecule/certification-card/index.js.map +0 -1
  39. package/es/molecule/certification-card/style.css +0 -72
  40. package/es/template/certifications/index.d.ts +0 -54
  41. package/es/template/certifications/index.d.ts.map +0 -1
  42. package/es/template/certifications/index.js +0 -91
  43. package/es/template/certifications/index.js.map +0 -1
  44. package/es/template/certifications/style.css +0 -70
  45. package/lib/molecule/certification-card/index.d.ts +0 -21
  46. package/lib/molecule/certification-card/index.d.ts.map +0 -1
  47. package/lib/molecule/certification-card/index.js +0 -113
  48. package/lib/molecule/certification-card/index.js.map +0 -1
  49. package/lib/molecule/certification-card/style.css +0 -72
  50. package/lib/template/certifications/index.d.ts +0 -54
  51. package/lib/template/certifications/index.d.ts.map +0 -1
  52. package/lib/template/certifications/index.js +0 -110
  53. package/lib/template/certifications/index.js.map +0 -1
  54. package/lib/template/certifications/style.css +0 -70
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AA4CA,gDA4BC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/atom/title/index.js"],"names":[],"mappings":";AAwCA,gDA4BC"}
@@ -13,9 +13,6 @@ 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
-
19
16
  case 'standard':
20
17
  return style.titleFormGroup;
21
18
 
@@ -39,9 +36,6 @@ const getSubtitleStyle = (type, size) => {
39
36
  case 'standard':
40
37
  return style.subtitleFormGroup;
41
38
 
42
- case 'standard-without-margin':
43
- return style.subtitleFormGroupWithoutMargin;
44
-
45
39
  case 'small':
46
40
  return style.smallSubtitleFormGroup;
47
41
 
@@ -1 +1 @@
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,KAAK,CAACQ,mBAAb;MARJ;;EAJJ;AAeD,CAhBD;;AAkBA,MAAMC,gBAAgB,GAAG,CAACP,IAAD,EAAOC,IAAP,KAAgB;EACvC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACU,YAAb;;IACF,KAAK,YAAL;MACE,QAAQP,IAAR;QACE,KAAK,UAAL;UACE,OAAOH,KAAK,CAACW,iBAAb;;QACF,KAAK,yBAAL;UACE,OAAOX,KAAK,CAACY,8BAAb;;QACF,KAAK,OAAL;UACE,OAAOZ,KAAK,CAACa,sBAAb;;QACF,KAAK,sBAAL;UACE,OAAOb,KAAK,CAACc,mCAAb;;QACF,KAAK,aAAL;UACE,OAAOd,KAAK,CAACe,2BAAb;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,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"}
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,UAAL;UACE,OAAOH,KAAK,CAACK,cAAb;;QACF,KAAK,QAAL;UACE,OAAOL,KAAK,CAACM,oBAAb;;QACF,KAAK,OAAL;UACE,OAAON,KAAK,CAACO,mBAAb;MANJ;;EAJJ;AAaD,CAdD;;AAgBA,MAAMC,gBAAgB,GAAG,CAACN,IAAD,EAAOC,IAAP,KAAgB;EACvC,QAAQD,IAAR;IACE,KAAK,MAAL;MACE,OAAOF,KAAK,CAACS,YAAb;;IACF,KAAK,YAAL;MACE,QAAQN,IAAR;QACE,KAAK,UAAL;UACE,OAAOH,KAAK,CAACU,iBAAb;;QACF,KAAK,OAAL;UACE,OAAOV,KAAK,CAACW,sBAAb;;QACF,KAAK,sBAAL;UACE,OAAOX,KAAK,CAACY,mCAAb;;QACF,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CAAgB,CAAC,UAAD,EAAa,OAAb,EAAsB,sBAAtB,EAA8C,aAA9C,CAAhB,CANE;EAOhBR,IAAI,EAAExB,SAAS,CAACiC,KAAV,CAAgBhC,IAAI,CAAC6B,SAArB,CAPU;EAQhBL,GAAG,EAAEzB,SAAS,CAACiC,KAAV,CAAgB/B,GAAG,CAAC4B,SAApB;AARW,CAAlB;AAUA,eAAeb,KAAf"}
@@ -28,11 +28,6 @@
28
28
  gap: 4px;
29
29
  }
30
30
 
31
- .titleFormGroupLightWeight {
32
- composes: titleFormGroup;
33
- font-weight: 600;
34
- }
35
-
36
31
  .mediumTitleFormGroup {
37
32
  composes: title;
38
33
  font-size: 16px;
@@ -69,12 +64,6 @@
69
64
  color: cm_grey_400;
70
65
  }
71
66
 
72
- .subtitleFormGroupWithoutMargin {
73
- composes: subtitleFormGroup;
74
- font-weight: 500;
75
- margin: 0;
76
- }
77
-
78
67
  .smallSubtitleFormGroup{
79
68
  composes: subtitleFormGroup;
80
69
  max-width: 455px;
@@ -1,6 +1,5 @@
1
1
  export default ProgressWrapper;
2
- declare function ProgressWrapper({ completedCourses, completedModules, title, subtitle, progression, sections }: {
3
- completedCourses: any;
2
+ declare function ProgressWrapper({ completedModules, title, subtitle, progression, sections }: {
4
3
  completedModules: any;
5
4
  title: any;
6
5
  subtitle: any;
@@ -19,8 +18,7 @@ declare namespace ProgressWrapper {
19
18
  const progression: PropTypes.Requireable<number>;
20
19
  const sections: PropTypes.Requireable<(PropTypes.InferProps<{
21
20
  type: PropTypes.Requireable<string>;
22
- badgeUrl: PropTypes.Requireable<string>;
23
- onDownload: PropTypes.Requireable<(...args: any[]) => any>;
21
+ downloadUrl: PropTypes.Requireable<string>;
24
22
  stars: PropTypes.Requireable<number>;
25
23
  }> | null | undefined)[]>;
26
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AAyFA;;;;;;;8BA8DC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-wrapper/index.js"],"names":[],"mappings":";AA6FA;;;;;;8BAyDC"}
@@ -1,5 +1,4 @@
1
1
  import _map from "lodash/fp/map";
2
- import _lowerCase from "lodash/fp/lowerCase";
3
2
  import _isEmpty from "lodash/fp/isEmpty";
4
3
 
5
4
  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); }
@@ -24,8 +23,7 @@ const DetailSection = ({
24
23
  index,
25
24
  type,
26
25
  isLocked,
27
- badgeUrl,
28
- onDownload,
26
+ downloadUrl,
29
27
  stars
30
28
  }, context) => {
31
29
  const {
@@ -34,7 +32,10 @@ const DetailSection = ({
34
32
  const isTypeStars = type === 'stars';
35
33
  const DownloadButton = /*#__PURE__*/React.createElement(ButtonLink, {
36
34
  label: translate('download'),
37
- onClick: onDownload,
35
+ link: {
36
+ target: '_blank',
37
+ href: downloadUrl
38
+ },
38
39
  "data-name": "download-button",
39
40
  "aria-label": "download button",
40
41
  customStyle: {
@@ -86,7 +87,7 @@ const DetailSection = ({
86
87
  className: style[`detailsSection${index}`]
87
88
  }, /*#__PURE__*/React.createElement("img", {
88
89
  className: style.img,
89
- src: badgeUrl || 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'
90
+ src: type === 'badge' ? downloadUrl : 'https://s3.eu-west-1.amazonaws.com/static.coorpacademy.com/assets/images/diploma.svg'
90
91
  }), /*#__PURE__*/React.createElement("div", {
91
92
  className: style.detailsInfo
92
93
  }, /*#__PURE__*/React.createElement("div", {
@@ -99,7 +100,6 @@ const DetailSection = ({
99
100
  };
100
101
 
101
102
  const ProgressWrapper = ({
102
- completedCourses,
103
103
  completedModules,
104
104
  title,
105
105
  subtitle,
@@ -124,11 +124,7 @@ const ProgressWrapper = ({
124
124
  className: style.statscontainer
125
125
  }, /*#__PURE__*/React.createElement("div", {
126
126
  className: style.stats
127
- }, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("span", {
128
- className: style.statsNumber
129
- }, completedCourses), _lowerCase(translate('courses_completed'))), /*#__PURE__*/React.createElement("div", {
130
- className: style.divider
131
- }), /*#__PURE__*/React.createElement("div", {
127
+ }, /*#__PURE__*/React.createElement("div", {
132
128
  className: style.statsModule
133
129
  }, /*#__PURE__*/React.createElement("span", {
134
130
  className: style.statsNumber
@@ -159,13 +155,11 @@ const ProgressWrapper = ({
159
155
  }, uncappedMap(({
160
156
  type,
161
157
  stars,
162
- badgeUrl,
163
- onDownload
158
+ downloadUrl
164
159
  }, index) => /*#__PURE__*/React.createElement(DetailSection, {
165
160
  type,
166
161
  isLocked,
167
- badgeUrl,
168
- onDownload,
162
+ downloadUrl,
169
163
  stars,
170
164
  key: `${type}-${index}`,
171
165
  index: index
@@ -174,8 +168,7 @@ const ProgressWrapper = ({
174
168
 
175
169
  const commonDetailSectionPropTypes = process.env.NODE_ENV !== "production" ? {
176
170
  type: PropTypes.oneOf(['diploma', 'badge', 'stars']),
177
- badgeUrl: PropTypes.string,
178
- onDownload: PropTypes.func,
171
+ downloadUrl: PropTypes.string,
179
172
  stars: PropTypes.number
180
173
  } : {};
181
174
  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","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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AAU,EAAEjB,SAAS,CAACgE,IAHa;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"}
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","title","subtitle","progression","sections","modulesCompletedLocal","container","titleContainer","statscontainer","stats","statsModule","statsNumber","customProgressBar","positive","statsMobile","statsModuleMobile","statsProgressionMobile","details","commonDetailSectionPropTypes","oneOf","string","number","contextTypes","childContextTypes","propTypes","bool","completedCourses","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 {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 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,CAApB;;AAEA,MAAMC,aAAa,GAAG,CAAC;EAACC,KAAD;EAAQC,IAAR;EAAcC,QAAd;EAAwBC,WAAxB;EAAqCC;AAArC,CAAD,EAA8CC,OAA9C,KAA0D;EAC9E,MAAM;IAACC;EAAD,IAAcD,OAApB;EACA,MAAME,WAAW,GAAGN,IAAI,KAAK,OAA7B;EAEA,MAAMO,cAAc,gBAClB,oBAAC,UAAD;IACE,KAAK,EAAEF,SAAS,CAAC,UAAD,CADlB;IAEE,IAAI,EAAE;MACJG,MAAM,EAAE,QADJ;MAEJC,IAAI,EAAEP;IAFF,CAFR;IAME,aAAU,iBANZ;IAOE,cAAW,iBAPb;IAQE,WAAW,EAAE;MAACQ,eAAe,EAAE,SAAlB;MAA6BC,KAAK,EAAE;IAApC,CARf;IASE,IAAI,EAAE;MACJC,QAAQ,EAAE,MADN;MAEJC,MAAM,EAAE;QACNC,IAAI,EAAE,UADA;QAENH,KAAK,EAAE,SAFD;QAGNI,IAAI,EAAE,EAHA;QAINC,WAAW,EAAE;UAACC,OAAO,EAAE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,iBAAT,CAA2B9C;AADT,CAA/B;AAIAsB,eAAe,CAACyB,SAAhB,2CAA4B;EAC1BvB,KAAK,EAAE3C,SAAS,CAAC8D,MADS;EAE1BlB,QAAQ,EAAE5C,SAAS,CAAC8D,MAFM;EAG1BM,gBAAgB,EAAEpE,SAAS,CAAC+D,MAHF;EAI1BrB,gBAAgB,EAAE1C,SAAS,CAAC+D,MAJF;EAK1BlB,WAAW,EAAE7C,SAAS,CAAC+D,MALG;EAM1BjB,QAAQ,EAAE9C,SAAS,CAACqE,OAAV,CAAkBrE,SAAS,CAACsE,KAAV,CAAgBV,4BAAhB,CAAlB;AANgB,CAA5B;AASA,eAAenB,eAAf"}
@@ -41,14 +41,6 @@
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
-
52
44
  .progression {
53
45
  display: flex;
54
46
  justify-content: end;
@@ -181,5 +173,5 @@
181
173
  padding-top: 16px;
182
174
  color: cm_grey_400;
183
175
  font-weight: 600;
184
- }
176
+ }
185
177
  }
@@ -36,18 +36,9 @@ declare namespace CertificationDetail {
36
36
  completedCourses: PropTypes.Requireable<number>;
37
37
  completedModules: PropTypes.Requireable<number>;
38
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>;
50
- }>>;
39
+ const diplomaUrl: PropTypes.Requireable<string>;
40
+ const badgeUrl: PropTypes.Requireable<string>;
41
+ const ongoingCoursesAvailable: PropTypes.Requireable<boolean>;
51
42
  const certificationCourses: PropTypes.Requireable<PropTypes.InferProps<{
52
43
  list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
53
44
  customStyle: PropTypes.Requireable<{
@@ -55,7 +46,6 @@ declare namespace CertificationDetail {
55
46
  }>;
56
47
  loading: PropTypes.Requireable<boolean>;
57
48
  }>>;
58
- const totalCourses: PropTypes.Requireable<number>;
59
49
  const totalModules: PropTypes.Requireable<number>;
60
50
  const filters: PropTypes.Requireable<PropTypes.InferProps<{
61
51
  onChange: PropTypes.Requireable<(...args: any[]) => any>;
@@ -66,37 +56,6 @@ declare namespace CertificationDetail {
66
56
  validOption: PropTypes.Requireable<boolean>;
67
57
  }> | null | undefined)[]>;
68
58
  }>>;
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
- }>>;
100
59
  const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
101
60
  const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
102
61
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAkBA,4EA8GC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAiBA,4EAgGC"}
@@ -5,12 +5,11 @@ import PropTypes from 'prop-types';
5
5
  import classnames from 'classnames';
6
6
  import Provider from '../../atom/provider';
7
7
  import Tag from '../../atom/tag';
8
- import Select, { SelectOptionPropTypes } from '../../atom/select';
8
+ import { SelectOptionPropTypes } from '../../atom/select';
9
9
  import ButtonLinkIcon from '../../atom/button-link-icon';
10
10
  import Icon from '../../atom/icon';
11
11
  import CardsGrid from '../../organism/cards-grid';
12
12
  import AllCourses from '../skill-detail/all-courses';
13
- import ContinueLearning from '../skill-detail/continue-learning';
14
13
  import { ContinueLearningButton } from '../skill-detail';
15
14
  import ProgressWrapper from '../../molecule/progress-wrapper';
16
15
  import style from './style.css';
@@ -22,17 +21,15 @@ const CertificationDetail = (props, context) => {
22
21
  title,
23
22
  description,
24
23
  certificationCourses,
25
- ongoingCourses,
26
- totalCourses,
24
+ ongoingCoursesAvailable,
27
25
  totalModules,
28
26
  filters,
29
- sorting,
30
27
  onBackClick,
31
28
  onContinueLearningClick,
32
29
  metrics,
33
30
  logoUrl,
34
- onDownloadDiploma,
35
- badge = {}
31
+ diplomaUrl,
32
+ badgeUrl
36
33
  } = props;
37
34
  const {
38
35
  translate
@@ -43,10 +40,6 @@ const CertificationDetail = (props, context) => {
43
40
  completedModules,
44
41
  stars
45
42
  } = metrics;
46
- const {
47
- badgeUrl = false,
48
- onDownloadBadge
49
- } = badge;
50
43
  const [showMore, setShowMore] = useState(false);
51
44
  const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
52
45
  const Description = useCallback(() => {
@@ -88,16 +81,10 @@ const CertificationDetail = (props, context) => {
88
81
  }
89
82
  })) : null) : null, /*#__PURE__*/React.createElement("div", {
90
83
  className: style.contentStats
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,
84
+ }, /*#__PURE__*/React.createElement("span", null, `${totalModules} ${_lowerCase(translate('modules'))}`)), /*#__PURE__*/React.createElement(ContinueLearningButton, {
85
+ ongoingCoursesAvailable: ongoingCoursesAvailable,
95
86
  onClick: onContinueLearningClick
96
- }))), /*#__PURE__*/React.createElement("div", {
97
- className: style.continueLearningSection
98
- }, /*#__PURE__*/React.createElement(ContinueLearning, {
99
- ongoingCourses: ongoingCourses
100
- })), /*#__PURE__*/React.createElement(ProgressWrapper, {
87
+ }))), /*#__PURE__*/React.createElement(ProgressWrapper, {
101
88
  title: translate('your_progress'),
102
89
  subtitle: translate('certification_progress_wrapper_subtitle'),
103
90
  progression: progression,
@@ -105,20 +92,18 @@ const CertificationDetail = (props, context) => {
105
92
  completedModules: completedModules,
106
93
  sections: _compact([{
107
94
  type: 'diploma',
108
- onDownload: () => onDownloadDiploma
95
+ downloadUrl: diplomaUrl
109
96
  }, badgeUrl && {
110
97
  type: 'badge',
111
- badgeUrl,
112
- onDownload: () => onDownloadBadge
98
+ downloadUrl: badgeUrl
113
99
  }, {
114
100
  type: 'stars',
115
101
  stars
116
102
  }])
117
103
  }), /*#__PURE__*/React.createElement(AllCourses, {
118
104
  courses: certificationCourses,
119
- totalCourses: totalCourses,
120
- filters: filters,
121
- sorting: sorting
105
+ totalCourses: totalModules,
106
+ filters: filters
122
107
  })));
123
108
  };
124
109
 
@@ -137,20 +122,15 @@ CertificationDetail.propTypes = process.env.NODE_ENV !== "production" ? {
137
122
  completedCourses: PropTypes.number,
138
123
  completedModules: PropTypes.number
139
124
  }),
140
- onDownloadDiploma: PropTypes.func,
141
- badge: PropTypes.shape({
142
- badgeUrl: PropTypes.string,
143
- onDownloadBadge: PropTypes.func
144
- }),
145
- ongoingCourses: PropTypes.shape(CardsGrid.propTypes),
125
+ diplomaUrl: PropTypes.string,
126
+ badgeUrl: PropTypes.string,
127
+ ongoingCoursesAvailable: PropTypes.bool,
146
128
  certificationCourses: PropTypes.shape(CardsGrid.propTypes),
147
- totalCourses: PropTypes.number,
148
129
  totalModules: PropTypes.number,
149
130
  filters: PropTypes.shape({
150
131
  onChange: PropTypes.func,
151
132
  options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
152
133
  }),
153
- sorting: PropTypes.shape(Select.propTypes),
154
134
  onBackClick: PropTypes.func,
155
135
  onContinueLearningClick: PropTypes.func
156
136
  } : {};
@@ -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","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;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,iBAdI;IAeJC,KAAK,GAAG;EAfJ,IAgBFhB,KAhBJ;EAiBA,MAAM;IAACiB;EAAD,IAAchB,OAApB;EACA,MAAM;IAACiB,WAAD;IAAcC,gBAAd;IAAgCC,gBAAhC;IAAkDC;EAAlD,IAA2DR,OAAjE;EACA,MAAM;IAACS,QAAQ,GAAG,KAAZ;IAAmBC;EAAnB,IAAsCP,KAA5C;EAEA,MAAM,CAACQ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AO,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"}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearningButton","ProgressWrapper","style","DESCRIPTION_BREAKPOINT","CertificationDetail","props","context","certificationRef","title","description","certificationCourses","ongoingCoursesAvailable","totalModules","filters","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","type","downloadUrl","contextTypes","skin","childContextTypes","propTypes","string","isRequired","shape","number","bool","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 {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 {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 ongoingCoursesAvailable,\n totalModules,\n filters,\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>{`${totalModules} ${lowerCase(translate('modules'))}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\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 courses={certificationCourses} totalCourses={totalModules} filters={filters} />\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 ongoingCoursesAvailable: PropTypes.bool,\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n totalModules: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\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,SAAQC,qBAAR,QAAoC,mBAApC;AACA,OAAOC,cAAP,MAA2B,6BAA3B;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,UAAP,MAAuB,6BAAvB;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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hBqB;EAoB9BmB,WAAW,EAAEvB,SAAS,CAAC8D,IApBO;EAqB9BtC,uBAAuB,EAAExB,SAAS,CAAC8D;AArBL,CAAhC;AAwBA,eAAejD,mBAAf"}
@@ -8,14 +8,6 @@
8
8
  @value cm_grey_200 from colors;
9
9
  @value cm_grey_400 from colors;
10
10
 
11
- .divider {
12
- width: 4px;
13
- height: 4px;
14
- background-color: cm_grey_400;
15
- border: solid cm_grey_400 1px;
16
- border-radius: 4px;
17
- }
18
-
19
11
  .textBase {
20
12
  font-family: "Gilroy";
21
13
  font-style: normal;
@@ -53,6 +45,7 @@
53
45
  align-items: center;
54
46
  width: 100%;
55
47
  gap: 40px;
48
+ margin-bottom: 40px;
56
49
  }
57
50
 
58
51
  .logoContainer {
@@ -112,10 +105,6 @@
112
105
  color: cm_grey_400;
113
106
  }
114
107
 
115
- .continueLearningSection {
116
- padding: 24px 0 32px 0;
117
- }
118
-
119
108
  @media tablet {
120
109
  .ctaContainer {
121
110
  flex-direction: column;
@@ -96,7 +96,7 @@ const AllCourses = (props, context) => {
96
96
  setSearchResults(list);
97
97
  handleSearchReset();
98
98
  } else {
99
- setSearchResults(searchResults.filter(skill => skill.progress < 100));
99
+ setSearchResults(searchResults.filter(skill => skill.progress === 0));
100
100
  }
101
101
  }, [list, searchResults, showCompleted, setShowCompleted, setSearchResults, handleSearchReset]);
102
102
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
@@ -126,9 +126,9 @@ const AllCourses = (props, context) => {
126
126
  "aria-label": 'Show completed courses aria label',
127
127
  value: showCompleted,
128
128
  onChange: handleShowCompletedToggle
129
- }), /*#__PURE__*/React.createElement("div", {
129
+ }), sortView ? /*#__PURE__*/React.createElement("div", {
130
130
  className: style.sortWrapper
131
- }, translate('sort_by'), sortView))), /*#__PURE__*/React.createElement("div", {
131
+ }, translate('sort_by'), sortView) : null)), /*#__PURE__*/React.createElement("div", {
132
132
  className: style.filterWrapper
133
133
  }, options.length > 2 && searchResults.length > 0 ? options.map((filter, index) => {
134
134
  const {