@coorpacademy/components 11.32.36 → 11.32.37-alpha.4
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/certification-card/index.d.ts.map +1 -1
- package/es/molecule/certification-card/index.js +2 -1
- package/es/molecule/certification-card/index.js.map +1 -1
- package/es/molecule/progress-bar/index.d.ts.map +1 -1
- package/es/molecule/progress-bar/index.js +3 -1
- package/es/molecule/progress-bar/index.js.map +1 -1
- package/es/template/certifications/index.js +2 -1
- package/es/template/certifications/index.js.map +1 -1
- package/es/template/certifications/style.css +1 -1
- package/es/template/playlist-detail/index.d.ts +1 -8
- package/es/template/playlist-detail/index.d.ts.map +1 -1
- package/es/template/playlist-detail/index.js +5 -13
- package/es/template/playlist-detail/index.js.map +1 -1
- package/es/template/playlist-detail/style.css +0 -4
- package/es/template/skill-detail/index.d.ts +14 -20
- package/es/template/skill-detail/index.d.ts.map +1 -1
- package/es/template/skill-detail/index.js +6 -12
- package/es/template/skill-detail/index.js.map +1 -1
- package/lib/molecule/certification-card/index.d.ts.map +1 -1
- package/lib/molecule/certification-card/index.js +2 -1
- package/lib/molecule/certification-card/index.js.map +1 -1
- package/lib/molecule/progress-bar/index.d.ts.map +1 -1
- package/lib/molecule/progress-bar/index.js +3 -1
- package/lib/molecule/progress-bar/index.js.map +1 -1
- package/lib/template/certifications/index.js +2 -1
- package/lib/template/certifications/index.js.map +1 -1
- package/lib/template/certifications/style.css +1 -1
- package/lib/template/playlist-detail/index.d.ts +1 -8
- package/lib/template/playlist-detail/index.d.ts.map +1 -1
- package/lib/template/playlist-detail/index.js +5 -14
- package/lib/template/playlist-detail/index.js.map +1 -1
- package/lib/template/playlist-detail/style.css +0 -4
- package/lib/template/skill-detail/index.d.ts +14 -20
- package/lib/template/skill-detail/index.d.ts.map +1 -1
- package/lib/template/skill-detail/index.js +6 -13
- package/lib/template/skill-detail/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,0EAwDC"}
|
|
@@ -64,7 +64,8 @@ const CertificationCard = (props, context) => {
|
|
|
64
64
|
label: translate('certification'),
|
|
65
65
|
size: "S"
|
|
66
66
|
}), /*#__PURE__*/React.createElement("div", {
|
|
67
|
-
className: style.title
|
|
67
|
+
className: style.title,
|
|
68
|
+
"data-name": "certification-title"
|
|
68
69
|
}, title), /*#__PURE__*/React.createElement("div", {
|
|
69
70
|
className: style.moduleCount
|
|
70
71
|
}, /*#__PURE__*/React.createElement("span", null, nbDone), ` ${translate('certification_module')}`)), /*#__PURE__*/React.createElement(ProgressBar, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","COLORS","Provider","Tag","ProgressBar","style","CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","container","top","right","imageWrapper","detailWrapper","titleWrapper","moduleCount","customProgressBar","positive","contextTypes","childContextTypes","propTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageWrapper}>\n <img src={imgUrl} />\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","COLORS","Provider","Tag","ProgressBar","style","CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","container","top","right","imageWrapper","detailWrapper","titleWrapper","moduleCount","customProgressBar","positive","contextTypes","childContextTypes","propTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageWrapper}>\n <img src={imgUrl} />\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>\n <span>{nbDone}</span>\n {` ${translate('certification_module')}`}\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default CertificationCard;\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,SAAQC,MAAR,QAAqB,wBAArB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,GAAP,MAAgB,gBAAhB;AACA,OAAOC,WAAP,MAAwB,iBAAxB;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,iBAAiB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC5C,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,QAAd;IAAwBC,MAAxB;IAAgCC;EAAhC,IAA2CN,KAAjD;EACA,MAAM;IACJO,KADI;IAEJC,SAAS,EAAE;MAACC;IAAD;EAFP,IAGFN,IAHJ;EAIA,MAAM;IAACO;EAAD,IAAcT,OAApB;EAE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AU;EAAvC,GACGA,KADH,CAFF,eAKE;IAAK,SAAS,EAAET,KAAK,CAACgC;EAAtB,gBACE,kCAAOrB,MAAP,CADF,EAEI,IAAGC,SAAS,CAAC,sBAAD,CAAyB,EAFzC,CALF,CADF,eAWE,oBAAC,WAAD;IACE,SAAS,EAAEZ,KAAK,CAACiC,iBADnB;IAEE,KAAK,EAAE;MAACb,eAAe,EAAExB,MAAM,CAACsC;IAAzB,CAFT;IAGE,WAAW,EAAE,KAHf;IAIE,KAAK,EAAE5B,QAJT;IAKE,GAAG,EAAE;EALP,EAXF,CAZF,CADF;AAkCD,CAxDD;;AA0DAL,iBAAiB,CAACkC,YAAlB,GAAiC;EAC/BvB,SAAS,EAAEf,QAAQ,CAACuC,iBAAT,CAA2BxB;AADP,CAAjC;AAIAX,iBAAiB,CAACoC,SAAlB,2CAA8B;EAC5BjC,KAAK,EAAET,SAAS,CAAC2C,MADW;EAE5BjC,IAAI,EAAEV,SAAS,CAAC4C,KAAV,CAAgB;IACpB9B,KAAK,EAAEd,SAAS,CAAC2C,MADG;IAEpB5B,SAAS,EAAEf,SAAS,CAAC4C,KAAV,CAAgB;MACzB5B,MAAM,EAAEhB,SAAS,CAAC6C;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BlC,QAAQ,EAAEX,SAAS,CAAC6C,MARQ;EAS5BjC,MAAM,EAAEZ,SAAS,CAAC2C,MATU;EAU5B9B,OAAO,EAAEb,SAAS,CAAC8C;AAVS,CAA9B;AAaA,eAAexC,iBAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAMA,sDAqCC"}
|
|
@@ -27,7 +27,9 @@ const ProgressBar = props => {
|
|
|
27
27
|
}), steps);
|
|
28
28
|
|
|
29
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: classnames(style.background, className)
|
|
30
|
+
className: classnames(style.background, className),
|
|
31
|
+
"data-name": "progress-bar-wrapper",
|
|
32
|
+
"data-content": `${text}`
|
|
31
33
|
}, /*#__PURE__*/React.createElement("div", {
|
|
32
34
|
className: style.progress,
|
|
33
35
|
style: _extends({}, propsStyle, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","ProgressBar","props","className","value","max","desc","steps","propsStyle","displayInfo","ratio","percentage","Math","floor","text","stepList","index","step","background","progress","width","texts","description","propTypes","string","number","isRequired","objectOf","oneOfType","bool"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {\n className,\n value,\n max,\n desc = '',\n steps = 0,\n style: propsStyle,\n displayInfo = true\n } = props;\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","PropTypes","classnames","style","ProgressBar","props","className","value","max","desc","steps","propsStyle","displayInfo","ratio","percentage","Math","floor","text","stepList","index","step","background","progress","width","texts","description","propTypes","string","number","isRequired","objectOf","oneOfType","bool"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {\n className,\n value,\n max,\n desc = '',\n steps = 0,\n style: propsStyle,\n displayInfo = true\n } = props;\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div\n className={classnames(style.background, className)}\n data-name=\"progress-bar-wrapper\"\n data-content={`${text}`}\n >\n <div\n className={style.progress}\n style={{\n ...propsStyle,\n width: `${ratio * 100}%`\n }}\n />\n {displayInfo ? (\n <p className={style.texts}>\n <span className={style.description}>{`${value}/${max} ${desc}`}</span>\n <span className={style.percentage}>{text}</span>\n </p>\n ) : null}\n <div className={style.steps}>{stepList}</div>\n </div>\n );\n};\n\nProgressBar.propTypes = {\n className: PropTypes.string,\n value: PropTypes.number.isRequired,\n max: PropTypes.number.isRequired,\n desc: PropTypes.string,\n steps: PropTypes.number,\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n displayInfo: PropTypes.bool\n};\n\nexport default ProgressBar;\n"],"mappings":";;;;AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AAEA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,SADI;IAEJC,KAFI;IAGJC,GAHI;IAIJC,IAAI,GAAG,EAJH;IAKJC,KAAK,GAAG,CALJ;IAMJP,KAAK,EAAEQ,UANH;IAOJC,WAAW,GAAG;EAPV,IAQFP,KARJ;EAUA,MAAMQ,KAAK,GAAGN,KAAK,GAAGC,GAAtB;EACA,MAAMM,UAAU,GAAGC,IAAI,CAACC,KAAL,CAAWH,KAAK,GAAG,GAAnB,CAAnB;EACA,MAAMI,IAAI,GAAI,GAAEH,UAAW,GAA3B;;EACA,MAAMI,QAAQ,GAAG,OAAMC,KAAK,iBAAI;IAAK,SAAS,EAAEhB,KAAK,CAACiB,IAAtB;IAA4B,GAAG,EAAED;EAAjC,EAAf,EAA2DT,KAA3D,CAAjB;;EACA,oBACE;IACE,SAAS,EAAER,UAAU,CAACC,KAAK,CAACkB,UAAP,EAAmBf,SAAnB,CADvB;IAEE,aAAU,sBAFZ;IAGE,gBAAe,GAAEW,IAAK;EAHxB,gBAKE;IACE,SAAS,EAAEd,KAAK,CAACmB,QADnB;IAEE,KAAK,eACAX,UADA;MAEHY,KAAK,EAAG,GAAEV,KAAK,GAAG,GAAI;IAFnB;EAFP,EALF,EAYGD,WAAW,gBACV;IAAG,SAAS,EAAET,KAAK,CAACqB;EAApB,gBACE;IAAM,SAAS,EAAErB,KAAK,CAACsB;EAAvB,GAAsC,GAAElB,KAAM,IAAGC,GAAI,IAAGC,IAAK,EAA7D,CADF,eAEE;IAAM,SAAS,EAAEN,KAAK,CAACW;EAAvB,GAAoCG,IAApC,CAFF,CADU,GAKR,IAjBN,eAkBE;IAAK,SAAS,EAAEd,KAAK,CAACO;EAAtB,GAA8BQ,QAA9B,CAlBF,CADF;AAsBD,CArCD;;AAuCAd,WAAW,CAACsB,SAAZ,2CAAwB;EACtBpB,SAAS,EAAEL,SAAS,CAAC0B,MADC;EAEtBpB,KAAK,EAAEN,SAAS,CAAC2B,MAAV,CAAiBC,UAFF;EAGtBrB,GAAG,EAAEP,SAAS,CAAC2B,MAAV,CAAiBC,UAHA;EAItBpB,IAAI,EAAER,SAAS,CAAC0B,MAJM;EAKtBjB,KAAK,EAAET,SAAS,CAAC2B,MALK;EAMtBzB,KAAK,EAAEF,SAAS,CAAC6B,QAAV,CAAmB7B,SAAS,CAAC8B,SAAV,CAAoB,CAAC9B,SAAS,CAAC0B,MAAX,EAAmB1B,SAAS,CAAC2B,MAA7B,CAApB,CAAnB,CANe;EAOtBhB,WAAW,EAAEX,SAAS,CAAC+B;AAPD,CAAxB;AAUA,eAAe5B,WAAf"}
|
|
@@ -27,7 +27,8 @@ const Certifications = (props, context) => {
|
|
|
27
27
|
setShowCompleted(!showCompleted);
|
|
28
28
|
}, [showCompleted, setShowCompleted]);
|
|
29
29
|
return /*#__PURE__*/React.createElement("div", {
|
|
30
|
-
className: style.container
|
|
30
|
+
className: style.container,
|
|
31
|
+
"data-name": "Certifications"
|
|
31
32
|
}, /*#__PURE__*/React.createElement(Title, {
|
|
32
33
|
title: translate('certificates'),
|
|
33
34
|
subtitle: translate('certificates_subtitle'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Provider","Title","Select","InputSwitch","CertificationCard","style","Certifications","props","context","certifications","sorting","translate","showCompleted","setShowCompleted","sortView","undefined","handleShowCompletedToggle","container","iconName","iconColor","borderRadius","backgroundColor","sortSectionWrapper","certificatesCount","length","sortSection","sortWrapper","certificateList","map","certification","progress","label","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","goal","title","condition","nbDone","number","imgUrl","onClick","func"],"sources":["../../../src/template/certifications/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Title from '../../atom/title';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport CertificationCard from '../../molecule/certification-card';\nimport style from './style.css';\n\nconst Certifications = (props, context) => {\n const {certifications, sorting} = props;\n const {translate} = context;\n\n const [showCompleted, setShowCompleted] = useState(true);\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 handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(!showCompleted);\n }, [showCompleted, setShowCompleted]);\n\n return (\n <div className={style.container}>\n <Title\n title={translate('certificates')}\n subtitle={translate('certificates_subtitle')}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n subtitleSize=\"standard-without-margin\"\n icon={{\n iconName: 'wreath-laurel',\n iconColor: '#B87A00',\n borderRadius: '12px',\n backgroundColor: '#FFEECC'\n }}\n />\n <div className={style.sortSectionWrapper}>\n <div className={style.certificatesCount}>\n {`${certifications.length} ${translate('certificate(s)')}`}\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 {sorting ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.certificateList}>\n {certifications.map(certification => {\n if (!showCompleted && certification.progress === 100) {\n return null;\n }\n return (\n <div key={certification.label}>\n <CertificationCard {...certification} />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nCertifications.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertifications.propTypes = {\n certifications: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default Certifications;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,iBAAP,MAA8B,mCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IAACC,cAAD;IAAiBC;EAAjB,IAA4BH,KAAlC;EACA,MAAM;IAACI;EAAD,IAAcH,OAApB;EAEA,MAAM,CAACI,aAAD,EAAgBC,gBAAhB,IAAoChB,QAAQ,CAAC,IAAD,CAAlD;EAEA,MAAMiB,QAAQ,GACZJ,OAAO,KAAKK,SAAZ,gBACE;IAAK,aAAU;EAAf,gBACE,oBAAC,MAAD,eAAYL,OAAZ;IAAqB,cAAW;EAAhC,GADF,CADF,GAII,IALN;EAOA,MAAMM,yBAAyB,GAAGlB,WAAW,CAAC,MAAM;IAClDe,gBAAgB,CAAC,CAACD,aAAF,CAAhB;EACD,CAF4C,EAE1C,CAACA,aAAD,EAAgBC,gBAAhB,CAF0C,CAA7C;EAIA,oBACE;IAAK,SAAS,EAAER,KAAK,CAACY;
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useState","useCallback","PropTypes","Provider","Title","Select","InputSwitch","CertificationCard","style","Certifications","props","context","certifications","sorting","translate","showCompleted","setShowCompleted","sortView","undefined","handleShowCompletedToggle","container","iconName","iconColor","borderRadius","backgroundColor","sortSectionWrapper","certificatesCount","length","sortSection","sortWrapper","certificateList","map","certification","progress","label","contextTypes","childContextTypes","propTypes","arrayOf","shape","string","goal","title","condition","nbDone","number","imgUrl","onClick","func"],"sources":["../../../src/template/certifications/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Title from '../../atom/title';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport CertificationCard from '../../molecule/certification-card';\nimport style from './style.css';\n\nconst Certifications = (props, context) => {\n const {certifications, sorting} = props;\n const {translate} = context;\n\n const [showCompleted, setShowCompleted] = useState(true);\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 handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(!showCompleted);\n }, [showCompleted, setShowCompleted]);\n\n return (\n <div className={style.container} data-name=\"Certifications\">\n <Title\n title={translate('certificates')}\n subtitle={translate('certificates_subtitle')}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n subtitleSize=\"standard-without-margin\"\n icon={{\n iconName: 'wreath-laurel',\n iconColor: '#B87A00',\n borderRadius: '12px',\n backgroundColor: '#FFEECC'\n }}\n />\n <div className={style.sortSectionWrapper}>\n <div className={style.certificatesCount}>\n {`${certifications.length} ${translate('certificate(s)')}`}\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 {sorting ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.certificateList}>\n {certifications.map(certification => {\n if (!showCompleted && certification.progress === 100) {\n return null;\n }\n return (\n <div key={certification.label}>\n <CertificationCard {...certification} />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nCertifications.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertifications.propTypes = {\n certifications: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default Certifications;\n"],"mappings":";;AAAA,OAAOA,KAAP,IAAeC,QAAf,EAAyBC,WAAzB,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,QAAP,MAAqB,qBAArB;AACA,OAAOC,KAAP,MAAkB,kBAAlB;AACA,OAAOC,MAAP,MAAmB,mBAAnB;AACA,OAAOC,WAAP,MAAwB,yBAAxB;AACA,OAAOC,iBAAP,MAA8B,mCAA9B;AACA,OAAOC,KAAP,MAAkB,aAAlB;;AAEA,MAAMC,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IAACC,cAAD;IAAiBC;EAAjB,IAA4BH,KAAlC;EACA,MAAM;IAACI;EAAD,IAAcH,OAApB;EAEA,MAAM,CAACI,aAAD,EAAgBC,gBAAhB,IAAoChB,QAAQ,CAAC,IAAD,CAAlD;EAEA,MAAMiB,QAAQ,GACZ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AoCE;IAAK,SAAS,EAAET,KAAK,CAACsB;EAAtB,GACGlB,cAAc,CAACmB,GAAf,CAAmBC,aAAa,IAAI;IACnC,IAAI,CAACjB,aAAD,IAAkBiB,aAAa,CAACC,QAAd,KAA2B,GAAjD,EAAsD;MACpD,OAAO,IAAP;IACD;;IACD,oBACE;MAAK,GAAG,EAAED,aAAa,CAACE;IAAxB,gBACE,oBAAC,iBAAD,EAAuBF,aAAvB,CADF,CADF;EAKD,CATA,CADH,CApCF,CADF;AAmDD,CApED;;AAsEAvB,cAAc,CAAC0B,YAAf,GAA8B;EAC5BrB,SAAS,EAAEX,QAAQ,CAACiC,iBAAT,CAA2BtB;AADV,CAA9B;AAIAL,cAAc,CAAC4B,SAAf,2CAA2B;EACzBzB,cAAc,EAAEV,SAAS,CAACoC,OAAV,CACdpC,SAAS,CAACqC,KAAV,CAAgB;IACdL,KAAK,EAAEhC,SAAS,CAACsC,MADH;IAEdC,IAAI,EAAEvC,SAAS,CAACqC,KAAV,CAAgB;MACpBG,KAAK,EAAExC,SAAS,CAACsC,MADG;MAEpBG,SAAS,EAAEzC,SAAS,CAACqC,KAAV,CAAgB;QACzBK,MAAM,EAAE1C,SAAS,CAAC2C;MADO,CAAhB;IAFS,CAAhB,CAFQ;IAQdZ,QAAQ,EAAE/B,SAAS,CAAC2C,MARN;IASdC,MAAM,EAAE5C,SAAS,CAACsC,MATJ;IAUdO,OAAO,EAAE7C,SAAS,CAAC8C;EAVL,CAAhB,CADc,CADS;EAezBnC,OAAO,EAAEX,SAAS,CAACqC,KAAV,CAAgBlC,MAAM,CAACgC,SAAvB;AAfgB,CAA3B;AAkBA,eAAe5B,cAAf"}
|
|
@@ -33,13 +33,7 @@ declare namespace PlaylistDetail {
|
|
|
33
33
|
}> | null | undefined)[]>;
|
|
34
34
|
const playlistRef: PropTypes.Validator<string>;
|
|
35
35
|
const description: PropTypes.Requireable<string>;
|
|
36
|
-
const
|
|
37
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
38
|
-
customStyle: PropTypes.Requireable<{
|
|
39
|
-
[x: string]: string | null | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
loading: PropTypes.Requireable<boolean>;
|
|
42
|
-
}>>;
|
|
36
|
+
const ongoingCoursesAvailable: PropTypes.Requireable<boolean>;
|
|
43
37
|
const playlistCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
44
38
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
45
39
|
customStyle: PropTypes.Requireable<{
|
|
@@ -47,7 +41,6 @@ declare namespace PlaylistDetail {
|
|
|
47
41
|
}>;
|
|
48
42
|
loading: PropTypes.Requireable<boolean>;
|
|
49
43
|
}>>;
|
|
50
|
-
const totalCourses: PropTypes.Requireable<number>;
|
|
51
44
|
const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
52
45
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
46
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";AAgBA,uEAuEC"}
|
|
@@ -8,7 +8,6 @@ import ButtonLinkIcon from '../../atom/button-link-icon';
|
|
|
8
8
|
import Icon from '../../atom/icon';
|
|
9
9
|
import CardsGrid from '../../organism/cards-grid';
|
|
10
10
|
import AllCourses from '../skill-detail/all-courses';
|
|
11
|
-
import ContinueLearning from '../skill-detail/continue-learning';
|
|
12
11
|
import PlaylistDetailCover from '../../molecule/playlist-detail-cover';
|
|
13
12
|
import { ContinueLearningButton } from '../skill-detail';
|
|
14
13
|
import style from './style.css';
|
|
@@ -20,9 +19,8 @@ const PlaylistDetail = (props, context) => {
|
|
|
20
19
|
coverImages,
|
|
21
20
|
playlistRef,
|
|
22
21
|
description,
|
|
23
|
-
|
|
22
|
+
ongoingCoursesAvailable,
|
|
24
23
|
playlistCourses,
|
|
25
|
-
totalCourses,
|
|
26
24
|
filters,
|
|
27
25
|
sorting,
|
|
28
26
|
onBackClick,
|
|
@@ -72,15 +70,10 @@ const PlaylistDetail = (props, context) => {
|
|
|
72
70
|
})) : null) : null, /*#__PURE__*/React.createElement("div", {
|
|
73
71
|
className: style.continueLearningButton
|
|
74
72
|
}, /*#__PURE__*/React.createElement(ContinueLearningButton, {
|
|
75
|
-
ongoingCoursesAvailable:
|
|
73
|
+
ongoingCoursesAvailable: ongoingCoursesAvailable,
|
|
76
74
|
onClick: onContinueLearningClick
|
|
77
|
-
})))), /*#__PURE__*/React.createElement(
|
|
78
|
-
|
|
79
|
-
}, /*#__PURE__*/React.createElement(ContinueLearning, {
|
|
80
|
-
ongoingCourses: ongoingCourses
|
|
81
|
-
})), /*#__PURE__*/React.createElement(AllCourses, {
|
|
82
|
-
courses: playlistCourses,
|
|
83
|
-
totalCourses: totalCourses,
|
|
75
|
+
})))), /*#__PURE__*/React.createElement(AllCourses, {
|
|
76
|
+
content: playlistCourses,
|
|
84
77
|
filters: filters,
|
|
85
78
|
sorting: sorting
|
|
86
79
|
})));
|
|
@@ -95,9 +88,8 @@ PlaylistDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
95
88
|
coverImages: PlaylistDetailCover.propTypes.images,
|
|
96
89
|
playlistRef: PropTypes.string.isRequired,
|
|
97
90
|
description: PropTypes.string,
|
|
98
|
-
|
|
91
|
+
ongoingCoursesAvailable: PropTypes.bool,
|
|
99
92
|
playlistCourses: PropTypes.shape(CardsGrid.propTypes),
|
|
100
|
-
totalCourses: PropTypes.number,
|
|
101
93
|
filters: PropTypes.shape({
|
|
102
94
|
onChange: PropTypes.func,
|
|
103
95
|
options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","classnames","Provider","Tag","Select","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","PlaylistDetailCover","ContinueLearningButton","style","DESCRIPTION_BREAKPOINT","PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCoursesAvailable","playlistCourses","filters","sorting","onBackClick","onContinueLearningClick","translate","showMore","setShowMore","handleShowMore","Description","truncate","backgroundContainer","container","backButton","ctaContainer","coverWrapper","length","showMoreWrapper","faSize","wrapperSize","continueLearningButton","contextTypes","skin","childContextTypes","propTypes","string","isRequired","images","bool","shape","onChange","func","options","arrayOf"],"sources":["../../../src/template/playlist-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport PlaylistDetailCover from '../../molecule/playlist-detail-cover';\nimport {ContinueLearningButton} from '../skill-detail';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst PlaylistDetail = (props, context) => {\n const {\n title,\n coverImages,\n playlistRef,\n description,\n ongoingCoursesAvailable,\n playlistCourses,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick\n } = props;\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 }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.coverWrapper}>\n <PlaylistDetailCover images={coverImages} />\n </div>\n <div>\n <Tag label={translate('playlist')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <AllCourses content={playlistCourses} filters={filters} sorting={sorting} />\n </div>\n </div>\n );\n};\n\nPlaylistDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nPlaylistDetail.propTypes = {\n title: PropTypes.string.isRequired,\n coverImages: PlaylistDetailCover.propTypes.images,\n playlistRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n ongoingCoursesAvailable: PropTypes.bool,\n playlistCourses: 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 onContinueLearningClick: PropTypes.func\n};\n\nexport default PlaylistDetail;\n"],"mappings":"AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,QAA5B,QAA2C,OAA3C;AACA,OAAOC,SAAP,MAAsB,YAAtB;AACA,OAAOC,UAAP,MAAuB,YAAvB;AACA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,CAAC2C,iBAAT,CAA2BlB;AAFV,CAA9B;AAKAb,cAAc,CAACgC,SAAf,2CAA2B;EACzB7B,KAAK,EAAEjB,SAAS,CAAC+C,MAAV,CAAiBC,UADC;EAEzB9B,WAAW,EAAER,mBAAmB,CAACoC,SAApB,CAA8BG,MAFlB;EAGzB9B,WAAW,EAAEnB,SAAS,CAAC+C,MAAV,CAAiBC,UAHL;EAIzB5B,WAAW,EAAEpB,SAAS,CAAC+C,MAJE;EAKzB1B,uBAAuB,EAAErB,SAAS,CAACkD,IALV;EAMzB5B,eAAe,EAAEtB,SAAS,CAACmD,KAAV,CAAgB3C,SAAS,CAACsC,SAA1B,CANQ;EAOzBvB,OAAO,EAAEvB,SAAS,CAACmD,KAAV,CAAgB;IACvBC,QAAQ,EAAEpD,SAAS,CAACqD,IADG;IAEvBC,OAAO,EAAEtD,SAAS,CAACuD,OAAV,CAAkBvD,SAAS,CAACmD,KAAV,CAAgB9C,qBAAhB,CAAlB;EAFc,CAAhB,CAPgB;EAWzBmB,OAAO,EAAExB,SAAS,CAACmD,KAAV,CAAgB/C,MAAM,CAAC0C,SAAvB,CAXgB;EAYzBrB,WAAW,EAAEzB,SAAS,CAACqD,IAZE;EAazB3B,uBAAuB,EAAE1B,SAAS,CAACqD;AAbV,CAA3B;AAgBA,eAAevC,cAAf"}
|
|
@@ -61,33 +61,27 @@ declare namespace SkillDetail {
|
|
|
61
61
|
}
|
|
62
62
|
export { contextTypes_1 as contextTypes };
|
|
63
63
|
export namespace propTypes_1 {
|
|
64
|
-
const title: PropTypes.Validator<string>;
|
|
65
|
-
const skillRef: PropTypes.Validator<string>;
|
|
66
|
-
const description: PropTypes.Requireable<string>;
|
|
67
|
-
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
64
|
+
export const title: PropTypes.Validator<string>;
|
|
65
|
+
export const skillRef: PropTypes.Validator<string>;
|
|
66
|
+
export const description: PropTypes.Requireable<string>;
|
|
67
|
+
export const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
68
|
score: PropTypes.Requireable<number>;
|
|
69
69
|
content: PropTypes.Requireable<number>;
|
|
70
70
|
questionsToReview: PropTypes.Requireable<number>;
|
|
71
71
|
contentCompleted: PropTypes.Requireable<number>;
|
|
72
72
|
}>>;
|
|
73
|
-
const focused: PropTypes.Requireable<boolean>;
|
|
74
|
-
const availableForReview: PropTypes.Requireable<boolean>;
|
|
75
|
-
const
|
|
73
|
+
export const focused: PropTypes.Requireable<boolean>;
|
|
74
|
+
export const availableForReview: PropTypes.Requireable<boolean>;
|
|
75
|
+
const ongoingCoursesAvailable_1: PropTypes.Requireable<boolean>;
|
|
76
|
+
export { ongoingCoursesAvailable_1 as ongoingCoursesAvailable };
|
|
77
|
+
export const skillIncludedCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
76
78
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
77
79
|
customStyle: PropTypes.Requireable<{
|
|
78
80
|
[x: string]: string | null | undefined;
|
|
79
81
|
}>;
|
|
80
82
|
loading: PropTypes.Requireable<boolean>;
|
|
81
83
|
}>>;
|
|
82
|
-
const
|
|
83
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
84
|
-
customStyle: PropTypes.Requireable<{
|
|
85
|
-
[x: string]: string | null | undefined;
|
|
86
|
-
}>;
|
|
87
|
-
loading: PropTypes.Requireable<boolean>;
|
|
88
|
-
}>>;
|
|
89
|
-
const totalCourses: PropTypes.Requireable<number>;
|
|
90
|
-
const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
84
|
+
export const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
91
85
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
92
86
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
93
87
|
name: PropTypes.Validator<string>;
|
|
@@ -96,7 +90,7 @@ declare namespace SkillDetail {
|
|
|
96
90
|
validOption: PropTypes.Requireable<boolean>;
|
|
97
91
|
}> | null | undefined)[]>;
|
|
98
92
|
}>>;
|
|
99
|
-
const sorting: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
|
+
export const sorting: PropTypes.Requireable<PropTypes.InferProps<{
|
|
100
94
|
title: PropTypes.Requireable<string>;
|
|
101
95
|
name: PropTypes.Requireable<string>;
|
|
102
96
|
className: PropTypes.Requireable<string>;
|
|
@@ -127,9 +121,9 @@ declare namespace SkillDetail {
|
|
|
127
121
|
'aria-label': PropTypes.Requireable<string>;
|
|
128
122
|
'aria-labelledby': PropTypes.Requireable<string>;
|
|
129
123
|
}>>;
|
|
130
|
-
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
|
-
const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
|
-
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
124
|
+
export const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
125
|
+
export const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
126
|
+
export const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
133
127
|
}
|
|
134
128
|
export { propTypes_1 as propTypes };
|
|
135
129
|
}
|
|
@@ -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":"AAcO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEAuJC"}
|
|
@@ -11,7 +11,6 @@ import Icon from '../../atom/icon';
|
|
|
11
11
|
import CardsGrid from '../../organism/cards-grid';
|
|
12
12
|
import style from './style.css';
|
|
13
13
|
import AllCourses from './all-courses';
|
|
14
|
-
import ContinueLearning from './continue-learning';
|
|
15
14
|
export const ContinueLearningButton = (props, context) => {
|
|
16
15
|
const {
|
|
17
16
|
ongoingCoursesAvailable,
|
|
@@ -62,9 +61,8 @@ const SkillDetail = (props, context) => {
|
|
|
62
61
|
metrics = {},
|
|
63
62
|
focused,
|
|
64
63
|
availableForReview,
|
|
65
|
-
|
|
64
|
+
ongoingCoursesAvailable,
|
|
66
65
|
skillIncludedCourses,
|
|
67
|
-
totalCourses,
|
|
68
66
|
filters,
|
|
69
67
|
sorting,
|
|
70
68
|
onBackClick,
|
|
@@ -149,7 +147,7 @@ const SkillDetail = (props, context) => {
|
|
|
149
147
|
borderRadius: '12px'
|
|
150
148
|
}
|
|
151
149
|
}), /*#__PURE__*/React.createElement(ContinueLearningButton, {
|
|
152
|
-
ongoingCoursesAvailable:
|
|
150
|
+
ongoingCoursesAvailable: ongoingCoursesAvailable,
|
|
153
151
|
onClick: onContinueLearningClick
|
|
154
152
|
}))), score !== undefined ? /*#__PURE__*/React.createElement("div", {
|
|
155
153
|
className: style.progressInformationsWrapper
|
|
@@ -167,7 +165,7 @@ const SkillDetail = (props, context) => {
|
|
|
167
165
|
"data-name": "skill-questions"
|
|
168
166
|
}, /*#__PURE__*/React.createElement("span", {
|
|
169
167
|
className: style.skillInformationNumber
|
|
170
|
-
}, questionsToReview), "\xA0", translate('
|
|
168
|
+
}, questionsToReview), "\xA0", translate('skill_chart_side_panel_questions_to_review')) : null), /*#__PURE__*/React.createElement(ProgressBar, null), /*#__PURE__*/React.createElement("div", {
|
|
171
169
|
className: style.progressInformations
|
|
172
170
|
}, content && /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
173
171
|
className: style.progressInformation,
|
|
@@ -179,11 +177,8 @@ const SkillDetail = (props, context) => {
|
|
|
179
177
|
"data-name": "completed-percentage"
|
|
180
178
|
}, /*#__PURE__*/React.createElement("span", {
|
|
181
179
|
className: style.progressInformationNumber
|
|
182
|
-
}, score.toFixed(1), "%"))))) : null, /*#__PURE__*/React.createElement(
|
|
183
|
-
|
|
184
|
-
}), /*#__PURE__*/React.createElement(AllCourses, {
|
|
185
|
-
courses: skillIncludedCourses,
|
|
186
|
-
totalCourses: totalCourses,
|
|
180
|
+
}, score.toFixed(1), "%"))))) : null, /*#__PURE__*/React.createElement(AllCourses, {
|
|
181
|
+
content: skillIncludedCourses,
|
|
187
182
|
filters: filters,
|
|
188
183
|
sorting: sorting
|
|
189
184
|
})));
|
|
@@ -205,9 +200,8 @@ SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
205
200
|
}),
|
|
206
201
|
focused: PropTypes.bool,
|
|
207
202
|
availableForReview: PropTypes.bool,
|
|
208
|
-
|
|
203
|
+
ongoingCoursesAvailable: PropTypes.bool,
|
|
209
204
|
skillIncludedCourses: PropTypes.shape(CardsGrid.propTypes),
|
|
210
|
-
totalCourses: PropTypes.number,
|
|
211
205
|
filters: PropTypes.shape({
|
|
212
206
|
onChange: PropTypes.func,
|
|
213
207
|
options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","Select","SelectOptionPropTypes","ButtonLink","ButtonLinkIcon","Icon","CardsGrid","style","AllCourses","ContinueLearning","ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","totalCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","toFixed","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} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\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\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\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 skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n totalCourses,\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 }, [showMore, description]);\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={skillRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div>\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\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\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.toFixed(1)}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={skillIncludedCourses}\n totalCourses={totalCourses}\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 skillRef: 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 totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n onReviewClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func\n};\n\nexport default SkillDetail;\n"],"mappings":";AAAA,OAAOA,KAAP,IAAeC,WAAf,EAA4BC,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,CAACuF,MAFI;IAGvBpC,iBAAiB,EAAEnD,SAAS,CAACuF,MAHN;IAIvBnC,gBAAgB,EAAEpD,SAAS,CAACuF;EAJL,CAAhB,CAJa;EAUtBhD,OAAO,EAAEvC,SAAS,CAACgC,IAVG;EAWtBQ,kBAAkB,EAAExC,SAAS,CAACgC,IAXR;EAYtBS,cAAc,EAAEzC,SAAS,CAACsF,KAAV,CAAgB7E,SAAS,CAACsB,SAA1B,CAZM;EAatBW,oBAAoB,EAAE1C,SAAS,CAACsF,KAAV,CAAgB7E,SAAS,CAACsB,SAA1B,CAbA;EActBY,YAAY,EAAE3C,SAAS,CAACuF,MAdF;EAetB3C,OAAO,EAAE5C,SAAS,CAACsF,KAAV,CAAgB;IACvBE,QAAQ,EAAExF,SAAS,CAACiC,IADG;IAEvBwD,OAAO,EAAEzF,SAAS,CAAC0F,OAAV,CAAkB1F,SAAS,CAACsF,KAAV,CAAgBjF,qBAAhB,CAAlB;EAFc,CAAhB,CAfa;EAmBtBwC,OAAO,EAAE7C,SAAS,CAACsF,KAAV,CAAgBlF,MAAM,CAAC2B,SAAvB,CAnBa;EAoBtBe,WAAW,EAAE9C,SAAS,CAACiC,IApBD;EAqBtBc,aAAa,EAAE/C,SAAS,CAACiC,IArBH;EAsBtBe,uBAAuB,EAAEhD,SAAS,CAACiC;AAtBb,CAAxB;AAyBA,eAAeC,WAAf"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["React","useCallback","useState","PropTypes","convert","classnames","Provider","Select","SelectOptionPropTypes","ButtonLink","ButtonLinkIcon","Icon","CardsGrid","style","AllCourses","ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","width","borderRadius","backgroundColor","position","faIcon","name","color","size","contextTypes","childContextTypes","propTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","handleShowMore","Description","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","length","showMoreWrapper","ctaWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","toFixed","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} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\n\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\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 skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCoursesAvailable,\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 }, [showMore, description]);\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={skillRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div>\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\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\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('skill_chart_side_panel_questions_to_review')}\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.toFixed(1)}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <AllCourses content={skillIncludedCourses} filters={filters} sorting={sorting} />\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 skillRef: 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 ongoingCoursesAvailable: PropTypes.bool,\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: PropT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;IAIvBlC,gBAAgB,EAAEjD,SAAS,CAACmF;EAJL,CAAhB,CAJa;EAUtB7C,OAAO,EAAEtC,SAAS,CAAC+B,IAVG;EAWtBQ,kBAAkB,EAAEvC,SAAS,CAAC+B,IAXR;EAYtBhB,uBAAuB,EAAEf,SAAS,CAAC+B,IAZb;EAatBS,oBAAoB,EAAExC,SAAS,CAACkF,KAAV,CAAgBzE,SAAS,CAACqB,SAA1B,CAbA;EActBW,OAAO,EAAEzC,SAAS,CAACkF,KAAV,CAAgB;IACvBE,QAAQ,EAAEpF,SAAS,CAACgC,IADG;IAEvBqD,OAAO,EAAErF,SAAS,CAACsF,OAAV,CAAkBtF,SAAS,CAACkF,KAAV,CAAgB7E,qBAAhB,CAAlB;EAFc,CAAhB,CAda;EAkBtBqC,OAAO,EAAE1C,SAAS,CAACkF,KAAV,CAAgB9E,MAAM,CAAC0B,SAAvB,CAlBa;EAmBtBa,WAAW,EAAE3C,SAAS,CAACgC,IAnBD;EAoBtBY,aAAa,EAAE5C,SAAS,CAACgC,IApBH;EAqBtBa,uBAAuB,EAAE7C,SAAS,CAACgC;AArBb,CAAxB;AAwBA,eAAeC,WAAf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/certification-card/index.js"],"names":[],"mappings":";AAQA,0EAwDC"}
|
|
@@ -77,7 +77,8 @@ const CertificationCard = (props, context) => {
|
|
|
77
77
|
label: translate('certification'),
|
|
78
78
|
size: "S"
|
|
79
79
|
}), /*#__PURE__*/_react.default.createElement("div", {
|
|
80
|
-
className: _style.default.title
|
|
80
|
+
className: _style.default.title,
|
|
81
|
+
"data-name": "certification-title"
|
|
81
82
|
}, title), /*#__PURE__*/_react.default.createElement("div", {
|
|
82
83
|
className: _style.default.moduleCount
|
|
83
84
|
}, /*#__PURE__*/_react.default.createElement("span", null, nbDone), ` ${translate('certification_module')}`)), /*#__PURE__*/_react.default.createElement(_progressBar.default, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","style","container","top","right","imageWrapper","detailWrapper","titleWrapper","moduleCount","customProgressBar","COLORS","positive","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageWrapper}>\n <img src={imgUrl} />\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title}
|
|
1
|
+
{"version":3,"file":"index.js","names":["CertificationCard","props","context","label","goal","progress","imgUrl","onClick","title","condition","nbDone","translate","isInprogress","progressLabel","progressTagType","progressIconProps","position","iconName","iconColor","backgroundColor","size","faSize","wrapperSize","customStyle","padding","style","container","top","right","imageWrapper","detailWrapper","titleWrapper","moduleCount","customProgressBar","COLORS","positive","contextTypes","Provider","childContextTypes","propTypes","PropTypes","string","shape","number","func"],"sources":["../../../src/molecule/certification-card/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport {COLORS} from '../../variables/colors';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport ProgressBar from '../progress-bar';\nimport style from './style.css';\n\nconst CertificationCard = (props, context) => {\n const {label, goal, progress, imgUrl, onClick} = props;\n const {\n title,\n condition: {nbDone}\n } = goal;\n const {translate} = context;\n\n const isInprogress = progress < 100;\n const progressLabel = isInprogress ? translate('in_progress') : translate('completed');\n const progressTagType = isInprogress ? 'progress' : 'success';\n const progressIconProps = {\n position: 'left',\n iconName: isInprogress ? 'clock' : 'circle-check',\n iconColor: isInprogress ? '#B87A00' : '#05944F',\n backgroundColor: isInprogress ? '#FFEECC' : '#D6F5E5',\n size: {\n faSize: 10,\n wrapperSize: 10\n },\n customStyle: {padding: 0}\n };\n return (\n <div className={style.container} data-name={`certification-card-${label}`} onClick={onClick}>\n {progress > 0 ? (\n <Tag\n label={progressLabel}\n type={progressTagType}\n customStyle={{position: 'absolute', top: '12px', right: '12px'}}\n icon={progressIconProps}\n />\n ) : null}\n <div className={style.imageWrapper}>\n <img src={imgUrl} />\n </div>\n <div className={style.detailWrapper}>\n <div className={style.titleWrapper}>\n <Tag label={translate('certification')} size=\"S\" />\n <div className={style.title} data-name=\"certification-title\">\n {title}\n </div>\n <div className={style.moduleCount}>\n <span>{nbDone}</span>\n {` ${translate('certification_module')}`}\n </div>\n </div>\n <ProgressBar\n className={style.customProgressBar}\n style={{backgroundColor: COLORS.positive}}\n displayInfo={false}\n value={progress}\n max={100}\n />\n </div>\n </div>\n );\n};\n\nCertificationCard.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertificationCard.propTypes = {\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n};\n\nexport default CertificationCard;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AAEA,MAAMA,iBAAiB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EAC5C,MAAM;IAACC,KAAD;IAAQC,IAAR;IAAcC,QAAd;IAAwBC,MAAxB;IAAgCC;EAAhC,IAA2CN,KAAjD;EACA,MAAM;IACJO,KADI;IAEJC,SAAS,EAAE;MAACC;IAAD;EAFP,IAGFN,IAHJ;EAIA,MAAM;IAACO;EAAD,IAAcT,OAApB;EAEA,MAAMU,YAAY,GAAGP,QAAQ,GAAG,GAAhC;EACA,MAAMQ,aAAa,GAAGD,YAAY,GAAGD,SAAS,CAAC,aAAD,CAAZ,GAA8BA,SAAS,CAAC,WAAD,CAAzE;EACA,MAAMG,eAAe,GAAGF,YAAY,GAAG,UAAH,GAAgB,SAApD;EACA,MAAMG,iBAAiB,GAAG;IACxBC,QAAQ,EAAE,MADc;IAExBC,QAAQ,EAAEL,YAAY,GAAG,OAAH,GAAa,cAFX;IAGxBM,SAAS,EAAEN,YAAY,GAAG,SAAH,GAAe,SAHd;IAIxBO,eAAe,EAAEP,YAAY,GAAG,SAAH,GAAe,SAJpB;IAKxBQ,IAAI,EAAE;MACJC,MAAM,EAAE,EADJ;MAEJC,WAAW,EAAE;IAFT,CALkB;IASxBC,WAAW,EAAE;MAACC,OAAO,EAAE;IAAV;EATW,CAA1B;EAWA,oBACE;IAAK,SAAS,EAAEC,cAAA,CAAMC,SAAtB;IAAiC,aAAY,sBAAqBvB,KAAM,EAAxE;IAA2E,OAAO,EAAEI;EAApF,GACGF,QAAQ,GAAG,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S,EAAE+B,kBAAA,CAAUE,KAAV,CAAgB;MACzBhC,MAAM,EAAE8B,kBAAA,CAAUG;IADO,CAAhB;EAFS,CAAhB,CAFsB;EAQ5BtC,QAAQ,EAAEmC,kBAAA,CAAUG,MARQ;EAS5BrC,MAAM,EAAEkC,kBAAA,CAAUC,MATU;EAU5BlC,OAAO,EAAEiC,kBAAA,CAAUI;AAVS,CAA9B;eAae5C,iB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAMA,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/molecule/progress-bar/index.js"],"names":[],"mappings":";AAMA,sDAqCC"}
|
|
@@ -35,7 +35,9 @@ const ProgressBar = props => {
|
|
|
35
35
|
key: index
|
|
36
36
|
}), steps);
|
|
37
37
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
38
|
-
className: (0, _classnames.default)(_style.default.background, className)
|
|
38
|
+
className: (0, _classnames.default)(_style.default.background, className),
|
|
39
|
+
"data-name": "progress-bar-wrapper",
|
|
40
|
+
"data-content": `${text}`
|
|
39
41
|
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
40
42
|
className: _style.default.progress,
|
|
41
43
|
style: _extends({}, propsStyle, {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ProgressBar","props","className","value","max","desc","steps","style","propsStyle","displayInfo","ratio","percentage","Math","floor","text","stepList","index","step","classnames","background","progress","width","texts","description","propTypes","PropTypes","string","number","isRequired","objectOf","oneOfType","bool"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {\n className,\n value,\n max,\n desc = '',\n steps = 0,\n style: propsStyle,\n displayInfo = true\n } = props;\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div
|
|
1
|
+
{"version":3,"file":"index.js","names":["ProgressBar","props","className","value","max","desc","steps","style","propsStyle","displayInfo","ratio","percentage","Math","floor","text","stepList","index","step","classnames","background","progress","width","texts","description","propTypes","PropTypes","string","number","isRequired","objectOf","oneOfType","bool"],"sources":["../../../src/molecule/progress-bar/index.js"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {times} from 'lodash/fp';\nimport style from './style.css';\n\nconst ProgressBar = props => {\n const {\n className,\n value,\n max,\n desc = '',\n steps = 0,\n style: propsStyle,\n displayInfo = true\n } = props;\n\n const ratio = value / max;\n const percentage = Math.floor(ratio * 100);\n const text = `${percentage}%`;\n const stepList = times(index => <div className={style.step} key={index} />, steps);\n return (\n <div\n className={classnames(style.background, className)}\n data-name=\"progress-bar-wrapper\"\n data-content={`${text}`}\n >\n <div\n className={style.progress}\n style={{\n ...propsStyle,\n width: `${ratio * 100}%`\n }}\n />\n {displayInfo ? (\n <p className={style.texts}>\n <span className={style.description}>{`${value}/${max} ${desc}`}</span>\n <span className={style.percentage}>{text}</span>\n </p>\n ) : null}\n <div className={style.steps}>{stepList}</div>\n </div>\n );\n};\n\nProgressBar.propTypes = {\n className: PropTypes.string,\n value: PropTypes.number.isRequired,\n max: PropTypes.number.isRequired,\n desc: PropTypes.string,\n steps: PropTypes.number,\n style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),\n displayInfo: PropTypes.bool\n};\n\nexport default ProgressBar;\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAEA;;;;;;AAEA,MAAMA,WAAW,GAAGC,KAAK,IAAI;EAC3B,MAAM;IACJC,SADI;IAEJC,KAFI;IAGJC,GAHI;IAIJC,IAAI,GAAG,EAJH;IAKJC,KAAK,GAAG,CALJ;IAMJC,KAAK,EA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EmB,kBAAA,CAAUE,MALK;EAMtBpB,KAAK,EAAEkB,kBAAA,CAAUI,QAAV,CAAmBJ,kBAAA,CAAUK,SAAV,CAAoB,CAACL,kBAAA,CAAUC,MAAX,EAAmBD,kBAAA,CAAUE,MAA7B,CAApB,CAAnB,CANe;EAOtBlB,WAAW,EAAEgB,kBAAA,CAAUM;AAPD,CAAxB;eAUe/B,W"}
|
|
@@ -45,7 +45,8 @@ const Certifications = (props, context) => {
|
|
|
45
45
|
setShowCompleted(!showCompleted);
|
|
46
46
|
}, [showCompleted, setShowCompleted]);
|
|
47
47
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
-
className: _style.default.container
|
|
48
|
+
className: _style.default.container,
|
|
49
|
+
"data-name": "Certifications"
|
|
49
50
|
}, /*#__PURE__*/_react.default.createElement(_title.default, {
|
|
50
51
|
title: translate('certificates'),
|
|
51
52
|
subtitle: translate('certificates_subtitle'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["Certifications","props","context","certifications","sorting","translate","showCompleted","setShowCompleted","useState","sortView","undefined","handleShowCompletedToggle","useCallback","style","container","iconName","iconColor","borderRadius","backgroundColor","sortSectionWrapper","certificatesCount","length","sortSection","sortWrapper","certificateList","map","certification","progress","label","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","goal","title","condition","nbDone","number","imgUrl","onClick","func","Select"],"sources":["../../../src/template/certifications/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Title from '../../atom/title';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport CertificationCard from '../../molecule/certification-card';\nimport style from './style.css';\n\nconst Certifications = (props, context) => {\n const {certifications, sorting} = props;\n const {translate} = context;\n\n const [showCompleted, setShowCompleted] = useState(true);\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 handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(!showCompleted);\n }, [showCompleted, setShowCompleted]);\n\n return (\n <div className={style.container}>\n <Title\n title={translate('certificates')}\n subtitle={translate('certificates_subtitle')}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n subtitleSize=\"standard-without-margin\"\n icon={{\n iconName: 'wreath-laurel',\n iconColor: '#B87A00',\n borderRadius: '12px',\n backgroundColor: '#FFEECC'\n }}\n />\n <div className={style.sortSectionWrapper}>\n <div className={style.certificatesCount}>\n {`${certifications.length} ${translate('certificate(s)')}`}\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 {sorting ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.certificateList}>\n {certifications.map(certification => {\n if (!showCompleted && certification.progress === 100) {\n return null;\n }\n return (\n <div key={certification.label}>\n <CertificationCard {...certification} />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nCertifications.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertifications.propTypes = {\n certifications: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default Certifications;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IAACC,cAAD;IAAiBC;EAAjB,IAA4BH,KAAlC;EACA,MAAM;IAACI;EAAD,IAAcH,OAApB;EAEA,MAAM,CAACI,aAAD,EAAgBC,gBAAhB,IAAoC,IAAAC,eAAA,EAAS,IAAT,CAA1C;EAEA,MAAMC,QAAQ,GACZL,OAAO,KAAKM,SAAZ,gBACE;IAAK,aAAU;EAAf,gBACE,6BAAC,eAAD,eAAYN,OAAZ;IAAqB,cAAW;EAAhC,GADF,CADF,GAII,IALN;EAOA,MAAMO,yBAAyB,GAAG,IAAAC,kBAAA,EAAY,MAAM;IAClDL,gBAAgB,CAAC,CAACD,aAAF,CAAhB;EACD,CAFiC,EAE/B,CAACA,aAAD,EAAgBC,gBAAhB,CAF+B,CAAlC;EAIA,oBACE;IAAK,SAAS,EAAEM,cAAA,CAAMC;
|
|
1
|
+
{"version":3,"file":"index.js","names":["Certifications","props","context","certifications","sorting","translate","showCompleted","setShowCompleted","useState","sortView","undefined","handleShowCompletedToggle","useCallback","style","container","iconName","iconColor","borderRadius","backgroundColor","sortSectionWrapper","certificatesCount","length","sortSection","sortWrapper","certificateList","map","certification","progress","label","contextTypes","Provider","childContextTypes","propTypes","PropTypes","arrayOf","shape","string","goal","title","condition","nbDone","number","imgUrl","onClick","func","Select"],"sources":["../../../src/template/certifications/index.js"],"sourcesContent":["import React, {useState, useCallback} from 'react';\nimport PropTypes from 'prop-types';\nimport Provider from '../../atom/provider';\nimport Title from '../../atom/title';\nimport Select from '../../atom/select';\nimport InputSwitch from '../../atom/input-switch';\nimport CertificationCard from '../../molecule/certification-card';\nimport style from './style.css';\n\nconst Certifications = (props, context) => {\n const {certifications, sorting} = props;\n const {translate} = context;\n\n const [showCompleted, setShowCompleted] = useState(true);\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 handleShowCompletedToggle = useCallback(() => {\n setShowCompleted(!showCompleted);\n }, [showCompleted, setShowCompleted]);\n\n return (\n <div className={style.container} data-name=\"Certifications\">\n <Title\n title={translate('certificates')}\n subtitle={translate('certificates_subtitle')}\n type=\"form-group\"\n titleSize=\"standard-light-weight\"\n subtitleSize=\"standard-without-margin\"\n icon={{\n iconName: 'wreath-laurel',\n iconColor: '#B87A00',\n borderRadius: '12px',\n backgroundColor: '#FFEECC'\n }}\n />\n <div className={style.sortSectionWrapper}>\n <div className={style.certificatesCount}>\n {`${certifications.length} ${translate('certificate(s)')}`}\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 {sorting ? (\n <div className={style.sortWrapper}>\n {translate('sort_by')}\n {sortView}\n </div>\n ) : null}\n </div>\n </div>\n <div className={style.certificateList}>\n {certifications.map(certification => {\n if (!showCompleted && certification.progress === 100) {\n return null;\n }\n return (\n <div key={certification.label}>\n <CertificationCard {...certification} />\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n\nCertifications.contextTypes = {\n translate: Provider.childContextTypes.translate\n};\n\nCertifications.propTypes = {\n certifications: PropTypes.arrayOf(\n PropTypes.shape({\n label: PropTypes.string,\n goal: PropTypes.shape({\n title: PropTypes.string,\n condition: PropTypes.shape({\n nbDone: PropTypes.number\n })\n }),\n progress: PropTypes.number,\n imgUrl: PropTypes.string,\n onClick: PropTypes.func\n })\n ),\n sorting: PropTypes.shape(Select.propTypes)\n};\n\nexport default Certifications;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAEA,MAAMA,cAAc,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACzC,MAAM;IAACC,cAAD;IAAiBC;EAAjB,IAA4BH,KAAlC;EACA,MAAM;IAACI;EAAD,IAAcH,OAApB;EAEA,MAAM,CAACI,aAAD,EAAgBC,gBAAhB,IAAoC,IAAAC,eAAA,EAAS,IAAT,CAA1C;EAEA,MAA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AKJ,IAfN,CAJF,CAdF,eAoCE;IAAK,SAAS,EAAEI,cAAA,CAAMW;EAAtB,GACGrB,cAAc,CAACsB,GAAf,CAAmBC,aAAa,IAAI;IACnC,IAAI,CAACpB,aAAD,IAAkBoB,aAAa,CAACC,QAAd,KAA2B,GAAjD,EAAsD;MACpD,OAAO,IAAP;IACD;;IACD,oBACE;MAAK,GAAG,EAAED,aAAa,CAACE;IAAxB,gBACE,6BAAC,0BAAD,EAAuBF,aAAvB,CADF,CADF;EAKD,CATA,CADH,CApCF,CADF;AAmDD,CApED;;AAsEA1B,cAAc,CAAC6B,YAAf,GAA8B;EAC5BxB,SAAS,EAAEyB,iBAAA,CAASC,iBAAT,CAA2B1B;AADV,CAA9B;AAIAL,cAAc,CAACgC,SAAf,2CAA2B;EACzB7B,cAAc,EAAE8B,kBAAA,CAAUC,OAAV,CACdD,kBAAA,CAAUE,KAAV,CAAgB;IACdP,KAAK,EAAEK,kBAAA,CAAUG,MADH;IAEdC,IAAI,EAAEJ,kBAAA,CAAUE,KAAV,CAAgB;MACpBG,KAAK,EAAEL,kBAAA,CAAUG,MADG;MAEpBG,SAAS,EAAEN,kBAAA,CAAUE,KAAV,CAAgB;QACzBK,MAAM,EAAEP,kBAAA,CAAUQ;MADO,CAAhB;IAFS,CAAhB,CAFQ;IAQdd,QAAQ,EAAEM,kBAAA,CAAUQ,MARN;IASdC,MAAM,EAAET,kBAAA,CAAUG,MATJ;IAUdO,OAAO,EAAEV,kBAAA,CAAUW;EAVL,CAAhB,CADc,CADS;EAezBxC,OAAO,EAAE6B,kBAAA,CAAUE,KAAV,CAAgBU,eAAA,CAAOb,SAAvB;AAfgB,CAA3B;eAkBehC,c"}
|
|
@@ -33,13 +33,7 @@ declare namespace PlaylistDetail {
|
|
|
33
33
|
}> | null | undefined)[]>;
|
|
34
34
|
const playlistRef: PropTypes.Validator<string>;
|
|
35
35
|
const description: PropTypes.Requireable<string>;
|
|
36
|
-
const
|
|
37
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
38
|
-
customStyle: PropTypes.Requireable<{
|
|
39
|
-
[x: string]: string | null | undefined;
|
|
40
|
-
}>;
|
|
41
|
-
loading: PropTypes.Requireable<boolean>;
|
|
42
|
-
}>>;
|
|
36
|
+
const ongoingCoursesAvailable: PropTypes.Requireable<boolean>;
|
|
43
37
|
const playlistCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
44
38
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
45
39
|
customStyle: PropTypes.Requireable<{
|
|
@@ -47,7 +41,6 @@ declare namespace PlaylistDetail {
|
|
|
47
41
|
}>;
|
|
48
42
|
loading: PropTypes.Requireable<boolean>;
|
|
49
43
|
}>>;
|
|
50
|
-
const totalCourses: PropTypes.Requireable<number>;
|
|
51
44
|
const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
52
45
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
53
46
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/playlist-detail/index.js"],"names":[],"mappings":";AAgBA,uEAuEC"}
|
|
@@ -23,8 +23,6 @@ var _cardsGrid = _interopRequireDefault(require("../../organism/cards-grid"));
|
|
|
23
23
|
|
|
24
24
|
var _allCourses = _interopRequireDefault(require("../skill-detail/all-courses"));
|
|
25
25
|
|
|
26
|
-
var _continueLearning = _interopRequireDefault(require("../skill-detail/continue-learning"));
|
|
27
|
-
|
|
28
26
|
var _playlistDetailCover = _interopRequireDefault(require("../../molecule/playlist-detail-cover"));
|
|
29
27
|
|
|
30
28
|
var _skillDetail = require("../skill-detail");
|
|
@@ -45,9 +43,8 @@ const PlaylistDetail = (props, context) => {
|
|
|
45
43
|
coverImages,
|
|
46
44
|
playlistRef,
|
|
47
45
|
description,
|
|
48
|
-
|
|
46
|
+
ongoingCoursesAvailable,
|
|
49
47
|
playlistCourses,
|
|
50
|
-
totalCourses,
|
|
51
48
|
filters,
|
|
52
49
|
sorting,
|
|
53
50
|
onBackClick,
|
|
@@ -97,15 +94,10 @@ const PlaylistDetail = (props, context) => {
|
|
|
97
94
|
})) : null) : null, /*#__PURE__*/_react.default.createElement("div", {
|
|
98
95
|
className: _style.default.continueLearningButton
|
|
99
96
|
}, /*#__PURE__*/_react.default.createElement(_skillDetail.ContinueLearningButton, {
|
|
100
|
-
ongoingCoursesAvailable:
|
|
97
|
+
ongoingCoursesAvailable: ongoingCoursesAvailable,
|
|
101
98
|
onClick: onContinueLearningClick
|
|
102
|
-
})))), /*#__PURE__*/_react.default.createElement(
|
|
103
|
-
|
|
104
|
-
}, /*#__PURE__*/_react.default.createElement(_continueLearning.default, {
|
|
105
|
-
ongoingCourses: ongoingCourses
|
|
106
|
-
})), /*#__PURE__*/_react.default.createElement(_allCourses.default, {
|
|
107
|
-
courses: playlistCourses,
|
|
108
|
-
totalCourses: totalCourses,
|
|
99
|
+
})))), /*#__PURE__*/_react.default.createElement(_allCourses.default, {
|
|
100
|
+
content: playlistCourses,
|
|
109
101
|
filters: filters,
|
|
110
102
|
sorting: sorting
|
|
111
103
|
})));
|
|
@@ -120,9 +112,8 @@ PlaylistDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
120
112
|
coverImages: _playlistDetailCover.default.propTypes.images,
|
|
121
113
|
playlistRef: _propTypes.default.string.isRequired,
|
|
122
114
|
description: _propTypes.default.string,
|
|
123
|
-
|
|
115
|
+
ongoingCoursesAvailable: _propTypes.default.bool,
|
|
124
116
|
playlistCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
|
|
125
|
-
totalCourses: _propTypes.default.number,
|
|
126
117
|
filters: _propTypes.default.shape({
|
|
127
118
|
onChange: _propTypes.default.func,
|
|
128
119
|
options: _propTypes.default.arrayOf(_propTypes.default.shape(_select.SelectOptionPropTypes))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["DESCRIPTION_BREAKPOINT","PlaylistDetail","props","context","title","coverImages","playlistRef","description","
|
|
1
|
+
{"version":3,"file":"index.js","names":["DESCRIPTION_BREAKPOINT","PlaylistDetail","props","context","title","coverImages","playlistRef","description","ongoingCoursesAvailable","playlistCourses","filters","sorting","onBackClick","onContinueLearningClick","translate","showMore","setShowMore","useState","handleShowMore","useCallback","Description","classnames","style","truncate","backgroundContainer","container","backButton","ctaContainer","coverWrapper","length","showMoreWrapper","faSize","wrapperSize","continueLearningButton","contextTypes","skin","Provider","childContextTypes","propTypes","PropTypes","string","isRequired","PlaylistDetailCover","images","bool","shape","CardsGrid","onChange","func","options","arrayOf","SelectOptionPropTypes","Select"],"sources":["../../../src/template/playlist-detail/index.js"],"sourcesContent":["import React, {useCallback, useState} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport PlaylistDetailCover from '../../molecule/playlist-detail-cover';\nimport {ContinueLearningButton} from '../skill-detail';\nimport style from './style.css';\n\nconst DESCRIPTION_BREAKPOINT = 382;\n\nconst PlaylistDetail = (props, context) => {\n const {\n title,\n coverImages,\n playlistRef,\n description,\n ongoingCoursesAvailable,\n playlistCourses,\n filters,\n sorting,\n onBackClick,\n onContinueLearningClick\n } = props;\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 }, [showMore, description]);\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={playlistRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div className={style.coverWrapper}>\n <PlaylistDetailCover images={coverImages} />\n </div>\n <div>\n <Tag label={translate('playlist')} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {description.length >= DESCRIPTION_BREAKPOINT ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.continueLearningButton}>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n </div>\n <AllCourses content={playlistCourses} filters={filters} sorting={sorting} />\n </div>\n </div>\n );\n};\n\nPlaylistDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nPlaylistDetail.propTypes = {\n title: PropTypes.string.isRequired,\n coverImages: PlaylistDetailCover.propTypes.images,\n playlistRef: PropTypes.string.isRequired,\n description: PropTypes.string,\n ongoingCoursesAvailable: PropTypes.bool,\n playlistCourses: 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 onContinueLearningClick: PropTypes.func\n};\n\nexport default PlaylistDetail;\n"],"mappings":";;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AAEA,MAAMA,sBAAsB,GA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BnC,eAAe,EAAE8B,kBAAA,CAAUM,KAAV,CAAgBC,kBAAA,CAAUR,SAA1B,CANQ;EAOzB5B,OAAO,EAAE6B,kBAAA,CAAUM,KAAV,CAAgB;IACvBE,QAAQ,EAAER,kBAAA,CAAUS,IADG;IAEvBC,OAAO,EAAEV,kBAAA,CAAUW,OAAV,CAAkBX,kBAAA,CAAUM,KAAV,CAAgBM,6BAAhB,CAAlB;EAFc,CAAhB,CAPgB;EAWzBxC,OAAO,EAAE4B,kBAAA,CAAUM,KAAV,CAAgBO,eAAA,CAAOd,SAAvB,CAXgB;EAYzB1B,WAAW,EAAE2B,kBAAA,CAAUS,IAZE;EAazBnC,uBAAuB,EAAE0B,kBAAA,CAAUS;AAbV,CAA3B;eAgBe/C,c"}
|
|
@@ -61,33 +61,27 @@ declare namespace SkillDetail {
|
|
|
61
61
|
}
|
|
62
62
|
export { contextTypes_1 as contextTypes };
|
|
63
63
|
export namespace propTypes_1 {
|
|
64
|
-
const title: PropTypes.Validator<string>;
|
|
65
|
-
const skillRef: PropTypes.Validator<string>;
|
|
66
|
-
const description: PropTypes.Requireable<string>;
|
|
67
|
-
const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
64
|
+
export const title: PropTypes.Validator<string>;
|
|
65
|
+
export const skillRef: PropTypes.Validator<string>;
|
|
66
|
+
export const description: PropTypes.Requireable<string>;
|
|
67
|
+
export const metrics: PropTypes.Requireable<PropTypes.InferProps<{
|
|
68
68
|
score: PropTypes.Requireable<number>;
|
|
69
69
|
content: PropTypes.Requireable<number>;
|
|
70
70
|
questionsToReview: PropTypes.Requireable<number>;
|
|
71
71
|
contentCompleted: PropTypes.Requireable<number>;
|
|
72
72
|
}>>;
|
|
73
|
-
const focused: PropTypes.Requireable<boolean>;
|
|
74
|
-
const availableForReview: PropTypes.Requireable<boolean>;
|
|
75
|
-
const
|
|
73
|
+
export const focused: PropTypes.Requireable<boolean>;
|
|
74
|
+
export const availableForReview: PropTypes.Requireable<boolean>;
|
|
75
|
+
const ongoingCoursesAvailable_1: PropTypes.Requireable<boolean>;
|
|
76
|
+
export { ongoingCoursesAvailable_1 as ongoingCoursesAvailable };
|
|
77
|
+
export const skillIncludedCourses: PropTypes.Requireable<PropTypes.InferProps<{
|
|
76
78
|
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
77
79
|
customStyle: PropTypes.Requireable<{
|
|
78
80
|
[x: string]: string | null | undefined;
|
|
79
81
|
}>;
|
|
80
82
|
loading: PropTypes.Requireable<boolean>;
|
|
81
83
|
}>>;
|
|
82
|
-
const
|
|
83
|
-
list: PropTypes.Requireable<(PropTypes.InferProps<any> | null | undefined)[]>;
|
|
84
|
-
customStyle: PropTypes.Requireable<{
|
|
85
|
-
[x: string]: string | null | undefined;
|
|
86
|
-
}>;
|
|
87
|
-
loading: PropTypes.Requireable<boolean>;
|
|
88
|
-
}>>;
|
|
89
|
-
const totalCourses: PropTypes.Requireable<number>;
|
|
90
|
-
const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
84
|
+
export const filters: PropTypes.Requireable<PropTypes.InferProps<{
|
|
91
85
|
onChange: PropTypes.Requireable<(...args: any[]) => any>;
|
|
92
86
|
options: PropTypes.Requireable<(PropTypes.InferProps<{
|
|
93
87
|
name: PropTypes.Validator<string>;
|
|
@@ -96,7 +90,7 @@ declare namespace SkillDetail {
|
|
|
96
90
|
validOption: PropTypes.Requireable<boolean>;
|
|
97
91
|
}> | null | undefined)[]>;
|
|
98
92
|
}>>;
|
|
99
|
-
const sorting: PropTypes.Requireable<PropTypes.InferProps<{
|
|
93
|
+
export const sorting: PropTypes.Requireable<PropTypes.InferProps<{
|
|
100
94
|
title: PropTypes.Requireable<string>;
|
|
101
95
|
name: PropTypes.Requireable<string>;
|
|
102
96
|
className: PropTypes.Requireable<string>;
|
|
@@ -127,9 +121,9 @@ declare namespace SkillDetail {
|
|
|
127
121
|
'aria-label': PropTypes.Requireable<string>;
|
|
128
122
|
'aria-labelledby': PropTypes.Requireable<string>;
|
|
129
123
|
}>>;
|
|
130
|
-
const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
131
|
-
const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
132
|
-
const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
124
|
+
export const onBackClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
125
|
+
export const onReviewClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
126
|
+
export const onContinueLearningClick: PropTypes.Requireable<(...args: any[]) => any>;
|
|
133
127
|
}
|
|
134
128
|
export { propTypes_1 as propTypes };
|
|
135
129
|
}
|
|
@@ -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":"AAcO,8EA+BN;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYD,oEAuJC"}
|
|
@@ -29,8 +29,6 @@ var _style = _interopRequireDefault(require("./style.css"));
|
|
|
29
29
|
|
|
30
30
|
var _allCourses = _interopRequireDefault(require("./all-courses"));
|
|
31
31
|
|
|
32
|
-
var _continueLearning = _interopRequireDefault(require("./continue-learning"));
|
|
33
|
-
|
|
34
32
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
35
33
|
|
|
36
34
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -87,9 +85,8 @@ const SkillDetail = (props, context) => {
|
|
|
87
85
|
metrics = {},
|
|
88
86
|
focused,
|
|
89
87
|
availableForReview,
|
|
90
|
-
|
|
88
|
+
ongoingCoursesAvailable,
|
|
91
89
|
skillIncludedCourses,
|
|
92
|
-
totalCourses,
|
|
93
90
|
filters,
|
|
94
91
|
sorting,
|
|
95
92
|
onBackClick,
|
|
@@ -174,7 +171,7 @@ const SkillDetail = (props, context) => {
|
|
|
174
171
|
borderRadius: '12px'
|
|
175
172
|
}
|
|
176
173
|
}), /*#__PURE__*/_react.default.createElement(ContinueLearningButton, {
|
|
177
|
-
ongoingCoursesAvailable:
|
|
174
|
+
ongoingCoursesAvailable: ongoingCoursesAvailable,
|
|
178
175
|
onClick: onContinueLearningClick
|
|
179
176
|
}))), score !== undefined ? /*#__PURE__*/_react.default.createElement("div", {
|
|
180
177
|
className: _style.default.progressInformationsWrapper
|
|
@@ -192,7 +189,7 @@ const SkillDetail = (props, context) => {
|
|
|
192
189
|
"data-name": "skill-questions"
|
|
193
190
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
194
191
|
className: _style.default.skillInformationNumber
|
|
195
|
-
}, questionsToReview), "\xA0", translate('
|
|
192
|
+
}, questionsToReview), "\xA0", translate('skill_chart_side_panel_questions_to_review')) : null), /*#__PURE__*/_react.default.createElement(ProgressBar, null), /*#__PURE__*/_react.default.createElement("div", {
|
|
196
193
|
className: _style.default.progressInformations
|
|
197
194
|
}, content && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
198
195
|
className: _style.default.progressInformation,
|
|
@@ -204,11 +201,8 @@ const SkillDetail = (props, context) => {
|
|
|
204
201
|
"data-name": "completed-percentage"
|
|
205
202
|
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
206
203
|
className: _style.default.progressInformationNumber
|
|
207
|
-
}, score.toFixed(1), "%"))))) : null, /*#__PURE__*/_react.default.createElement(
|
|
208
|
-
|
|
209
|
-
}), /*#__PURE__*/_react.default.createElement(_allCourses.default, {
|
|
210
|
-
courses: skillIncludedCourses,
|
|
211
|
-
totalCourses: totalCourses,
|
|
204
|
+
}, score.toFixed(1), "%"))))) : null, /*#__PURE__*/_react.default.createElement(_allCourses.default, {
|
|
205
|
+
content: skillIncludedCourses,
|
|
212
206
|
filters: filters,
|
|
213
207
|
sorting: sorting
|
|
214
208
|
})));
|
|
@@ -230,9 +224,8 @@ SkillDetail.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
|
230
224
|
}),
|
|
231
225
|
focused: _propTypes.default.bool,
|
|
232
226
|
availableForReview: _propTypes.default.bool,
|
|
233
|
-
|
|
227
|
+
ongoingCoursesAvailable: _propTypes.default.bool,
|
|
234
228
|
skillIncludedCourses: _propTypes.default.shape(_cardsGrid.default.propTypes),
|
|
235
|
-
totalCourses: _propTypes.default.number,
|
|
236
229
|
filters: _propTypes.default.shape({
|
|
237
230
|
onChange: _propTypes.default.func,
|
|
238
231
|
options: _propTypes.default.arrayOf(_propTypes.default.shape(_select.SelectOptionPropTypes))
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","width","borderRadius","backgroundColor","convert","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","ongoingCourses","skillIncludedCourses","totalCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","useState","handleShowMore","useCallback","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","length","showMoreWrapper","ctaWrapper","list","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","toFixed","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} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\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\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\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 skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCourses,\n skillIncludedCourses,\n totalCourses,\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 }, [showMore, description]);\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={skillRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div>\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\n ongoingCoursesAvailable={!!ongoingCourses.list.length}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\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.toFixed(1)}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <ContinueLearning ongoingCourses={ongoingCourses} />\n <AllCourses\n courses={skillIncludedCourses}\n totalCourses={totalCourses}\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 skillRef: 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 totalCourses: PropTypes.number,\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n sorting: PropTypes.shape(Select.propTypes),\n onBackClick: PropTypes.func,\n 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;;AACA;;;;;;;;AAEO,MAAMA,sBAAsB,GAAG,CAACC,KAAD,EAAQC,OAAR,KAAoB;EACxD,MAAM;IAACC,uBAAD;IAA0BC;EAA1B,IAAqCH,KAA3C;EACA,MAAM;IAACI,IAAD;IAAOC;EAAP,IAAoBJ,OAA1B;EACA,MAAMK,gBAAgB,GAAG,mBAAI,gBAAJ,EAAsBF,IAAtB,CAAzB;EAEA,oBACE,uDACE,6BAAC,mBAAD;IACE,KAAK,EACHF,uBAAuB,GAAGG,SAAS,CAAC,mBAAD,CAAZ,GAAoCA,SAAS,CAAC,gBAAD,CAFxE;IAIE,IAAI,EAAC,SAJP;IAKE,WAAW,EAAE;MACXE,KAAK,EAAE,aADI;MAEXC,YAAY,EAAE,MAFH;MAGXC,eAAe,EAAEH;IAHN,CALf;IAUE,oBAAoB,EAAE,IAAAI,yBAAA,EAAS,YAAWJ,gBAAiB,0BAArC,CAVxB;IAWE,UAAU,EAAC,SAXb;IAYE,IAAI,EAAE;MACJK,QAAQ,EAAE,MADN;MAEJC,MAAM,EAAE;QACNC,IAAI,EAAE,MADA;QAENC,KAAK,EAAE,SAFD;QAGNC,IAAI,EAAE;MAHA;IAFJ,CAZR;IAoBE,OAAO,EAAEZ;EApBX,EADF,CADF;AA0BD,CA/BM;;;AAiCPJ,sBAAsB,CAACiB,YAAvB,GAAsC;EACpCZ,IAAI,EAAEa,iBAAA,CAASC,iBAAT,CAA2Bd,IADG;EAEpCC,SAAS,EAAEY,iBAAA,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AIvBvC,gBAAgB,EAAErB,kBAAA,CAAU4D;EAJL,CAAhB,CAJa;EAUtBpD,OAAO,EAAER,kBAAA,CAAUC,IAVG;EAWtBQ,kBAAkB,EAAET,kBAAA,CAAUC,IAXR;EAYtBS,cAAc,EAAEV,kBAAA,CAAU2D,KAAV,CAAgBE,kBAAA,CAAU9D,SAA1B,CAZM;EAatBY,oBAAoB,EAAEX,kBAAA,CAAU2D,KAAV,CAAgBE,kBAAA,CAAU9D,SAA1B,CAbA;EActBa,YAAY,EAAEZ,kBAAA,CAAU4D,MAdF;EAetB/C,OAAO,EAAEb,kBAAA,CAAU2D,KAAV,CAAgB;IACvBG,QAAQ,EAAE9D,kBAAA,CAAUE,IADG;IAEvB6D,OAAO,EAAE/D,kBAAA,CAAUgE,OAAV,CAAkBhE,kBAAA,CAAU2D,KAAV,CAAgBM,6BAAhB,CAAlB;EAFc,CAAhB,CAfa;EAmBtBnD,OAAO,EAAEd,kBAAA,CAAU2D,KAAV,CAAgBO,eAAA,CAAOnE,SAAvB,CAnBa;EAoBtBgB,WAAW,EAAEf,kBAAA,CAAUE,IApBD;EAqBtBc,aAAa,EAAEhB,kBAAA,CAAUE,IArBH;EAsBtBe,uBAAuB,EAAEjB,kBAAA,CAAUE;AAtBb,CAAxB;eAyBeC,W"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["ContinueLearningButton","props","context","ongoingCoursesAvailable","onClick","skin","translate","primarySkinColor","width","borderRadius","backgroundColor","convert","position","faIcon","name","color","size","contextTypes","Provider","childContextTypes","propTypes","PropTypes","bool","func","SkillDetail","title","skillRef","description","metrics","focused","availableForReview","skillIncludedCourses","filters","sorting","onBackClick","onReviewClick","onContinueLearningClick","score","content","questionsToReview","contentCompleted","showMore","setShowMore","useState","handleShowMore","useCallback","Description","classnames","style","truncate","ProgressBar","undefined","progressBarColor","inlineProgressValueStyle","progressBarWrapper","progress","backgroundContainer","container","backButton","ctaContainer","skillFocusBadge","faSize","wrapperSize","length","showMoreWrapper","ctaWrapper","progressInformationsWrapper","progressTitle","skillCoursesAndQuestionsWrapper","skillInformation","skillInformationNumber","progressInformations","progressInformation","progressInformationNumber","toFixed","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} from 'lodash/fp';\nimport Provider from '../../atom/provider';\nimport Select, {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLink from '../../atom/button-link';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport style from './style.css';\nimport AllCourses from './all-courses';\n\nexport const ContinueLearningButton = (props, context) => {\n const {ongoingCoursesAvailable, onClick} = props;\n const {skin, translate} = context;\n const primarySkinColor = get('common.primary', skin);\n\n return (\n <div>\n <ButtonLink\n label={\n ongoingCoursesAvailable ? translate('continue_learning') : translate('start_learning')\n }\n type=\"primary\"\n customStyle={{\n width: 'fit-content',\n borderRadius: '12px',\n backgroundColor: primarySkinColor\n }}\n hoverBackgroundColor={convert(`hsl(from ${primarySkinColor} h s calc(l*(1 - 0.08)))`)}\n hoverColor=\"#FFFFFF\"\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 skillRef,\n description,\n metrics = {},\n focused,\n availableForReview,\n ongoingCoursesAvailable,\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 }, [showMore, description]);\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={skillRef}>\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label=\"Back\"\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n <div className={style.ctaContainer}>\n <div>\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\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n {score !== undefined ? (\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('skill_chart_side_panel_questions_to_review')}\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.toFixed(1)}%</span>\n </div>\n </>\n )}\n </div>\n </div>\n ) : null}\n <AllCourses content={skillIncludedCourses} filters={filters} sorting={sorting} />\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 skillRef: 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 ongoingCoursesAvailable: PropTypes.bool,\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;;AAC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,CAAU6D,OAAV,CAAkB7D,kBAAA,CAAUwD,KAAV,CAAgBM,6BAAhB,CAAlB;EAFc,CAAhB,CAda;EAkBtBlD,OAAO,EAAEZ,kBAAA,CAAUwD,KAAV,CAAgBO,eAAA,CAAOhE,SAAvB,CAlBa;EAmBtBc,WAAW,EAAEb,kBAAA,CAAUE,IAnBD;EAoBtBY,aAAa,EAAEd,kBAAA,CAAUE,IApBH;EAqBtBa,uBAAuB,EAAEf,kBAAA,CAAUE;AArBb,CAAxB;eAwBeC,W"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coorpacademy/components",
|
|
3
|
-
"version": "11.32.
|
|
3
|
+
"version": "11.32.37-alpha.4+0c1c3b393",
|
|
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": "0c1c3b3938269cf655b47e312db8368097931b0e"
|
|
181
181
|
}
|