@coorpacademy/components 11.32.10 → 11.32.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/molecule/discipline-associated-skills/index.js +9 -9
- package/es/molecule/discipline-associated-skills/index.js.map +1 -1
- package/es/molecule/discipline-associated-skills/style.css +7 -2
- package/es/molecule/discipline-header/index.js +1 -1
- package/es/molecule/discipline-header/index.js.map +1 -1
- package/es/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/es/molecule/learner-skill-card/index.js +2 -1
- package/es/molecule/learner-skill-card/index.js.map +1 -1
- package/es/molecule/learner-skill-card/style.css +1 -0
- package/es/template/skill-detail/index.d.ts +57 -0
- package/es/template/skill-detail/index.d.ts.map +1 -0
- package/es/template/skill-detail/index.js +248 -0
- package/es/template/skill-detail/index.js.map +1 -0
- package/es/template/skill-detail/style.css +172 -0
- package/lib/molecule/discipline-associated-skills/index.js +9 -9
- package/lib/molecule/discipline-associated-skills/index.js.map +1 -1
- package/lib/molecule/discipline-associated-skills/style.css +7 -2
- package/lib/molecule/discipline-header/index.js +1 -1
- package/lib/molecule/discipline-header/index.js.map +1 -1
- package/lib/molecule/learner-skill-card/index.d.ts.map +1 -1
- package/lib/molecule/learner-skill-card/index.js +2 -1
- package/lib/molecule/learner-skill-card/index.js.map +1 -1
- package/lib/molecule/learner-skill-card/style.css +1 -0
- package/lib/template/skill-detail/index.d.ts +57 -0
- package/lib/template/skill-detail/index.d.ts.map +1 -0
- package/lib/template/skill-detail/index.js +266 -0
- package/lib/template/skill-detail/index.js.map +1 -0
- package/lib/template/skill-detail/style.css +172 -0
- package/package.json +3 -2
- package/es/stories/Configure.mdx +0 -364
- package/es/stories/assets/accessibility.png +0 -0
- package/es/stories/assets/accessibility.svg +0 -5
- package/es/stories/assets/addon-library.png +0 -0
- package/es/stories/assets/assets.png +0 -0
- package/es/stories/assets/avif-test-image.avif +0 -0
- package/es/stories/assets/context.png +0 -0
- package/es/stories/assets/discord.svg +0 -15
- package/es/stories/assets/docs.png +0 -0
- package/es/stories/assets/figma-plugin.png +0 -0
- package/es/stories/assets/github.svg +0 -3
- package/es/stories/assets/share.png +0 -0
- package/es/stories/assets/styling.png +0 -0
- package/es/stories/assets/testing.png +0 -0
- package/es/stories/assets/theming.png +0 -0
- package/es/stories/assets/tutorials.svg +0 -12
- package/es/stories/assets/youtube.svg +0 -4
- package/es/stories/button.css +0 -30
- package/es/stories/header.css +0 -32
- package/es/stories/page.css +0 -69
- package/lib/stories/Configure.mdx +0 -364
- package/lib/stories/assets/accessibility.png +0 -0
- package/lib/stories/assets/accessibility.svg +0 -5
- package/lib/stories/assets/addon-library.png +0 -0
- package/lib/stories/assets/assets.png +0 -0
- package/lib/stories/assets/avif-test-image.avif +0 -0
- package/lib/stories/assets/context.png +0 -0
- package/lib/stories/assets/discord.svg +0 -15
- package/lib/stories/assets/docs.png +0 -0
- package/lib/stories/assets/figma-plugin.png +0 -0
- package/lib/stories/assets/github.svg +0 -3
- package/lib/stories/assets/share.png +0 -0
- package/lib/stories/assets/styling.png +0 -0
- package/lib/stories/assets/testing.png +0 -0
- package/lib/stories/assets/theming.png +0 -0
- package/lib/stories/assets/tutorials.svg +0 -12
- package/lib/stories/assets/youtube.svg +0 -4
- package/lib/stories/button.css +0 -30
- package/lib/stories/header.css +0 -32
- package/lib/stories/page.css +0 -69
|
@@ -19,19 +19,19 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
19
19
|
} = props;
|
|
20
20
|
const AnchorElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
|
|
21
21
|
className: style.chipFocusedContent
|
|
22
|
-
}, /*#__PURE__*/React.createElement(Icon, {
|
|
22
|
+
}, skill.focused ? /*#__PURE__*/React.createElement(Icon, {
|
|
23
23
|
iconName: "bullseye-arrow",
|
|
24
24
|
backgroundColor: "#DDD1FF",
|
|
25
25
|
size: {
|
|
26
26
|
faSize: 12,
|
|
27
27
|
wrapperSize: 12
|
|
28
28
|
}
|
|
29
|
-
}), /*#__PURE__*/React.createElement("div", {
|
|
29
|
+
}) : null, /*#__PURE__*/React.createElement("div", {
|
|
30
30
|
className: style.chipFocusedContentText
|
|
31
|
-
}, skill)), []);
|
|
31
|
+
}, skill.locale)), []);
|
|
32
32
|
const TooltipContentElement = useCallback(skill => /*#__PURE__*/React.createElement("div", {
|
|
33
33
|
className: style.tooltipContentWrapper
|
|
34
|
-
}, /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, translate('skill_focused_chip_tooltip'))), /*#__PURE__*/React.createElement("div", null, skill)), []);
|
|
34
|
+
}, skill.focused ? /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("b", null, translate('skill_focused_chip_tooltip'))) : null, /*#__PURE__*/React.createElement("div", null, skill.locale)), []);
|
|
35
35
|
return !_isEmpty(skills) ? /*#__PURE__*/React.createElement("div", {
|
|
36
36
|
"data-name": "discipline-associated-skills",
|
|
37
37
|
className: style.associatedSkillsWrapper
|
|
@@ -45,26 +45,26 @@ const DisciplineAssociatedSkills = (props, context) => {
|
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
function handleAnchorElement() {
|
|
48
|
-
return AnchorElement(skill
|
|
48
|
+
return AnchorElement(skill);
|
|
49
49
|
}
|
|
50
50
|
|
|
51
51
|
function handleTooltipContentElement() {
|
|
52
|
-
return TooltipContentElement(skill
|
|
52
|
+
return TooltipContentElement(skill);
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
return /*#__PURE__*/React.createElement("div", {
|
|
56
56
|
key: _uniqueId(),
|
|
57
57
|
className: classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused),
|
|
58
58
|
onClick: handleSkillClick
|
|
59
|
-
},
|
|
59
|
+
}, /*#__PURE__*/React.createElement(ToolTip, {
|
|
60
60
|
AnchorElement: handleAnchorElement,
|
|
61
61
|
fontSize: 12,
|
|
62
62
|
delayHide: 0,
|
|
63
63
|
iconContainerClassName: style.infoIconTooltip,
|
|
64
|
-
tooltipClassName: style.tooltip,
|
|
64
|
+
tooltipClassName: skill.focused ? style.tooltipSkillFocused : style.tooltip,
|
|
65
65
|
TooltipContent: handleTooltipContentElement,
|
|
66
66
|
closeToolTipInformationTextAriaLabel: translate('close_tooltip_information')
|
|
67
|
-
})
|
|
67
|
+
}));
|
|
68
68
|
})))) : null;
|
|
69
69
|
};
|
|
70
70
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","skill","chipFocusedContent","faSize","wrapperSize","chipFocusedContentText","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","PropTypes","classnames","Icon","ToolTip","Provider","CatalogSection","style","DisciplineAssociatedSkills","props","context","translate","skills","onSkillClick","AnchorElement","skill","chipFocusedContent","focused","faSize","wrapperSize","chipFocusedContentText","locale","TooltipContentElement","tooltipContentWrapper","associatedSkillsWrapper","chipsWrapper","map","handleSkillClick","ref","handleAnchorElement","handleTooltipContentElement","chipWrapper","chipWrapperFocused","infoIconTooltip","tooltipSkillFocused","tooltip","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","bool","func"],"sources":["../../../src/molecule/discipline-associated-skills/index.js"],"sourcesContent":["import React, {useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {isEmpty, uniqueId} from 'lodash/fp';\nimport Icon from '../../atom/icon';\nimport ToolTip from '../../atom/tooltip';\nimport Provider from '../../atom/provider';\nimport CatalogSection from '../../atom/catalog-section';\nimport style from './style.css';\n\nconst DisciplineAssociatedSkills = (props, context) => {\n const {translate} = context;\n\n const {skills = [], onSkillClick} = props;\n\n const AnchorElement = useCallback(\n skill => (\n <div className={style.chipFocusedContent}>\n {skill.focused ? (\n <Icon\n iconName=\"bullseye-arrow\"\n backgroundColor=\"#DDD1FF\"\n size={{\n faSize: 12,\n wrapperSize: 12\n }}\n />\n ) : null}\n <div className={style.chipFocusedContentText}>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n const TooltipContentElement = useCallback(\n skill => (\n <div className={style.tooltipContentWrapper}>\n {skill.focused ? (\n <div>\n <b>{translate('skill_focused_chip_tooltip')}</b>\n </div>\n ) : null}\n <div>{skill.locale}</div>\n </div>\n ),\n []\n );\n\n return !isEmpty(skills) ? (\n <div data-name=\"discipline-associated-skills\" className={style.associatedSkillsWrapper}>\n <CatalogSection title={translate('associated_skills')}>\n <div className={style.chipsWrapper}>\n {skills.map(skill => {\n function handleSkillClick() {\n return onSkillClick(skill.ref);\n }\n function handleAnchorElement() {\n return AnchorElement(skill);\n }\n function handleTooltipContentElement() {\n return TooltipContentElement(skill);\n }\n return (\n <div\n key={uniqueId()}\n className={classnames(style.chipWrapper, skill.focused && style.chipWrapperFocused)}\n onClick={handleSkillClick}\n >\n <ToolTip\n AnchorElement={handleAnchorElement}\n fontSize={12}\n delayHide={0}\n iconContainerClassName={style.infoIconTooltip}\n tooltipClassName={skill.focused ? style.tooltipSkillFocused : style.tooltip}\n TooltipContent={handleTooltipContentElement}\n closeToolTipInformationTextAriaLabel={translate('close_tooltip_information')}\n />\n </div>\n );\n })}\n </div>\n </CatalogSection>\n </div>\n ) : null;\n};\n\nDisciplineAssociatedSkills.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nDisciplineAssociatedSkills.propTypes = {\n skills: PropTypes.arrayOf(\n PropTypes.shape({\n ref: PropTypes.string,\n locale: PropTypes.string,\n focused: PropTypes.bool\n })\n ),\n onSkillClick: PropTypes.func\n};\n\nexport default DisciplineAssociatedSkills;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,WAAf,QAAiC,OAAjC;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OA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
|
|
|
55
55
|
background-color: transparent;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
.tooltip
|
|
58
|
+
.tooltip,
|
|
59
|
+
.tooltipSkillFocused {
|
|
59
60
|
width: fit-content;
|
|
60
61
|
color: #FFF;
|
|
61
62
|
font-size: 12px;
|
|
62
63
|
font-style: normal;
|
|
63
64
|
line-height: 16px;
|
|
64
|
-
top: -
|
|
65
|
+
top: -48px;
|
|
65
66
|
|
|
66
67
|
p {
|
|
67
68
|
padding: 8px 8px;
|
|
@@ -69,6 +70,10 @@
|
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|
|
73
|
+
.tooltipSkillFocused {
|
|
74
|
+
top: -64px;
|
|
75
|
+
}
|
|
76
|
+
|
|
72
77
|
.tooltipContentWrapper {
|
|
73
78
|
padding: 8px 12px;
|
|
74
79
|
text-align: left;
|
|
@@ -76,7 +76,7 @@ class DisciplineHeader extends React.Component {
|
|
|
76
76
|
const {
|
|
77
77
|
translate
|
|
78
78
|
} = this.context;
|
|
79
|
-
const maxHeightCourseInfos =
|
|
79
|
+
const maxHeightCourseInfos = 210;
|
|
80
80
|
const hasMediaContent = image || video;
|
|
81
81
|
const toggleLabel = fullDisplay ? translate('See less') : translate('Show more');
|
|
82
82
|
const shortCourseText = scrollHeightShowMore <= maxHeightCourseInfos;
|
|
@@ -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(el) {\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 =
|
|
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(el) {\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}>\n <Preview image={image} video={video} />\n </div>\n ) : null}\n <div className={style.courseWrapper}>\n <div\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,i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ule/learner-skill-card/index.js"],"names":[],"mappings":";AASA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/learner-skill-card/index.js"],"names":[],"mappings":";AASA,yEAyJC"}
|
|
@@ -43,7 +43,8 @@ const LearnerSkillCard = (props, context) => {
|
|
|
43
43
|
const buttonReviewProps = {
|
|
44
44
|
customStyle: {
|
|
45
45
|
backgroundColor: '#FFF',
|
|
46
|
-
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'
|
|
46
|
+
transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',
|
|
47
|
+
padding: '0px'
|
|
47
48
|
},
|
|
48
49
|
disabled: !review,
|
|
49
50
|
onClick: onReviewClick,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","convert","PropTypes","Icon","ButtonLink","Provider","style","LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","focus","metrics","review","onReviewClick","onExploreClick","score","content","questionsToReview","contentCompleted","skin","translate","hovered","setHovered","primarySkinColor","reviewLocale","exploreLocale","coursesLocale","questionsLocale","skillFocusLocale","contentCompletedLocale","handleMouseOver","handleMouseLeave","buttonReviewProps","customStyle","backgroundColor","transition","disabled","onClick","label","buttonExploreProps","color","icon","position","faIcon","name","size","ProgressBar","progressBarColor","inlineProgressValueStyle","width","progressWrapper","progress","learnerSkillCardWrapper","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","faSize","wrapperSize","progressInformations","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","childContextTypes","propTypes","string","bool","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n focus = false,\n metrics,\n review = false,\n onReviewClick,\n onExploreClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n const [hovered, setHovered] = useState(false);\n const primarySkinColor = get('common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const coursesLocale = translate('courses');\n const questionsLocale = translate('questions');\n const skillFocusLocale = translate('skill_focus');\n const contentCompletedLocale = translate('courses_completed');\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n disabled: !review,\n onClick: onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n onClick: onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n size: 16\n }\n }\n };\n\n const ProgressBar = useCallback(() => {\n if (!content) return null;\n\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n aria-label={get('progression', ariaLabel)}\n />\n </div>\n );\n }, [score, ariaLabel, content]);\n\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {content || questionsToReview ? (\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {coursesLocale}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {questionsLocale}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n {focus ? (\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 {skillFocusLocale}\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 {` ${contentCompletedLocale}`}\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 className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div\n className={style.buttonWrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-name=\"button-explore-wrapper\"\n >\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n review: PropTypes.bool,\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJ,cAAcC,SADV;IAEJC,UAFI;IAGJC,cAHI;IAIJC,KAAK,GAAG,KAJJ;IAKJC,OALI;IAMJC,MAAM,GAAG,KANL;IAOJC,aAPI;IAQJC;EARI,IASFT,KATJ;EAUA,MAAM;IAACU,KAAD;IAAQC,OAAR;IAAiBC,iBAAjB;IAAoCC,gBAAgB,GAAG;EAAvD,IAA4DP,OAAlE;EACA,MAAM;IAACQ,IAAD;IAAOC;EAAP,IAAoBd,OAA1B;EACA,MAAM,CAACe,OAAD,EAAUC,UAAV,IAAwBzB,QAAQ,CAAC,KAAD,CAAtC;;EACA,MAAM0B,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBJ,IAAtB,CAAzB;;EAEA,MAAMK,YAAY,GAAGJ,SAAS,CAAC,QAAD,CAA9B;EACA,MAAMK,aAAa,GAAGL,SAAS,CAAC,SAAD,CAA/B;EACA,MAAMM,aAAa,GAAGN,SAAS,CAAC,SAAD,CAA/B;EACA,MAAMO,eAAe,GAAGP,SAAS,CAAC,WAAD,CAAjC;EACA,MAAMQ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;EAG3B3D,cAAc,EAAEV,SAAS,CAACqE,MAHC;EAI3B1D,KAAK,EAAEX,SAAS,CAACsE,IAJU;EAK3B1D,OAAO,EAAEZ,SAAS,CAACuE,KAAV,CAAgB;IACvBvD,KAAK,EAAEhB,SAAS,CAACwE,MADM;IAEvBvD,OAAO,EAAEjB,SAAS,CAACwE,MAFI;IAGvBtD,iBAAiB,EAAElB,SAAS,CAACwE,MAHN;IAIvBrD,gBAAgB,EAAEnB,SAAS,CAACwE;EAJL,CAAhB,CALkB;EAW3B3D,MAAM,EAAEb,SAAS,CAACsE,IAXS;EAY3BxD,aAAa,EAAEd,SAAS,CAACyE,IAZE;EAa3B1D,cAAc,EAAEf,SAAS,CAACyE;AAbC,CAA7B;AAgBA,eAAepE,gBAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","convert","PropTypes","Icon","ButtonLink","Provider","style","LearnerSkillCard","props","context","ariaLabel","skillTitle","skillAriaLabel","focus","metrics","review","onReviewClick","onExploreClick","score","content","questionsToReview","contentCompleted","skin","translate","hovered","setHovered","primarySkinColor","reviewLocale","exploreLocale","coursesLocale","questionsLocale","skillFocusLocale","contentCompletedLocale","handleMouseOver","handleMouseLeave","buttonReviewProps","customStyle","backgroundColor","transition","padding","disabled","onClick","label","buttonExploreProps","color","icon","position","faIcon","name","size","ProgressBar","progressBarColor","inlineProgressValueStyle","width","progressWrapper","progress","learnerSkillCardWrapper","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","skillTitleWrapper","skillFocusBadge","faSize","wrapperSize","progressInformations","progressInformation","progressInformationNumber","ctaWrapper","buttonWrapper","contextTypes","childContextTypes","propTypes","string","bool","shape","number","func"],"sources":["../../../src/molecule/learner-skill-card/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport {convert} from 'css-color-function';\nimport {get} from 'lodash/fp';\nimport PropTypes from 'prop-types';\nimport Icon from '../../atom/icon';\nimport ButtonLink from '../../atom/button-link';\nimport Provider from '../../atom/provider';\nimport style from './style.css';\n\nconst LearnerSkillCard = (props, context) => {\n const {\n 'aria-label': ariaLabel,\n skillTitle,\n skillAriaLabel,\n focus = false,\n metrics,\n review = false,\n onReviewClick,\n onExploreClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {skin, translate} = context;\n const [hovered, setHovered] = useState(false);\n const primarySkinColor = get('common.primary', skin);\n\n const reviewLocale = translate('Review');\n const exploreLocale = translate('Explore');\n const coursesLocale = translate('courses');\n const questionsLocale = translate('questions');\n const skillFocusLocale = translate('skill_focus');\n const contentCompletedLocale = translate('courses_completed');\n\n const handleMouseOver = useCallback(() => setHovered(true), [setHovered]);\n\n const handleMouseLeave = useCallback(() => setHovered(false), [setHovered]);\n\n const buttonReviewProps = {\n customStyle: {\n backgroundColor: '#FFF',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n padding: '0px'\n },\n disabled: !review,\n onClick: onReviewClick,\n 'aria-label': `${skillTitle}, ${reviewLocale}`,\n label: reviewLocale,\n 'data-name': 'learner-skill-card-review-button'\n };\n\n const buttonExploreProps = {\n customStyle: {\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out'\n },\n onClick: onExploreClick,\n 'aria-label': `${skillTitle}, ${exploreLocale}`,\n label: exploreLocale,\n 'data-name': 'learner-skill-card-explore-button',\n icon: {\n position: 'left',\n faIcon: {\n name: 'compass',\n backgroundColor: hovered ? primarySkinColor : convert(`color(${primarySkinColor} a(0.07))`),\n color: hovered ? '#FFFFFF' : primarySkinColor,\n size: 16\n }\n }\n };\n\n const ProgressBar = useCallback(() => {\n if (!content) return null;\n\n const progressBarColor = '#3EC483';\n const inlineProgressValueStyle = {\n backgroundColor: progressBarColor,\n width: `${score}%`\n };\n\n return (\n <div className={style.progressWrapper}>\n <div\n data-name=\"progress\"\n className={style.progress}\n style={inlineProgressValueStyle}\n role=\"progressbar\"\n aria-label={get('progression', ariaLabel)}\n />\n </div>\n );\n }, [score, ariaLabel, content]);\n\n return (\n <div\n className={style.learnerSkillCardWrapper}\n data-name=\"learner-skill-card-wrapper\"\n aria-label={ariaLabel}\n >\n {content || questionsToReview ? (\n <div className={style.skillCoursesAndQuestionsWrapper}>\n {content ? (\n <div className={style.skillInformation} data-name=\"skill-courses\">\n <span className={style.skillInformationNumber}>{content}</span> {coursesLocale}\n </div>\n ) : null}\n {questionsToReview ? (\n <div className={style.skillInformation} data-name=\"skill-questions\">\n <span className={style.skillInformationNumber}>{questionsToReview}</span>\n {questionsLocale}\n </div>\n ) : null}\n </div>\n ) : null}\n <div className={style.skillTitleWrapper}>\n <div\n data-name=\"skill-title\"\n className={style.skillTitle}\n aria-label={skillAriaLabel || skillTitle}\n >\n {skillTitle}\n </div>\n {focus ? (\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 {skillFocusLocale}\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 {` ${contentCompletedLocale}`}\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 className={style.ctaWrapper} data-name=\"cta-wrapper\">\n <ButtonLink {...buttonReviewProps} />\n <div\n className={style.buttonWrapper}\n onMouseOver={handleMouseOver}\n onMouseLeave={handleMouseLeave}\n data-name=\"button-explore-wrapper\"\n >\n <ButtonLink {...buttonExploreProps} />\n </div>\n </div>\n </div>\n );\n};\n\nLearnerSkillCard.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nLearnerSkillCard.propTypes = {\n 'aria-label': PropTypes.string,\n skillTitle: PropTypes.string,\n skillAriaLabel: PropTypes.string,\n focus: PropTypes.bool,\n metrics: PropTypes.shape({\n score: PropTypes.number,\n content: PropTypes.number,\n questionsToReview: PropTypes.number,\n contentCompleted: PropTypes.number\n }),\n review: PropTypes.bool,\n onReviewClick: PropTypes.func,\n onExploreClick: PropTypes.func\n};\n\nexport default LearnerSkillCard;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AAEA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,gBAAgB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC3C,MAAM;IACJ,cAAcC,SADV;IAEJC,UAFI;IAGJC,cAHI;IAIJC,KAAK,GAAG,KAJJ;IAKJC,OALI;IAMJC,MAAM,GAAG,KANL;IAOJC,aAPI;IAQJC;EARI,IASFT,KATJ;EAUA,MAAM;IAACU,KAAD;IAAQC,OAAR;IAAiBC,iBAAjB;IAAoCC,gBAAgB,GAAG;EAAvD,IAA4DP,OAAlE;EACA,MAAM;IAACQ,IAAD;IAAOC;EAAP,IAAoBd,OAA1B;EACA,MAAM,CAACe,OAAD,EAAUC,UAAV,IAAwBzB,QAAQ,CAAC,KAAD,CAAtC;;EACA,MAAM0B,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBJ,IAAtB,CAAzB;;EAEA,MAAMK,YAAY,GAAGJ,SAAS,CAAC,QAAD,CAA9B;EACA,MAAMK,aAAa,GAAGL,SAAS,CAAC,SAAD,CAA/B;EACA,MAAMM,aAAa,GAAGN,SAAS,CAAC,SAAD,CAA/B;EACA,MAAMO,eAAe,GAAGP,SAAS,CAAC,WAAD,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sE,MADG;EAE3B7D,UAAU,EAAET,SAAS,CAACsE,MAFK;EAG3B5D,cAAc,EAAEV,SAAS,CAACsE,MAHC;EAI3B3D,KAAK,EAAEX,SAAS,CAACuE,IAJU;EAK3B3D,OAAO,EAAEZ,SAAS,CAACwE,KAAV,CAAgB;IACvBxD,KAAK,EAAEhB,SAAS,CAACyE,MADM;IAEvBxD,OAAO,EAAEjB,SAAS,CAACyE,MAFI;IAGvBvD,iBAAiB,EAAElB,SAAS,CAACyE,MAHN;IAIvBtD,gBAAgB,EAAEnB,SAAS,CAACyE;EAJL,CAAhB,CALkB;EAW3B5D,MAAM,EAAEb,SAAS,CAACuE,IAXS;EAY3BzD,aAAa,EAAEd,SAAS,CAAC0E,IAZE;EAa3B3D,cAAc,EAAEf,SAAS,CAAC0E;AAbC,CAA7B;AAgBA,eAAerE,gBAAf"}
|
|
@@ -0,0 +1,57 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AAuDA,oEA6IC"}
|
|
@@ -0,0 +1,248 @@
|
|
|
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
|
|
@@ -0,0 +1 @@
|
|
|
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,gB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