@coorpacademy/components 11.40.19 → 11.40.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/es/molecule/cm-popin/index.d.ts.map +1 -1
  2. package/es/molecule/cm-popin/index.js +6 -1
  3. package/es/molecule/cm-popin/index.js.map +1 -1
  4. package/es/template/app-player/player/slides/index.d.ts.map +1 -1
  5. package/es/template/app-player/player/slides/index.js +3 -1
  6. package/es/template/app-player/player/slides/index.js.map +1 -1
  7. package/es/template/app-player/player/slides/style.css +12 -6
  8. package/es/template/certification-detail/index.d.ts +860 -0
  9. package/es/template/certification-detail/index.d.ts.map +1 -1
  10. package/es/template/certification-detail/index.js +8 -3
  11. package/es/template/certification-detail/index.js.map +1 -1
  12. package/es/template/certification-detail/style.css +5 -0
  13. package/es/template/playlist-detail/index.d.ts +860 -0
  14. package/es/template/playlist-detail/index.d.ts.map +1 -1
  15. package/es/template/playlist-detail/index.js +8 -3
  16. package/es/template/playlist-detail/index.js.map +1 -1
  17. package/es/template/playlist-detail/style.css +5 -0
  18. package/es/template/skill-detail/index.d.ts +2 -0
  19. package/es/template/skill-detail/index.d.ts.map +1 -1
  20. package/es/template/skill-detail/index.js +6 -2
  21. package/es/template/skill-detail/index.js.map +1 -1
  22. package/es/template/skill-detail/style.css +4 -1
  23. package/lib/molecule/cm-popin/index.d.ts.map +1 -1
  24. package/lib/molecule/cm-popin/index.js +6 -1
  25. package/lib/molecule/cm-popin/index.js.map +1 -1
  26. package/lib/template/app-player/player/slides/index.d.ts.map +1 -1
  27. package/lib/template/app-player/player/slides/index.js +3 -1
  28. package/lib/template/app-player/player/slides/index.js.map +1 -1
  29. package/lib/template/app-player/player/slides/style.css +12 -6
  30. package/lib/template/certification-detail/index.d.ts +860 -0
  31. package/lib/template/certification-detail/index.d.ts.map +1 -1
  32. package/lib/template/certification-detail/index.js +8 -3
  33. package/lib/template/certification-detail/index.js.map +1 -1
  34. package/lib/template/certification-detail/style.css +5 -0
  35. package/lib/template/playlist-detail/index.d.ts +860 -0
  36. package/lib/template/playlist-detail/index.d.ts.map +1 -1
  37. package/lib/template/playlist-detail/index.js +8 -3
  38. package/lib/template/playlist-detail/index.js.map +1 -1
  39. package/lib/template/playlist-detail/style.css +5 -0
  40. package/lib/template/skill-detail/index.d.ts +2 -0
  41. package/lib/template/skill-detail/index.d.ts.map +1 -1
  42. package/lib/template/skill-detail/index.js +6 -2
  43. package/lib/template/skill-detail/index.js.map +1 -1
  44. package/lib/template/skill-detail/style.css +4 -1
  45. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAgBA,4EAkIC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/template/certification-detail/index.js"],"names":[],"mappings":";AAiBA,4EAwIC"}
@@ -14,6 +14,7 @@ import { SelectOptionPropTypes } from '../../atom/select';
14
14
  import ButtonLinkIcon from '../../atom/button-link-icon';
15
15
  import Icon from '../../atom/icon';
16
16
  import CardsGrid from '../../organism/cards-grid';
17
+ import CMPopin from '../../molecule/cm-popin';
17
18
  import AllCourses from '../skill-detail/all-courses';
18
19
  import { ContinueLearningButton } from '../skill-detail';
19
20
  import ProgressWrapper from '../../molecule/progress-wrapper';
@@ -33,7 +34,8 @@ const CertificationDetail = (props, context) => {
33
34
  diplomaUrl,
34
35
  badgeUrl,
35
36
  search,
36
- metrics = {}
37
+ metrics = {},
38
+ popinWithCards
37
39
  } = props;
38
40
  const descriptionRef = useRef(null);
39
41
  const {
@@ -126,7 +128,9 @@ const CertificationDetail = (props, context) => {
126
128
  filters: filters,
127
129
  "data-name": "certification-courses",
128
130
  search: search
129
- })));
131
+ })), popinWithCards ? /*#__PURE__*/React.createElement("div", {
132
+ className: style.popinWithCards
133
+ }, /*#__PURE__*/React.createElement(CMPopin, popinWithCards)) : null);
130
134
  };
