@coorpacademy/components 11.32.12 → 11.32.13
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-header/index.d.ts +1 -1
- package/es/molecule/discipline-header/index.d.ts.map +1 -1
- package/es/molecule/discipline-header/index.js +5 -2
- package/es/molecule/discipline-header/index.js.map +1 -1
- package/lib/molecule/discipline-header/index.d.ts +1 -1
- package/lib/molecule/discipline-header/index.d.ts.map +1 -1
- package/lib/molecule/discipline-header/index.js +5 -2
- package/lib/molecule/discipline-header/index.js.map +1 -1
- package/package.json +2 -2
- package/es/template/skill-detail/index.d.ts +0 -57
- package/es/template/skill-detail/index.d.ts.map +0 -1
- package/es/template/skill-detail/index.js +0 -248
- package/es/template/skill-detail/index.js.map +0 -1
- package/es/template/skill-detail/style.css +0 -172
- package/lib/template/skill-detail/index.d.ts +0 -57
- package/lib/template/skill-detail/index.d.ts.map +0 -1
- package/lib/template/skill-detail/index.js +0 -266
- package/lib/template/skill-detail/index.js.map +0 -1
- package/lib/template/skill-detail/style.css +0 -172
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAME;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAME;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,kBAGC;IAED,sBAwDC;CACF"}
|
|
@@ -55,7 +55,8 @@ class DisciplineHeader extends React.Component {
|
|
|
55
55
|
}));
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
setHandle(
|
|
58
|
+
setHandle() {
|
|
59
|
+
const el = document.getElementById('discipline-summary');
|
|
59
60
|
this.setState({
|
|
60
61
|
scrollHeightShowMore: getOr(0, 'scrollHeight', el)
|
|
61
62
|
});
|
|
@@ -85,13 +86,15 @@ class DisciplineHeader extends React.Component {
|
|
|
85
86
|
"data-name": "disciplineHeader",
|
|
86
87
|
className: style.wrapper
|
|
87
88
|
}, hasMediaContent ? /*#__PURE__*/React.createElement("div", {
|
|
88
|
-
className: style.imgWrapper
|
|
89
|
+
className: style.imgWrapper,
|
|
90
|
+
ref: this.setHandle
|
|
89
91
|
}, /*#__PURE__*/React.createElement(Preview, {
|
|
90
92
|
image: image,
|
|
91
93
|
video: video
|
|
92
94
|
})) : null, /*#__PURE__*/React.createElement("div", {
|
|
93
95
|
className: style.courseWrapper
|
|
94
96
|
}, /*#__PURE__*/React.createElement("div", {
|
|
97
|
+
id: "discipline-summary",
|
|
95
98
|
className: fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort,
|
|
96
99
|
ref: this.setHandle
|
|
97
100
|
}, /*#__PURE__*/React.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","get","getOr","classnames","NovaSolidSynchronizeSynchronize3","SyncIcon","VideoPlayer","Picture","style","Preview","image","video","mimeType","id","jwpOptions","propTypes","src","shape","DisciplineHeader","Component","constructor","props","state","fullDisplay","scrollHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","render","title","description","lastUpdated","translate","context","maxHeightCourseInfos","hasMediaContent","toggleLabel","shortCourseText","courseSeeMoreButtonStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","courseTextWrapperFull","courseTextWrapperShort","innerHTML","__html","lastUpdatedWrapper","lastUpdatedWrapperShort","syncIcon","lastUpdatedText","contextTypes","func","string"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport {NovaSolidSynchronizeSynchronize3 as SyncIcon} from '@coorpacademy/nova-icons';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video,\n lastUpdated: PropTypes.string\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n scrollHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle(
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","get","getOr","classnames","NovaSolidSynchronizeSynchronize3","SyncIcon","VideoPlayer","Picture","style","Preview","image","video","mimeType","id","jwpOptions","propTypes","src","shape","DisciplineHeader","Component","constructor","props","state","fullDisplay","scrollHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","document","getElementById","render","title","description","lastUpdated","translate","context","maxHeightCourseInfos","hasMediaContent","toggleLabel","shortCourseText","courseSeeMoreButtonStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","courseTextWrapperFull","courseTextWrapperShort","innerHTML","__html","lastUpdatedWrapper","lastUpdatedWrapperShort","syncIcon","lastUpdatedText","contextTypes","func","string"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport {NovaSolidSynchronizeSynchronize3 as SyncIcon} from '@coorpacademy/nova-icons';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video,\n lastUpdated: PropTypes.string\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n scrollHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle() {\n const el = document.getElementById('discipline-summary');\n this.setState({scrollHeightShowMore: getOr(0, 'scrollHeight', el)});\n }\n\n render() {\n const {image, title, description, video, lastUpdated} = this.props;\n const {fullDisplay, scrollHeightShowMore} = this.state;\n const {translate} = this.context;\n const maxHeightCourseInfos = 210;\n const hasMediaContent = image || video;\n const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');\n const shortCourseText = scrollHeightShowMore <= maxHeightCourseInfos;\n const courseSeeMoreButtonStyle = shortCourseText ? style.showMoreHidden : style.showMore;\n\n return (\n <div data-name=\"disciplineHeader\" className={style.wrapper}>\n {hasMediaContent ? (\n <div className={style.imgWrapper} ref={this.setHandle}>\n <Preview image={image} video={video} />\n </div>\n ) : null}\n <div className={style.courseWrapper}>\n <div\n id=\"discipline-summary\"\n className={fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort}\n ref={this.setHandle}\n >\n <div\n data-name=\"title\"\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n />\n </div>\n <div className={courseSeeMoreButtonStyle} onClick={this.handleToggleDisplay}>\n {toggleLabel}\n </div>\n {lastUpdated ? (\n <div\n className={classnames(\n style.lastUpdatedWrapper,\n shortCourseText ? style.lastUpdatedWrapperShort : null\n )}\n >\n <SyncIcon className={style.syncIcon} />\n <div\n className={classnames(style.lastUpdatedText, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: lastUpdated}}\n />\n </div>\n ) : null}\n </div>\n </div>\n );\n }\n}\n\nexport default DisciplineHeader;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,GAAP,MAAgB,eAAhB;AACA,OAAOC,KAAP,MAAkB,iBAAlB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA,SAAQC,gCAAgC,IAAIC,QAA5C,QAA2D,0BAA3D;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,OAAP,MAAoB,oBAApB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,OAAO,GAAG,CAAC;EAACC,KAAD;EAAQC;AAAR,CAAD,KAAoB;EAClC,MAAMC,QAAQ,GAAGX,GAAG,CAAC,UAAD,EAAaU,KAAb,CAApB;EACA,MAA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MAHF;MAIE,uBAAuB,EAAE;QAACC,MAAM,EAAElB;MAAT;IAJ3B,EALF,eAWE;MACE,SAAS,EAAE1B,KAAK,CAAC2C,SADnB,CAEE;MAFF;MAGE,uBAAuB,EAAE;QAACC,MAAM,EAAEjB;MAAT;IAH3B,EAXF,CADF,eAkBE;MAAK,SAAS,EAAEQ,wBAAhB;MAA0C,OAAO,EAAE,KAAKlB;IAAxD,GACGgB,WADH,CAlBF,EAqBGL,WAAW,gBACV;MACE,SAAS,EAAEjC,UAAU,CACnBK,KAAK,CAAC6C,kBADa,EAEnBX,eAAe,GAAGlC,KAAK,CAAC8C,uBAAT,GAAmC,IAF/B;IADvB,gBAME,oBAAC,QAAD;MAAU,SAAS,EAAE9C,KAAK,CAAC+C;IAA3B,EANF,eAOE;MACE,SAAS,EAAEpD,UAAU,CAACK,KAAK,CAACgD,eAAP,EAAwBhD,KAAK,CAAC2C,SAA9B,CADvB,CAEE;MAFF;MAGE,uBAAuB,EAAE;QAACC,MAAM,EAAEhB;MAAT;IAH3B,EAPF,CADU,GAcR,IAnCN,CANF,CADF;EA8CD;;AA1F4C;;AAAzClB,gB,CASGuC,Y,GAAe;EACpBpB,SAAS,EAAErC,SAAS,CAAC0D;AADD,C;AATlBxC,gB,CACGH,S,2CAAY;EACjBmB,KAAK,EAAElC,SAAS,CAAC2D,MADA;EAEjBxB,WAAW,EAAEnC,SAAS,CAAC2D,MAFN;EAGjBjD,KAAK,EAAED,OAAO,CAACM,SAAR,CAAkBL,KAHR;EAIjBC,KAAK,EAAEF,OAAO,CAACM,SAAR,CAAkBJ,KAJR;EAKjByB,WAAW,EAAEpC,SAAS,CAAC2D;AALN,C;AA4FrB,eAAezC,gBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAME;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/discipline-header/index.js"],"names":[],"mappings":";AA4BA;IACE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAME;IAEF;;MAEE;IAEF,wBAQC;IANC;;;MAGC;IAKH,4BAIC;IAED,kBAGC;IAED,sBAwDC;CACF"}
|
|
@@ -70,7 +70,8 @@ class DisciplineHeader extends _react.default.Component {
|
|
|
70
70
|
}));
|
|
71
71
|
}
|
|
72
72
|
|
|
73
|
-
setHandle(
|
|
73
|
+
setHandle() {
|
|
74
|
+
const el = document.getElementById('discipline-summary');
|
|
74
75
|
this.setState({
|
|
75
76
|
scrollHeightShowMore: (0, _getOr.default)(0, 'scrollHeight', el)
|
|
76
77
|
});
|
|
@@ -100,13 +101,15 @@ class DisciplineHeader extends _react.default.Component {
|
|
|
100
101
|
"data-name": "disciplineHeader",
|
|
101
102
|
className: _style.default.wrapper
|
|
102
103
|
}, hasMediaContent ? /*#__PURE__*/_react.default.createElement("div", {
|
|
103
|
-
className: _style.default.imgWrapper
|
|
104
|
+
className: _style.default.imgWrapper,
|
|
105
|
+
ref: this.setHandle
|
|
104
106
|
}, /*#__PURE__*/_react.default.createElement(Preview, {
|
|
105
107
|
image: image,
|
|
106
108
|
video: video
|
|
107
109
|
})) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
108
110
|
className: _style.default.courseWrapper
|
|
109
111
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
+
id: "discipline-summary",
|
|
110
113
|
className: fullDisplay ? _style.default.courseTextWrapperFull : _style.default.courseTextWrapperShort,
|
|
111
114
|
ref: this.setHandle
|
|
112
115
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Preview","image","video","mimeType","get","id","jwpOptions","style","propTypes","Picture","src","PropTypes","shape","VideoPlayer","DisciplineHeader","React","Component","constructor","props","state","fullDisplay","scrollHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","getOr","render","title","description","lastUpdated","translate","context","maxHeightCourseInfos","hasMediaContent","toggleLabel","shortCourseText","courseSeeMoreButtonStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","courseTextWrapperFull","courseTextWrapperShort","classnames","innerHTML","__html","lastUpdatedWrapper","lastUpdatedWrapperShort","syncIcon","lastUpdatedText","contextTypes","func","string"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport {NovaSolidSynchronizeSynchronize3 as SyncIcon} from '@coorpacademy/nova-icons';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video,\n lastUpdated: PropTypes.string\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n scrollHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle(
|
|
1
|
+
{"version":3,"file":"index.js","names":["Preview","image","video","mimeType","get","id","jwpOptions","style","propTypes","Picture","src","PropTypes","shape","VideoPlayer","DisciplineHeader","React","Component","constructor","props","state","fullDisplay","scrollHeightShowMore","handleToggleDisplay","bind","setHandle","setState","prevState","el","document","getElementById","getOr","render","title","description","lastUpdated","translate","context","maxHeightCourseInfos","hasMediaContent","toggleLabel","shortCourseText","courseSeeMoreButtonStyle","showMoreHidden","showMore","wrapper","imgWrapper","courseWrapper","courseTextWrapperFull","courseTextWrapperShort","classnames","innerHTML","__html","lastUpdatedWrapper","lastUpdatedWrapperShort","syncIcon","lastUpdatedText","contextTypes","func","string"],"sources":["../../../src/molecule/discipline-header/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/fp/get';\nimport getOr from 'lodash/fp/getOr';\nimport classnames from 'classnames';\nimport {NovaSolidSynchronizeSynchronize3 as SyncIcon} from '@coorpacademy/nova-icons';\nimport VideoPlayer from '../video-player';\nimport Picture from '../../atom/picture';\nimport style from './style.css';\n\nconst Preview = ({image, video}) => {\n const mimeType = get('mimeType', video);\n const id = get('id', video);\n const jwpOptions = get('jwpOptions', video);\n if (id) {\n return <VideoPlayer mimeType={mimeType} id={id} width=\"380px\" height=\"250px\" />;\n } else if (jwpOptions) {\n return <VideoPlayer {...video} />;\n } else {\n return <Picture className={style.image} src={image} />;\n }\n};\n\nPreview.propTypes = {\n image: Picture.propTypes.src,\n video: PropTypes.shape(VideoPlayer.propTypes)\n};\n\nclass DisciplineHeader extends React.Component {\n static propTypes = {\n title: PropTypes.string,\n description: PropTypes.string,\n image: Preview.propTypes.image,\n video: Preview.propTypes.video,\n lastUpdated: PropTypes.string\n };\n\n static contextTypes = {\n translate: PropTypes.func\n };\n\n constructor(props) {\n super(props);\n this.state = {\n fullDisplay: false,\n scrollHeightShowMore: 0\n };\n this.handleToggleDisplay = this.handleToggleDisplay.bind(this);\n this.setHandle = this.setHandle.bind(this);\n }\n\n handleToggleDisplay() {\n this.setState(prevState => ({\n fullDisplay: !prevState.fullDisplay\n }));\n }\n\n setHandle() {\n const el = document.getElementById('discipline-summary');\n this.setState({scrollHeightShowMore: getOr(0, 'scrollHeight', el)});\n }\n\n render() {\n const {image, title, description, video, lastUpdated} = this.props;\n const {fullDisplay, scrollHeightShowMore} = this.state;\n const {translate} = this.context;\n const maxHeightCourseInfos = 210;\n const hasMediaContent = image || video;\n const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');\n const shortCourseText = scrollHeightShowMore <= maxHeightCourseInfos;\n const courseSeeMoreButtonStyle = shortCourseText ? style.showMoreHidden : style.showMore;\n\n return (\n <div data-name=\"disciplineHeader\" className={style.wrapper}>\n {hasMediaContent ? (\n <div className={style.imgWrapper} ref={this.setHandle}>\n <Preview image={image} video={video} />\n </div>\n ) : null}\n <div className={style.courseWrapper}>\n <div\n id=\"discipline-summary\"\n className={fullDisplay ? style.courseTextWrapperFull : style.courseTextWrapperShort}\n ref={this.setHandle}\n >\n <div\n data-name=\"title\"\n className={classnames(style.title, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: title}}\n />\n <div\n className={style.innerHTML}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: description}}\n />\n </div>\n <div className={courseSeeMoreButtonStyle} onClick={this.handleToggleDisplay}>\n {toggleLabel}\n </div>\n {lastUpdated ? (\n <div\n className={classnames(\n style.lastUpdatedWrapper,\n shortCourseText ? style.lastUpdatedWrapperShort : null\n )}\n >\n <SyncIcon className={style.syncIcon} />\n <div\n className={classnames(style.lastUpdatedText, style.innerHTML)}\n // eslint-disable-next-line react/no-danger\n dangerouslySetInnerHTML={{__html: lastUpdated}}\n />\n </div>\n ) : null}\n </div>\n </div>\n );\n }\n}\n\nexport default DisciplineHeader;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,OAAO,GAA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AAU+C;AALN,C;eA4FN5C,gB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.32.
|
|
3
|
+
"version": "11.32.13",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -177,5 +177,5 @@
|
|
|
177
177
|
"last 2 versions",
|
|
178
178
|
"IE 11"
|
|
179
179
|
],
|
|
180
|
-
"gitHead": "
|
|
180
|
+
"gitHead": "6ab0254581f7381d7f561fefc8bb233bf223369c"
|
|
181
181
|
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export default SkillDetail;
|
|
2
|
-
declare function SkillDetail(props: any, context: any): JSX.Element;
|
|
3
|
-
declare namespace SkillDetail {
|
|
4
|
-
namespace contextTypes {
|
|
5
|
-
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
-
common: PropTypes.Requireable<{
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
}>;
|
|
9
|
-
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
-
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
-
logo: PropTypes.Requireable<any>;
|
|
12
|
-
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
-
login: PropTypes.Requireable<any>;
|
|
14
|
-
}>>;
|
|
15
|
-
icons: PropTypes.Requireable<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
}>;
|
|
18
|
-
mod: PropTypes.Requireable<{
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
}>;
|
|
21
|
-
courses: PropTypes.Requireable<any[]>;
|
|
22
|
-
texts: PropTypes.Requireable<{
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
}>;
|
|
25
|
-
}>>;
|
|
26
|
-
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
}
|
|
28
|
-
namespace propTypes {
|
|
29
|
-
const title: PropTypes.Validator<string>;
|
|
30
|
-
const description: PropTypes.Requireable<string>;
|
|
31
|
-
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
|
-
score: PropTypes.Requireable<number>;
|
|
33
|
-
content: PropTypes.Requireable<number>;
|
|
34
|
-
questionsToReview: PropTypes.Requireable<number>;
|
|
35
|
-
contentCompleted: PropTypes.Requireable<number>;
|
|
36
|
-
}>>;
|
|
37
|
-
const focused: PropTypes.Requireable<boolean>;
|
|
38
|
-
const availableForReview: PropTypes.Requireable<boolean>;
|
|
39
|
-
const ongoingCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
40
|
-
title: PropTypes.Requireable<string>;
|
|
41
|
-
provider: PropTypes.Requireable<string>;
|
|
42
|
-
progress: PropTypes.Requireable<number>;
|
|
43
|
-
}> | null | undefined)[]>;
|
|
44
|
-
const skillIncludedCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
45
|
-
title: PropTypes.Requireable<string>;
|
|
46
|
-
type: PropTypes.Requireable<string>;
|
|
47
|
-
provider: PropTypes.Requireable<string>;
|
|
48
|
-
progress: PropTypes.Requireable<number>;
|
|
49
|
-
}> | null | undefined)[]>;
|
|
50
|
-
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
-
const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
-
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
-
const onCourseClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
import PropTypes from "prop-types";
|
|
57
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AAuDA,oEA6IC"}
|
|
@@ -1,248 +0,0 @@
|
|
|
1
|
-
import _get from "lodash/fp/get";
|
|
2
|
-
import React, { useCallback, useState } from 'react';
|
|
3
|
-
import PropTypes from 'prop-types';
|
|
4
|
-
import { convert } from 'css-color-function';
|
|
5
|
-
import classnames from 'classnames';
|
|
6
|
-
import Provider from '../../atom/provider';
|
|
7
|
-
import ButtonLink from '../../atom/button-link';
|
|
8
|
-
import Icon from '../../atom/icon';
|
|
9
|
-
import style from './style.css';
|
|
10
|
-
|
|
11
|
-
const ContinueLearningButton = (props, context) => {
|
|
12
|
-
const [hovered, setHovered] = useState(false);
|
|
13
|
-
const {
|
|
14
|
-
onClick
|
|
15
|
-
} = props;
|
|
16
|
-
const {
|
|
17
|
-
skin,
|
|
18
|
-
translate
|
|
19
|
-
} = context;
|
|
20
|
-
|
|
21
|
-
const primarySkinColor = _get('common.primary', skin);
|
|
22
|
-
|
|
23
|
-
const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);
|
|
24
|
-
const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);
|
|
25
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
26
|
-
onMouseOver: handleMouseOver,
|
|
27
|
-
onMouseLeave: handleMouseLeave
|
|
28
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
29
|
-
label: translate('continue_learning'),
|
|
30
|
-
type: "primary",
|
|
31
|
-
customStyle: {
|
|
32
|
-
width: 'fit-content',
|
|
33
|
-
borderRadius: '12px',
|
|
34
|
-
backgroundColor: hovered ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`) : primarySkinColor
|
|
35
|
-
},
|
|
36
|
-
icon: {
|
|
37
|
-
position: 'left',
|
|
38
|
-
faIcon: {
|
|
39
|
-
name: 'play',
|
|
40
|
-
color: '#FFFFFF',
|
|
41
|
-
size: 16
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
onClick: onClick
|
|
45
|
-
}));
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
ContinueLearningButton.contextTypes = {
|
|
49
|
-
skin: Provider.childContextTypes.skin,
|
|
50
|
-
translate: Provider.childContextTypes.translate
|
|
51
|
-
};
|
|
52
|
-
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
53
|
-
onClick: PropTypes.func
|
|
54
|
-
} : {};
|
|
55
|
-
|
|
56
|
-
const SkillDetail = (props, context) => {
|
|
57
|
-
const {
|
|
58
|
-
title,
|
|
59
|
-
description,
|
|
60
|
-
metrics,
|
|
61
|
-
focused,
|
|
62
|
-
availableForReview,
|
|
63
|
-
ongoingCourses,
|
|
64
|
-
skillIncludedCourses,
|
|
65
|
-
onBackClick,
|
|
66
|
-
onReviewClick,
|
|
67
|
-
onContinueLearningClick,
|
|
68
|
-
onCourseClick
|
|
69
|
-
} = props;
|
|
70
|
-
const {
|
|
71
|
-
score,
|
|
72
|
-
content,
|
|
73
|
-
questionsToReview,
|
|
74
|
-
contentCompleted = 0
|
|
75
|
-
} = metrics;
|
|
76
|
-
const {
|
|
77
|
-
skin,
|
|
78
|
-
translate
|
|
79
|
-
} = context;
|
|
80
|
-
const [showMore, setShowMore] = useState(false);
|
|
81
|
-
const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
82
|
-
const Description = useCallback(() => {
|
|
83
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
84
|
-
className: classnames(style.description, !showMore && style.truncate)
|
|
85
|
-
}, description);
|
|
86
|
-
});
|
|
87
|
-
const ProgressBar = useCallback(() => {
|
|
88
|
-
if (score === undefined) return null;
|
|
89
|
-
const progressBarColor = '#3EC483';
|
|
90
|
-
const inlineProgressValueStyle = {
|
|
91
|
-
backgroundColor: progressBarColor,
|
|
92
|
-
width: `${score}%`
|
|
93
|
-
};
|
|
94
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
95
|
-
className: style.progressBarWrapper
|
|
96
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
97
|
-
"data-name": "progress",
|
|
98
|
-
className: style.progress,
|
|
99
|
-
style: inlineProgressValueStyle,
|
|
100
|
-
role: "progressbar"
|
|
101
|
-
}));
|
|
102
|
-
}, [score]);
|
|
103
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
104
|
-
className: style.backgroundContainer
|
|
105
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
106
|
-
className: style.container
|
|
107
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
108
|
-
className: style.backButtonWrapper,
|
|
109
|
-
onClick: onBackClick
|
|
110
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
111
|
-
iconName: "arrow-left",
|
|
112
|
-
size: {
|
|
113
|
-
faSize: 14,
|
|
114
|
-
wrapperSize: 14
|
|
115
|
-
}
|
|
116
|
-
})), /*#__PURE__*/React.createElement("div", {
|
|
117
|
-
className: style.ctaContainer
|
|
118
|
-
}, focused ? /*#__PURE__*/React.createElement("div", {
|
|
119
|
-
className: style.skillFocusBadge
|
|
120
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
121
|
-
iconName: "bullseye-arrow",
|
|
122
|
-
backgroundColor: "#DDD1FF",
|
|
123
|
-
size: {
|
|
124
|
-
faSize: 10,
|
|
125
|
-
wrapperSize: 16
|
|
126
|
-
}
|
|
127
|
-
}), translate('skill_focus')) : null, /*#__PURE__*/React.createElement("div", {
|
|
128
|
-
className: style.ctaWrapper
|
|
129
|
-
}, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
130
|
-
type: "secondary",
|
|
131
|
-
onClick: onReviewClick,
|
|
132
|
-
label: translate('review_this_skill'),
|
|
133
|
-
disabled: !availableForReview,
|
|
134
|
-
customStyle: {
|
|
135
|
-
width: 'fit-content',
|
|
136
|
-
borderRadius: '12px'
|
|
137
|
-
}
|
|
138
|
-
}), /*#__PURE__*/React.createElement(ContinueLearningButton, {
|
|
139
|
-
onClick: onContinueLearningClick
|
|
140
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
141
|
-
className: style.title
|
|
142
|
-
}, title), description ? /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Description, null), description.length >= 226 ? /*#__PURE__*/React.createElement("div", {
|
|
143
|
-
className: style.showMoreWrapper,
|
|
144
|
-
onClick: handleShowMore
|
|
145
|
-
}, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/React.createElement(Icon, {
|
|
146
|
-
iconName: showMore ? "chevron-up" : "chevron-down",
|
|
147
|
-
size: {
|
|
148
|
-
faSize: 14,
|
|
149
|
-
wrapperSize: 16
|
|
150
|
-
}
|
|
151
|
-
})) : null) : null, /*#__PURE__*/React.createElement("div", {
|
|
152
|
-
className: style.progressInformationsWrapper
|
|
153
|
-
}, /*#__PURE__*/React.createElement("div", {
|
|
154
|
-
className: style.progressTitle
|
|
155
|
-
}, translate('your_progress')), /*#__PURE__*/React.createElement("div", {
|
|
156
|
-
className: style.skillCoursesAndQuestionsWrapper
|
|
157
|
-
}, content ? /*#__PURE__*/React.createElement("div", {
|
|
158
|
-
className: style.skillInformation,
|
|
159
|
-
"data-name": "skill-courses"
|
|
160
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
161
|
-
className: style.skillInformationNumber
|
|
162
|
-
}, content), " ", translate('courses')) : null, questionsToReview ? /*#__PURE__*/React.createElement("div", {
|
|
163
|
-
className: style.skillInformation,
|
|
164
|
-
"data-name": "skill-questions"
|
|
165
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
166
|
-
className: style.skillInformationNumber
|
|
167
|
-
}, questionsToReview), "\xA0", translate('questions')) : null), /*#__PURE__*/React.createElement(ProgressBar, null), /*#__PURE__*/React.createElement("div", {
|
|
168
|
-
className: style.progressInformations
|
|
169
|
-
}, content && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
170
|
-
className: style.progressInformation,
|
|
171
|
-
"data-name": "skill-completed-courses"
|
|
172
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
173
|
-
className: style.progressInformationNumber
|
|
174
|
-
}, contentCompleted), ` ${translate('courses_completed')}`), /*#__PURE__*/React.createElement("div", {
|
|
175
|
-
className: style.progressInformation,
|
|
176
|
-
"data-name": "completed-percentage"
|
|
177
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
178
|
-
className: style.progressInformationNumber
|
|
179
|
-
}, score, "%"))))), /*#__PURE__*/React.createElement(ContinueLearning, {
|
|
180
|
-
ongoingCourses: ongoingCourses,
|
|
181
|
-
onCourseClick: onCourseClick
|
|
182
|
-
})));
|
|
183
|
-
};
|
|
184
|
-
|
|
185
|
-
SkillDetail.contextTypes = {
|
|
186
|
-
skin: Provider.childContextTypes.skin,
|
|
187
|
-
translate: Provider.childContextTypes.translate
|
|
188
|
-
};
|
|
189
|
-
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
190
|
-
title: PropTypes.string.isRequired,
|
|
191
|
-
description: PropTypes.string,
|
|
192
|
-
metrics: PropTypes.shape({
|
|
193
|
-
score: PropTypes.number,
|
|
194
|
-
content: PropTypes.number,
|
|
195
|
-
questionsToReview: PropTypes.number,
|
|
196
|
-
contentCompleted: PropTypes.number
|
|
197
|
-
}),
|
|
198
|
-
focused: PropTypes.bool,
|
|
199
|
-
availableForReview: PropTypes.bool,
|
|
200
|
-
ongoingCourses: PropTypes.arrayOf(PropTypes.shape({
|
|
201
|
-
title: PropTypes.string,
|
|
202
|
-
provider: PropTypes.string,
|
|
203
|
-
progress: PropTypes.number
|
|
204
|
-
})),
|
|
205
|
-
skillIncludedCourses: PropTypes.arrayOf(PropTypes.shape({
|
|
206
|
-
title: PropTypes.string,
|
|
207
|
-
type: PropTypes.string,
|
|
208
|
-
provider: PropTypes.string,
|
|
209
|
-
progress: PropTypes.number
|
|
210
|
-
})),
|
|
211
|
-
onBackClick: PropTypes.func,
|
|
212
|
-
onReviewClick: PropTypes.func,
|
|
213
|
-
onContinueLearningClick: PropTypes.func,
|
|
214
|
-
onCourseClick: PropTypes.func
|
|
215
|
-
} : {};
|
|
216
|
-
export default SkillDetail;
|
|
217
|
-
|
|
218
|
-
const ContinueLearning = (props, context) => {
|
|
219
|
-
const {
|
|
220
|
-
ongoingCourses,
|
|
221
|
-
onCourseClick
|
|
222
|
-
} = props;
|
|
223
|
-
const {
|
|
224
|
-
skin,
|
|
225
|
-
translate
|
|
226
|
-
} = context;
|
|
227
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
228
|
-
className: style.continueLearningWrapper
|
|
229
|
-
}, /*#__PURE__*/React.createElement("span", {
|
|
230
|
-
className: style.continueLearningTitle
|
|
231
|
-
}, translate('continue_learning')), /*#__PURE__*/React.createElement("span", {
|
|
232
|
-
className: style.continueLearningNumber
|
|
233
|
-
}, ongoingCourses.length));
|
|
234
|
-
};
|
|
235
|
-
|
|
236
|
-
ContinueLearning.contextTypes = {
|
|
237
|
-
skin: Provider.childContextTypes.skin,
|
|
238
|
-
translate: Provider.childContextTypes.translate
|
|
239
|
-
};
|
|
240
|
-
ContinueLearning.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
241
|
-
ongoingCourses: PropTypes.arrayOf(PropTypes.shape({
|
|
242
|
-
title: PropTypes.string,
|
|
243
|
-
provider: PropTypes.string,
|
|
244
|
-
progress: PropTypes.number
|
|
245
|
-
})),
|
|
246
|
-
onCourseClick: PropTypes.func
|
|
247
|
-
} : {};
|
|
248
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","ButtonLink","Icon","style","ContinueLearningButton","props","context","hovered","setHovered","onClick","skin","translate","primarySkinColor","handleMouseOver","handleMouseLeave","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","func","SkillDetail","title","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","onBackClick","onReviewClick","onContinueLearningClick","onCourseClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","ctaWrapper","length","showMoreWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","bool","arrayOf","provider","type","ContinueLearning","continueLearningWrapper","continueLearningTitle","continueLearningNumber"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\n <ButtonLink\n label={translate('continue_learning')}\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n description,\n metrics,\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n onCourseClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\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 });\n\n const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon\n iconName=\"arrow-left\"\n size={{\n faSize: 14,\n wrapperSize: 14\n }}\n />\n </div>\n <div className={style.ctaContainer}>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton onClick={onContinueLearningClick} />\n </div>\n </div>\n <div className={style.title}>{title}</div>\n {description ? \n <>\n <Description />\n {description.length >= 226 ? \n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? \"chevron-up\" : \"chevron-down\"}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div> : null}\n </> \n : null}\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} onCourseClick={onCourseClick} />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n skillIncludedCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n type: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n onCourseClick: PropTypes.func\n};\n\nexport default SkillDetail;\n\nconst ContinueLearning = (props, context) => {\n const {\n ongoingCourses,\n onCourseClick\n } = props;\n const {skin, translate} = context;\n\n return (\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('continue_learning')}</span>\n <span className={style.continueLearningNumber}>\n {ongoingCourses.length}\n </span>\n </div>\n )\n}\n\nContinueLearning.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearning.propTypes = {\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onCourseClick: PropTypes.func\n};\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAAoD,OAApD;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBZ,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACa;EAAD,IAAYJ,KAAlB;EACA,MAAM;IAACK,IAAD;IAAOC;EAAP,IAAoBL,OAA1B;;EACA,MAAMM,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;;EAEA,MAAMG,eAAe,GAAGlB,WAAW,CAAC,MAAMa,UAAU,CAAC,IAAD,CAAjB,EAAyB,CAACA,UAAD,CAAzB,CAAnC;EAEA,MAAMM,gBAAgB,GAAGnB,WAAW,CAAC,MAAMa,UAAU,CAAC,KAAD,CAAjB,EAA0B,CAACA,UAAD,CAA1B,CAApC;EAEA,oBACE;IAAK,WAAW,EAAEK,eAAlB;IAAmC,YAAY,EAAEC;EAAjD,gBACE,oBAAC,UAAD;IACE,KAAK,EAAEH,SAAS,CAAC,mBAAD,CADlB;IAEE,IAAI,EAAC,SAFP;IAGE,WAAW,EAAE;MACXI,KAAK,EAAE,aADI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D;;AAiBAkB,gBAAgB,CAACzD,YAAjB,GAAgC;EAC9Bb,IAAI,EAAEV,QAAQ,CAACwB,iBAAT,CAA2Bd,IADH;EAE9BC,SAAS,EAAEX,QAAQ,CAACwB,iBAAT,CAA2Bb;AAFR,CAAhC;AAKAqE,gBAAgB,CAACvD,SAAjB,2CAA6B;EAC3BQ,cAAc,EAAEpC,SAAS,CAACgF,OAAV,CACdhF,SAAS,CAAC6E,KAAV,CAAgB;IACd9C,KAAK,EAAE/B,SAAS,CAAC2E,MADH;IAEdM,QAAQ,EAAEjF,SAAS,CAAC2E,MAFN;IAGdnB,QAAQ,EAAExD,SAAS,CAAC8E;EAHN,CAAhB,CADc,CADW;EAQ3BrC,aAAa,EAAEzC,SAAS,CAAC6B;AARE,CAA7B"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
@value colors: "../../variables/colors.css";
|
|
2
|
-
@value xtraLightGrey from colors;
|
|
3
|
-
@value cm_grey_100 from colors;
|
|
4
|
-
@value cm_grey_400 from colors;
|
|
5
|
-
|
|
6
|
-
.textBase {
|
|
7
|
-
font-family: "Gilroy";
|
|
8
|
-
font-style: normal;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.backgroundContainer {
|
|
12
|
-
background-color: white;
|
|
13
|
-
min-height: 100%;
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.container {
|
|
18
|
-
composes: textBase;
|
|
19
|
-
background-color: white;
|
|
20
|
-
font-family: "Gilroy";
|
|
21
|
-
font-style: normal;
|
|
22
|
-
margin-top: 48px;
|
|
23
|
-
margin-bottom: 48px;
|
|
24
|
-
margin-left: auto;
|
|
25
|
-
margin-right: auto;
|
|
26
|
-
padding: 0 16px;
|
|
27
|
-
position: relative;
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
min-height: 100%;
|
|
30
|
-
width: 100%;
|
|
31
|
-
max-width: calc(1080px + 32px);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.backButtonWrapper {
|
|
35
|
-
margin-bottom: 16px;
|
|
36
|
-
background-color: cm_grey_100;
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
width: fit-content;
|
|
39
|
-
padding: 8px;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ctaContainer {
|
|
44
|
-
display: flex;
|
|
45
|
-
width: 100%;
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.skillFocusBadge {
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 12px;
|
|
52
|
-
width: fit-content;
|
|
53
|
-
align-items: center;
|
|
54
|
-
background-color: #DDD1FF;
|
|
55
|
-
border-radius: 24px;
|
|
56
|
-
padding: 4px 8px;
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
line-height: 16px;
|
|
59
|
-
font-weight: 600;
|
|
60
|
-
color: #3900D6;
|
|
61
|
-
margin-right: 8px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.ctaWrapper,
|
|
65
|
-
.showMoreWrapper {
|
|
66
|
-
display: flex;
|
|
67
|
-
gap: 8px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.showMoreWrapper {
|
|
71
|
-
align-items: center;
|
|
72
|
-
margin-top: 8px;
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.title {
|
|
78
|
-
font-size: 24px;
|
|
79
|
-
font-weight: 700;
|
|
80
|
-
line-height: 32px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.description {
|
|
84
|
-
margin-top: 8px;
|
|
85
|
-
max-width: 734px;
|
|
86
|
-
font-size: 14px;
|
|
87
|
-
font-weight: 500;
|
|
88
|
-
line-height: 20px;
|
|
89
|
-
color: cm_grey_400;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.truncate {
|
|
93
|
-
display: -webkit-box;
|
|
94
|
-
-webkit-line-clamp: 2;
|
|
95
|
-
-webkit-box-orient: vertical;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.progressInformationsWrapper {
|
|
101
|
-
margin-top: 40px;
|
|
102
|
-
background-color: xtraLightGrey;
|
|
103
|
-
border-radius: 16px;
|
|
104
|
-
padding: 24px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.progressTitle {
|
|
108
|
-
font-size: 16px;
|
|
109
|
-
font-weight: 600;
|
|
110
|
-
line-height: 22px;
|
|
111
|
-
margin-bottom: 16px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.skillCoursesAndQuestionsWrapper,
|
|
115
|
-
.progressInformations {
|
|
116
|
-
display: flex;
|
|
117
|
-
justify-content: space-between;
|
|
118
|
-
margin-bottom: 8px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.skillInformation,
|
|
122
|
-
.progressInformation {
|
|
123
|
-
composes: textBase;
|
|
124
|
-
font-weight: 600;
|
|
125
|
-
font-size: 14px;
|
|
126
|
-
line-height: 20px;
|
|
127
|
-
color: cm_grey_400;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.skillInformationNumber,
|
|
131
|
-
.progressInformationNumber {
|
|
132
|
-
color: #000;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.progressBarWrapper {
|
|
136
|
-
position: relative;
|
|
137
|
-
left: 0;
|
|
138
|
-
width: 100%;
|
|
139
|
-
height: 4px;
|
|
140
|
-
border-radius: 2px;
|
|
141
|
-
overflow: hidden;
|
|
142
|
-
background-color: cm_grey_100;
|
|
143
|
-
margin: 16px 0;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.progress {
|
|
147
|
-
display: block;
|
|
148
|
-
height: 8px;
|
|
149
|
-
animation: progressbar 2s ease-in-out;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/* Continue Learning */
|
|
153
|
-
.continueLearningWrapper {
|
|
154
|
-
margin-top: 40px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.continueLearningTitle {
|
|
158
|
-
font-size: 16px;
|
|
159
|
-
font-weight: 600;
|
|
160
|
-
line-height: 22px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.continueLearningNumber {
|
|
164
|
-
border-radius: 50%;
|
|
165
|
-
background-color: #EAEAEB;
|
|
166
|
-
color: #515161;
|
|
167
|
-
padding: 2px 4px;
|
|
168
|
-
margin-left: 8px;
|
|
169
|
-
font-size: 10px;
|
|
170
|
-
font-weight: 600;
|
|
171
|
-
line-height: 12px;
|
|
172
|
-
}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
export default SkillDetail;
|
|
2
|
-
declare function SkillDetail(props: any, context: any): JSX.Element;
|
|
3
|
-
declare namespace SkillDetail {
|
|
4
|
-
namespace contextTypes {
|
|
5
|
-
const skin: PropTypes.Requireable<PropTypes.InferProps<{
|
|
6
|
-
common: PropTypes.Requireable<{
|
|
7
|
-
[x: string]: any;
|
|
8
|
-
}>;
|
|
9
|
-
images: PropTypes.Requireable<PropTypes.InferProps<{
|
|
10
|
-
'logo-mobile': PropTypes.Requireable<any>;
|
|
11
|
-
logo: PropTypes.Requireable<any>;
|
|
12
|
-
'logo-email': PropTypes.Requireable<any>;
|
|
13
|
-
login: PropTypes.Requireable<any>;
|
|
14
|
-
}>>;
|
|
15
|
-
icons: PropTypes.Requireable<{
|
|
16
|
-
[x: string]: any;
|
|
17
|
-
}>;
|
|
18
|
-
mod: PropTypes.Requireable<{
|
|
19
|
-
[x: string]: any;
|
|
20
|
-
}>;
|
|
21
|
-
courses: PropTypes.Requireable<any[]>;
|
|
22
|
-
texts: PropTypes.Requireable<{
|
|
23
|
-
[x: string]: any;
|
|
24
|
-
}>;
|
|
25
|
-
}>>;
|
|
26
|
-
const translate: PropTypes.Requireable<(...args: any[]) => any>;
|
|
27
|
-
}
|
|
28
|
-
namespace propTypes {
|
|
29
|
-
const title: PropTypes.Validator<string>;
|
|
30
|
-
const description: PropTypes.Requireable<string>;
|
|
31
|
-
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
|
-
score: PropTypes.Requireable<number>;
|
|
33
|
-
content: PropTypes.Requireable<number>;
|
|
34
|
-
questionsToReview: PropTypes.Requireable<number>;
|
|
35
|
-
contentCompleted: PropTypes.Requireable<number>;
|
|
36
|
-
}>>;
|
|
37
|
-
const focused: PropTypes.Requireable<boolean>;
|
|
38
|
-
const availableForReview: PropTypes.Requireable<boolean>;
|
|
39
|
-
const ongoingCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
40
|
-
title: PropTypes.Requireable<string>;
|
|
41
|
-
provider: PropTypes.Requireable<string>;
|
|
42
|
-
progress: PropTypes.Requireable<number>;
|
|
43
|
-
}> | null | undefined)[]>;
|
|
44
|
-
const skillIncludedCourses: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
45
|
-
title: PropTypes.Requireable<string>;
|
|
46
|
-
type: PropTypes.Requireable<string>;
|
|
47
|
-
provider: PropTypes.Requireable<string>;
|
|
48
|
-
progress: PropTypes.Requireable<number>;
|
|
49
|
-
}> | null | undefined)[]>;
|
|
50
|
-
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
51
|
-
const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
52
|
-
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
|
-
const onCourseClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
import PropTypes from "prop-types";
|
|
57
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AAuDA,oEA6IC"}
|
|
@@ -1,266 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
exports.__esModule = true;
|
|
4
|
-
exports.default = void 0;
|
|
5
|
-
|
|
6
|
-
var _get2 = _interopRequireDefault(require("lodash/fp/get"));
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
|
-
var _cssColorFunction = require("css-color-function");
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _provider = _interopRequireDefault(require("../../atom/provider"));
|
|
17
|
-
|
|
18
|
-
var _buttonLink = _interopRequireDefault(require("../../atom/button-link"));
|
|
19
|
-
|
|
20
|
-
var _icon = _interopRequireDefault(require("../../atom/icon"));
|
|
21
|
-
|
|
22
|
-
var _style = _interopRequireDefault(require("./style.css"));
|
|
23
|
-
|
|
24
|
-
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25
|
-
|
|
26
|
-
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
|
-
|
|
28
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
29
|
-
|
|
30
|
-
const ContinueLearningButton = (props, context) => {
|
|
31
|
-
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
32
|
-
const {
|
|
33
|
-
onClick
|
|
34
|
-
} = props;
|
|
35
|
-
const {
|
|
36
|
-
skin,
|
|
37
|
-
translate
|
|
38
|
-
} = context;
|
|
39
|
-
const primarySkinColor = (0, _get2.default)('common.primary', skin);
|
|
40
|
-
const handleMouseOver = (0, _react.useCallback)(() => setHovered(true), [setHovered]);
|
|
41
|
-
const handleMouseLeave = (0, _react.useCallback)(() => setHovered(false), [setHovered]);
|
|
42
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
43
|
-
onMouseOver: handleMouseOver,
|
|
44
|
-
onMouseLeave: handleMouseLeave
|
|
45
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
46
|
-
label: translate('continue_learning'),
|
|
47
|
-
type: "primary",
|
|
48
|
-
customStyle: {
|
|
49
|
-
width: 'fit-content',
|
|
50
|
-
borderRadius: '12px',
|
|
51
|
-
backgroundColor: hovered ? (0, _cssColorFunction.convert)(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`) : primarySkinColor
|
|
52
|
-
},
|
|
53
|
-
icon: {
|
|
54
|
-
position: 'left',
|
|
55
|
-
faIcon: {
|
|
56
|
-
name: 'play',
|
|
57
|
-
color: '#FFFFFF',
|
|
58
|
-
size: 16
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
onClick: onClick
|
|
62
|
-
}));
|
|
63
|
-
};
|
|
64
|
-
|
|
65
|
-
ContinueLearningButton.contextTypes = {
|
|
66
|
-
skin: _provider.default.childContextTypes.skin,
|
|
67
|
-
translate: _provider.default.childContextTypes.translate
|
|
68
|
-
};
|
|
69
|
-
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
70
|
-
onClick: _propTypes.default.func
|
|
71
|
-
} : {};
|
|
72
|
-
|
|
73
|
-
const SkillDetail = (props, context) => {
|
|
74
|
-
const {
|
|
75
|
-
title,
|
|
76
|
-
description,
|
|
77
|
-
metrics,
|
|
78
|
-
focused,
|
|
79
|
-
availableForReview,
|
|
80
|
-
ongoingCourses,
|
|
81
|
-
skillIncludedCourses,
|
|
82
|
-
onBackClick,
|
|
83
|
-
onReviewClick,
|
|
84
|
-
onContinueLearningClick,
|
|
85
|
-
onCourseClick
|
|
86
|
-
} = props;
|
|
87
|
-
const {
|
|
88
|
-
score,
|
|
89
|
-
content,
|
|
90
|
-
questionsToReview,
|
|
91
|
-
contentCompleted = 0
|
|
92
|
-
} = metrics;
|
|
93
|
-
const {
|
|
94
|
-
skin,
|
|
95
|
-
translate
|
|
96
|
-
} = context;
|
|
97
|
-
const [showMore, setShowMore] = (0, _react.useState)(false);
|
|
98
|
-
const handleShowMore = (0, _react.useCallback)(() => setShowMore(!showMore), [setShowMore, showMore]);
|
|
99
|
-
const Description = (0, _react.useCallback)(() => {
|
|
100
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
101
|
-
className: (0, _classnames.default)(_style.default.description, !showMore && _style.default.truncate)
|
|
102
|
-
}, description);
|
|
103
|
-
});
|
|
104
|
-
const ProgressBar = (0, _react.useCallback)(() => {
|
|
105
|
-
if (score === undefined) return null;
|
|
106
|
-
const progressBarColor = '#3EC483';
|
|
107
|
-
const inlineProgressValueStyle = {
|
|
108
|
-
backgroundColor: progressBarColor,
|
|
109
|
-
width: `${score}%`
|
|
110
|
-
};
|
|
111
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
112
|
-
className: _style.default.progressBarWrapper
|
|
113
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
-
"data-name": "progress",
|
|
115
|
-
className: _style.default.progress,
|
|
116
|
-
style: inlineProgressValueStyle,
|
|
117
|
-
role: "progressbar"
|
|
118
|
-
}));
|
|
119
|
-
}, [score]);
|
|
120
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
-
className: _style.default.backgroundContainer
|
|
122
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
123
|
-
className: _style.default.container
|
|
124
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
125
|
-
className: _style.default.backButtonWrapper,
|
|
126
|
-
onClick: onBackClick
|
|
127
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
128
|
-
iconName: "arrow-left",
|
|
129
|
-
size: {
|
|
130
|
-
faSize: 14,
|
|
131
|
-
wrapperSize: 14
|
|
132
|
-
}
|
|
133
|
-
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
134
|
-
className: _style.default.ctaContainer
|
|
135
|
-
}, focused ? /*#__PURE__*/_react.default.createElement("div", {
|
|
136
|
-
className: _style.default.skillFocusBadge
|
|
137
|
-
}, /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
138
|
-
iconName: "bullseye-arrow",
|
|
139
|
-
backgroundColor: "#DDD1FF",
|
|
140
|
-
size: {
|
|
141
|
-
faSize: 10,
|
|
142
|
-
wrapperSize: 16
|
|
143
|
-
}
|
|
144
|
-
}), translate('skill_focus')) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
145
|
-
className: _style.default.ctaWrapper
|
|
146
|
-
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
147
|
-
type: "secondary",
|
|
148
|
-
onClick: onReviewClick,
|
|
149
|
-
label: translate('review_this_skill'),
|
|
150
|
-
disabled: !availableForReview,
|
|
151
|
-
customStyle: {
|
|
152
|
-
width: 'fit-content',
|
|
153
|
-
borderRadius: '12px'
|
|
154
|
-
}
|
|
155
|
-
}), /*#__PURE__*/_react.default.createElement(ContinueLearningButton, {
|
|
156
|
-
onClick: onContinueLearningClick
|
|
157
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
158
|
-
className: _style.default.title
|
|
159
|
-
}, title), description ? /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(Description, null), description.length >= 226 ? /*#__PURE__*/_react.default.createElement("div", {
|
|
160
|
-
className: _style.default.showMoreWrapper,
|
|
161
|
-
onClick: handleShowMore
|
|
162
|
-
}, showMore ? translate('Show less') : translate('Show more'), /*#__PURE__*/_react.default.createElement(_icon.default, {
|
|
163
|
-
iconName: showMore ? "chevron-up" : "chevron-down",
|
|
164
|
-
size: {
|
|
165
|
-
faSize: 14,
|
|
166
|
-
wrapperSize: 16
|
|
167
|
-
}
|
|
168
|
-
})) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
169
|
-
className: _style.default.progressInformationsWrapper
|
|
170
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
171
|
-
className: _style.default.progressTitle
|
|
172
|
-
}, translate('your_progress')), /*#__PURE__*/_react.default.createElement("div", {
|
|
173
|
-
className: _style.default.skillCoursesAndQuestionsWrapper
|
|
174
|
-
}, content ? /*#__PURE__*/_react.default.createElement("div", {
|
|
175
|
-
className: _style.default.skillInformation,
|
|
176
|
-
"data-name": "skill-courses"
|
|
177
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
178
|
-
className: _style.default.skillInformationNumber
|
|
179
|
-
}, content), " ", translate('courses')) : null, questionsToReview ? /*#__PURE__*/_react.default.createElement("div", {
|
|
180
|
-
className: _style.default.skillInformation,
|
|
181
|
-
"data-name": "skill-questions"
|
|
182
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
183
|
-
className: _style.default.skillInformationNumber
|
|
184
|
-
}, questionsToReview), "\xA0", translate('questions')) : null), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
185
|
-
className: _style.default.progressInformations
|
|
186
|
-
}, content && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
187
|
-
className: _style.default.progressInformation,
|
|
188
|
-
"data-name": "skill-completed-courses"
|
|
189
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
190
|
-
className: _style.default.progressInformationNumber
|
|
191
|
-
}, contentCompleted), ` ${translate('courses_completed')}`), /*#__PURE__*/_react.default.createElement("div", {
|
|
192
|
-
className: _style.default.progressInformation,
|
|
193
|
-
"data-name": "completed-percentage"
|
|
194
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
195
|
-
className: _style.default.progressInformationNumber
|
|
196
|
-
}, score, "%"))))), /*#__PURE__*/_react.default.createElement(ContinueLearning, {
|
|
197
|
-
ongoingCourses: ongoingCourses,
|
|
198
|
-
onCourseClick: onCourseClick
|
|
199
|
-
})));
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
SkillDetail.contextTypes = {
|
|
203
|
-
skin: _provider.default.childContextTypes.skin,
|
|
204
|
-
translate: _provider.default.childContextTypes.translate
|
|
205
|
-
};
|
|
206
|
-
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
207
|
-
title: _propTypes.default.string.isRequired,
|
|
208
|
-
description: _propTypes.default.string,
|
|
209
|
-
metrics: _propTypes.default.shape({
|
|
210
|
-
score: _propTypes.default.number,
|
|
211
|
-
content: _propTypes.default.number,
|
|
212
|
-
questionsToReview: _propTypes.default.number,
|
|
213
|
-
contentCompleted: _propTypes.default.number
|
|
214
|
-
}),
|
|
215
|
-
focused: _propTypes.default.bool,
|
|
216
|
-
availableForReview: _propTypes.default.bool,
|
|
217
|
-
ongoingCourses: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
218
|
-
title: _propTypes.default.string,
|
|
219
|
-
provider: _propTypes.default.string,
|
|
220
|
-
progress: _propTypes.default.number
|
|
221
|
-
})),
|
|
222
|
-
skillIncludedCourses: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
223
|
-
title: _propTypes.default.string,
|
|
224
|
-
type: _propTypes.default.string,
|
|
225
|
-
provider: _propTypes.default.string,
|
|
226
|
-
progress: _propTypes.default.number
|
|
227
|
-
})),
|
|
228
|
-
onBackClick: _propTypes.default.func,
|
|
229
|
-
onReviewClick: _propTypes.default.func,
|
|
230
|
-
onContinueLearningClick: _propTypes.default.func,
|
|
231
|
-
onCourseClick: _propTypes.default.func
|
|
232
|
-
} : {};
|
|
233
|
-
var _default = SkillDetail;
|
|
234
|
-
exports.default = _default;
|
|
235
|
-
|
|
236
|
-
const ContinueLearning = (props, context) => {
|
|
237
|
-
const {
|
|
238
|
-
ongoingCourses,
|
|
239
|
-
onCourseClick
|
|
240
|
-
} = props;
|
|
241
|
-
const {
|
|
242
|
-
skin,
|
|
243
|
-
translate
|
|
244
|
-
} = context;
|
|
245
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
246
|
-
className: _style.default.continueLearningWrapper
|
|
247
|
-
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
248
|
-
className: _style.default.continueLearningTitle
|
|
249
|
-
}, translate('continue_learning')), /*#__PURE__*/_react.default.createElement("span", {
|
|
250
|
-
className: _style.default.continueLearningNumber
|
|
251
|
-
}, ongoingCourses.length));
|
|
252
|
-
};
|
|
253
|
-
|
|
254
|
-
ContinueLearning.contextTypes = {
|
|
255
|
-
skin: _provider.default.childContextTypes.skin,
|
|
256
|
-
translate: _provider.default.childContextTypes.translate
|
|
257
|
-
};
|
|
258
|
-
ContinueLearning.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
259
|
-
ongoingCourses: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
260
|
-
title: _propTypes.default.string,
|
|
261
|
-
provider: _propTypes.default.string,
|
|
262
|
-
progress: _propTypes.default.number
|
|
263
|
-
})),
|
|
264
|
-
onCourseClick: _propTypes.default.func
|
|
265
|
-
} : {};
|
|
266
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ContinueLearningButton","props","context","hovered","setHovered","useState","onClick","skin","translate","primarySkinColor","handleMouseOver","useCallback","handleMouseLeave","width","borderRadius","backgroundColor","convert","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","func","SkillDetail","title","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","onBackClick","onReviewClick","onContinueLearningClick","onCourseClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","ctaWrapper","length","showMoreWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","bool","arrayOf","provider","type","ContinueLearning","continueLearningWrapper","continueLearningTitle","continueLearningNumber"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport style from './style.css';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n return (\n <div onMouseOver={handleMouseOver} onMouseLeave={handleMouseLeave}>\n <ButtonLink\n label={translate('continue_learning')}\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: hovered\n ? convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)\n : primarySkinColor\n }}\n icon={{\n position: 'left',\n faIcon: {\n name: 'play',\n color: '#FFFFFF',\n size: 16\n }\n }}\n onClick={onClick}\n />\n </div>\n );\n};\n\nContinueLearningButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearningButton.propTypes = {\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n description,\n metrics,\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n onBackClick,\n onReviewClick,\n onContinueLearningClick,\n onCourseClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n\n const [showMore, setShowMore] = useState(false);\n\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 });\n\n const ProgressBar = useCallback(() => {\n if (score === undefined) return null;\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressBarWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n />\n </div>\n );\n }, [score]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container}>\n <div className={style.backButtonWrapper} onClick={onBackClick}>\n <Icon\n iconName=\"arrow-left\"\n size={{\n faSize: 14,\n wrapperSize: 14\n }}\n />\n </div>\n <div className={style.ctaContainer}>\n {focused ? (\n <div className={style.skillFocusBadge}>\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 10,\n wrapperSize: 16\n }}\n />\n {translate('skill_focus')}\n </div>\n ) : null}\n\n <div className={style.ctaWrapper}>\n <ButtonLink\n type=\"secondary\"\n onClick={onReviewClick}\n label={translate('review_this_skill')}\n disabled={!availableForReview}\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px'\n }}\n />\n <ContinueLearningButton onClick={onContinueLearningClick} />\n </div>\n </div>\n <div className={style.title}>{title}</div>\n {description ? \n <>\n <Description />\n {description.length >= 226 ? \n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {showMore ? translate('Show less') : translate('Show more')}\n <Icon\n iconName={showMore ? \"chevron-up\" : \"chevron-down\"}\n size={{\n faSize: 14,\n wrapperSize: 16\n }}\n />\n </div> : null}\n </> \n : null}\n <div className={style.progressInformationsWrapper}>\n <div className={style.progressTitle}>{translate('your_progress')}</div>\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {translate('courses')}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {translate('questions')}\n </div>\n ) : null}\n </div>\n <ProgressBar />\n <div className={style.progressInformations}>\n {content && (\n <>\n <div className={style.progressInformation} data-name=\"skill-completed-courses\">\n <span className={style.progressInformationNumber}>{contentCompleted}</span>\n {` ${translate('courses_completed')}`}\n </div>\n <div className={style.progressInformation} data-name=\"completed-percentage\">\n <span className={style.progressInformationNumber}>{score}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n <ContinueLearning ongoingCourses={ongoingCourses} onCourseClick={onCourseClick} />\n </div>\n </div>\n );\n};\n\nSkillDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nSkillDetail.propTypes = {\n title: PropTypes.string.isRequired,\n description: PropTypes.string,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n focused: PropTypes.bool,\n availableForReview: PropTypes.bool,\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n skillIncludedCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n type: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n onCourseClick: PropTypes.func\n};\n\nexport default SkillDetail;\n\nconst ContinueLearning = (props, context) => {\n const {\n ongoingCourses,\n onCourseClick\n } = props;\n const {skin, translate} = context;\n\n return (\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('continue_learning')}</span>\n <span className={style.continueLearningNumber}>\n {ongoingCourses.length}\n </span>\n </div>\n )\n}\n\nContinueLearning.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nContinueLearning.propTypes = {\n ongoingCourses: PropTypes.arrayOf(\n PropTypes.shape({\n title: PropTypes.string,\n provider: PropTypes.string,\n progress: PropTypes.number\n })\n ),\n onCourseClick: PropTypes.func\n};\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwB,IAAAC,eAAA,EAAS,KAAT,CAA9B;EACA,MAAM;IAACC;EAAD,IAAYL,KAAlB;EACA,MAAM;IAACM,IAAD;IAAOC;EAAP,IAAoBN,OAA1B;EACA,MAAMO,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;EAEA,MAAMG,eAAe,GAAG,IAAAC,kBAAA,EAAY,MAAMP,UAAU,CAAC,IAAD,CAA5B,EAAoC,CAACA,UAAD,CAApC,CAAxB;EAEA,MAAMQ,gBAAgB,GAAG,IAAAD,kBAAA,EAAY,MAAMP,UAAU,CAAC,KAAD,CAA5B,EAAqC,CAACA,UAAD,CAArC,CAAzB;EAEA,oBACE;IAAK,WAAW,EAAEM,eAAlB;IAAmC,YAAY,EAAEE;EAAjD,gBACE,6BAAC,mBAAD;IACE,KAAK,EAAEJ,SAAS,CAAC,mBAAD,CADlB;IAEE,IAAI,EAAC,SAFP;IAGE,WAAW,EAAE;MAC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EAAEyC,cAAA,CAAMqC;EAAvB,GACGpD,cAAc,CAAC+B,MADlB,CAFF,CADF;AAQD,CAfD;;AAiBAkB,gBAAgB,CAAC7D,YAAjB,GAAgC;EAC9Bf,IAAI,EAAEgB,iBAAA,CAASC,iBAAT,CAA2BjB,IADH;EAE9BC,SAAS,EAAEe,iBAAA,CAASC,iBAAT,CAA2BhB;AAFR,CAAhC;AAKA2E,gBAAgB,CAAC1D,SAAjB,2CAA6B;EAC3BS,cAAc,EAAER,kBAAA,CAAUsD,OAAV,CACdtD,kBAAA,CAAUmD,KAAV,CAAgB;IACdhD,KAAK,EAAEH,kBAAA,CAAUiD,MADH;IAEdM,QAAQ,EAAEvD,kBAAA,CAAUiD,MAFN;IAGdnB,QAAQ,EAAE9B,kBAAA,CAAUoD;EAHN,CAAhB,CADc,CADW;EAQ3BvC,aAAa,EAAEb,kBAAA,CAAUC;AARE,CAA7B"}
|
|
@@ -1,172 +0,0 @@
|
|
|
1
|
-
@value colors: "../../variables/colors.css";
|
|
2
|
-
@value xtraLightGrey from colors;
|
|
3
|
-
@value cm_grey_100 from colors;
|
|
4
|
-
@value cm_grey_400 from colors;
|
|
5
|
-
|
|
6
|
-
.textBase {
|
|
7
|
-
font-family: "Gilroy";
|
|
8
|
-
font-style: normal;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
.backgroundContainer {
|
|
12
|
-
background-color: white;
|
|
13
|
-
min-height: 100%;
|
|
14
|
-
width: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
.container {
|
|
18
|
-
composes: textBase;
|
|
19
|
-
background-color: white;
|
|
20
|
-
font-family: "Gilroy";
|
|
21
|
-
font-style: normal;
|
|
22
|
-
margin-top: 48px;
|
|
23
|
-
margin-bottom: 48px;
|
|
24
|
-
margin-left: auto;
|
|
25
|
-
margin-right: auto;
|
|
26
|
-
padding: 0 16px;
|
|
27
|
-
position: relative;
|
|
28
|
-
box-sizing: border-box;
|
|
29
|
-
min-height: 100%;
|
|
30
|
-
width: 100%;
|
|
31
|
-
max-width: calc(1080px + 32px);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.backButtonWrapper {
|
|
35
|
-
margin-bottom: 16px;
|
|
36
|
-
background-color: cm_grey_100;
|
|
37
|
-
border-radius: 8px;
|
|
38
|
-
width: fit-content;
|
|
39
|
-
padding: 8px;
|
|
40
|
-
cursor: pointer;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ctaContainer {
|
|
44
|
-
display: flex;
|
|
45
|
-
width: 100%;
|
|
46
|
-
justify-content: space-between;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.skillFocusBadge {
|
|
50
|
-
display: flex;
|
|
51
|
-
height: 12px;
|
|
52
|
-
width: fit-content;
|
|
53
|
-
align-items: center;
|
|
54
|
-
background-color: #DDD1FF;
|
|
55
|
-
border-radius: 24px;
|
|
56
|
-
padding: 4px 8px;
|
|
57
|
-
font-size: 12px;
|
|
58
|
-
line-height: 16px;
|
|
59
|
-
font-weight: 600;
|
|
60
|
-
color: #3900D6;
|
|
61
|
-
margin-right: 8px;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
.ctaWrapper,
|
|
65
|
-
.showMoreWrapper {
|
|
66
|
-
display: flex;
|
|
67
|
-
gap: 8px;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
.showMoreWrapper {
|
|
71
|
-
align-items: center;
|
|
72
|
-
margin-top: 8px;
|
|
73
|
-
font-weight: 600;
|
|
74
|
-
cursor: pointer;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.title {
|
|
78
|
-
font-size: 24px;
|
|
79
|
-
font-weight: 700;
|
|
80
|
-
line-height: 32px;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
.description {
|
|
84
|
-
margin-top: 8px;
|
|
85
|
-
max-width: 734px;
|
|
86
|
-
font-size: 14px;
|
|
87
|
-
font-weight: 500;
|
|
88
|
-
line-height: 20px;
|
|
89
|
-
color: cm_grey_400;
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
.truncate {
|
|
93
|
-
display: -webkit-box;
|
|
94
|
-
-webkit-line-clamp: 2;
|
|
95
|
-
-webkit-box-orient: vertical;
|
|
96
|
-
overflow: hidden;
|
|
97
|
-
text-overflow: ellipsis;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.progressInformationsWrapper {
|
|
101
|
-
margin-top: 40px;
|
|
102
|
-
background-color: xtraLightGrey;
|
|
103
|
-
border-radius: 16px;
|
|
104
|
-
padding: 24px;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
.progressTitle {
|
|
108
|
-
font-size: 16px;
|
|
109
|
-
font-weight: 600;
|
|
110
|
-
line-height: 22px;
|
|
111
|
-
margin-bottom: 16px;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
.skillCoursesAndQuestionsWrapper,
|
|
115
|
-
.progressInformations {
|
|
116
|
-
display: flex;
|
|
117
|
-
justify-content: space-between;
|
|
118
|
-
margin-bottom: 8px;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
.skillInformation,
|
|
122
|
-
.progressInformation {
|
|
123
|
-
composes: textBase;
|
|
124
|
-
font-weight: 600;
|
|
125
|
-
font-size: 14px;
|
|
126
|
-
line-height: 20px;
|
|
127
|
-
color: cm_grey_400;
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
.skillInformationNumber,
|
|
131
|
-
.progressInformationNumber {
|
|
132
|
-
color: #000;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
.progressBarWrapper {
|
|
136
|
-
position: relative;
|
|
137
|
-
left: 0;
|
|
138
|
-
width: 100%;
|
|
139
|
-
height: 4px;
|
|
140
|
-
border-radius: 2px;
|
|
141
|
-
overflow: hidden;
|
|
142
|
-
background-color: cm_grey_100;
|
|
143
|
-
margin: 16px 0;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.progress {
|
|
147
|
-
display: block;
|
|
148
|
-
height: 8px;
|
|
149
|
-
animation: progressbar 2s ease-in-out;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
/* Continue Learning */
|
|
153
|
-
.continueLearningWrapper {
|
|
154
|
-
margin-top: 40px;
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
.continueLearningTitle {
|
|
158
|
-
font-size: 16px;
|
|
159
|
-
font-weight: 600;
|
|
160
|
-
line-height: 22px;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
.continueLearningNumber {
|
|
164
|
-
border-radius: 50%;
|
|
165
|
-
background-color: #EAEAEB;
|
|
166
|
-
color: #515161;
|
|
167
|
-
padding: 2px 4px;
|
|
168
|
-
margin-left: 8px;
|
|
169
|
-
font-size: 10px;
|
|
170
|
-
font-weight: 600;
|
|
171
|
-
line-height: 12px;
|
|
172
|
-
}
|