@coorpacademy/components 11.32.12-alpha.4 → 11.32.12-alpha.5
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/template/skill-detail/all-courses.d.ts.map +1 -1
- package/es/template/skill-detail/all-courses.js +1 -0
- package/es/template/skill-detail/all-courses.js.map +1 -1
- package/es/template/skill-detail/index.d.ts +1 -0
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +11 -5
- package/es/template/skill-detail/index.js.map +1 -1
- package/lib/template/skill-detail/all-courses.d.ts.map +1 -1
- package/lib/template/skill-detail/all-courses.js +1 -0
- package/lib/template/skill-detail/all-courses.js.map +1 -1
- package/lib/template/skill-detail/index.d.ts +1 -0
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +11 -5
- package/lib/template/skill-detail/index.js.map +1 -1
- package/locales/en/global.json +1 -0
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AA2CA,
|
|
1
|
+
{"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AA2CA,mEAoHC"}
|
|
@@ -116,6 +116,7 @@ const AllCourses = (props, context) => {
|
|
|
116
116
|
})), /*#__PURE__*/React.createElement("div", {
|
|
117
117
|
className: style.sortSection
|
|
118
118
|
}, /*#__PURE__*/React.createElement(InputSwitch, {
|
|
119
|
+
id: 'show-completed-courses-switch',
|
|
119
120
|
type: "switch",
|
|
120
121
|
name: translate('show_completed'),
|
|
121
122
|
title: translate('show_completed'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-courses.js","names":["React","useState","useCallback","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","searchValueIncluded","InputSwitch","style","FilterButton","props","context","selected","filter","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","label","contextTypes","childContextTypes","translate","propTypes","bool","string","func","AllCourses","skillIncludedCourses","filters","sorting","options","onChange","list","showCompleted","setShowCompleted","searchValue","setSearchValue","searchResults","setSearchResults","sort","a","b","progressA","progress","progressB","sortView","undefined","handleSearch","value","skill","title","handleSearchReset","handleShowCompletedToggle","tempShowCompleted","continueLearningWrapper","continueLearningTitle","continueLearningNumber","length","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","filterWrapper","map","index","name","handleChange","filterButtonWrapper","divider","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","arrayOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './all-courses.css';\n\nconst FilterButton = (props, context) => {\n const {selected, filter, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label: filter,\n onClick,\n 'data-name': 'filter-type-course-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n selected: PropTypes.bool,\n filter: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {skillIncludedCourses, filters, sorting} = props;\n const {options, onChange} = filters;\n const {list} = skillIncludedCourses;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n const [searchResults, setSearchResults] = useState(\n list.sort((a, b) => {\n const progressA = a.progress ?? 0;\n const progressB = b.progress ?? 0;\n return progressB - progressA;\n })\n );\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(list.filter(skill => searchValueIncluded(skill.title, value)));\n },\n [list, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(list);\n }, [list, setSearchValue, setSearchResults]);\n\n const handleShowCompletedToggle = useCallback(() => {\n const tempShowCompleted = !showCompleted;\n setShowCompleted(tempShowCompleted);\n if (tempShowCompleted) {\n setSearchResults(list);\n handleSearchReset();\n } else {\n setSearchResults(searchResults.filter(skill => skill.progress === 0));\n }\n }, [searchResults, showCompleted, setShowCompleted]);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_courses')}</span>\n <span className={style.continueLearningNumber}>{skillIncludedCourses.list.length}</span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n </div>\n </div>\n <div className={style.filterWrapper}>\n {options.length > 2 && searchResults.length > 0\n ? options.map((filter, index) => {\n const {name, value, selected} = filter;\n\n function handleChange() {\n onChange(value);\n handleSearchReset();\n }\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton selected={selected} filter={name} onClick={handleChange} />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n })\n : null}\n </div>\n <div>\n {searchResults.length > 0 ? (\n <CardsGrid list={searchResults} justifyContent=\"left\" />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default AllCourses;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,UAAP,MAAuB,4BAAvB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,mBAAP,MAAgC,kCAAhC;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,KAAP,MAAkB,mBAAlB;;AAEA,MAAMC,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IAACC,QAAD;IAAWC,MAAX;IAAmBC;EAAnB,IAA8BJ,KAApC;EACA,MAAM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ErC,SAAS,CAAC+B,IADG;IAEvBK,OAAO,EAAEpC,SAAS,CAACiF,OAAV,CAAkBjF,SAAS,CAACgF,KAAV,CAAgB7E,qBAAhB,CAAlB;EAFc,CAAhB,CAFY;EAMrBgC,OAAO,EAAEnC,SAAS,CAACgF,KAAV,CAAgB9E,MAAM,CAAC0B,SAAvB;AANY,CAAvB;AASA,eAAeI,UAAf"}
|
|
1
|
+
{"version":3,"file":"all-courses.js","names":["React","useState","useCallback","PropTypes","Provider","Select","SelectOptionPropTypes","ButtonLink","SearchForm","CardsGrid","searchValueIncluded","InputSwitch","style","FilterButton","props","context","selected","filter","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","label","contextTypes","childContextTypes","translate","propTypes","bool","string","func","AllCourses","skillIncludedCourses","filters","sorting","options","onChange","list","showCompleted","setShowCompleted","searchValue","setSearchValue","searchResults","setSearchResults","sort","a","b","progressA","progress","progressB","sortView","undefined","handleSearch","value","skill","title","handleSearchReset","handleShowCompletedToggle","tempShowCompleted","continueLearningWrapper","continueLearningTitle","continueLearningNumber","length","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","filterWrapper","map","index","name","handleChange","filterButtonWrapper","divider","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","arrayOf"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './all-courses.css';\n\nconst FilterButton = (props, context) => {\n const {selected, filter, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label: filter,\n onClick,\n 'data-name': 'filter-type-course-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n selected: PropTypes.bool,\n filter: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {skillIncludedCourses, filters, sorting} = props;\n const {options, onChange} = filters;\n const {list} = skillIncludedCourses;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n const [searchResults, setSearchResults] = useState(\n list.sort((a, b) => {\n const progressA = a.progress ?? 0;\n const progressB = b.progress ?? 0;\n return progressB - progressA;\n })\n );\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(list.filter(skill => searchValueIncluded(skill.title, value)));\n },\n [list, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(list);\n }, [list, setSearchValue, setSearchResults]);\n\n const handleShowCompletedToggle = useCallback(() => {\n const tempShowCompleted = !showCompleted;\n setShowCompleted(tempShowCompleted);\n if (tempShowCompleted) {\n setSearchResults(list);\n handleSearchReset();\n } else {\n setSearchResults(searchResults.filter(skill => skill.progress === 0));\n }\n }, [searchResults, showCompleted, setShowCompleted]);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_courses')}</span>\n <span className={style.continueLearningNumber}>{skillIncludedCourses.list.length}</span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n </div>\n </div>\n <div className={style.filterWrapper}>\n {options.length > 2 && searchResults.length > 0\n ? options.map((filter, index) => {\n const {name, value, selected} = filter;\n\n function handleChange() {\n onChange(value);\n handleSearchReset();\n }\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton selected={selected} filter={name} onClick={handleChange} />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n })\n : null}\n </div>\n <div>\n {searchResults.length > 0 ? (\n <CardsGrid list={searchResults} justifyContent=\"left\" />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default AllCourses;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AAEA,OAAOC,QAAP,MAAqB,qBAArB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AAEtB;EAA7D,GACG9B,SAAS,CAAC,kCAAD,CADZ,CAPF,CAJJ,CAlDF,CADF;AAsED,CApHD;;AAsHAK,UAAU,CAACP,YAAX,GAA0B;EACxBT,IAAI,EAAEf,QAAQ,CAACyB,iBAAT,CAA2BV,IADT;EAExBW,SAAS,EAAE1B,QAAQ,CAACyB,iBAAT,CAA2BC;AAFd,CAA1B;AAKAK,UAAU,CAACJ,SAAX,2CAAuB;EACrBK,oBAAoB,EAAEjC,SAAS,CAACgF,KAAV,CAAgB1E,SAAS,CAACsB,SAA1B,CADD;EAErBM,OAAO,EAAElC,SAAS,CAACgF,KAAV,CAAgB;IACvB3C,QAAQ,EAAErC,SAAS,CAAC+B,IADG;IAEvBK,OAAO,EAAEpC,SAAS,CAACiF,OAAV,CAAkBjF,SAAS,CAACgF,KAAV,CAAgB7E,qBAAhB,CAAlB;EAFc,CAAhB,CAFY;EAMrBgC,OAAO,EAAEnC,SAAS,CAACgF,KAAV,CAAgB9E,MAAM,CAAC0B,SAAvB;AANY,CAAvB;AASA,eAAeI,UAAf"}
|
|
@@ -27,6 +27,7 @@ declare namespace SkillDetail {
|
|
|
27
27
|
}
|
|
28
28
|
namespace propTypes {
|
|
29
29
|
const title: PropTypes.Validator<string>;
|
|
30
|
+
const ref: PropTypes.Validator<string>;
|
|
30
31
|
const description: PropTypes.Requireable<string>;
|
|
31
32
|
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
33
|
score: PropTypes.Requireable<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AA4DA,oEAwJC"}
|
|
@@ -15,6 +15,7 @@ import ContinueLearning from './continue-learning';
|
|
|
15
15
|
const ContinueLearningButton = (props, context) => {
|
|
16
16
|
const [hovered, setHovered] = useState(false);
|
|
17
17
|
const {
|
|
18
|
+
ongoingCoursesAvailable,
|
|
18
19
|
onClick
|
|
19
20
|
} = props;
|
|
20
21
|
const {
|
|
@@ -30,7 +31,7 @@ const ContinueLearningButton = (props, context) => {
|
|
|
30
31
|
onMouseOver: handleMouseOver,
|
|
31
32
|
onMouseLeave: handleMouseLeave
|
|
32
33
|
}, /*#__PURE__*/React.createElement(ButtonLink, {
|
|
33
|
-
label: translate('continue_learning'),
|
|
34
|
+
label: ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning'),
|
|
34
35
|
type: "primary",
|
|
35
36
|
customStyle: {
|
|
36
37
|
width: 'fit-content',
|
|
@@ -54,14 +55,16 @@ ContinueLearningButton.contextTypes = {
|
|
|
54
55
|
translate: Provider.childContextTypes.translate
|
|
55
56
|
};
|
|
56
57
|
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
58
|
+
ongoingCoursesAvailable: PropTypes.bool,
|
|
57
59
|
onClick: PropTypes.func
|
|
58
60
|
} : {};
|
|
59
61
|
|
|
60
62
|
const SkillDetail = (props, context) => {
|
|
61
63
|
const {
|
|
62
64
|
title,
|
|
65
|
+
ref,
|
|
63
66
|
description,
|
|
64
|
-
metrics,
|
|
67
|
+
metrics = {},
|
|
65
68
|
focused,
|
|
66
69
|
availableForReview,
|
|
67
70
|
ongoingCourses,
|
|
@@ -107,7 +110,8 @@ const SkillDetail = (props, context) => {
|
|
|
107
110
|
return /*#__PURE__*/React.createElement("div", {
|
|
108
111
|
className: style.backgroundContainer
|
|
109
112
|
}, /*#__PURE__*/React.createElement("div", {
|
|
110
|
-
className: style.container
|
|
113
|
+
className: style.container,
|
|
114
|
+
"data-name": ref
|
|
111
115
|
}, /*#__PURE__*/React.createElement("div", {
|
|
112
116
|
className: style.backButtonWrapper,
|
|
113
117
|
onClick: onBackClick
|
|
@@ -151,8 +155,9 @@ const SkillDetail = (props, context) => {
|
|
|
151
155
|
borderRadius: '12px'
|
|
152
156
|
}
|
|
153
157
|
}), /*#__PURE__*/React.createElement(ContinueLearningButton, {
|
|
158
|
+
ongoingCoursesAvailable: !!ongoingCourses.list.length,
|
|
154
159
|
onClick: onContinueLearningClick
|
|
155
|
-
}))), /*#__PURE__*/React.createElement("div", {
|
|
160
|
+
}))), score !== undefined ? /*#__PURE__*/React.createElement("div", {
|
|
156
161
|
className: style.progressInformationsWrapper
|
|
157
162
|
}, /*#__PURE__*/React.createElement("div", {
|
|
158
163
|
className: style.progressTitle
|
|
@@ -180,7 +185,7 @@ const SkillDetail = (props, context) => {
|
|
|
180
185
|
"data-name": "completed-percentage"
|
|
181
186
|
}, /*#__PURE__*/React.createElement("span", {
|
|
182
187
|
className: style.progressInformationNumber
|
|
183
|
-
}, score, "%"))))), /*#__PURE__*/React.createElement(ContinueLearning, {
|
|
188
|
+
}, score, "%"))))) : null, /*#__PURE__*/React.createElement(ContinueLearning, {
|
|
184
189
|
ongoingCourses: ongoingCourses
|
|
185
190
|
}), /*#__PURE__*/React.createElement(AllCourses, {
|
|
186
191
|
skillIncludedCourses: skillIncludedCourses,
|
|
@@ -195,6 +200,7 @@ SkillDetail.contextTypes = {
|
|
|
195
200
|
};
|
|
196
201
|
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
197
202
|
title: PropTypes.string.isRequired,
|
|
203
|
+
ref: PropTypes.string.isRequired,
|
|
198
204
|
description: PropTypes.string,
|
|
199
205
|
metrics: PropTypes.shape({
|
|
200
206
|
score: PropTypes.number,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","Select","SelectOptionPropTypes","ButtonLink","Icon","CardsGrid","style","AllCourses","ContinueLearning","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","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","length","showMoreWrapper","ctaWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","bool","onChange","options","arrayOf"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} 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 Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\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 filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {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 <div>\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 <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>\n ) : null}\n </>\n ) : null}\n </div>\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.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>{' '}\n {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} />\n <AllCourses\n skillIncludedCourses={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n />\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.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,gBAAP,MAA6B,qBAA7B;;AAEA,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBjB,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACkB;EAAD,IAAYJ,KAAlB;EACA,MAAM;IAACK,IAAD;IAAOC;EAAP,IAAoBL,OAA1B;;EACA,MAAMM,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;;EAEA,MAAMG,eAAe,GAAGvB,WAAW,CAAC,MAAMkB,UAAU,CAAC,IAAD,CAAjB,EAAyB,CAACA,UAAD,CAAzB,CAAnC;EAEA,MAAMM,gBAAgB,GAAGxB,WAAW,CAAC,MAAMkB,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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BnC,OAAO,EAAEjD,SAAS,CAACoF,MAFI;IAGvBlC,iBAAiB,EAAElD,SAAS,CAACoF,MAHN;IAIvBjC,gBAAgB,EAAEnD,SAAS,CAACoF;EAJL,CAAhB,CAHa;EAStB7C,OAAO,EAAEvC,SAAS,CAACqF,IATG;EAUtB7C,kBAAkB,EAAExC,SAAS,CAACqF,IAVR;EAWtB5C,cAAc,EAAEzC,SAAS,CAACmF,KAAV,CAAgB3E,SAAS,CAACyB,SAA1B,CAXM;EAYtBS,oBAAoB,EAAE1C,SAAS,CAACmF,KAAV,CAAgB3E,SAAS,CAACyB,SAA1B,CAZA;EAatBU,OAAO,EAAE3C,SAAS,CAACmF,KAAV,CAAgB;IACvBG,QAAQ,EAAEtF,SAAS,CAACkC,IADG;IAEvBqD,OAAO,EAAEvF,SAAS,CAACwF,OAAV,CAAkBxF,SAAS,CAACmF,KAAV,CAAgB9E,qBAAhB,CAAlB;EAFc,CAAhB,CAba;EAiBtBuC,OAAO,EAAE5C,SAAS,CAACmF,KAAV,CAAgB/E,MAAM,CAAC6B,SAAvB,CAjBa;EAkBtBY,WAAW,EAAE7C,SAAS,CAACkC,IAlBD;EAmBtBY,aAAa,EAAE9C,SAAS,CAACkC,IAnBH;EAoBtBa,uBAAuB,EAAE/C,SAAS,CAACkC;AApBb,CAAxB;AAuBA,eAAeC,WAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","Select","SelectOptionPropTypes","ButtonLink","Icon","CardsGrid","style","AllCourses","ContinueLearning","ContinueLearningButton","props","context","hovered","setHovered","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","handleMouseOver","handleMouseLeave","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","bool","func","SkillDetail","title","ref","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","onChange","options","arrayOf"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isEmpty} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {ongoingCoursesAvailable, 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={ongoingCoursesAvailable ? translate('continue_learning') : translate('start_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 ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n ref,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {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} data-name={ref}>\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 <div>\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 <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>\n ) : null}\n </>\n ) : null}\n </div>\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 ongoingCoursesAvailable={!!ongoingCourses.list.length} onClick={onContinueLearningClick} />\n </div>\n </div>\n {score !== undefined ? <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>{' '}\n {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> : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n skillIncludedCourses={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n />\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 ref: 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.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,OAAR,QAAsB,oBAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,MAAP,IAAgBC,qBAAhB,QAA4C,mBAA5C;AACA,OAAOC,UAAP,MAAuB,wBAAvB;AACA,OAAOC,IAAP,MAAiB,iBAAjB;AACA,OAAOC,SAAP,MAAsB,2BAAtB;AACA,OAAOC,KAAP,MAAkB,aAAlB;AACA,OAAOC,UAAP,MAAuB,eAAvB;AACA,OAAOC,gBAAP,MAA6B,qBAA7B;;AAEA,MAAMC,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACjD,MAAM,CAACC,OAAD,EAAUC,UAAV,IAAwBjB,QAAQ,CAAC,KAAD,CAAtC;EACA,MAAM;IAACkB,uBAAD;IAA0BC;EAA1B,IAAqCL,KAA3C;EACA,MAAM;IAACM,IAAD;IAAOC;EAAP,IAAoBN,OAA1B;;EACA,MAAMO,gBAAgB,GAAG,KAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;;EAEA,MAAMG,eAAe,GAAGxB,WAAW,CAAC,MAAMkB,UAAU,CAAC,IAAD,CAAjB,EAAyB,CAACA,UAAD,CAAzB,CAAnC;EAEA,MAAMO,gBAAgB,GAAGzB,WAAW,CAAC,MAAMkB,UAAU,CAAC,KAAD,CAAjB,EAA0B,CAACA,UAAD,CAA1B,CAApC;EAEA,oBACE;IAAK,WAAW,EAAEM,eAAlB;IAAmC,YAAY,EAAEC;EAAjD,gBACE,oBAAC,UAAD;IACE,K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,CAAxB;AAwBA,eAAeC,WAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AA2CA,
|
|
1
|
+
{"version":3,"file":"all-courses.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/all-courses.js"],"names":[],"mappings":";AA2CA,mEAoHC"}
|
|
@@ -134,6 +134,7 @@ const AllCourses = (props, context) => {
|
|
|
134
134
|
})), /*#__PURE__*/_react.default.createElement("div", {
|
|
135
135
|
className: _allCourses.default.sortSection
|
|
136
136
|
}, /*#__PURE__*/_react.default.createElement(_inputSwitch.default, {
|
|
137
|
+
id: 'show-completed-courses-switch',
|
|
137
138
|
type: "switch",
|
|
138
139
|
name: translate('show_completed'),
|
|
139
140
|
title: translate('show_completed'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"all-courses.js","names":["FilterButton","props","context","selected","filter","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","label","contextTypes","Provider","childContextTypes","translate","propTypes","PropTypes","bool","string","func","AllCourses","skillIncludedCourses","filters","sorting","options","onChange","list","showCompleted","setShowCompleted","useState","searchValue","setSearchValue","searchResults","setSearchResults","sort","a","b","progressA","progress","progressB","sortView","undefined","handleSearch","useCallback","value","skill","searchValueIncluded","title","handleSearchReset","handleShowCompletedToggle","tempShowCompleted","style","continueLearningWrapper","continueLearningTitle","continueLearningNumber","length","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","filterWrapper","map","index","name","handleChange","filterButtonWrapper","divider","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","CardsGrid","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './all-courses.css';\n\nconst FilterButton = (props, context) => {\n const {selected, filter, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label: filter,\n onClick,\n 'data-name': 'filter-type-course-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n selected: PropTypes.bool,\n filter: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {skillIncludedCourses, filters, sorting} = props;\n const {options, onChange} = filters;\n const {list} = skillIncludedCourses;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n const [searchResults, setSearchResults] = useState(\n list.sort((a, b) => {\n const progressA = a.progress ?? 0;\n const progressB = b.progress ?? 0;\n return progressB - progressA;\n })\n );\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(list.filter(skill => searchValueIncluded(skill.title, value)));\n },\n [list, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(list);\n }, [list, setSearchValue, setSearchResults]);\n\n const handleShowCompletedToggle = useCallback(() => {\n const tempShowCompleted = !showCompleted;\n setShowCompleted(tempShowCompleted);\n if (tempShowCompleted) {\n setSearchResults(list);\n handleSearchReset();\n } else {\n setSearchResults(searchResults.filter(skill => skill.progress === 0));\n }\n }, [searchResults, showCompleted, setShowCompleted]);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_courses')}</span>\n <span className={style.continueLearningNumber}>{skillIncludedCourses.list.length}</span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n </div>\n </div>\n <div className={style.filterWrapper}>\n {options.length > 2 && searchResults.length > 0\n ? options.map((filter, index) => {\n const {name, value, selected} = filter;\n\n function handleChange() {\n onChange(value);\n handleSearchReset();\n }\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton selected={selected} filter={name} onClick={handleChange} />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n })\n : null}\n </div>\n <div>\n {searchResults.length > 0 ? (\n <CardsGrid list={searchResults} justifyContent=\"left\" />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IAACC,QAAD;IAAWC,MAAX;IAAmBC;EAAnB,IAA8BJ,KAApC;EACA,MAAM;IAACK;EAAD,IAASJ,OAAf;EACA,MAAMK,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBD,IAAtB,CAAzB;EAEA,MAAME,WAAW,GAAG;IAClBC,WAAW,EAAE;MACXC,eAAe,EAAEP,QAAQ,GAAGI,gBAAH,GAAsB,SADpC;MAEXI,KAAK,EAAER,QAAQ,GAAG,SAAH,GAAe,SAFnB;MAGXS,UAAU,EAAE,6DAHD;MAIXC,KAAK,EAAE;IAJI,CADK;IAOlBC,KAAK,EAAEV,MAPW;IAQlBC,OARkB;IASlB,aAAa;EATK,CAApB;EAYA,oBAAO,6BAAC,mBAAD,EAAgBG,WAAhB,CAAP;AACD,CAlBD;;AAoBAR,YAAY,CAACe,YAAb,GAA4B;EAC1BT,IAAI,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX,IADP;EAE1BY,SAAS,EAAEF,iBAAA,CAASC,iBAAT,CAA2BC;AAFZ,CAA5B;AAKAlB,YAAY,CAACmB,SAAb,2CAAyB;EACvBhB,QAAQ,EAAEiB,kBAAA,CAAUC,IADG;EAEvBjB,MAAM,EAAEgB,kBAAA,CAAUE,MAFK;EAGvBjB,OAAO,EAAEe,kBAAA,CAAUG;AAHI,CAAzB;;AAMA,MAAMC,UAAU,GAAG,CAACvB,KAAD,EAAQC,OAAR,KAAoB;EACrC,MAAM;IAACuB,oBAAD;IAAuBC,OAAvB;IAAgCC;EAAhC,IAA2C1B,KAAj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SAAS,CAAC,kCAAD,CADZ,CAPF,CAJJ,CAjDF,CADF;AAqED,CAnHD;;AAqHAM,UAAU,CAACT,YAAX,GAA0B;EACxBT,IAAI,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX,IADT;EAExBY,SAAS,EAAEF,iBAAA,CAASC,iBAAT,CAA2BC;AAFd,CAA1B;AAKAM,UAAU,CAACL,SAAX,2CAAuB;EACrBM,oBAAoB,EAAEL,kBAAA,CAAUwD,KAAV,CAAgBC,kBAAA,CAAU1D,SAA1B,CADD;EAErBO,OAAO,EAAEN,kBAAA,CAAUwD,KAAV,CAAgB;IACvB/C,QAAQ,EAAET,kBAAA,CAAUG,IADG;IAEvBK,OAAO,EAAER,kBAAA,CAAU0D,OAAV,CAAkB1D,kBAAA,CAAUwD,KAAV,CAAgBG,6BAAhB,CAAlB;EAFc,CAAhB,CAFY;EAMrBpD,OAAO,EAAEP,kBAAA,CAAUwD,KAAV,CAAgBI,eAAA,CAAO7D,SAAvB;AANY,CAAvB;eASeK,U"}
|
|
1
|
+
{"version":3,"file":"all-courses.js","names":["FilterButton","props","context","selected","filter","onClick","skin","primarySkinColor","buttonProps","customStyle","backgroundColor","color","transition","width","label","contextTypes","Provider","childContextTypes","translate","propTypes","PropTypes","bool","string","func","AllCourses","skillIncludedCourses","filters","sorting","options","onChange","list","showCompleted","setShowCompleted","useState","searchValue","setSearchValue","searchResults","setSearchResults","sort","a","b","progressA","progress","progressB","sortView","undefined","handleSearch","useCallback","value","skill","searchValueIncluded","title","handleSearchReset","handleShowCompletedToggle","tempShowCompleted","style","continueLearningWrapper","continueLearningTitle","continueLearningNumber","length","searchAndSortSection","searchWrapper","placeholder","sortSection","sortWrapper","filterWrapper","map","index","name","handleChange","filterButtonWrapper","divider","emptySearchResultContainer","emptySearchResultTitle","emptySearchResultDescription","emptySearchResultClearSearch","shape","CardsGrid","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/all-courses.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport {get} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport SearchForm from '../../molecule/search-form';\nimport CardsGrid from '../../organism/cards-grid';\nimport searchValueIncluded from '../../util/search-value-included';\nimport InputSwitch from '../../atom/input-switch';\nimport style from './all-courses.css';\n\nconst FilterButton = (props, context) => {\n const {selected, filter, onClick} = props;\n const {skin} = context;\n const primarySkinColor = get('common.primary', skin);\n\n const buttonProps = {\n customStyle: {\n backgroundColor: selected ? primarySkinColor : '#E1E1E3',\n color: selected ? '#FFFFFF' : '#515161',\n transition: 'background-color 0.15s ease-in-out, color 0.15s ease-in-out',\n width: 'fit-content'\n },\n label: filter,\n onClick,\n 'data-name': 'filter-type-course-button'\n };\n\n return <ButtonLink {...buttonProps} />;\n};\n\nFilterButton.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nFilterButton.propTypes = {\n selected: PropTypes.bool,\n filter: PropTypes.string,\n onClick: PropTypes.func\n};\n\nconst AllCourses = (props, context) => {\n const {skillIncludedCourses, filters, sorting} = props;\n const {options, onChange} = filters;\n const {list} = skillIncludedCourses;\n const {translate} = context;\n const [showCompleted, setShowCompleted] = useState(true);\n const [searchValue, setSearchValue] = useState('');\n const [searchResults, setSearchResults] = useState(\n list.sort((a, b) => {\n const progressA = a.progress ?? 0;\n const progressB = b.progress ?? 0;\n return progressB - progressA;\n })\n );\n\n const sortView =\n sorting !== undefined ? (\n <div data-name=\"choice\">\n <Select {...sorting} aria-label=\"All courses sort\" />\n </div>\n ) : null;\n\n const handleSearch = useCallback(\n value => {\n setSearchValue(value);\n setSearchResults(list.filter(skill => searchValueIncluded(skill.title, value)));\n },\n [list, setSearchValue, setSearchResults]\n );\n\n const handleSearchReset = useCallback(() => {\n setSearchValue('');\n setSearchResults(list);\n }, [list, setSearchValue, setSearchResults]);\n\n const handleShowCompletedToggle = useCallback(() => {\n const tempShowCompleted = !showCompleted;\n setShowCompleted(tempShowCompleted);\n if (tempShowCompleted) {\n setSearchResults(list);\n handleSearchReset();\n } else {\n setSearchResults(searchResults.filter(skill => skill.progress === 0));\n }\n }, [searchResults, showCompleted, setShowCompleted]);\n\n return (\n <>\n <div className={style.continueLearningWrapper}>\n <span className={style.continueLearningTitle}>{translate('all_courses')}</span>\n <span className={style.continueLearningNumber}>{skillIncludedCourses.list.length}</span>\n </div>\n <div className={style.searchAndSortSection}>\n <div className={style.searchWrapper}>\n <SearchForm\n search={{\n placeholder: translate('search_place_holder'),\n value: searchValue,\n onChange: handleSearch\n }}\n onReset={handleSearchReset}\n />\n </div>\n <div className={style.sortSection}>\n <InputSwitch\n id={'show-completed-courses-switch'}\n type=\"switch\"\n name={translate('show_completed')}\n title={translate('show_completed')}\n aria-label={'Show completed courses aria label'}\n value={showCompleted}\n onChange={handleShowCompletedToggle}\n />\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n </div>\n </div>\n <div className={style.filterWrapper}>\n {options.length > 2 && searchResults.length > 0\n ? options.map((filter, index) => {\n const {name, value, selected} = filter;\n\n function handleChange() {\n onChange(value);\n handleSearchReset();\n }\n return (\n <div key={index} className={style.filterButtonWrapper}>\n <FilterButton selected={selected} filter={name} onClick={handleChange} />\n {value === 'ALL' ? <div className={style.divider} /> : null}\n </div>\n );\n })\n : null}\n </div>\n <div>\n {searchResults.length > 0 ? (\n <CardsGrid list={searchResults} justifyContent=\"left\" />\n ) : (\n <div className={style.emptySearchResultContainer}>\n <div className={style.emptySearchResultTitle}>\n {translate('empty_search_result_title', {searchValue})}\n </div>\n <div className={style.emptySearchResultDescription}>\n {translate('empty_search_result_description')}\n </div>\n <div className={style.emptySearchResultClearSearch} onClick={handleSearchReset}>\n {translate('empty_search_result_clear_search')}\n </div>\n </div>\n )}\n </div>\n </>\n );\n};\n\nAllCourses.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nAllCourses.propTypes = {\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default AllCourses;\n"],"mappings":";;;;;;;AAAA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,YAAY,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACvC,MAAM;IAACC,QAAD;IAAWC,MAAX;IAAmBC;EAAnB,IAA8BJ,KAApC;EACA,MAAM;IAACK;EAAD,IAASJ,OAAf;EACA,MAAMK,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBD,IAAtB,CAAzB;EAEA,MAAME,WAAW,GAAG;IAClBC,WAAW,EAAE;MACXC,eAAe,EAAEP,QAAQ,GAAGI,gBAAH,GAAsB,SADpC;MAEXI,KAAK,EAAER,QAAQ,GAAG,SAAH,GAAe,SAFnB;MAGXS,UAAU,EAAE,6DAHD;MAIXC,KAAK,EAAE;IAJI,CADK;IAOlBC,KAAK,EAAEV,MAPW;IAQlBC,OARkB;IASlB,aAAa;EATK,CAApB;EAYA,oBAAO,6BAAC,mBAAD,EAAgBG,WAAhB,CAAP;AACD,CAlBD;;AAoBAR,YAAY,CAACe,YAAb,GAA4B;EAC1BT,IAAI,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX,IADP;EAE1BY,SAAS,EAAEF,iBAAA,CAASC,iBAAT,CAA2BC;AAFZ,CAA5B;AAKAlB,YAAY,CAACmB,SAAb,2CAAyB;EACvBhB,QAAQ,EAAEiB,kBAAA,CAAUC,IADG;EAEvBjB,MAAM,EAAEgB,kBAAA,CAAUE,MAFK;EAGvBjB,OAAO,EAAEe,kBAAA,CAAUG;AAHI,CAAzB;;AAMA,MAAMC,UAAU,GAAG,CAACvB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B,GACGxD,SAAS,CAAC,iCAAD,CADZ,CAJF,eAOE;IAAK,SAAS,EAAEqC,mBAAA,CAAMoB,4BAAtB;IAAoD,OAAO,EAAEvB;EAA7D,GACGlC,SAAS,CAAC,kCAAD,CADZ,CAPF,CAJJ,CAlDF,CADF;AAsED,CApHD;;AAsHAM,UAAU,CAACT,YAAX,GAA0B;EACxBT,IAAI,EAAEU,iBAAA,CAASC,iBAAT,CAA2BX,IADT;EAExBY,SAAS,EAAEF,iBAAA,CAASC,iBAAT,CAA2BC;AAFd,CAA1B;AAKAM,UAAU,CAACL,SAAX,2CAAuB;EACrBM,oBAAoB,EAAEL,kBAAA,CAAUwD,KAAV,CAAgBC,kBAAA,CAAU1D,SAA1B,CADD;EAErBO,OAAO,EAAEN,kBAAA,CAAUwD,KAAV,CAAgB;IACvB/C,QAAQ,EAAET,kBAAA,CAAUG,IADG;IAEvBK,OAAO,EAAER,kBAAA,CAAU0D,OAAV,CAAkB1D,kBAAA,CAAUwD,KAAV,CAAgBG,6BAAhB,CAAlB;EAFc,CAAhB,CAFY;EAMrBpD,OAAO,EAAEP,kBAAA,CAAUwD,KAAV,CAAgBI,eAAA,CAAO7D,SAAvB;AANY,CAAvB;eASeK,U"}
|
|
@@ -27,6 +27,7 @@ declare namespace SkillDetail {
|
|
|
27
27
|
}
|
|
28
28
|
namespace propTypes {
|
|
29
29
|
const title: PropTypes.Validator<string>;
|
|
30
|
+
const ref: PropTypes.Validator<string>;
|
|
30
31
|
const description: PropTypes.Requireable<string>;
|
|
31
32
|
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
32
33
|
score: PropTypes.Requireable<number>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/skill-detail/index.js"],"names":[],"mappings":";AA4DA,oEAwJC"}
|
|
@@ -38,6 +38,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
38
38
|
const ContinueLearningButton = (props, context) => {
|
|
39
39
|
const [hovered, setHovered] = (0, _react.useState)(false);
|
|
40
40
|
const {
|
|
41
|
+
ongoingCoursesAvailable,
|
|
41
42
|
onClick
|
|
42
43
|
} = props;
|
|
43
44
|
const {
|
|
@@ -51,7 +52,7 @@ const ContinueLearningButton = (props, context) => {
|
|
|
51
52
|
onMouseOver: handleMouseOver,
|
|
52
53
|
onMouseLeave: handleMouseLeave
|
|
53
54
|
}, /*#__PURE__*/_react.default.createElement(_buttonLink.default, {
|
|
54
|
-
label: translate('continue_learning'),
|
|
55
|
+
label: ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning'),
|
|
55
56
|
type: "primary",
|
|
56
57
|
customStyle: {
|
|
57
58
|
width: 'fit-content',
|
|
@@ -75,14 +76,16 @@ ContinueLearningButton.contextTypes = {
|
|
|
75
76
|
translate: _provider.default.childContextTypes.translate
|
|
76
77
|
};
|
|
77
78
|
ContinueLearningButton.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
79
|
+
ongoingCoursesAvailable: _propTypes.default.bool,
|
|
78
80
|
onClick: _propTypes.default.func
|
|
79
81
|
} : {};
|
|
80
82
|
|
|
81
83
|
const SkillDetail = (props, context) => {
|
|
82
84
|
const {
|
|
83
85
|
title,
|
|
86
|
+
ref,
|
|
84
87
|
description,
|
|
85
|
-
metrics,
|
|
88
|
+
metrics = {},
|
|
86
89
|
focused,
|
|
87
90
|
availableForReview,
|
|
88
91
|
ongoingCourses,
|
|
@@ -128,7 +131,8 @@ const SkillDetail = (props, context) => {
|
|
|
128
131
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
129
132
|
className: _style.default.backgroundContainer
|
|
130
133
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
131
|
-
className: _style.default.container
|
|
134
|
+
className: _style.default.container,
|
|
135
|
+
"data-name": ref
|
|
132
136
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
133
137
|
className: _style.default.backButtonWrapper,
|
|
134
138
|
onClick: onBackClick
|
|
@@ -172,8 +176,9 @@ const SkillDetail = (props, context) => {
|
|
|
172
176
|
borderRadius: '12px'
|
|
173
177
|
}
|
|
174
178
|
}), /*#__PURE__*/_react.default.createElement(ContinueLearningButton, {
|
|
179
|
+
ongoingCoursesAvailable: !!ongoingCourses.list.length,
|
|
175
180
|
onClick: onContinueLearningClick
|
|
176
|
-
}))), /*#__PURE__*/_react.default.createElement("div", {
|
|
181
|
+
}))), score !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
|
|
177
182
|
className: _style.default.progressInformationsWrapper
|
|
178
183
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
179
184
|
className: _style.default.progressTitle
|
|
@@ -201,7 +206,7 @@ const SkillDetail = (props, context) => {
|
|
|
201
206
|
"data-name": "completed-percentage"
|
|
202
207
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
203
208
|
className: _style.default.progressInformationNumber
|
|
204
|
-
}, score, "%"))))), /*#__PURE__*/_react.default.createElement(_continueLearning.default, {
|
|
209
|
+
}, score, "%"))))) : null, /*#__PURE__*/_react.default.createElement(_continueLearning.default, {
|
|
205
210
|
ongoingCourses: ongoingCourses
|
|
206
211
|
}), /*#__PURE__*/_react.default.createElement(_allCourses.default, {
|
|
207
212
|
skillIncludedCourses: skillIncludedCourses,
|
|
@@ -216,6 +221,7 @@ SkillDetail.contextTypes = {
|
|
|
216
221
|
};
|
|
217
222
|
SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
218
223
|
title: _propTypes.default.string.isRequired,
|
|
224
|
+
ref: _propTypes.default.string.isRequired,
|
|
219
225
|
description: _propTypes.default.string,
|
|
220
226
|
metrics: _propTypes.default.shape({
|
|
221
227
|
score: _propTypes.default.number,
|
|
@@ -1 +1 @@
|
|
|
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","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","length","showMoreWrapper","ctaWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","bool","CardsGrid","onChange","options","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} 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 Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\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 filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {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 <div>\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 <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>\n ) : null}\n </>\n ) : null}\n </div>\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.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>{' '}\n {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} />\n <AllCourses\n skillIncludedCourses={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n />\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.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AACA;;AACA;;AACA;;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;MACXK,KAAK,EAAE,aADI;MAEXC,YAAY,EAAE,MAFH;MAGXC,eAAe,EAAEZ,OAAO,GACpB,IAAAa,yBAAA,EAAS,YAAWP,gBAAiB,0BAArC,CADoB,GAEpBA;IALO,CAHf;IAUE,IAAI,EAAE;M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AAA,CAAUqD;EAJL,CAAhB,CAHa;EAStB/C,OAAO,EAAEN,kBAAA,CAAUsD,IATG;EAUtB/C,kBAAkB,EAAEP,kBAAA,CAAUsD,IAVR;EAWtB9C,cAAc,EAAER,kBAAA,CAAUoD,KAAV,CAAgBG,kBAAA,CAAUxD,SAA1B,CAXM;EAYtBU,oBAAoB,EAAET,kBAAA,CAAUoD,KAAV,CAAgBG,kBAAA,CAAUxD,SAA1B,CAZA;EAatBW,OAAO,EAAEV,kBAAA,CAAUoD,KAAV,CAAgB;IACvBI,QAAQ,EAAExD,kBAAA,CAAUC,IADG;IAEvBwD,OAAO,EAAEzD,kBAAA,CAAU0D,OAAV,CAAkB1D,kBAAA,CAAUoD,KAAV,CAAgBO,6BAAhB,CAAlB;EAFc,CAAhB,CAba;EAiBtBhD,OAAO,EAAEX,kBAAA,CAAUoD,KAAV,CAAgBQ,eAAA,CAAO7D,SAAvB,CAjBa;EAkBtBa,WAAW,EAAEZ,kBAAA,CAAUC,IAlBD;EAmBtBY,aAAa,EAAEb,kBAAA,CAAUC,IAnBH;EAoBtBa,uBAAuB,EAAEd,kBAAA,CAAUC;AApBb,CAAxB;eAuBeC,W"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ContinueLearningButton","props","context","hovered","setHovered","useState","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","handleMouseOver","useCallback","handleMouseLeave","width","borderRadius","backgroundColor","convert","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","func","SkillDetail","title","ref","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButtonWrapper","faSize","wrapperSize","ctaContainer","skillFocusBadge","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","string","isRequired","shape","number","CardsGrid","onChange","options","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/skill-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport {convert} from 'css-color-function';\nimport classnames from 'classnames';\nimport {get, isEmpty} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\nimport ContinueLearning from './continue-learning';\n\nconst ContinueLearningButton = (props, context) => {\n const [hovered, setHovered] = useState(false);\n const {ongoingCoursesAvailable, 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={ongoingCoursesAvailable ? translate('continue_learning') : translate('start_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 ongoingCoursesAvailable: PropTypes.bool,\n onClick: PropTypes.func\n};\n\nconst SkillDetail = (props, context) => {\n const {\n title,\n ref,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n filters,\n sorting,\n onBackClick,\n onReviewClick,\n onContinueLearningClick\n } = props;\n const {score, content, questionsToReview, contentCompleted = 0} = metrics;\n const {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} data-name={ref}>\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 <div>\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 <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>\n ) : null}\n </>\n ) : null}\n </div>\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 ongoingCoursesAvailable={!!ongoingCourses.list.length} onClick={onContinueLearningClick} />\n </div>\n </div>\n {score !== undefined ? <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>{' '}\n {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> : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n skillIncludedCourses={skillIncludedCourses}\n filters={filters}\n sorting={sorting}\n />\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 ref: 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.shape(CardsGrid.propTypes),\n skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\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EAAElB,kBAAA,CAAUwD,MAFI;IAGvBrC,iBAAiB,EAAEnB,kBAAA,CAAUwD,MAHN;IAIvBpC,gBAAgB,EAAEpB,kBAAA,CAAUwD;EAJL,CAAhB,CAJa;EAUtBhD,OAAO,EAAER,kBAAA,CAAUC,IAVG;EAWtBQ,kBAAkB,EAAET,kBAAA,CAAUC,IAXR;EAYtBS,cAAc,EAAEV,kBAAA,CAAUuD,KAAV,CAAgBE,kBAAA,CAAU1D,SAA1B,CAZM;EAatBY,oBAAoB,EAAEX,kBAAA,CAAUuD,KAAV,CAAgBE,kBAAA,CAAU1D,SAA1B,CAbA;EActBa,OAAO,EAAEZ,kBAAA,CAAUuD,KAAV,CAAgB;IACvBG,QAAQ,EAAE1D,kBAAA,CAAUE,IADG;IAEvByD,OAAO,EAAE3D,kBAAA,CAAU4D,OAAV,CAAkB5D,kBAAA,CAAUuD,KAAV,CAAgBM,6BAAhB,CAAlB;EAFc,CAAhB,CAda;EAkBtBhD,OAAO,EAAEb,kBAAA,CAAUuD,KAAV,CAAgBO,eAAA,CAAO/D,SAAvB,CAlBa;EAmBtBe,WAAW,EAAEd,kBAAA,CAAUE,IAnBD;EAoBtBa,aAAa,EAAEf,kBAAA,CAAUE,IApBH;EAqBtBc,uBAAuB,EAAEhB,kBAAA,CAAUE;AArBb,CAAxB;eAwBeC,W"}
|
package/locales/en/global.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.32.12-alpha.
|
|
3
|
+
"version": "11.32.12-alpha.5+5ebe37eb1",
|
|
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": "5ebe37eb102fd233281316c1d10730c8bb63d6b6"
|
|
181
181
|
}
|