131
135
  CertificationDetail.contextTypes = {
132
136
  skin: Provider.childContextTypes.skin,
@@ -158,7 +162,8 @@ CertificationDetail.propTypes = process.env.NODE_ENV !== "production" ? {
158
162
  search: PropTypes.shape({
159
163
  oldValue: PropTypes.string,
160
164
  onChange: PropTypes.func
161
- })
165
+ }),
166
+ popinWithCards: PropTypes.shape(CMPopin.propTypes)
162
167
  } : {};
163
168
  export default CertificationDetail;
164
169
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["React","useCallback","useEffect","useRef","useState","useMemo","PropTypes","classnames","Markdown","Provider","Tag","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","AllCourses","ContinueLearningButton","ProgressWrapper","style","CertificationDetail","props","context","certificationRef","title","tag","description","certificationCourses","ongoingCoursesAvailable","filters","onBackClick","onContinueLearningClick","logoUrl","diplomaUrl","badgeUrl","search","metrics","descriptionRef","translate","progression","mandatoryModules","stars","totalModules","totalContents","_pipe","_getOr","_size","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","createElement","ref","className","truncate","completedModules","_round","backgroundContainer","container","_isNil","faIcon","onClick","backButton","tooltipPlacement","ctaContainer","logoContainer","logo","src","label","Fragment","showMoreWrapper","iconName","size","faSize","wrapperSize","contentStats","count","subtitle","sections","_compact","type","downloadUrl","content","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","string","isRequired","shape","number","bool","onChange","func","options","arrayOf","oldValue"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useEffect, useRef, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, round, isNil, size, pipe, getOr} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport AllCourses from '../skill-detail/all-courses';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n tag,\n description,\n certificationCourses,\n ongoingCoursesAvailable,\n filters,\n onBackClick,\n onContinueLearningClick,\n logoUrl,\n diplomaUrl,\n badgeUrl,\n search,\n metrics = {}\n } = props;\n const descriptionRef = useRef(null);\n const {translate} = context;\n\n const {\n progression,\n mandatoryModules,\n stars,\n totalModules,\n totalContents = pipe(getOr([], 'list'), size)(certificationCourses)\n } = metrics;\n\n const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n useEffect(() => {\n if (descriptionRef.current) {\n const {clientHeight = 0, scrollHeight = 0} = descriptionRef.current;\n setIsDescriptionTruncated(scrollHeight > clientHeight);\n }\n }, [description]);\n\n const Description = useCallback(() => {\n return (\n <div\n ref={descriptionRef}\n className={classnames(style.description, !showMore && style.truncate)}\n >\n <Markdown>{description}</Markdown>\n </div>\n );\n }, [showMore, description]);\n\n const completedModules = useMemo(\n () => round((mandatoryModules * progression) / 100),\n [mandatoryModules, progression]\n );\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n {!isNil(onBackClick) ? (\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label={translate('back')}\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n ) : null}\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={tag} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {isDescriptionTruncated ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${translate('modules', {count: totalModules})}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedModules={completedModules}\n mandatoryModules={mandatoryModules}\n sections={compact([\n diplomaUrl && {\n type: 'diploma',\n downloadUrl: diplomaUrl\n },\n badgeUrl && {\n type: 'badge',\n downloadUrl: badgeUrl\n },\n stars && {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n content={certificationCourses}\n totalContents={totalContents}\n filters={filters}\n data-name=\"certification-courses\"\n search={search}\n />\n </div>\n </div>\n );\n};\n\nCertificationDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nCertificationDetail.propTypes = {\n title: PropTypes.string.isRequired,\n tag: PropTypes.string,\n certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n mandatoryModules: PropTypes.number,\n totalModules: PropTypes.number,\n totalContents: PropTypes.number\n }),\n diplomaUrl: PropTypes.string,\n badgeUrl: PropTypes.string,\n ongoingCoursesAvailable: PropTypes.bool,\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n search: PropTypes.shape({\n oldValue: PropTypes.string,\n onChange: PropTypes.func\n })\n};\n\nexport default CertificationDetail;\n"],"mappings":";;;;;;AAAA,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E,GAAG,EAAElB,SAAS,CAACwF,MAAM;EACrBxE,gBAAgB,EAAEhB,SAAS,CAACwF,MAAM,CAACC,UAAU;EAC7CtE,WAAW,EAAEnB,SAAS,CAACwF,MAAM,CAACC,UAAU;EACxChE,OAAO,EAAEzB,SAAS,CAACwF,MAAM;EACzB3D,OAAO,EAAE7B,SAAS,CAAC0F,KAAK,CAAC;IACvB1D,WAAW,EAAEhC,SAAS,CAAC2F,MAAM;IAC7BzD,KAAK,EAAElC,SAAS,CAAC2F,MAAM;IACvB1D,gBAAgB,EAAEjC,SAAS,CAAC2F,MAAM;IAClCxD,YAAY,EAAEnC,SAAS,CAAC2F,MAAM;IAC9BvD,aAAa,EAAEpC,SAAS,CAAC2F;EAC3B,CAAC,CAAC;EACFjE,UAAU,EAAE1B,SAAS,CAACwF,MAAM;EAC5B7D,QAAQ,EAAE3B,SAAS,CAACwF,MAAM;EAC1BnE,uBAAuB,EAAErB,SAAS,CAAC4F,IAAI;EACvCxE,oBAAoB,EAAEpB,SAAS,CAAC0F,KAAK,CAAClF,SAAS,CAAC4E,SAAS,CAAC;EAC1D9D,OAAO,EAAEtB,SAAS,CAAC0F,KAAK,CAAC;IACvBG,QAAQ,EAAE7F,SAAS,CAAC8F,IAAI;IACxBC,OAAO,EAAE/F,SAAS,CAACgG,OAAO,CAAChG,SAAS,CAAC0F,KAAK,CAACrF,qBAAqB,CAAC;EACnE,CAAC,CAAC;EACFkB,WAAW,EAAEvB,SAAS,CAAC8F,IAAI;EAC3BtE,uBAAuB,EAAExB,SAAS,CAAC8F,IAAI;EACvClE,MAAM,EAAE5B,SAAS,CAAC0F,KAAK,CAAC;IACtBO,QAAQ,EAAEjG,SAAS,CAACwF,MAAM;IAC1BK,QAAQ,EAAE7F,SAAS,CAAC8F;EACtB,CAAC;AACH,CAAC;AAED,eAAejF,mBAAmB","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["React","useCallback","useEffect","useRef","useState","useMemo","PropTypes","classnames","Markdown","Provider","Tag","SelectOptionPropTypes","ButtonLinkIcon","Icon","CardsGrid","CMPopin","AllCourses","ContinueLearningButton","ProgressWrapper","style","CertificationDetail","props","context","certificationRef","title","tag","description","certificationCourses","ongoingCoursesAvailable","filters","onBackClick","onContinueLearningClick","logoUrl","diplomaUrl","badgeUrl","search","metrics","popinWithCards","descriptionRef","translate","progression","mandatoryModules","stars","totalModules","totalContents","_pipe","_getOr","_size","isDescriptionTruncated","setIsDescriptionTruncated","showMore","setShowMore","handleShowMore","current","clientHeight","scrollHeight","Description","createElement","ref","className","truncate","completedModules","_round","backgroundContainer","container","_isNil","faIcon","onClick","backButton","tooltipPlacement","ctaContainer","logoContainer","logo","src","label","Fragment","showMoreWrapper","iconName","size","faSize","wrapperSize","contentStats","count","subtitle","sections","_compact","type","downloadUrl","content","contextTypes","skin","childContextTypes","propTypes","process","env","NODE_ENV","string","isRequired","shape","number","bool","onChange","func","options","arrayOf","oldValue"],"sources":["../../../src/template/certification-detail/index.js"],"sourcesContent":["import React, {useCallback, useEffect, useRef, useState, useMemo} from 'react';\nimport PropTypes from 'prop-types';\nimport classnames from 'classnames';\nimport {compact, round, isNil, size, pipe, getOr} from 'lodash/fp';\nimport Markdown from 'markdown-to-jsx';\nimport Provider from '../../atom/provider';\nimport Tag from '../../atom/tag';\nimport {SelectOptionPropTypes} from '../../atom/select';\nimport ButtonLinkIcon from '../../atom/button-link-icon';\nimport Icon from '../../atom/icon';\nimport CardsGrid from '../../organism/cards-grid';\nimport CMPopin from '../../molecule/cm-popin';\nimport AllCourses from '../skill-detail/all-courses';\nimport {ContinueLearningButton} from '../skill-detail';\nimport ProgressWrapper from '../../molecule/progress-wrapper';\nimport style from './style.css';\n\nconst CertificationDetail = (props, context) => {\n const {\n certificationRef,\n title,\n tag,\n description,\n certificationCourses,\n ongoingCoursesAvailable,\n filters,\n onBackClick,\n onContinueLearningClick,\n logoUrl,\n diplomaUrl,\n badgeUrl,\n search,\n metrics = {},\n popinWithCards\n } = props;\n const descriptionRef = useRef(null);\n const {translate} = context;\n\n const {\n progression,\n mandatoryModules,\n stars,\n totalModules,\n totalContents = pipe(getOr([], 'list'), size)(certificationCourses)\n } = metrics;\n\n const [isDescriptionTruncated, setIsDescriptionTruncated] = useState(false);\n const [showMore, setShowMore] = useState(false);\n\n const handleShowMore = useCallback(() => setShowMore(!showMore), [setShowMore, showMore]);\n\n useEffect(() => {\n if (descriptionRef.current) {\n const {clientHeight = 0, scrollHeight = 0} = descriptionRef.current;\n setIsDescriptionTruncated(scrollHeight > clientHeight);\n }\n }, [description]);\n\n const Description = useCallback(() => {\n return (\n <div\n ref={descriptionRef}\n className={classnames(style.description, !showMore && style.truncate)}\n >\n <Markdown>{description}</Markdown>\n </div>\n );\n }, [showMore, description]);\n\n const completedModules = useMemo(\n () => round((mandatoryModules * progression) / 100),\n [mandatoryModules, progression]\n );\n\n return (\n <div className={style.backgroundContainer}>\n <div className={style.container} data-name={certificationRef}>\n {!isNil(onBackClick) ? (\n <ButtonLinkIcon\n faIcon=\"arrow-left\"\n data-name=\"back-button\"\n aria-label={translate('back')}\n onClick={onBackClick}\n className={style.backButton}\n tooltipPlacement=\"right\"\n />\n ) : null}\n <div className={style.ctaContainer}>\n <div className={style.logoContainer}>\n <img className={style.logo} src={logoUrl} />\n </div>\n <div>\n <Tag label={tag} />\n <div className={style.title}>{title}</div>\n {description ? (\n <>\n <Description />\n {isDescriptionTruncated ? (\n <div className={style.showMoreWrapper} onClick={handleShowMore}>\n {translate(showMore ? 'Show less' : 'Show more')}\n <Icon\n iconName={showMore ? 'chevron-up' : 'chevron-down'}\n size={{faSize: 14, wrapperSize: 16}}\n />\n </div>\n ) : null}\n </>\n ) : null}\n <div className={style.contentStats}>\n <span>{`${translate('modules', {count: totalModules})}`}</span>\n </div>\n <ContinueLearningButton\n ongoingCoursesAvailable={ongoingCoursesAvailable}\n onClick={onContinueLearningClick}\n />\n </div>\n </div>\n <ProgressWrapper\n title={translate('your_progress')}\n subtitle={translate('certification_progress_wrapper_subtitle')}\n progression={progression}\n completedModules={completedModules}\n mandatoryModules={mandatoryModules}\n sections={compact([\n diplomaUrl && {\n type: 'diploma',\n downloadUrl: diplomaUrl\n },\n badgeUrl && {\n type: 'badge',\n downloadUrl: badgeUrl\n },\n stars && {\n type: 'stars',\n stars\n }\n ])}\n />\n <AllCourses\n content={certificationCourses}\n totalContents={totalContents}\n filters={filters}\n data-name=\"certification-courses\"\n search={search}\n />\n </div>\n {popinWithCards ? (\n <div className={style.popinWithCards}>\n <CMPopin {...popinWithCards} />\n </div>\n ) : null}\n </div>\n );\n};\n\nCertificationDetail.contextTypes = {\n skin: Provider.childContextTypes.skin,\n translate: Provider.childContextTypes.translate\n};\n\nCertificationDetail.propTypes = {\n title: PropTypes.string.isRequired,\n tag: PropTypes.string,\n certificationRef: PropTypes.string.isRequired,\n description: PropTypes.string.isRequired,\n logoUrl: PropTypes.string,\n metrics: PropTypes.shape({\n progression: PropTypes.number,\n stars: PropTypes.number,\n mandatoryModules: PropTypes.number,\n totalModules: PropTypes.number,\n totalContents: PropTypes.number\n }),\n diplomaUrl: PropTypes.string,\n badgeUrl: PropTypes.string,\n ongoingCoursesAvailable: PropTypes.bool,\n certificationCourses: PropTypes.shape(CardsGrid.propTypes),\n filters: PropTypes.shape({\n onChange: PropTypes.func,\n options: PropTypes.arrayOf(PropTypes.shape(SelectOptionPropTypes))\n }),\n onBackClick: PropTypes.func,\n onContinueLearningClick: PropTypes.func,\n search: PropTypes.shape({\n oldValue: PropTypes.string,\n onChange: PropTypes.func\n }),\n popinWithCards: PropTypes.shape(CMPopin.propTypes)\n};\n\nexport default CertificationDetail;\n"],"mappings":";;;;;;AAAA,OAAOA,KAAK,IAAGC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,QAAO,OAAO;AAC9E,OAAOC,SAAS,MAAM,YAAY;AAClC,OAAOC,UAAU,MAAM,YAAY;AAEnC,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,OAA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reList":[]}
@@ -107,6 +107,11 @@
107
107
  color: cm_grey_400;
108
108
  }
109
109
 
110
+ .popinWithCards {
111
+ position: relative;
112
+ z-index: 7;
113
+ }
114
+
110
115
  @media tablet {
111
116
  .ctaContainer {
112
117
  flex-direction: column;